diff mbox

[2/6] drm/i915: Fix multifunction SDVO detection

Message ID 1308256588-8026-2-git-send-email-ajax@redhat.com
State New, archived
Headers show

Commit Message

Adam Jackson June 16, 2011, 8:36 p.m. UTC
I can't think of any sensible reason to limit this to a mask of 0x0f,
ie, SDVO_OUTPUT_{TMDS,RGB,CVBS,SVID}0.

Signed-off-by: Adam Jackson <ajax@redhat.com>
---
 drivers/gpu/drm/i915/intel_sdvo.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

Comments

Chris Wilson June 16, 2011, 8:44 p.m. UTC | #1
On Thu, 16 Jun 2011 16:36:24 -0400, Adam Jackson <ajax@redhat.com> wrote:
> I can't think of any sensible reason to limit this to a mask of 0x0f,
> ie, SDVO_OUTPUT_{TMDS,RGB,CVBS,SVID}0.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index a6339f8..475f615 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -1281,8 +1281,7 @@  static bool
 intel_sdvo_multifunc_encoder(struct intel_sdvo *intel_sdvo)
 {
 	/* Is there more than one type of output? */
-	int caps = intel_sdvo->caps.output_flags & 0xf;
-	return caps & -caps;
+	return hweight16(intel_sdvo->caps.output_flags) > 1;
 }
 
 static struct edid *