Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/i915/dvo-ch7xxx: fix get_hw_state

The boot-up state seems to be all-zeros, so it's safer to check for
the bits that need to be set when the dvo encoder is in the dpms on
state, than checking the bits we set when it's in the off state.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55047
Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

+3 -3
+3 -3
drivers/gpu/drm/i915/dvo_ch7xxx.c
··· 303 303 304 304 ch7xxx_readb(dvo, CH7xxx_PM, &val); 305 305 306 - if (val & CH7xxx_PM_FPD) 307 - return false; 308 - else 306 + if (val & (CH7xxx_PM_DVIL | CH7xxx_PM_DVIP)) 309 307 return true; 308 + else 309 + return false; 310 310 } 311 311 312 312 static void ch7xxx_dump_regs(struct intel_dvo_device *dvo)