]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915/display/adl_p: Drop earlier return in tc_has_modular_fia()
authorJosé Roberto de Souza <jose.souza@intel.com>
Mon, 24 May 2021 21:48:01 +0000 (14:48 -0700)
committerJosé Roberto de Souza <jose.souza@intel.com>
Tue, 25 May 2021 17:30:23 +0000 (10:30 -0700)
MODULAR_FIA_MASK is set in adl_p so we can drop this ealier return
and read registers.
Also to avoid warnings from icl_tc_port_assert_ref_held() when
calling tc_cold_block() in this functions it is necessary to held the
lock.

Cc: Imre Deak <imre.deak@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Clint Taylor <Clinton.A.Taylor@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210524214805.259692-1-jose.souza@intel.com
drivers/gpu/drm/i915/display/intel_tc.c

index 5f03215a03e4b9615b34755e16f324f14e3f1597..db85e0e2031e05a369fe30c7e8e5c31514c575c4 100644 (file)
@@ -734,13 +734,11 @@ tc_has_modular_fia(struct drm_i915_private *i915, struct intel_digital_port *dig
        if (!INTEL_INFO(i915)->display.has_modular_fia)
                return false;
 
-       /* TODO: check if in real HW MODULAR_FIA_MASK is set, if so remove this block */
-       if (IS_ALDERLAKE_P(i915))
-               return true;
-
+       mutex_lock(&dig_port->tc_lock);
        wakeref = tc_cold_block(dig_port);
        val = intel_uncore_read(&i915->uncore, PORT_TX_DFLEXDPSP(FIA1));
        tc_cold_unblock(dig_port, wakeref);
+       mutex_unlock(&dig_port->tc_lock);
 
        drm_WARN_ON(&i915->drm, val == 0xffffffff);