From bbd440fb81338d8e8d58193867f1404c4e6cef7a Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Thu, 20 Nov 2014 22:33:59 +0100 Subject: [PATCH] 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 Cc: Paulo Zanoni Reported-by: Paulo Zanoni Reviewed-by: Jesse Barnes Signed-off-by: Daniel Vetter --- Reading git-format-patch failed