[PATCH 4/8] comments to help review and debug

José Roberto de Souza jose.souza at intel.com
Thu Mar 17 16:23:48 UTC 2022


---
 drivers/gpu/drm/i915/display/intel_psr.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
index 235461f49ee26..f7b7b374374b1 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -2153,6 +2153,7 @@ static void _psr_invalidate_handle(struct intel_dp *intel_dp,
 		u32 val = man_trk_ctl_continuos_full_frame(dev_priv) |
 			  man_trk_ctl_partial_frame_bit_get(dev_priv);
 
+		/* continuos full frame is already enabled */
 		if (prev_busy_frontbuffer_bits)
 			return;
 
@@ -2239,21 +2240,35 @@ static void _psr_flush_handle(struct intel_dp *intel_dp,
 	struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
 
 	if (intel_dp->psr.psr2_sel_fetch_enabled) {
+		/* is continuos full frame enabled? */
 		if (prev_busy_frontbuffer_bits) {
+			/* it is, can we turn it off? */
 			if (intel_dp->psr.busy_frontbuffer_bits == 0) {
 				u32 clear = man_trk_ctl_continuos_full_frame(dev_priv);
 				u32 set = man_trk_ctl_single_full_frame_bit_get(dev_priv) |
 					  man_trk_ctl_partial_frame_bit_get(dev_priv);
 
+				/*
+				 * turn continuos full frame off and do a single
+				 * full frame
+				 */
 				intel_de_rmw(dev_priv,
 					     PSR2_MAN_TRK_CTL(intel_dp->psr.transcoder),
 					     clear, set);
 				intel_de_write(dev_priv, CURSURFLIVE(intel_dp->psr.pipe), 0);
 			}
 		} else {
+			/*
+			 * continuos full frame is disabled, only a single full
+			 * frame is required
+			 */
 			psr_force_hw_tracking_exit(intel_dp);
 		}
 	} else {
+		/*
+		 * if prev_busy_frontbuffer_bits is set, it means that PSR is
+		 * inactive
+		 */
 		if (prev_busy_frontbuffer_bits == 0)
 			psr_force_hw_tracking_exit(intel_dp);
 
-- 
2.35.1



More information about the Intel-gfx-trybot mailing list