summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/display/intel_pps.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2022-05-10 12:42:31 +0200
committerVille Syrjälä <ville.syrjala@linux.intel.com>2022-05-27 19:22:52 +0200
commit60b02a09598f87972a15bb181b9a62b8a8ee682a (patch)
treed4c78b517befcdf58221c7ccbcf26aed8a1ca0c5 /drivers/gpu/drm/i915/display/intel_pps.c
parentdrm/i915/pps: Split pps_init_delays() into distinct parts (diff)
downloadlinux-60b02a09598f87972a15bb181b9a62b8a8ee682a.tar.xz
linux-60b02a09598f87972a15bb181b9a62b8a8ee682a.zip
drm/i915/pps: Introduce pps_delays_valid()
Add a small helper that determines if the PPS delays have been initialized or not. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220510104242.6099-5-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/display/intel_pps.c')
-rw-r--r--drivers/gpu/drm/i915/display/intel_pps.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_pps.c b/drivers/gpu/drm/i915/display/intel_pps.c
index bc56f0fe8e6d..2ef6502703c2 100644
--- a/drivers/gpu/drm/i915/display/intel_pps.c
+++ b/drivers/gpu/drm/i915/display/intel_pps.c
@@ -1159,6 +1159,12 @@ intel_pps_verify_state(struct intel_dp *intel_dp)
}
}
+static bool pps_delays_valid(struct edp_power_seq *delays)
+{
+ return delays->t1_t3 || delays->t8 || delays->t9 ||
+ delays->t10 || delays->t11_t12;
+}
+
static void pps_init_delays_cur(struct intel_dp *intel_dp,
struct edp_power_seq *cur)
{
@@ -1230,7 +1236,7 @@ static void pps_init_delays(struct intel_dp *intel_dp)
lockdep_assert_held(&dev_priv->pps_mutex);
/* already initialized? */
- if (final->t11_t12 != 0)
+ if (pps_delays_valid(final))
return;
pps_init_delays_cur(intel_dp, &cur);