From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Tvrtko Ursulin <tursulin@igalia.com>
Cc: intel-xe@lists.freedesktop.org, kernel-dev@igalia.com,
Tvrtko Ursulin <tvrtko.ursulin@igalia.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [PATCH v15 06/10] drm/xe: Handle DPT in system memory
Date: Wed, 10 Dec 2025 12:32:04 +0200 [thread overview]
Message-ID: <aTlMJJFSMG1gilvC@intel.com> (raw)
In-Reply-To: <9450ca34-033c-4217-80cb-6f87924f372c@igalia.com>
On Wed, Dec 10, 2025 at 11:07:48AM +0100, Tvrtko Ursulin wrote:
>
> On 09/12/2025 15:25, Ville Syrjälä wrote:
> > On Tue, Dec 09, 2025 at 03:10:03PM +0100, Tvrtko Ursulin wrote:
> >> On 09/12/2025 10:54, Ville Syrjälä wrote:
> >>> On Mon, Dec 08, 2025 at 08:17:17PM +0100, Tvrtko Ursulin wrote:
> >>>> From: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
> >>>>
> >>>> If DPT is allocated from system memory it will be created in the default
> >>>> write-back cached mode. This means we need to flush it after populating
> >>>> otherwise nothing works.
> >>>>
> >>>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
> >>>> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> >>>> ---
> >>>> drivers/gpu/drm/xe/display/xe_fb_pin.c | 4 ++++
> >>>> 1 file changed, 4 insertions(+)
> >>>>
> >>>> diff --git a/drivers/gpu/drm/xe/display/xe_fb_pin.c b/drivers/gpu/drm/xe/display/xe_fb_pin.c
> >>>> index a22a9182dadb..89ee68c40329 100644
> >>>> --- a/drivers/gpu/drm/xe/display/xe_fb_pin.c
> >>>> +++ b/drivers/gpu/drm/xe/display/xe_fb_pin.c
> >>>> @@ -3,6 +3,7 @@
> >>>> * Copyright © 2021 Intel Corporation
> >>>> */
> >>>>
> >>>> +#include <drm/drm_cache.h>
> >>>> #include <drm/ttm/ttm_bo.h>
> >>>>
> >>>> #include "i915_vma.h"
> >>>> @@ -162,6 +163,9 @@ static int __xe_pin_fb_vma_dpt(const struct intel_framebuffer *fb,
> >>>> rot_info->plane[i].dst_stride);
> >>>> }
> >>>>
> >>>> + if (!xe_bo_is_vram(dpt) && !xe_bo_is_stolen(dpt))
> >>>> + drm_clflush_virt_range(dpt->vmap.vaddr, dpt_size);
> >>> How is anything working currently if the DPT is being
> >>> created with the wrong caching mode?
> >> I suspect the stolen allocation never fails in practice (or almost
> >> never, or at least not in CI).
> >>> Sounds like someone should fix the DPT creation to correctly
> >>> ask for UC/WC. But I suppose someone should measure if WB+flush
> >>> is actually faster...
> >> I am not sure what is desired here. System memory buffers defaulting to
> >> cached is the xe default, so should DPT be an exception I do not know.
> > Anything meant for the display engine is supposed to be uncached.
>
> I can add XE_BO_FLAG_SCANOUT to the system memory buffer creation and
> that would handle this aspect. Acceptable to you?
>
> But..
>
> >
> >> In any case AuxCCS seems to only work with DPT in system memory and this
> >> clflush. DPT in stolen with GTT access and GTT flushing (as i915 does
> >> it) does not seem to work for xe. I guess the entity doing the DPT reads
> >> is somehow special coherency wise.
> > Sounds like there is still something broken in xe.
>
> ... Issue is when you found the magic mocs 61 the CI still saw a
> sporadic failure. 3 out of 44 new tests failed. These sporadic CI fails
> I was never able to reproduce locally. (It was always ADL-P, and I have
> an ADL-P as well.)
>
> Above coupled with the fact i915 has this clflush on the first pin, I
> assumed CCS is just special enough that it is required. For certain with
> it there are no sporadic CI fails.
clflush does nothing for the display engine. If it helps then
I think there must be dirty cachelines around. I don't see how
anything else could explain it.
One would think it should be possible to even see such dirt right
after allocating a new BO and handing it to the display engine
without touching it in any way (IIRC even reads through the GMADR
aperture trigger cache flushes).
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2025-12-10 10:32 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-08 19:17 [PATCH v15 00/10] AuxCCS handling and render compression modifiers Tvrtko Ursulin
2025-12-08 19:17 ` [PATCH v15 01/10] drm/xe/xelpg: Limit AuxCCS ring buffer programming to Alderlake Tvrtko Ursulin
2025-12-08 19:17 ` [PATCH v15 02/10] drm/xe/xelp: Quiesce memory traffic before invalidating AuxCCS Tvrtko Ursulin
2025-12-08 19:17 ` [PATCH v15 03/10] drm/xe/xelp: Wait for AuxCCS invalidation to complete Tvrtko Ursulin
2025-12-08 19:17 ` [PATCH v15 04/10] drm/xe: Export xe_emit_aux_table_inv Tvrtko Ursulin
2025-12-08 19:17 ` [PATCH v15 05/10] drm/xe/xelp: Add AuxCCS invalidation to the indirect context workarounds Tvrtko Ursulin
2025-12-08 19:17 ` [PATCH v15 06/10] drm/xe: Handle DPT in system memory Tvrtko Ursulin
2025-12-09 9:54 ` Ville Syrjälä
2025-12-09 14:10 ` Tvrtko Ursulin
2025-12-09 14:25 ` Ville Syrjälä
2025-12-10 10:07 ` Tvrtko Ursulin
2025-12-10 10:32 ` Ville Syrjälä [this message]
2025-12-10 11:17 ` Saarinen, Jani
2025-12-10 14:51 ` Tvrtko Ursulin
2025-12-10 17:20 ` Saarinen, Jani
2025-12-08 19:17 ` [PATCH v15 07/10] drm/xe: Do not use stolen memory for DPT on IGFX and AuxCCS Tvrtko Ursulin
2025-12-08 19:17 ` [PATCH v15 08/10] drm/xe/display: Add support for AuxCCS Tvrtko Ursulin
2025-12-08 19:17 ` [PATCH v15 09/10] drm/i915/display: Detect AuxCCS support via display parent interface Tvrtko Ursulin
2025-12-09 8:31 ` Jani Nikula
2025-12-09 11:38 ` Tvrtko Ursulin
2025-12-09 9:42 ` Ville Syrjälä
2025-12-09 9:56 ` Ville Syrjälä
2025-12-09 11:34 ` Tvrtko Ursulin
2025-12-08 19:17 ` [PATCH v15 10/10] drm/xe/xelp: Expose AuxCCS frame buffer modifiers on Alderlake-P Tvrtko Ursulin
2025-12-08 20:27 ` ✗ CI.checkpatch: warning for AuxCCS handling and render compression modifiers Patchwork
2025-12-08 20:28 ` ✓ CI.KUnit: success " Patchwork
2025-12-08 20:43 ` ✗ CI.checksparse: warning " Patchwork
2025-12-08 21:37 ` ✓ Xe.CI.BAT: success " Patchwork
2025-12-09 3:28 ` ✗ Xe.CI.Full: failure " Patchwork
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=aTlMJJFSMG1gilvC@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=kernel-dev@igalia.com \
--cc=rodrigo.vivi@intel.com \
--cc=tursulin@igalia.com \
--cc=tvrtko.ursulin@igalia.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