All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 1/3] lib/intel_bufops: Fix CCS plane width calculation
@ 2021-05-01  1:50 Imre Deak
  2021-05-01  1:50 ` [igt-dev] [PATCH i-g-t 2/3] lib/veboxcopy_gen12: Add support for MC_CCS/XYUV8888 conversions Imre Deak
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Imre Deak @ 2021-05-01  1:50 UTC (permalink / raw)
  To: igt-dev

The CCS plane width calculation was correct only for 32bpp formats,
where a 64 byte CCS unit maps to a 4 tiles * 32 pixel width on the main
surface, but for other bpps the same CCS unit maps to a
(4 tiles * 128 bytes / (bpp/8 bytes/pixel)) width. Fix the width
calculation accordingly.

Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 lib/intel_bufops.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/intel_bufops.h b/lib/intel_bufops.h
index 1a3d86925..3dc059808 100644
--- a/lib/intel_bufops.h
+++ b/lib/intel_bufops.h
@@ -78,7 +78,7 @@ intel_buf_ccs_width(int gen, const struct intel_buf *buf)
 	 * main surface.
 	 */
 	if (gen >= 12)
-		return DIV_ROUND_UP(intel_buf_width(buf), 128) * 64;
+		return DIV_ROUND_UP(intel_buf_width(buf), 512 / (buf->bpp / 8)) * 64;
 
 	return DIV_ROUND_UP(intel_buf_width(buf), 1024) * 128;
 }
-- 
2.27.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-05-03 14:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-01  1:50 [igt-dev] [PATCH i-g-t 1/3] lib/intel_bufops: Fix CCS plane width calculation Imre Deak
2021-05-01  1:50 ` [igt-dev] [PATCH i-g-t 2/3] lib/veboxcopy_gen12: Add support for MC_CCS/XYUV8888 conversions Imre Deak
2021-05-01  1:50 ` [igt-dev] [PATCH i-g-t 3/3] tests/kms_ccs: Test the XYUV8888 format as well Imre Deak
2021-05-03  9:56 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/3] lib/intel_bufops: Fix CCS plane width calculation Patchwork
2021-05-03 11:45 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2021-05-03 14:13 ` [igt-dev] [PATCH i-g-t 1/3] " Juha-Pekka Heikkila

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.