AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Use implicit kref infra
@ 2020-09-02  1:06 Luben Tuikov
  2020-09-02  1:06 ` [PATCH 1/3] drm: No warn for drivers who provide release Luben Tuikov
                   ` (3 more replies)
  0 siblings, 4 replies; 21+ messages in thread
From: Luben Tuikov @ 2020-09-02  1:06 UTC (permalink / raw)
  To: amd-gfx, dri-devel
  Cc: Alexander Deucher, Luben Tuikov, Xinhui.Pan, Daniel Vetter

Use the implicit kref infrastructure to free the container
struct amdgpu_device, container of struct drm_device.

First, in drm_dev_register(), do not indiscriminately warn
when a DRM driver hasn't opted for managed.final_kfree,
but instead check if the driver has provided its own
"release" function callback in the DRM driver structure.
If that is the case, no warning.

Remove drmm_add_final_kfree(). We take care of that, in the
kref "release" callback when all refs are down to 0, via
drm_dev_put(), i.e. the free is implicit.

Remove superfluous NULL check, since the DRM device to be
suspended always exists, so long as the underlying PCI and
DRM devices exist.

Luben Tuikov (3):
  drm: No warn for drivers who provide release
  drm/amdgpu: Remove drmm final free
  drm/amdgpu: Remove superfluous NULL check

 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c    | 2 --
 drivers/gpu/drm/drm_drv.c                  | 3 ++-
 3 files changed, 2 insertions(+), 6 deletions(-)

-- 
2.28.0.394.ge197136389

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2020-09-03 18:52 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-02  1:06 [PATCH 0/3] Use implicit kref infra Luben Tuikov
2020-09-02  1:06 ` [PATCH 1/3] drm: No warn for drivers who provide release Luben Tuikov
2020-09-02  1:06 ` [PATCH 2/3] drm/amdgpu: Remove drmm final free Luben Tuikov
2020-09-02  1:06 ` [PATCH 3/3] drm/amdgpu: Remove superfluous NULL check Luben Tuikov
2020-09-02  6:59   ` Daniel Vetter
2020-09-02  7:21     ` Christian König
2020-09-02  1:42 ` [PATCH 0/3] Use implicit kref infra Pan, Xinhui
2020-09-02  3:46   ` Luben Tuikov
2020-09-02  4:43     ` Pan, Xinhui
2020-09-02 14:50       ` Luben Tuikov
2020-09-02 15:00         ` Daniel Stone
2020-09-02 15:16           ` Luben Tuikov
2020-09-02 15:51             ` Daniel Stone
2020-09-02 19:04               ` Luben Tuikov
2020-09-02 19:16                 ` Alex Deucher
2020-09-02 19:55                   ` Daniel Vetter
2020-09-02 19:59                     ` Daniel Vetter
2020-09-03  1:57         ` Pan, Xinhui
2020-09-03 18:52           ` Luben Tuikov
2020-09-02  6:52     ` Daniel Vetter
2020-09-02 14:59       ` Luben Tuikov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox