mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-06 07:55:28 -04:00
drm/xe/display: use xe->display to decide whether to do anything
Since we only initialize xe->display when xe->info.probe_display, we can use !xe->display to bail out early. This seems cleaner and more accurate than relying on xe->info.probe_display, since xe->display may indeed be NULL. Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: https://lore.kernel.org/r/945d2a987214044a81f4816684972961b772b45a.1747397638.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
@@ -92,7 +92,7 @@ static void xe_display_fini_early(void *arg)
|
||||
struct xe_device *xe = arg;
|
||||
struct intel_display *display = xe->display;
|
||||
|
||||
if (!xe->info.probe_display)
|
||||
if (!display)
|
||||
return;
|
||||
|
||||
intel_display_driver_remove_nogem(display);
|
||||
@@ -106,7 +106,7 @@ int xe_display_init_early(struct xe_device *xe)
|
||||
struct intel_display *display = xe->display;
|
||||
int err;
|
||||
|
||||
if (!xe->info.probe_display)
|
||||
if (!display)
|
||||
return 0;
|
||||
|
||||
/* Fake uncore lock */
|
||||
@@ -160,7 +160,7 @@ int xe_display_init(struct xe_device *xe)
|
||||
struct intel_display *display = xe->display;
|
||||
int err;
|
||||
|
||||
if (!xe->info.probe_display)
|
||||
if (!display)
|
||||
return 0;
|
||||
|
||||
err = intel_display_driver_probe(display);
|
||||
@@ -174,7 +174,7 @@ void xe_display_register(struct xe_device *xe)
|
||||
{
|
||||
struct intel_display *display = xe->display;
|
||||
|
||||
if (!xe->info.probe_display)
|
||||
if (!display)
|
||||
return;
|
||||
|
||||
intel_display_driver_register(display);
|
||||
@@ -185,7 +185,7 @@ void xe_display_unregister(struct xe_device *xe)
|
||||
{
|
||||
struct intel_display *display = xe->display;
|
||||
|
||||
if (!xe->info.probe_display)
|
||||
if (!display)
|
||||
return;
|
||||
|
||||
intel_power_domains_disable(display);
|
||||
@@ -198,7 +198,7 @@ void xe_display_irq_handler(struct xe_device *xe, u32 master_ctl)
|
||||
{
|
||||
struct intel_display *display = xe->display;
|
||||
|
||||
if (!xe->info.probe_display)
|
||||
if (!display)
|
||||
return;
|
||||
|
||||
if (master_ctl & DISPLAY_IRQ)
|
||||
@@ -209,7 +209,7 @@ void xe_display_irq_enable(struct xe_device *xe, u32 gu_misc_iir)
|
||||
{
|
||||
struct intel_display *display = xe->display;
|
||||
|
||||
if (!xe->info.probe_display)
|
||||
if (!display)
|
||||
return;
|
||||
|
||||
if (gu_misc_iir & GU_MISC_GSE)
|
||||
@@ -220,7 +220,7 @@ void xe_display_irq_reset(struct xe_device *xe)
|
||||
{
|
||||
struct intel_display *display = xe->display;
|
||||
|
||||
if (!xe->info.probe_display)
|
||||
if (!display)
|
||||
return;
|
||||
|
||||
gen11_display_irq_reset(display);
|
||||
@@ -230,7 +230,7 @@ void xe_display_irq_postinstall(struct xe_device *xe, struct xe_gt *gt)
|
||||
{
|
||||
struct intel_display *display = xe->display;
|
||||
|
||||
if (!xe->info.probe_display)
|
||||
if (!display)
|
||||
return;
|
||||
|
||||
if (gt->info.id == XE_GT0)
|
||||
@@ -271,7 +271,7 @@ static void xe_display_enable_d3cold(struct xe_device *xe)
|
||||
{
|
||||
struct intel_display *display = xe->display;
|
||||
|
||||
if (!xe->info.probe_display)
|
||||
if (!display)
|
||||
return;
|
||||
|
||||
/*
|
||||
@@ -294,7 +294,7 @@ static void xe_display_disable_d3cold(struct xe_device *xe)
|
||||
{
|
||||
struct intel_display *display = xe->display;
|
||||
|
||||
if (!xe->info.probe_display)
|
||||
if (!display)
|
||||
return;
|
||||
|
||||
intel_dmc_resume(display);
|
||||
@@ -319,7 +319,7 @@ void xe_display_pm_suspend(struct xe_device *xe)
|
||||
struct intel_display *display = xe->display;
|
||||
bool s2idle = suspend_to_idle();
|
||||
|
||||
if (!xe->info.probe_display)
|
||||
if (!display)
|
||||
return;
|
||||
|
||||
/*
|
||||
@@ -353,7 +353,7 @@ void xe_display_pm_shutdown(struct xe_device *xe)
|
||||
{
|
||||
struct intel_display *display = xe->display;
|
||||
|
||||
if (!xe->info.probe_display)
|
||||
if (!display)
|
||||
return;
|
||||
|
||||
intel_power_domains_disable(display);
|
||||
@@ -384,7 +384,7 @@ void xe_display_pm_runtime_suspend(struct xe_device *xe)
|
||||
{
|
||||
struct intel_display *display = xe->display;
|
||||
|
||||
if (!xe->info.probe_display)
|
||||
if (!display)
|
||||
return;
|
||||
|
||||
if (xe->d3cold.allowed) {
|
||||
@@ -400,7 +400,7 @@ void xe_display_pm_suspend_late(struct xe_device *xe)
|
||||
struct intel_display *display = xe->display;
|
||||
bool s2idle = suspend_to_idle();
|
||||
|
||||
if (!xe->info.probe_display)
|
||||
if (!display)
|
||||
return;
|
||||
|
||||
intel_display_power_suspend_late(display, s2idle);
|
||||
@@ -410,7 +410,7 @@ void xe_display_pm_runtime_suspend_late(struct xe_device *xe)
|
||||
{
|
||||
struct intel_display *display = xe->display;
|
||||
|
||||
if (!xe->info.probe_display)
|
||||
if (!display)
|
||||
return;
|
||||
|
||||
if (xe->d3cold.allowed)
|
||||
@@ -428,7 +428,7 @@ void xe_display_pm_shutdown_late(struct xe_device *xe)
|
||||
{
|
||||
struct intel_display *display = xe->display;
|
||||
|
||||
if (!xe->info.probe_display)
|
||||
if (!display)
|
||||
return;
|
||||
|
||||
/*
|
||||
@@ -443,7 +443,7 @@ void xe_display_pm_resume_early(struct xe_device *xe)
|
||||
{
|
||||
struct intel_display *display = xe->display;
|
||||
|
||||
if (!xe->info.probe_display)
|
||||
if (!display)
|
||||
return;
|
||||
|
||||
intel_display_power_resume_early(display);
|
||||
@@ -453,7 +453,7 @@ void xe_display_pm_resume(struct xe_device *xe)
|
||||
{
|
||||
struct intel_display *display = xe->display;
|
||||
|
||||
if (!xe->info.probe_display)
|
||||
if (!display)
|
||||
return;
|
||||
|
||||
intel_dmc_resume(display);
|
||||
@@ -488,7 +488,7 @@ void xe_display_pm_runtime_resume(struct xe_device *xe)
|
||||
{
|
||||
struct intel_display *display = xe->display;
|
||||
|
||||
if (!xe->info.probe_display)
|
||||
if (!display)
|
||||
return;
|
||||
|
||||
if (xe->d3cold.allowed) {
|
||||
|
||||
Reference in New Issue
Block a user