Commit 5b6937b6 authored by Matthew Auld's avatar Matthew Auld

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: default avatarMatthew Auld <matthew.auld@intel.com>
Cc: Andrzej Hajda <andrzej.hajda@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: default avatarAndrzej Hajda <andrzej.hajda@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240522102143.128069-34-matthew.auld@intel.com
parent c7117419
...@@ -135,9 +135,9 @@ int xe_display_init_nommio(struct xe_device *xe) ...@@ -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); 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) if (!xe->info.enable_display)
return; return;
...@@ -172,12 +172,12 @@ int xe_display_init_noirq(struct xe_device *xe) ...@@ -172,12 +172,12 @@ int xe_display_init_noirq(struct xe_device *xe)
if (err) if (err)
return 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) if (!xe->info.enable_display)
return; return;
...@@ -196,7 +196,7 @@ int xe_display_init_noaccel(struct xe_device *xe) ...@@ -196,7 +196,7 @@ int xe_display_init_noaccel(struct xe_device *xe)
if (err) if (err)
return 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) int xe_display_init(struct xe_device *xe)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment