All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/i915: Clean up skl_plane_has_planar()
@ 2018-08-24 20:38 Dhinakaran Pandiyan
  2018-08-24 20:38 ` [PATCH 2/2] drm/i915: Do not advertize support for NV12 on ICL yet Dhinakaran Pandiyan
                   ` (6 more replies)
  0 siblings, 7 replies; 16+ messages in thread
From: Dhinakaran Pandiyan @ 2018-08-24 20:38 UTC (permalink / raw)
  To: intel-gfx; +Cc: Dhinakaran Pandiyan

skl_plane_has_planar is hard to read, simplify the logic by checking for
support in the order of platform, pipe and plane.

No change in functionality intended.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 27 +++++++++------------------
 1 file changed, 9 insertions(+), 18 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 30fdfd1a3037..7e18bd8b21b8 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -13622,24 +13622,15 @@ static bool skl_plane_has_fbc(struct drm_i915_private *dev_priv,
 bool skl_plane_has_planar(struct drm_i915_private *dev_priv,
 			  enum pipe pipe, enum plane_id plane_id)
 {
-	if (plane_id == PLANE_PRIMARY) {
-		if (IS_SKYLAKE(dev_priv) || IS_BROXTON(dev_priv))
-			return false;
-		else if ((INTEL_GEN(dev_priv) == 9 && pipe == PIPE_C) &&
-			 !IS_GEMINILAKE(dev_priv))
-			return false;
-	} else if (plane_id >= PLANE_SPRITE0) {
-		if (plane_id == PLANE_CURSOR)
-			return false;
-		if (IS_GEMINILAKE(dev_priv) || INTEL_GEN(dev_priv) == 10) {
-			if (plane_id != PLANE_SPRITE0)
-				return false;
-		} else {
-			if (plane_id != PLANE_SPRITE0 || pipe == PIPE_C ||
-			    IS_SKYLAKE(dev_priv) || IS_BROXTON(dev_priv))
-				return false;
-		}
-	}
+	if (IS_SKYLAKE(dev_priv) || IS_BROXTON(dev_priv))
+		return false;
+
+	if (INTEL_GEN(dev_priv) == 9 && !IS_GEMINILAKE(dev_priv) && pipe == PIPE_C)
+		return false;
+
+	if (plane_id == PLANE_CURSOR || plane_id != PLANE_SPRITE0)
+		return false;
+
 	return true;
 }
 
-- 
2.17.1

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

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

end of thread, other threads:[~2018-08-28 19:46 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-24 20:38 [PATCH 1/2] drm/i915: Clean up skl_plane_has_planar() Dhinakaran Pandiyan
2018-08-24 20:38 ` [PATCH 2/2] drm/i915: Do not advertize support for NV12 on ICL yet Dhinakaran Pandiyan
2018-08-27 11:56   ` Ville Syrjälä
2018-08-24 21:02 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Clean up skl_plane_has_planar() Patchwork
2018-08-24 21:56 ` ✓ Fi.CI.IGT: " Patchwork
2018-08-24 22:15 ` [PATCH 1/2] " Rodrigo Vivi
2018-08-24 22:27   ` Pandiyan, Dhinakaran
2018-08-24 23:16     ` Rodrigo Vivi
2018-08-24 23:38       ` Pandiyan, Dhinakaran
2018-08-27 11:56 ` Ville Syrjälä
2018-08-27 17:53   ` Pandiyan, Dhinakaran
2018-08-27 22:56   ` [PATCH v2] " Dhinakaran Pandiyan
2018-08-28 12:45     ` Ville Syrjälä
2018-08-28 19:45       ` Dhinakaran Pandiyan
2018-08-28  0:04 ` ✓ Fi.CI.BAT: success for series starting with [v2] drm/i915: Clean up skl_plane_has_planar() (rev2) Patchwork
2018-08-28  1:51 ` ✓ Fi.CI.IGT: " Patchwork

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.