Skip to content

Commit

Permalink
drm/xe/display: Drop xe_display_driver_remove()
Browse files Browse the repository at this point in the history
Handle it as part of xe_display_fini(). The error handling was already
calling it if a step after xe_display_init() failed. Just re-use the
same xe_display_fini() for driver remove.

Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250222001051.3012936-8-lucas.demarchi@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
  • Loading branch information
Lucas De Marchi committed Feb 25, 2025
1 parent d01bdc0 commit d41d048
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 17 deletions.
11 changes: 1 addition & 10 deletions drivers/gpu/drm/xe/display/xe_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ static void xe_display_fini(void *arg)
intel_hpd_poll_fini(xe);
intel_hdcp_component_fini(display);
intel_audio_deinit(xe);
intel_display_driver_remove(display);
}

int xe_display_init(struct xe_device *xe)
Expand Down Expand Up @@ -209,16 +210,6 @@ void xe_display_unregister(struct xe_device *xe)
intel_display_driver_unregister(display);
}

void xe_display_driver_remove(struct xe_device *xe)
{
struct intel_display *display = &xe->display;

if (!xe->info.probe_display)
return;

intel_display_driver_remove(display);
}

/* IRQ-related functions */

void xe_display_irq_handler(struct xe_device *xe, u32 master_ctl)
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/xe/display/xe_display.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ struct drm_driver;

bool xe_display_driver_probe_defer(struct pci_dev *pdev);
void xe_display_driver_set_hooks(struct drm_driver *driver);
void xe_display_driver_remove(struct xe_device *xe);

int xe_display_create(struct xe_device *xe);

Expand Down
8 changes: 2 additions & 6 deletions drivers/gpu/drm/xe/xe_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -868,11 +868,11 @@ int xe_device_probe(struct xe_device *xe)

err = xe_pxp_init(xe);
if (err)
goto err_remove_display;
return err;

err = drm_dev_register(&xe->drm, 0);
if (err)
goto err_remove_display;
return err;

xe_display_register(xe);

Expand All @@ -899,8 +899,6 @@ int xe_device_probe(struct xe_device *xe)

err_unregister_display:
xe_display_unregister(xe);
err_remove_display:
xe_display_driver_remove(xe);

return err;
}
Expand All @@ -911,8 +909,6 @@ void xe_device_remove(struct xe_device *xe)

drm_dev_unplug(&xe->drm);

xe_display_driver_remove(xe);

xe_heci_gsc_fini(xe);
}

Expand Down

0 comments on commit d41d048

Please sign in to comment.