diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c index 80f8680..2ea9414 100644 --- a/drivers/gpu/drm/i915/intel_sdvo.c +++ b/drivers/gpu/drm/i915/intel_sdvo.c @@ -1226,21 +1226,6 @@ static void intel_sdvo_mode_set(struct intel_encoder *intel_encoder) intel_sdvo_write_sdvox(intel_sdvo, sdvox); } -static bool intel_sdvo_connector_get_hw_state(struct intel_connector *connector) -{ - struct intel_sdvo_connector *intel_sdvo_connector = - to_intel_sdvo_connector(&connector->base); - struct intel_sdvo *intel_sdvo = intel_attached_sdvo(&connector->base); - u16 active_outputs; - - intel_sdvo_get_active_outputs(intel_sdvo, &active_outputs); - - if (active_outputs & intel_sdvo_connector->output_flag) - return true; - else - return false; -} - static bool intel_sdvo_get_hw_state(struct intel_encoder *encoder, enum pipe *pipe) { @@ -1262,6 +1247,25 @@ static bool intel_sdvo_get_hw_state(struct intel_encoder *encoder, return true; } +static bool intel_sdvo_connector_get_hw_state(struct intel_connector *connector) +{ + struct intel_sdvo_connector *intel_sdvo_connector = + to_intel_sdvo_connector(&connector->base); + struct intel_sdvo *intel_sdvo = intel_attached_sdvo(&connector->base); + u16 active_outputs; + enum pipe pipe_tmp; + + if (!intel_sdvo_get_hw_state(&intel_sdvo->base, &pipe_tmp)) + return false; + + intel_sdvo_get_active_outputs(intel_sdvo, &active_outputs); + + if (active_outputs & intel_sdvo_connector->output_flag) + return true; + else + return false; +} + static void intel_disable_sdvo(struct intel_encoder *encoder) { struct drm_i915_private *dev_priv = encoder->base.dev->dev_private;