Skip to content

Commit

Permalink
drm/xe/display: move display fini stuff to devm
Browse files Browse the repository at this point in the history
Match the i915 display handling here with calling both no_irq and
noaccel when removing the device.

Signed-off-by: Matthew Auld <[email protected]>
Cc: Andrzej Hajda <[email protected]>
Cc: Rodrigo Vivi <[email protected]>
Reviewed-by: Andrzej Hajda <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
  • Loading branch information
matt-auld committed May 22, 2024
1 parent c711741 commit 5b6937b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions drivers/gpu/drm/xe/display/xe_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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)
Expand Down

0 comments on commit 5b6937b

Please sign in to comment.