Skip to content

drm/ttm: Cleanup state in global ttm structures

Brian Yip dri-devel lkml 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 0 repliesNew
  2. v13 patches 1 replySuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2drm/ttm: Reset ttm_mem_global when initializeddrivers/gpu/drm/ttm/ttm_memory.c+2 -00 replies
2/2drm/ttm: Reset ttm_bo_glob when initializeddrivers/gpu/drm/ttm/ttm_bo.c+5 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/2] drm/ttm: Cleanup state in global ttm structures

State in global ttm structures was not properly reset on cleanup.

In the scenario where multiple drm drivers are loaded and the first one fails to initialize, there is an attempt to reset the global state in the ttm structures. However, there were some attributes which were not properly reset during this process. This resulted in a crash and false positive kobj initialization warnings during subsequent initialization of these global structures.

Fix the crash and false positive kobj initialization warnings.

---
Changes in v2:

State in global ttm structures is reset by means of zeroing memory in global structure initialization functions rather than checking reference counters in their corresponding release functions.

Brian Yip (2):
drm/ttm: Reset ttm_mem_global when initialized
drm/ttm: Reset ttm_bo_glob when initialized

 drivers/gpu/drm/ttm/ttm_bo.c     | 6 +++++-
 drivers/gpu/drm/ttm/ttm_memory.c | 2 ++
 2 files changed, 7 insertions(+), 1 deletion(-)
Signature · 1 line
2.20.1