summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2025-05-16 15:17:00 +0300
committerJani Nikula <jani.nikula@intel.com>2025-05-20 20:55:23 +0300
commit5a9f299f956ef9764f56044cfca7aafa23cea1d1 (patch)
tree83219bbb183655f73e585949b21a3dd646997168
parent7e49ab36e6f3fb6edc250609ece1548bf80c50cc (diff)
downloadlinux-5a9f299f956ef9764f56044cfca7aafa23cea1d1.tar.gz
linux-5a9f299f956ef9764f56044cfca7aafa23cea1d1.zip
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>
-rw-r--r--drivers/gpu/drm/xe/display/xe_display.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c
index 8b2aa7dc6e07..1e59b6dd2c3b 100644
--- a/drivers/gpu/drm/xe/display/xe_display.c
+++ b/drivers/gpu/drm/xe/display/xe_display.c
@@ -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) {