[PATCH i-g-t 12/37] lib/rendercopy: Use the proper compression format for 10bpc on dg2/lnl+

Juha-Pekka Heikkila juhapekka.heikkila at gmail.com
Tue Aug 27 16:04:16 UTC 2024


Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>

On 3.7.2024 2.27, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> Setup the dg2/lnl+ compression format correctly for 10bpc formats.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> ---
>   lib/rendercopy_gen9.c | 10 ++++++++--
>   1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/rendercopy_gen9.c b/lib/rendercopy_gen9.c
> index 4014100a23b5..b871a4b3dae1 100644
> --- a/lib/rendercopy_gen9.c
> +++ b/lib/rendercopy_gen9.c
> @@ -150,7 +150,10 @@ static uint32_t lnl_compression_format(const struct intel_buf *buf)
>   {
>   	switch (buf->bpp) {
>   	case 32:
> -		return 0x2; /* CMF_R8_G8_B8_A8 */
> +		if (buf->depth == 30)
> +			return 0x3; /* CMF_R10_G10_B10_A2 */
> +		else
> +			return 0x2; /* CMF_R8_G8_B8_A8 */
>   	default:
>   		igt_assert(0);
>   		return 0;
> @@ -161,7 +164,10 @@ static uint32_t dg2_compression_format(const struct intel_buf *buf)
>   {
>   	switch (buf->bpp) {
>   	case 32:
> -		return 0x8;
> +		if (buf->depth == 30)
> +			return 0xc;
> +		else
> +			return 0x8;
>   	default:
>   		igt_assert(0);
>   		return 0;



More information about the igt-dev mailing list