[PATCH i-g-t v2 03/18] lib/rendercopy: Use the proper compression format for 10bpc on dg2/lnl+
Ville Syrjala
ville.syrjala at linux.intel.com
Wed Sep 18 12:05:03 UTC 2024
From: Ville Syrjälä <ville.syrjala at linux.intel.com>
Setup the dg2/lnl+ compression format correctly for 10bpc formats.
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
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 9c68d3773b19..291ee99fd257 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