[PATCH v2 3/5] drm/i915: Set tile sizes in drm_format_info

Alexandru Gheorghe alexandru-cosmin.gheorghe at arm.com
Tue Aug 21 18:30:02 UTC 2018


Two new fields had been added to drm_format_info struct, tile_w and
tile_h, this need to be set to 1 for all non-tiled formats.

Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheorghe at arm.com>
---
 drivers/gpu/drm/i915/intel_display.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index bd8956f2544d..fdc679e9dfa3 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -2440,10 +2440,14 @@ static unsigned int intel_fb_modifier_to_tiling(uint64_t fb_modifier)
  * main surface.
  */
 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, },
-	{ .format = DRM_FORMAT_ARGB8888, .depth = 32, .num_planes = 2, .cpp = { 4, 1, }, .hsub = 8, .vsub = 16, },
-	{ .format = DRM_FORMAT_ABGR8888, .depth = 32, .num_planes = 2, .cpp = { 4, 1, }, .hsub = 8, .vsub = 16, },
+	{ .format = DRM_FORMAT_XRGB8888, .depth = 24, .num_planes = 2, .cpp = { 4, 1, },
+	.hsub = 8, .vsub = 16, .tile_w = 1, .tile_h = 1 },
+	{ .format = DRM_FORMAT_XBGR8888, .depth = 24, .num_planes = 2, .cpp = { 4, 1, },
+	  .hsub = 8, .vsub = 16, .tile_w = 1, .tile_h = 1 },
+	{ .format = DRM_FORMAT_ARGB8888, .depth = 32, .num_planes = 2, .cpp = { 4, 1, },
+	  .hsub = 8, .vsub = 16, .tile_w = 1, .tile_h = 1 },
+	{ .format = DRM_FORMAT_ABGR8888, .depth = 32, .num_planes = 2, .cpp = { 4, 1, },
+	  .hsub = 8, .vsub = 16, .tile_w = 1, .tile_h = 1 },
 };
 
 static const struct drm_format_info *
-- 
2.18.0



More information about the dri-devel mailing list