drm/i915: Read timings from the correct transcoder in intel_crtc_mode_get()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 1 Apr 2016 15:37:25 +0000 (18:37 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 9 Oct 2017 14:45:35 +0000 (17:45 +0300)
commite30a154b5262b967b133b06ac40777e651045898
tree7d3ea182ede377b92706af8c7a02179d214c3c92
parenta883241c3922000b21b58b5740c55badfe09940f
drm/i915: Read timings from the correct transcoder in intel_crtc_mode_get()

intel_crtc->config->cpu_transcoder isn't yet filled out when
intel_crtc_mode_get() gets called during output probing, so we should
not use it there. Instead intel_crtc_mode_get() figures out the correct
transcoder on its own, and that's what we should use.

If the BIOS boots LVDS on pipe B, intel_crtc_mode_get() would actually
end up reading the timings from pipe A instead (since PIPE_A==0),
which clearly isn't what we want.

It looks to me like this may have been broken by
commit eccb140bca67 ("drm/i915: hw state readout&check support for cpu_transcoder")
as that one removed the early initialization of cpu_transcoder from
intel_crtc_init().

Cc: stable@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: Rob Kramer <rob@solution-space.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Reported-by: Rob Kramer <rob@solution-space.com>
Fixes: eccb140bca67 ("drm/i915: hw state readout&check support for cpu_transcoder")
References: https://lists.freedesktop.org/archives/dri-devel/2016-April/104142.html
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/1459525046-19425-1-git-send-email-ville.syrjala@linux.intel.com
drivers/gpu/drm/i915/intel_display.c