diff options
author | Matthew Auld <matthew.auld@intel.com> | 2024-05-22 11:21:59 +0100 |
---|---|---|
committer | Matthew Auld <matthew.auld@intel.com> | 2024-05-22 13:22:40 +0100 |
commit | 5b6937b65e45e31af56a5bba47f69acc550acf26 (patch) | |
tree | 15f10afde0b28af553d46b414b3c60315496d86c /drivers/gpu | |
parent | c7117419784f612d59ee565145f722e8b5541fe6 (diff) | |
download | lwn-5b6937b65e45e31af56a5bba47f69acc550acf26.tar.gz lwn-5b6937b65e45e31af56a5bba47f69acc550acf26.zip |
drm/xe/display: move display fini stuff to devm
Match the i915 display handling here with calling both no_irq and
noaccel when removing the device.
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Andrzej Hajda <andrzej.hajda@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240522102143.128069-34-matthew.auld@intel.com
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/xe/display/xe_display.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c index 63b27fbcdaca..89701ca841fc 100644 --- a/drivers/gpu/drm/xe/display/xe_display.c +++ b/drivers/gpu/drm/xe/display/xe_display.c @@ -135,9 +135,9 @@ int xe_display_init_nommio(struct xe_device *xe) return drmm_add_action_or_reset(&xe->drm, xe_display_fini_nommio, xe); } -static void xe_display_fini_noirq(struct drm_device *dev, void *dummy) +static void xe_display_fini_noirq(void *arg) { - struct xe_device *xe = to_xe_device(dev); + struct xe_device *xe = arg; if (!xe->info.enable_display) return; @@ -172,12 +172,12 @@ int xe_display_init_noirq(struct xe_device *xe) if (err) return err; - return drmm_add_action_or_reset(&xe->drm, xe_display_fini_noirq, NULL); + return devm_add_action_or_reset(xe->drm.dev, xe_display_fini_noirq, xe); } -static void xe_display_fini_noaccel(struct drm_device *dev, void *dummy) +static void xe_display_fini_noaccel(void *arg) { - struct xe_device *xe = to_xe_device(dev); + struct xe_device *xe = arg; if (!xe->info.enable_display) return; @@ -196,7 +196,7 @@ int xe_display_init_noaccel(struct xe_device *xe) if (err) return err; - return drmm_add_action_or_reset(&xe->drm, xe_display_fini_noaccel, NULL); + return devm_add_action_or_reset(xe->drm.dev, xe_display_fini_noaccel, xe); } int xe_display_init(struct xe_device *xe) |