From: Jocelyn Falempe <jfalempe@redhat.com>
To: "Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Jani Nikula" <jani.nikula@linux.intel.com>,
"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
"Joonas Lahtinen" <joonas.lahtinen@linux.intel.com>,
"Tvrtko Ursulin" <tursulin@ursulin.net>,
"Ville Syrjälä" <ville.syrjala@linux.intel.com>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Christian Koenig" <christian.koenig@amd.com>,
"Huang Rui" <ray.huang@amd.com>,
"Matthew Auld" <matthew.auld@intel.com>,
"Matthew Brost" <matthew.brost@intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Cc: Jocelyn Falempe <jfalempe@redhat.com>
Subject: [PATCH v10 04/10] drm/i915/display: Add a disable_tiling() for skl planes
Date: Wed, 18 Jun 2025 11:31:22 +0200 [thread overview]
Message-ID: <20250618094011.238154-5-jfalempe@redhat.com> (raw)
In-Reply-To: <20250618094011.238154-1-jfalempe@redhat.com>
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>
---
v7:
* Reword commit message about alignment/size when disabling tiling (Ville Syrjälä)
.../drm/i915/display/skl_universal_plane.c | 20 +++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c b/drivers/gpu/drm/i915/display/skl_universal_plane.c
index 2aa64482d44b..ef09ef7b101f 100644
--- a/drivers/gpu/drm/i915/display/skl_universal_plane.c
+++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c
@@ -2792,6 +2792,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)
@@ -2838,6 +2857,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;
--
2.49.0
next prev parent reply other threads:[~2025-06-18 9:41 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-18 9:31 [PATCH v10 00/10] drm/i915: Add drm_panic support Jocelyn Falempe
2025-06-18 9:31 ` [PATCH v10 01/10] drm/panic: Add a private field to struct drm_scanout_buffer Jocelyn Falempe
2025-06-18 9:31 ` [PATCH v10 02/10] drm/i915/fbdev: Add intel_fbdev_get_map() Jocelyn Falempe
2025-06-18 9:31 ` [PATCH v10 03/10] drm/i915/display/i9xx: Add a disable_tiling() for i9xx planes Jocelyn Falempe
2025-07-19 18:23 ` Ville Syrjälä
2025-07-19 18:30 ` Ville Syrjälä
2025-07-28 11:19 ` Jocelyn Falempe
2025-06-18 9:31 ` Jocelyn Falempe [this message]
2025-06-18 9:31 ` [PATCH v10 05/10] drm/ttm: Add ttm_bo_kmap_try_from_panic() Jocelyn Falempe
2025-06-18 13:55 ` Christian König
2025-06-18 15:38 ` Jocelyn Falempe
2025-06-27 10:05 ` Maarten Lankhorst
2025-06-18 9:31 ` [PATCH v10 06/10] drm/i915: Add intel_bo_panic_setup and intel_bo_panic_finish Jocelyn Falempe
2025-06-18 9:31 ` [PATCH v10 07/10] drm/i915/display: Add drm_panic support Jocelyn Falempe
2025-06-18 9:31 ` [PATCH v10 08/10] drm/i915/display: Add drm_panic support for Y-tiling with DPT Jocelyn Falempe
2025-06-18 9:31 ` [PATCH v10 09/10] drm/i915/display: Add drm_panic support for 4-tiling " Jocelyn Falempe
2025-06-18 9:31 ` [PATCH v10 10/10] drm/i915/psr: Add intel_psr2_panic_force_full_update Jocelyn Falempe
2025-06-23 7:40 ` [PATCH v10 00/10] drm/i915: Add drm_panic support Maarten Lankhorst
2025-06-23 10:10 ` Jocelyn Falempe
2025-06-23 12:02 ` Maarten Lankhorst
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250618094011.238154-5-jfalempe@redhat.com \
--to=jfalempe@redhat.com \
--cc=airlied@gmail.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=joonas.lahtinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=matthew.auld@intel.com \
--cc=matthew.brost@intel.com \
--cc=mripard@kernel.org \
--cc=ray.huang@amd.com \
--cc=rodrigo.vivi@intel.com \
--cc=simona@ffwll.ch \
--cc=tursulin@ursulin.net \
--cc=tzimmermann@suse.de \
--cc=ville.syrjala@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).