linux/drivers/gpu/drm/vkms
Daniel Vetter 53d77aaa3f drm/vkms: 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 vkms, we don't bind), and also when unregistering
the device (very much the case for vkms). Therefore we can rely on devres
even though vkms 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: Only deref vkms_device after checking it (Melissa)

Reviewed-by: Melissa Wen <melissa.srw@gmail.com>
Cc: Melissa Wen <melissa.srw@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Cc: Haneen Mohammed <hamohammed.sa@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20200909091833.440548-1-daniel.vetter@ffwll.ch
2020-09-11 10:47:19 +02:00
..
Makefile drm/vkms: Add support for writeback 2020-09-07 17:03:48 -04:00
vkms_composer.c drm/vkms: Add support for writeback 2020-09-07 17:03:48 -04:00
vkms_crtc.c drm/vkms: avoid warning in vkms_get_vblank_timestamp 2020-08-30 09:27:06 -04:00
vkms_drv.c drm/vkms: Use devm_drm_dev_alloc 2020-09-11 10:47:19 +02:00
vkms_drv.h drm/vkms: Add support for writeback 2020-09-07 17:03:48 -04:00
vkms_gem.c drm/vkms: remove _unlocked suffix in drm_gem_object_put_unlocked 2020-05-19 22:31:36 +01:00
vkms_output.c drm/vkms: Add support for writeback 2020-09-07 17:03:48 -04:00
vkms_plane.c drm/vkms: plane_state->fb iff plane_state->crtc 2020-01-28 15:43:32 +01:00
vkms_writeback.c drm/vkms: Add support for writeback 2020-09-07 17:03:48 -04:00