There's no point in enabling PSR when the panel doesn't support it.
This also avoids a problem when PSR gets enabled when a CRTC is being
disabled, because sometimes in that situation the DSP_HOLD_VALID_INTR
interrupt on which we wait will never arrive. This was observed on
RK3288 with a panel without PSR (veyron-jaq Chromebook).
It's very easy to reproduce by running the kms_rmfb test in IGT a few
times.
Cc: Yakir Yang <[email protected]>
Reviewed-by: Sean Paul <[email protected]>
Signed-off-by: Tomeu Vizoso <[email protected]>
Signed-off-by: Archit Taneja <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
struct rockchip_dp_device *dp = to_dp(encoder);
unsigned long flags;
+ if (!analogix_dp_psr_supported(dp->dev))
+ return;
+
dev_dbg(dp->dev, "%s PSR...\n", enabled ? "Entry" : "Exit");
spin_lock_irqsave(&dp->psr_lock, flags);