public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH] drm/i915/display: Add HDR mode helper function
@ 2021-09-07 11:36 Tejas Upadhyay
  2021-09-07 12:47 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Tejas Upadhyay @ 2021-09-07 11:36 UTC (permalink / raw)
  To: intel-gfx

Add helper function with returns if HDR mode in on

Signed-off-by: Tejas Upadhyay <tejaskumarx.surendrakumar.upadhyay@intel.com>
---
 drivers/gpu/drm/i915/display/intel_display.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 1f447ba776c7..51008600a180 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -182,6 +182,12 @@ static void intel_update_czclk(struct drm_i915_private *dev_priv)
 		dev_priv->czclk_freq);
 }
 
+static bool is_hdr_mode(const struct intel_crtc_state *crtc_state)
+{
+	return (crtc_state->active_planes & ~(icl_hdr_plane_mask() |
+		BIT(PLANE_CURSOR))) == 0;
+}
+
 /* WA Display #0827: Gen9:all */
 static void
 skl_wa_827(struct drm_i915_private *dev_priv, enum pipe pipe, bool enable)
@@ -5257,8 +5263,7 @@ static void bdw_set_pipemisc(const struct intel_crtc_state *crtc_state)
 			PIPEMISC_YUV420_MODE_FULL_BLEND;
 
 	if (DISPLAY_VER(dev_priv) >= 11 &&
-	    (crtc_state->active_planes & ~(icl_hdr_plane_mask() |
-					   BIT(PLANE_CURSOR))) == 0)
+	    is_hdr_mode(crtc_state))
 		val |= PIPEMISC_HDR_MODE_PRECISION;
 
 	if (DISPLAY_VER(dev_priv) >= 12)
-- 
2.31.1


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

end of thread, other threads:[~2021-09-22 14:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-07 11:36 [Intel-gfx] [PATCH] drm/i915/display: Add HDR mode helper function Tejas Upadhyay
2021-09-07 12:47 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2021-09-07 15:51 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-09-07 17:34 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/display: Add HDR mode helper function (rev2) Patchwork
2021-09-07 19:54 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-09-22 14:37 ` [Intel-gfx] [PATCH] drm/i915/display: Add HDR mode helper function Ville Syrjälä

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox