diff options
author | José Roberto de Souza <jose.souza@intel.com> | 2021-04-08 13:31:50 -0700 |
---|---|---|
committer | José Roberto de Souza <jose.souza@intel.com> | 2021-04-09 13:30:43 -0700 |
commit | 5df7bd130818dfdc9047c2a81b19737d66e55f9a (patch) | |
tree | 949135d79f1e9b4275141b6d499460aa09225e7b /drivers/gpu/drm/i915/display/intel_pps.c | |
parent | 61a60d7962a6e8ed94ece62764f94368cd6082b2 (diff) | |
download | lwn-5df7bd130818dfdc9047c2a81b19737d66e55f9a.tar.gz lwn-5df7bd130818dfdc9047c2a81b19737d66e55f9a.zip |
drm/i915: skip display initialization when there is no display
Display features should not be initialized or de-initialized when there
is no display. Skip modeset initialization, output setup, plane, crtc,
encoder, connector registration, display cdclk and rawclk
initialization, display core initialization, etc.
Skip the functionality at as high level as possible, and remove any
redundant checks. If the functionality is conditional to *other* display
checks, do not add more. If the un-initialization has checks for
initialization, do not add more.
We explicitly do not care about any GMCH/VLV/CHV code paths, as they've
always had and will have display.
Reviewed-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210408203150.237947-3-jose.souza@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/display/intel_pps.c')
-rw-r--r-- | drivers/gpu/drm/i915/display/intel_pps.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_pps.c b/drivers/gpu/drm/i915/display/intel_pps.c index 3a0985f1f531..0fd28902d779 100644 --- a/drivers/gpu/drm/i915/display/intel_pps.c +++ b/drivers/gpu/drm/i915/display/intel_pps.c @@ -316,6 +316,9 @@ void intel_pps_reset_all(struct drm_i915_private *dev_priv) if (drm_WARN_ON(&dev_priv->drm, !IS_LP(dev_priv))) return; + if (!HAS_DISPLAY(dev_priv)) + return; + /* * We can't grab pps_mutex here due to deadlock with power_domain * mutex when power_domain functions are called while holding pps_mutex. @@ -1376,7 +1379,7 @@ void intel_pps_unlock_regs_wa(struct drm_i915_private *dev_priv) int pps_num; int pps_idx; - if (HAS_DDI(dev_priv)) + if (!HAS_DISPLAY(dev_priv) || HAS_DDI(dev_priv)) return; /* * This w/a is needed at least on CPT/PPT, but to be sure apply it |