[PATCH] drm/i915: NV12 changes for Gen10

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Vidya Srinivas <vidya.srinivas@xxxxxxxxx>
---
 drivers/gpu/drm/i915/intel_atomic.c  | 5 ++---
 drivers/gpu/drm/i915/intel_display.c | 7 ++++++-
 drivers/gpu/drm/i915/intel_sprite.c  | 4 ++++
 3 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_atomic.c b/drivers/gpu/drm/i915/intel_atomic.c
index ecba7c7..ca213bc 100644
--- a/drivers/gpu/drm/i915/intel_atomic.c
+++ b/drivers/gpu/drm/i915/intel_atomic.c
@@ -327,14 +327,13 @@ int intel_atomic_setup_scalers(struct drm_i915_private *dev_priv,
 		}
 
 		/* set scaler mode */
-		if ((IS_BROXTON(dev_priv) || IS_KABYLAKE(dev_priv)) &&
+		if ((IS_BROXTON(dev_priv) || IS_KABYLAKE(dev_priv) ||
+			IS_GEMINILAKE(dev_priv) || IS_CANNONLAKE(dev_priv)) &&
 			plane_state && plane_state->base.fb &&
 			plane_state->base.fb->format->format ==
 			DRM_FORMAT_NV12) {
 			scaler_state->scalers[*scaler_id].mode =
 				PS_SCALER_MODE_NV12;
-		} else if (IS_GEMINILAKE(dev_priv) || IS_CANNONLAKE(dev_priv)) {
-			scaler_state->scalers[*scaler_id].mode = 0;
 		} else if (num_scalers_need == 1 && intel_crtc->pipe != PIPE_C) {
 			/*
 			 * when only 1 scaler is in use on either pipe A or B,
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index df6b11a..115e0ea 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -13200,7 +13200,11 @@ intel_primary_plane_create(struct drm_i915_private *dev_priv, enum pipe pipe)
 			((pipe == PIPE_A || pipe == PIPE_B))) {
 			intel_primary_formats = nv12_primary_formats;
 			num_formats = ARRAY_SIZE(nv12_primary_formats);
+		} else if (IS_GEMINILAKE(dev_priv) || IS_CANNONLAKE(dev_priv)) {
+			intel_primary_formats = nv12_primary_formats;
+			num_formats = ARRAY_SIZE(nv12_primary_formats);
 		} else {
+
 			intel_primary_formats = skl_primary_formats;
 			num_formats = ARRAY_SIZE(skl_primary_formats);
 		}
@@ -14006,7 +14010,8 @@ static int intel_framebuffer_init(struct intel_framebuffer *intel_fb,
 		}
 		break;
 	case DRM_FORMAT_NV12:
-		if (!IS_BROXTON(dev_priv) && !IS_KABYLAKE(dev_priv)) {
+		if (!IS_BROXTON(dev_priv) && !IS_KABYLAKE(dev_priv) &&
+			!IS_GEMINILAKE(dev_priv) && !IS_CANNONLAKE(dev_priv)) {
 			DRM_DEBUG_KMS("unsupported pixel format: %s\n",
 		      drm_get_format_name(mode_cmd->pixel_format,
 				&format_name));
diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
index 1d35a18..35dcba0 100644
--- a/drivers/gpu/drm/i915/intel_sprite.c
+++ b/drivers/gpu/drm/i915/intel_sprite.c
@@ -1340,6 +1340,10 @@ intel_sprite_plane_create(struct drm_i915_private *dev_priv,
 			(pipe == PIPE_A || pipe == PIPE_B) && plane == 0) {
 			plane_formats = nv12_plane_formats;
 			num_plane_formats = ARRAY_SIZE(nv12_plane_formats);
+		} else if ((IS_GEMINILAKE(dev_priv) || IS_CANNONLAKE(dev_priv)) &&
+				   plane == 0) {
+			plane_formats = nv12_plane_formats;
+			num_plane_formats = ARRAY_SIZE(nv12_plane_formats);
 		} else {
 			plane_formats = skl_plane_formats;
 			num_plane_formats = ARRAY_SIZE(skl_plane_formats);
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux