public inbox for intel-xe@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Cc: intel-xe@lists.freedesktop.org, kernel-dev@igalia.com,
	"Ville Syrjälä" <ville.syrjala@linux.intel.com>
Subject: Re: [PATCH v17 1/8] drm/xe: Use write-combine mapping when populating DPT
Date: Tue, 3 Mar 2026 13:11:52 -0500	[thread overview]
Message-ID: <aackaFzhEXkCXwBM@intel.com> (raw)
In-Reply-To: <20260128101333.37765-2-tvrtko.ursulin@igalia.com>

On Wed, Jan 28, 2026 at 10:13:26AM +0000, Tvrtko Ursulin wrote:
> The fallback case for DPT backing store is a buffer object in system
> memory buffer, which by default use a write-back CPU caching policy.
>
> If this fallback gets triggered, and since there is currently no flushing,
> the DPT writes made when pinning a buffer to display are not guaranteed to
> be seen by the display engine.
>
> To fix this, since both the local memory and the stolen memory DPT
> placement use write-combine, let us make the system memory option follow
> suit by marking the buffer with the scanout flag.
>
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
> Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/xe/display/xe_fb_pin.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/xe/display/xe_fb_pin.c b/drivers/gpu/drm/xe/display/xe_fb_pin.c
> index d2c4e94180fa..b285cc446f57 100644
> --- a/drivers/gpu/drm/xe/display/xe_fb_pin.c
> +++ b/drivers/gpu/drm/xe/display/xe_fb_pin.c
> @@ -123,7 +123,8 @@ static int __xe_pin_fb_vma_dpt(const struct intel_framebuffer *fb,
>  						   ttm_bo_type_kernel,
>  						   XE_BO_FLAG_SYSTEM |
>  						   XE_BO_FLAG_GGTT |
> -						   XE_BO_FLAG_PAGETABLE,
> +						   XE_BO_FLAG_PAGETABLE |
> +						   XE_BO_FLAG_SCANOUT, /* Force WC mapping */

This kind of changes the semantics of the flag.

Could you please change this internal name to something like
s/XE_BO_FLAG_SCANOUT/XE_BO_FLAG_FORCE_WC

Then we will have something like

/*
 * Display scanout is always non-coherent with the CPU cache.
 *
 * For Xe_LPG and beyond up to NVL-P (excluding), PPGTT PTE
 * lookups are also non-coherent and require a CPU:WC mapping.
 */
if (args->flags & DRM_XE_GEM_CREATE_FLAG_SCANOUT)
                 bo_flags |= XE_BO_FLAG_FORCE_WC;


>  						   alignment, false);
>  	if (IS_ERR(dpt))
>  		return PTR_ERR(dpt);
> --
> 2.52.0
>

  reply	other threads:[~2026-03-03 18:12 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-28 10:13 [PATCH v17 0/8] AuxCCS handling and render compression modifiers Tvrtko Ursulin
2026-01-28 10:13 ` [PATCH v17 1/8] drm/xe: Use write-combine mapping when populating DPT Tvrtko Ursulin
2026-03-03 18:11   ` Rodrigo Vivi [this message]
2026-01-28 10:13 ` [PATCH v17 2/8] drm/xe/xelpg: Limit AuxCCS ring buffer programming to Alderlake Tvrtko Ursulin
2026-03-03 18:12   ` Rodrigo Vivi
2026-01-28 10:13 ` [PATCH v17 3/8] drm/xe/xelp: Quiesce memory traffic before invalidating AuxCCS Tvrtko Ursulin
2026-01-28 10:13 ` [PATCH v17 4/8] drm/xe/xelp: Wait for AuxCCS invalidation to complete Tvrtko Ursulin
2026-01-28 10:13 ` [PATCH v17 5/8] drm/xe: Export xe_emit_aux_table_inv Tvrtko Ursulin
2026-03-03 18:34   ` Matthew Brost
2026-01-28 10:13 ` [PATCH v17 6/8] drm/xe/xelp: Add AuxCCS invalidation to the indirect context workarounds Tvrtko Ursulin
2026-03-03 18:13   ` Rodrigo Vivi
2026-01-28 10:13 ` [PATCH v17 7/8] drm/xe/display: Add support for AuxCCS Tvrtko Ursulin
2026-01-28 10:13 ` [PATCH v17 8/8] drm/xe/xelp: Expose AuxCCS frame buffer modifiers on Alderlake-P Tvrtko Ursulin
2026-01-28 17:23 ` ✗ CI.checkpatch: warning for AuxCCS handling and render compression modifiers Patchwork
2026-01-28 17:24 ` ✓ CI.KUnit: success " Patchwork
2026-01-28 18:04 ` ✓ Xe.CI.BAT: " 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=aackaFzhEXkCXwBM@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=kernel-dev@igalia.com \
    --cc=tvrtko.ursulin@igalia.com \
    --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