drm/i915: Remove PLL asserts from .load_luts()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 29 Sep 2022 07:15:12 +0000 (10:15 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 30 Sep 2022 12:57:08 +0000 (15:57 +0300)
.load_luts() potentially runs from the vblank worker, and is
under a deadline to complete within the vblank. Thus we can't
do expesive stuff like talk to the Punit, etc.

To that end get rid of the assert_dsi_pll_enabled() call for
vlv/chv. We'll just have to trust that the PLL is already enabled
here.

And I don't think the normal assert_pll_enabled() really buys us
anything useful on gmch platforms either, so nuke that one too.
We don't have corresponding asserts in the ilk+ codepaths anyway
despite the hardware (IIRC) still requiring the clock to be
enabled when we access the LUT.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220929071521.26612-2-ville.syrjala@linux.intel.com
Acked-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/display/intel_color.c

index 6bda427..bbc56af 100644 (file)
@@ -25,9 +25,7 @@
 #include "intel_color.h"
 #include "intel_de.h"
 #include "intel_display_types.h"
-#include "intel_dpll.h"
 #include "intel_dsb.h"
-#include "vlv_dsi_pll.h"
 
 struct intel_color_funcs {
        int (*color_check)(struct intel_crtc_state *crtc_state);
@@ -580,11 +578,8 @@ static void i9xx_load_lut_8(struct intel_crtc *crtc,
 static void i9xx_load_luts(const struct intel_crtc_state *crtc_state)
 {
        struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
-       struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
        const struct drm_property_blob *gamma_lut = crtc_state->hw.gamma_lut;
 
-       assert_pll_enabled(dev_priv, crtc->pipe);
-
        i9xx_load_lut_8(crtc, gamma_lut);
 }
 
@@ -611,14 +606,8 @@ static void i965_load_lut_10p6(struct intel_crtc *crtc,
 static void i965_load_luts(const struct intel_crtc_state *crtc_state)
 {
        struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
-       struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
        const struct drm_property_blob *gamma_lut = crtc_state->hw.gamma_lut;
 
-       if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DSI))
-               assert_dsi_pll_enabled(dev_priv);
-       else
-               assert_pll_enabled(dev_priv, crtc->pipe);
-
        if (crtc_state->gamma_mode == GAMMA_MODE_MODE_8BIT)
                i9xx_load_lut_8(crtc, gamma_lut);
        else