diff mbox

[3/3] drm/i915: Add support for GET_PLANE2 CCS modifiers

Message ID 20170112005118.19146-4-ben@bwidawsk.net (mailing list archive)
State New, archived
Headers show

Commit Message

Ben Widawsky Jan. 12, 2017, 12:51 a.m. UTC
Cc: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
---
 drivers/gpu/drm/i915/intel_display.c | 10 ++++++++--
 drivers/gpu/drm/i915/intel_sprite.c  |  2 ++
 2 files changed, 10 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 26f3a911b999..cf1b19447af1 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -97,6 +97,8 @@  static const uint32_t skl_primary_formats[] = {
 };
 
 static const uint64_t skl_format_modifiers[] = {
+	I915_FORMAT_MOD_Yf_TILED_CCS,
+	I915_FORMAT_MOD_Y_TILED_CCS,
 	I915_FORMAT_MOD_Y_TILED,
 	I915_FORMAT_MOD_X_TILED,
 	DRM_FORMAT_MOD_INVALID
@@ -15225,15 +15227,19 @@  static bool skl_mod_supported(uint32_t format, uint64_t modifier)
 	switch (format) {
 	case DRM_FORMAT_C8:
 	case DRM_FORMAT_RGB565:
+		return  modifier == I915_FORMAT_MOD_Y_TILED ||
+			modifier == I915_FORMAT_MOD_X_TILED;
 	case DRM_FORMAT_XRGB8888:
 	case DRM_FORMAT_XBGR8888:
 	case DRM_FORMAT_ARGB8888:
 	case DRM_FORMAT_ABGR8888:
-		return modifier == I915_FORMAT_MOD_Y_TILED ||
+		return  modifier == I915_FORMAT_MOD_Yf_TILED_CCS ||
+			modifier == I915_FORMAT_MOD_Y_TILED_CCS ||
+			modifier == I915_FORMAT_MOD_Y_TILED ||
 			modifier == I915_FORMAT_MOD_X_TILED;
 	case DRM_FORMAT_XRGB2101010:
 	case DRM_FORMAT_XBGR2101010:
-		return modifier == I915_FORMAT_MOD_X_TILED;
+		return  modifier == I915_FORMAT_MOD_X_TILED;
 	case DRM_FORMAT_YUYV:
 	case DRM_FORMAT_YVYU:
 	case DRM_FORMAT_UYVY:
diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
index 152ec8196d41..eed7195212b7 100644
--- a/drivers/gpu/drm/i915/intel_sprite.c
+++ b/drivers/gpu/drm/i915/intel_sprite.c
@@ -1045,6 +1045,8 @@  static uint32_t skl_plane_formats[] = {
 };
 
 static const uint64_t skl_plane_format_modifiers[] = {
+	I915_FORMAT_MOD_Yf_TILED_CCS,
+	I915_FORMAT_MOD_Y_TILED_CCS,
 	I915_FORMAT_MOD_Y_TILED,
 	I915_FORMAT_MOD_X_TILED,
 	DRM_FORMAT_MOD_INVALID