]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Don't rely upon encoder->type for infoframe hw state readout
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 20 Nov 2014 21:33:59 +0000 (22:33 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 20 Nov 2014 21:37:04 +0000 (22:37 +0100)
commit452cb36cb47e0b38113dbd7c4c34d89d52a5822a
tree39cc7fa60e1b2bbdd28c9b2e343e403fae46b249
parent86fde1173826fb2fde48681552339553b57ea696
drm/i915: Don't rely upon encoder->type for infoframe hw state readout

encoder->type can change underneath us and doesn't need to reflect
actual hw state (since we don't construct it from hw state like
e.g. encoder->crtc crtc->config).

And this can indeed happen:
1) Boot with plugged-in hdmi screen. Since we only set ->type in the
   probe functions this means we won't detect any infoframes since
   type is still unkown.
2) First probe sets type to HDMI.
3) If the first modeset now does _not_ happen on the HDMI pipe with
   infoframes encoder->get_config suddenly sees infoframes and the
   state checker gets angry.

Fix this by only relying on actual hw state when figuring out whether
the ddi port is in hdmi mode and sends infoframes.

Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Paulo Zanoni <przanoni@gmail.com>
Reported-by: Paulo Zanoni <przanoni@gmail.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_ddi.c