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 <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
This commit is contained in:
Jani Nikula 2025-05-07 12:38:34 +03:00
parent 5779b26aaf
commit bfd43f9d1e
2 changed files with 13 additions and 7 deletions

View 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;
xe->display.hotplug.dp_wq = alloc_ordered_workqueue("xe-dp", 0);
spin_lock_init(&display->fb_tracking.lock);
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);

View 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;
}