[PATCH] drm/i915/display: On plane capability check rely on display version

Imre Deak imre.deak at intel.com
Fri Sep 13 06:57:07 UTC 2024


On Thu, Sep 12, 2024 at 06:24:32PM +0300, Juha-Pekka Heikkila wrote:
> When check in display code for Xe2 ccs modifiers rely on display version
> along with separation of dgpu and igpu
> 
> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
> ---
>  drivers/gpu/drm/i915/display/intel_fb.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_fb.c b/drivers/gpu/drm/i915/display/intel_fb.c
> index c9038d239eb2..25de4ce356bb 100644
> --- a/drivers/gpu/drm/i915/display/intel_fb.c
> +++ b/drivers/gpu/drm/i915/display/intel_fb.c
> @@ -477,12 +477,10 @@ static bool plane_has_modifier(struct drm_i915_private *i915,
>  	    HAS_FLAT_CCS(i915) != !md->ccs.packed_aux_planes)
>  		return false;
>  
> -	if (md->modifier == I915_FORMAT_MOD_4_TILED_BMG_CCS &&
> -	    (GRAPHICS_VER(i915) < 20 || !IS_DGFX(i915)))
> +	if (md->modifier == I915_FORMAT_MOD_4_TILED_BMG_CCS && !IS_DGFX(i915))
>  		return false;
>  
> -	if (md->modifier == I915_FORMAT_MOD_4_TILED_LNL_CCS &&
> -	    (GRAPHICS_VER(i915) < 20 || IS_DGFX(i915)))
> +	if (md->modifier == I915_FORMAT_MOD_4_TILED_LNL_CCS && IS_DGFX(i915))
>  		return false;

Instead of the above platform checks, the required page size for all planes
could be explicitly specified by adding INTEL_PLANE_CAP_NEED4K_PHYS and
requiring this plane cap for the LNL_CCS modifier.

>  
>  	return true;
> -- 
> 2.45.2
> 


More information about the Intel-gfx mailing list