Skip to content

Commit

Permalink
drm/i915/dvo-ch7xxx: fix get_hw_state
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Daniel Vetter committed Oct 12, 2012
1 parent fa55583 commit 4afa0ac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/gpu/drm/i915/dvo_ch7xxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,10 +303,10 @@ static bool ch7xxx_get_hw_state(struct intel_dvo_device *dvo)

ch7xxx_readb(dvo, CH7xxx_PM, &val);

if (val & CH7xxx_PM_FPD)
return false;
else
if (val & (CH7xxx_PM_DVIL | CH7xxx_PM_DVIP))
return true;
else
return false;
}

static void ch7xxx_dump_regs(struct intel_dvo_device *dvo)
Expand Down

0 comments on commit 4afa0ac

Please sign in to comment.