aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
diff options
context:
space:
mode:
authorDaniel Vetter <[email protected]>2020-09-09 12:07:45 +0000
committerDaniel Vetter <[email protected]>2020-09-11 08:47:19 +0000
commitbcc0ef7f57e51e5a5607eafb2a8ab63c6c1f21ff (patch)
tree0db03301419a3a87a55650bc6037c36ca3d79c69 /drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
parentdrm/aspeed: Use managed drmm_mode_config_cleanup (diff)
downloadkernel-bcc0ef7f57e51e5a5607eafb2a8ab63c6c1f21ff.tar.gz
kernel-bcc0ef7f57e51e5a5607eafb2a8ab63c6c1f21ff.zip
drm/vgem: Use devm_drm_dev_alloc
This means we also need to slightly restructure the exit code, so that final cleanup of the drm_device is triggered by unregistering the platform device. Note that devres is both clean up when the driver is unbound (not the case for vgem, we don't bind), and also when unregistering the device (very much the case for vgem). Therefore we can rely on devres even though vgem isn't a proper platform device driver. This also somewhat untangles the load code, since the drm and platform device setup are no longer interleaved, but two distinct steps. v2: use devres_open/release_group so we can use devm without real hacks in the driver core or having to create an entire fake bus for testing drivers. Might want to extract this into helpers eventually, maybe as a mock_drm_dev_alloc or test_drm_dev_alloc. v3: Fix error code handling (Melissa) Cc: Melissa Wen <[email protected]> Reviewed-by: Melissa Wen <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Emil Velikov <[email protected]> Cc: Sean Paul <[email protected]> Cc: Chris Wilson <[email protected]> Cc: Sam Ravnborg <[email protected]> Cc: Rob Clark <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.c')
0 files changed, 0 insertions, 0 deletions