[PATCH 2/3] drm/i915/psr: stop using bitwise OR with booleans in wm_optimization_wa()
Jani Nikula
jani.nikula at intel.com
Tue Oct 29 11:32:49 UTC 2024
Bitwise OR for booleans is a bit of an abuse. We can trivially drop the
usage.
Cc: Jouni Högander <jouni.hogander at intel.com>
Cc: Suraj Kandpal <suraj.kandpal at intel.com>
Signed-off-by: Jani Nikula <jani.nikula at intel.com>
---
drivers/gpu/drm/i915/display/intel_psr.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
index e018a0868009..02f31c7b254b 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -1782,18 +1782,19 @@ static void wm_optimization_wa(struct intel_dp *intel_dp,
{
struct intel_display *display = to_intel_display(intel_dp);
enum pipe pipe = intel_dp->psr.pipe;
- bool set_wa_bit = false;
+ bool activate = false;
/* Wa_14015648006 */
- if (IS_DISPLAY_VER(display, 11, 14))
- set_wa_bit |= crtc_state->wm_level_disabled;
+ if (IS_DISPLAY_VER(display, 11, 14) && crtc_state->wm_level_disabled)
+ activate = true;
/* Wa_16013835468 */
- if (DISPLAY_VER(display) == 12)
- set_wa_bit |= crtc_state->hw.adjusted_mode.crtc_vblank_start !=
- crtc_state->hw.adjusted_mode.crtc_vdisplay;
+ if (DISPLAY_VER(display) == 12 &&
+ crtc_state->hw.adjusted_mode.crtc_vblank_start !=
+ crtc_state->hw.adjusted_mode.crtc_vdisplay)
+ activate = true;
- if (set_wa_bit)
+ if (activate)
intel_de_rmw(display, GEN8_CHICKEN_DCPR_1,
0, LATENCY_REPORTING_REMOVED(pipe));
else
--
2.39.5
More information about the Intel-xe
mailing list