[Intel-gfx] [PATCH 04/12] drm/i915: Add a comment exlaining CCS hsub/vsub
ville.syrjala at linux.intel.com
ville.syrjala at linux.intel.com
Thu Aug 24 19:10:52 UTC 2017
From: Ville Syrjälä <ville.syrjala at linux.intel.com>
Let's document why we claim hsub==8,vsub==16 for CCS even though the
memory layout would suggest that we use 16x8 instead.
Cc: Daniel Vetter <daniel at ffwll.ch>
Cc: Ben Widawsky <ben at bwidawsk.net>
Cc: Jason Ekstrand <jason at jlekstrand.net>
Cc: Daniel Stone <daniels at collabora.com>
Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
drivers/gpu/drm/i915/intel_display.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index a8809bc64475..27c1a4cbce7d 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -2484,6 +2484,13 @@ static unsigned int intel_fb_modifier_to_tiling(uint64_t fb_modifier)
}
}
+/*
+ * 1 byte of CCS actually corresponds to 16x8 pixels on the main
+ * surface, and the memory layout for the CCS tile is 64x64 bytes.
+ * But since we're pretending the CCS tile is 128 bytes wide we
+ * adjust hsub/vsub here accordingly to 8x16 so that the
+ * bytes<->x/y conversions come out correct.
+ */
static const struct drm_format_info ccs_formats[] = {
{ .format = DRM_FORMAT_XRGB8888, .depth = 24, .num_planes = 2, .cpp = { 4, 1, }, .hsub = 8, .vsub = 16, },
{ .format = DRM_FORMAT_XBGR8888, .depth = 24, .num_planes = 2, .cpp = { 4, 1, }, .hsub = 8, .vsub = 16, },
--
2.13.0
More information about the Intel-gfx
mailing list