[PATCH 2/2] drm/xe/stolen: ignore first page for FBC

Saarinen, Jani jani.saarinen at intel.com
Wed May 1 12:37:56 UTC 2024


Hi, 
> -----Original Message-----
> From: Intel-xe <intel-xe-bounces at lists.freedesktop.org> On Behalf Of
> Matthew Auld
> Sent: Friday, 12 April 2024 18.03
> To: intel-xe at lists.freedesktop.org
> Cc: Roper, Matthew D <matthew.d.roper at intel.com>; Maarten Lankhorst
> <maarten.lankhorst at linux.intel.com>
> Subject: [PATCH 2/2] drm/xe/stolen: ignore first page for FBC
> 
> We have observed underruns on some platforms if the CFB offset is within the
> first page of stolen. Just like i915 skip the first page.

This caused regression where dg2 started skipping: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1665 

> 
> v2 (Maarten)
>   - Also align the start.
> 
> BSpec: 50214
> Reported-by: Matt Roper <matthew.d.roper at intel.com>
> Signed-off-by: Matthew Auld <matthew.auld at intel.com>
> Reviewed-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> ---
>  drivers/gpu/drm/xe/compat-i915-headers/i915_gem_stolen.h | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/xe/compat-i915-headers/i915_gem_stolen.h
> b/drivers/gpu/drm/xe/compat-i915-headers/i915_gem_stolen.h
> index b4ccc4231e7d..cb6c7598824b 100644
> --- a/drivers/gpu/drm/xe/compat-i915-headers/i915_gem_stolen.h
> +++ b/drivers/gpu/drm/xe/compat-i915-headers/i915_gem_stolen.h
> @@ -19,8 +19,13 @@ static inline int
> i915_gem_stolen_insert_node_in_range(struct xe_device *xe,
>  	int err;
>  	u32 flags = XE_BO_FLAG_PINNED | XE_BO_FLAG_STOLEN;
> 
> -	if (align)
> +	if (start < SZ_4K)
> +		start = SZ_4K;
> +
> +	if (align) {
>  		size = ALIGN(size, align);
> +		start = ALIGN(start, align);
> +	}
> 
>  	bo = xe_bo_create_locked_range(xe, xe_device_get_root_tile(xe),
>  				       NULL, size, start, end,
> --
> 2.44.0



More information about the Intel-xe mailing list