]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/xe/display: do not reference xe->display inline
authorJani Nikula <jani.nikula@intel.com>
Wed, 7 May 2025 09:38:34 +0000 (12:38 +0300)
committerJani Nikula <jani.nikula@intel.com>
Fri, 16 May 2025 08:15:09 +0000 (11:15 +0300)
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 <gustavo.sousa@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://lore.kernel.org/r/c99483ad86022d02f780bac73445baaf27a6edce.1746610601.git.jani.nikula@intel.com
drivers/gpu/drm/xe/display/xe_display.c
drivers/gpu/drm/xe/display/xe_fb_pin.c

index 68f064f33d4b87d868100b4fea5fc69199196f3b..b8030492fbd10426ed4b15e5f431c36365e09c8a 100644 (file)
@@ -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);
index d918ae1c806182b3953b0bc4f40d6d7fe044eff1..e95ca979e1fe3cfc37641bc05c00a288460cf7f2 100644 (file)
@@ -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;
        }