diff options
author | Imre Deak <imre.deak@intel.com> | 2018-07-05 15:26:54 +0300 |
---|---|---|
committer | Imre Deak <imre.deak@intel.com> | 2018-07-06 15:56:38 +0300 |
commit | b79ebe74e1c4219e91940b637d40939b0c80c0f2 (patch) | |
tree | 9fb375fd1a38f968877558f74a2f87b2b7dfbd5f /drivers/gpu/drm/i915/intel_device_info.c | |
parent | 6cc42152b02b3f73969934b63332d47e2dac55e4 (diff) |
drm/i915/ddi: Simplify get_encoder_power_domains()
We can simplify the encoder's get_power_domains() hook by calling it
only if the encoder is active. That way the hook can return its power
domains unconditionally without checking the active state by calling
encoder::get_hw_state(). This get_hw_state() query is in fact
redundant since it's already done by intel_modeset_readout_hw_state()
setting the encoder's crtc or leaving it NULL accordingly. Let's use
this fact to decide if the encoder is active.
While at it clarify the comment in intel_ddi_get_power_domains() about
primary vs. fake MST encoders and make sure we never do an incorrect
encoder->dig_port cast for fake MST encoders.
Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180705122654.17072-1-imre.deak@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_device_info.c')
0 files changed, 0 insertions, 0 deletions