[Intel-gfx] [PATCH] drm/i915: Fix sdvo connector get_hw_state function
Daniel Vetter
daniel at ffwll.ch
Wed Apr 3 11:09:11 CEST 2013
On Tue, Apr 02, 2013 at 09:30:34PM +0200, Daniel Vetter wrote:
> The active output is only the currently selected one, which does not
> imply that it's actually enabled. Since we don't use the sdvo encoder
> side dpms support, we need to check whether the chip-side sdvo port is
> enabled instead.
>
> v2: Fix up Bugzilla links.
>
> v3: Simplify logic a bit (Chris).
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=60138
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=63031
> Cc: Egbert Eich <eich at pdx.freedesktop.org>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
Queued for next with a cc: stable tag. Since it's just mostly harmless
warnings imo not something for -fixes right away.
-Daniel
> ---
> drivers/gpu/drm/i915/intel_sdvo.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
> index 33b46d9..35187d9 100644
> --- a/drivers/gpu/drm/i915/intel_sdvo.c
> +++ b/drivers/gpu/drm/i915/intel_sdvo.c
> @@ -1219,8 +1219,12 @@ 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);
> + struct drm_i915_private *dev_priv = intel_sdvo->base.base.dev->dev_private;
> u16 active_outputs;
>
> + if (!(I915_READ(intel_sdvo->sdvo_reg) & SDVO_ENABLE))
> + return false;
> +
> intel_sdvo_get_active_outputs(intel_sdvo, &active_outputs);
>
> if (active_outputs & intel_sdvo_connector->output_flag)
> --
> 1.7.10.4
>
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
More information about the Intel-gfx
mailing list