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

Ville Syrjala ville.syrjala at linux.intel.com
Tue Jul 2 23:27:52 UTC 2024


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;
-- 
2.44.2



More information about the igt-dev mailing list