All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm/xe: Fix DSB buffer coherency
Date: Wed, 18 Sep 2024 01:15:05 +0300	[thread overview]
Message-ID: <Zun_aTQbrUtmj490@intel.com> (raw)
In-Reply-To: <20240913114754.7956-2-maarten.lankhorst@linux.intel.com>

On Fri, Sep 13, 2024 at 01:47:53PM +0200, Maarten Lankhorst wrote:
> Add the scanout flag to force WC caching, and add the memory barrier
> where needed.
> 
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> ---
>  drivers/gpu/drm/xe/display/xe_dsb_buffer.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/display/xe_dsb_buffer.c b/drivers/gpu/drm/xe/display/xe_dsb_buffer.c
> index f99d901a3214f..f7949bf5426af 100644
> --- a/drivers/gpu/drm/xe/display/xe_dsb_buffer.c
> +++ b/drivers/gpu/drm/xe/display/xe_dsb_buffer.c
> @@ -48,11 +48,12 @@ bool intel_dsb_buffer_create(struct intel_crtc *crtc, struct intel_dsb_buffer *d
>  	if (!vma)
>  		return false;
>  
> +	/* Set scanout flag for WC mapping */
>  	obj = xe_bo_create_pin_map(xe, xe_device_get_root_tile(xe),
>  				   NULL, PAGE_ALIGN(size),
>  				   ttm_bo_type_kernel,
>  				   XE_BO_FLAG_VRAM_IF_DGFX(xe_device_get_root_tile(xe)) |
> -				   XE_BO_FLAG_GGTT);
> +				   XE_BO_FLAG_SCANOUT | XE_BO_FLAG_GGTT);
>  	if (IS_ERR(obj)) {
>  		kfree(vma);
>  		return false;
> @@ -73,5 +74,5 @@ void intel_dsb_buffer_cleanup(struct intel_dsb_buffer *dsb_buf)
>  
>  void intel_dsb_buffer_flush_map(struct intel_dsb_buffer *dsb_buf)
>  {
> -	/* TODO: add xe specific flush_map() for dsb buffer object. */
> +	xe_device_wmb(dsb_buf->vma->bo->tile->xe);

With some kind of comment added that this may be needed on
!x86 architectures to flush the WC buffer:

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

>  }
> -- 
> 2.45.2

-- 
Ville Syrjälä
Intel

  parent reply	other threads:[~2024-09-17 22:15 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-13 11:47 [PATCH 0/2] drm/xe: Re-enable DSB Maarten Lankhorst
2024-09-13 11:47 ` [PATCH 1/2] drm/xe: Fix DSB buffer coherency Maarten Lankhorst
2024-09-13 12:04   ` Matthew Auld
2024-09-13 17:58     ` Maarten Lankhorst
2024-09-13 17:12   ` Ville Syrjälä
2024-09-13 18:44     ` Maarten Lankhorst
2024-09-16 14:00       ` Ville Syrjälä
2024-09-17 22:15   ` Ville Syrjälä [this message]
2024-09-13 11:47 ` [PATCH 2/2] drm/xe: Revert "drm/i915: Disable DSB in Xe KMD" Maarten Lankhorst
2024-09-13 11:59 ` ✓ CI.Patch_applied: success for drm/xe: Re-enable DSB Patchwork
2024-09-13 11:59 ` ✓ CI.checkpatch: " Patchwork
2024-09-13 12:00 ` ✓ CI.KUnit: " Patchwork
2024-09-13 12:13 ` ✓ CI.Build: " Patchwork
2024-09-13 12:16 ` ✓ CI.Hooks: " Patchwork
2024-09-13 12:28 ` ✗ CI.checksparse: warning " Patchwork
2024-09-13 13:09 ` ✓ CI.BAT: success " Patchwork
2024-09-13 15:31 ` ✓ Fi.CI.BAT: " Patchwork
2024-09-14  1:52 ` ✗ CI.FULL: failure " Patchwork
2024-09-14 23:15 ` ✗ Fi.CI.IGT: " 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=Zun_aTQbrUtmj490@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=maarten.lankhorst@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.