path: root/drivers/gpu/drm/arm/malidp_drv.c
diff options
authorChris Wilson <>2017-02-02 09:36:32 +0000
committerDaniel Vetter <>2017-02-02 15:58:06 +0100
commitf30c92576af4bb155d26429540aae95e0a256ce2 (patch)
treec70d80092e2d9d19a937f1b862f14be0a0c95cbe /drivers/gpu/drm/arm/malidp_drv.c
parent8aaacbc0e5c729baa1dbae26f77755c96a23096e (diff)
drm: Provide a driver hook for drm_dev_release()
Some state is coupled into the device lifetime outside of the load/unload timeframe and requires teardown during final unreference from drm_dev_release(). For example, dmabufs hold both a device and module reference and may live longer than expected (i.e. the current pattern of the driver tearing down its state and then releasing a reference to the drm device) and yet touch driver private state when destroyed. v2: Export drm_dev_fini() and move the responsibility for finalizing the drm_device and freeing it to the release callback. (If no callback is provided, the core will call drm_dev_fini() and kfree(dev) as before.) v3: Remember to add drm_dev_fini() to drm_drv.h v4: Tidy language for kerneldoc v5: Cross reference from drm_dev_init() to note that driver->release() allows for arbitrary embedding. v6: Refer to driver data rather than driver state, as state is now becoming associated with the struct drm_atomic_state and friends. Signed-off-by: Chris Wilson <> Cc: Laurent Pinchart <> Cc: Daniel Vetter <> Reviewed-by: Laurent Pinchart <> [danvet: Use the proper reference for struct members, which is &drm_driver.release.] Signed-off-by: Daniel Vetter <> Link:
Diffstat (limited to 'drivers/gpu/drm/arm/malidp_drv.c')
0 files changed, 0 insertions, 0 deletions