drm/i915: Fix multifunction SDVO detection
authorAdam Jackson <ajax@redhat.com>
Thu, 16 Jun 2011 20:36:24 +0000 (16:36 -0400)
committerKeith Packard <keithp@keithp.com>
Thu, 20 Oct 2011 21:11:15 +0000 (14:11 -0700)
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>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Keith Packard <keithp@keithp.com>
drivers/gpu/drm/i915/intel_sdvo.c

index ed15c00aecdfe98bbe99aeb42715db090101f5a3..6cbbe5c3e062e6e7445ed72040633903b772dd7f 100644 (file)
@@ -1232,8 +1232,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 *