From: Jani Nikula Date: Wed, 7 May 2025 09:38:34 +0000 (+0300) Subject: drm/xe/display: do not reference xe->display inline X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bfd43f9d1e858667f34fd5d7e6dafa5ba97986be;p=thirdparty%2Flinux.git drm/xe/display: do not reference xe->display inline Always use a local variable for display instead of referencing xe->display inline. This makes it easier to convert xe->display into a pointer. Reviewed-by: Gustavo Sousa Signed-off-by: Jani Nikula Link: https://lore.kernel.org/r/c99483ad86022d02f780bac73445baaf27a6edce.1746610601.git.jani.nikula@intel.com --- diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c index 68f064f33d4b8..b8030492fbd10 100644 --- a/drivers/gpu/drm/xe/display/xe_display.c +++ b/drivers/gpu/drm/xe/display/xe_display.c @@ -38,7 +38,9 @@ static bool has_display(struct xe_device *xe) { - return HAS_DISPLAY(&xe->display); + struct intel_display *display = &xe->display; + + return HAS_DISPLAY(display); } /** @@ -84,8 +86,9 @@ static void unset_display_features(struct xe_device *xe) static void display_destroy(struct drm_device *dev, void *dummy) { struct xe_device *xe = to_xe_device(dev); + struct intel_display *display = &xe->display; - destroy_workqueue(xe->display.hotplug.dp_wq); + destroy_workqueue(display->hotplug.dp_wq); } /** @@ -101,9 +104,11 @@ static void display_destroy(struct drm_device *dev, void *dummy) */ int xe_display_create(struct xe_device *xe) { - spin_lock_init(&xe->display.fb_tracking.lock); + struct intel_display *display = &xe->display; + + spin_lock_init(&display->fb_tracking.lock); - xe->display.hotplug.dp_wq = alloc_ordered_workqueue("xe-dp", 0); + display->hotplug.dp_wq = alloc_ordered_workqueue("xe-dp", 0); return drmm_add_action_or_reset(&xe->drm, display_destroy, NULL); } @@ -362,7 +367,7 @@ void xe_display_pm_suspend(struct xe_device *xe) if (has_display(xe)) { intel_display_driver_suspend_access(display); - intel_encoder_suspend_all(&xe->display); + intel_encoder_suspend_all(display); } intel_opregion_suspend(display, s2idle ? PCI_D1 : PCI_D3cold); diff --git a/drivers/gpu/drm/xe/display/xe_fb_pin.c b/drivers/gpu/drm/xe/display/xe_fb_pin.c index d918ae1c80618..e95ca979e1fe3 100644 --- a/drivers/gpu/drm/xe/display/xe_fb_pin.c +++ b/drivers/gpu/drm/xe/display/xe_fb_pin.c @@ -389,6 +389,7 @@ static bool reuse_vma(struct intel_plane_state *new_plane_state, { struct intel_framebuffer *fb = to_intel_framebuffer(new_plane_state->hw.fb); struct xe_device *xe = to_xe_device(fb->base.dev); + struct intel_display *display = &xe->display; struct i915_vma *vma; if (old_plane_state->hw.fb == new_plane_state->hw.fb && @@ -399,8 +400,8 @@ static bool reuse_vma(struct intel_plane_state *new_plane_state, goto found; } - if (fb == intel_fbdev_framebuffer(xe->display.fbdev.fbdev)) { - vma = intel_fbdev_vma_pointer(xe->display.fbdev.fbdev); + if (fb == intel_fbdev_framebuffer(display->fbdev.fbdev)) { + vma = intel_fbdev_vma_pointer(display->fbdev.fbdev); if (vma) goto found; }