mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-22 07:27:12 +08:00
drm/atomic: Add dev pointer to drm_private_obj
All the objects that need to implement some callbacks in KMS have a pointer in there structure to the main drm_device. However, it's not the case for drm_private_objs, which makes it harder than it needs to be to implement some of its callbacks. Let's add that pointer. Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Tested-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Link: https://patch.msgid.link/20251014-drm-private-obj-reset-v2-1-6dd60e985e9d@kernel.org Signed-off-by: Maxime Ripard <mripard@kernel.org>
This commit is contained in:
@@ -906,6 +906,7 @@ drm_atomic_private_obj_init(struct drm_device *dev,
|
||||
|
||||
drm_modeset_lock_init(&obj->lock);
|
||||
|
||||
obj->dev = dev;
|
||||
obj->state = state;
|
||||
obj->funcs = funcs;
|
||||
list_add_tail(&obj->head, &dev->mode_config.privobj_list);
|
||||
|
||||
@@ -339,6 +339,11 @@ struct drm_private_state_funcs {
|
||||
* drm_atomic_helper_wait_for_dependencies().
|
||||
*/
|
||||
struct drm_private_obj {
|
||||
/**
|
||||
* @dev: parent DRM device
|
||||
*/
|
||||
struct drm_device *dev;
|
||||
|
||||
/**
|
||||
* @head: List entry used to attach a private object to a &drm_device
|
||||
* (queued to &drm_mode_config.privobj_list).
|
||||
|
||||
Reference in New Issue
Block a user