From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Jocelyn Falempe <jfalempe@redhat.com>
Cc: 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>,
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
Subject: Re: [PATCH v10 03/10] drm/i915/display/i9xx: Add a disable_tiling() for i9xx planes
Date: Sat, 19 Jul 2025 21:30:46 +0300 [thread overview]
Message-ID: <aHvkVora3Gzrm5NH@intel.com> (raw)
In-Reply-To: <aHviiKb0EnQbNksL@intel.com>
On Sat, Jul 19, 2025 at 09:23:04PM +0300, Ville Syrjälä wrote:
> On Wed, Jun 18, 2025 at 11:31:21AM +0200, Jocelyn Falempe wrote:
> > 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ä)
> >
> > drivers/gpu/drm/i915/display/i9xx_plane.c | 23 +++++++++++++++++++
> > .../drm/i915/display/intel_display_types.h | 2 ++
> > 2 files changed, 25 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/display/i9xx_plane.c b/drivers/gpu/drm/i915/display/i9xx_plane.c
> > index 8f15333a4b07..0807fae12450 100644
> > --- a/drivers/gpu/drm/i915/display/i9xx_plane.c
> > +++ b/drivers/gpu/drm/i915/display/i9xx_plane.c
> > @@ -905,6 +905,27 @@ static const struct drm_plane_funcs i8xx_plane_funcs = {
> > .format_mod_supported_async = intel_plane_format_mod_supported_async,
> > };
> >
> > +static void i9xx_disable_tiling(struct intel_plane *plane)
> > +{
> > + struct intel_display *display = to_intel_display(plane);
> > + enum i9xx_plane_id i9xx_plane = plane->i9xx_plane;
> > + u32 dspcntr;
> > + u32 reg;
> > +
> > + dspcntr = intel_de_read_fw(display, DSPCNTR(display, i9xx_plane));
> > + dspcntr &= ~DISP_TILED;
> > + intel_de_write_fw(display, DSPCNTR(display, i9xx_plane), dspcntr);
> > +
> > + if (DISPLAY_VER(display) >= 4) {
> > + reg = intel_de_read_fw(display, DSPSURF(display, i9xx_plane));
> > + intel_de_write_fw(display, DSPSURF(display, i9xx_plane), reg);
> > +
> > + } else {
> > + reg = intel_de_read_fw(display, DSPADDR(display, i9xx_plane));
> > + intel_de_write_fw(display, DSPADDR(display, i9xx_plane), reg);
> > + }
> > +}
>
> I thought I already shot this down before, but apparently this
> got merged now :(
>
> Just to reiterate why we don't want these 'disable tiling' hacks:
> - different tiling formats have different stride/alignment/watermark
> requirements so one can't safely change from one tiling to another
> - this completely fails to account for the TILEOFF vs. LINOFF stuff
Oh yeah, and rotation support of course is one really big difference
between different tiling formats.
> - etc.
>
> So IMO these hacks must be removed and instead the code must learn how
> to propetly write the tiled data. igt has all the code for that btw
> (twice over IIRC) so shouldn't be that hard.
>
> I suppose the only hack we need to keep is to disable compression,
> mainly because (IIRC) on flat CCS systems the CPU doesn't have access
> to the AUX data to clear it manually.
>
> I also wonder if there are actual igts for this? I think what is needed
> is a test that sets random things (different panning, rotation, pixel
> foramts, etc.) and triggers the dumper. Not quite sure how the test
> could validate that the output is correct though. CRCs might be a bit
> tricky since you need an identical reference image.
>
> /me off to summer vacation. Good luck
>
> --
> Ville Syrjälä
> Intel
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2025-07-19 18:30 UTC|newest]
Thread overview: 24+ 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ä [this message]
2025-07-28 11:19 ` Jocelyn Falempe
2025-06-18 9:31 ` [PATCH v10 04/10] drm/i915/display: Add a disable_tiling() for skl planes Jocelyn Falempe
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-18 10:10 ` ✓ CI.KUnit: success for drm/i915: Add drm_panic support (rev10) Patchwork
2025-06-18 10:25 ` ✗ CI.checksparse: warning " Patchwork
2025-06-18 10:47 ` ✓ Xe.CI.BAT: success " Patchwork
2025-06-18 22:25 ` ✗ Xe.CI.Full: failure " Patchwork
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=aHvkVora3Gzrm5NH@intel.com \
--to=ville.syrjala@linux.intel.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=jfalempe@redhat.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 \
/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