aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJocelyn Falempe <jfalempe@redhat.com>2025-06-24 11:01:13 +0200
committerMaarten Lankhorst <dev@lankhorst.se>2025-06-27 11:48:22 +0200
commit796f437d7bc9ff0a5099fa2b8018c9736877555b (patch)
tree752c107fa962e74f5f6f8e095ce127b6e9e9efa9
parentdrm/i915/display/i9xx: Add a disable_tiling() for i9xx planes (diff)
downloadlinux-796f437d7bc9ff0a5099fa2b8018c9736877555b.tar.gz
linux-796f437d7bc9ff0a5099fa2b8018c9736877555b.zip
drm/i915/display: Add a disable_tiling() for skl planes
drm_panic draws in linear framebuffer, so it's easier to re-use the current framebuffer, and disable tiling in the panic handler, to show the panic screen. This assumes that the alignment restriction is always smaller in linear than in tiled. It also assumes that the linear framebuffer size is always smaller than the tiled. Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com> Link: https://lore.kernel.org/r/20250624091501.257661-5-jfalempe@redhat.com Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
-rw-r--r--drivers/gpu/drm/i915/display/skl_universal_plane.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c b/drivers/gpu/drm/i915/display/skl_universal_plane.c
index 68f18f18bacd..1ba04f1b3ec0 100644
--- a/drivers/gpu/drm/i915/display/skl_universal_plane.c
+++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c
@@ -2791,6 +2791,25 @@ static u8 tgl_plane_caps(struct intel_display *display,
return caps;
}
+static void skl_disable_tiling(struct intel_plane *plane)
+{
+ struct intel_plane_state *state = to_intel_plane_state(plane->base.state);
+ struct intel_display *display = to_intel_display(plane);
+ u32 stride = state->view.color_plane[0].scanout_stride / 64;
+ u32 plane_ctl;
+
+ plane_ctl = intel_de_read(display, PLANE_CTL(plane->pipe, plane->id));
+ plane_ctl &= ~PLANE_CTL_TILED_MASK;
+
+ intel_de_write_fw(display, PLANE_STRIDE(plane->pipe, plane->id),
+ PLANE_STRIDE_(stride));
+
+ intel_de_write_fw(display, PLANE_CTL(plane->pipe, plane->id), plane_ctl);
+
+ intel_de_write_fw(display, PLANE_SURF(plane->pipe, plane->id),
+ skl_plane_surf(state, 0));
+}
+
struct intel_plane *
skl_universal_plane_create(struct intel_display *display,
enum pipe pipe, enum plane_id plane_id)
@@ -2837,6 +2856,7 @@ skl_universal_plane_create(struct intel_display *display,
plane->max_height = skl_plane_max_height;
plane->min_cdclk = skl_plane_min_cdclk;
}
+ plane->disable_tiling = skl_disable_tiling;
if (DISPLAY_VER(display) >= 13)
plane->max_stride = adl_plane_max_stride;