Patch "drm/i915: Read timings from the correct transcoder in intel_crtc_mode_get()" has been added to the 4.13-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
drm/i915: Read timings from the correct transcoder in intel_crtc_mode_get()
to the 4.13-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
drm-i915-read-timings-from-the-correct-transcoder-in-intel_crtc_mode_get.patch
and it can be found in the queue-4.13 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
7b50f7b24cd6c98541f1af53bddc5b6e861ee8c8Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <[email protected]>
Date: Fri, 1 Apr 2016 18:37:25 +0300
Subject: drm/i915: Read timings from the correct transcoder in intel_crtc_mode_get()
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
From: Ville Syrjälä <[email protected]>
commit 7b50f7b24cd6c98541f1af53bddc5b6e861ee8c8 upstream.
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().
References: https://lists.freedesktop.org/archives/dri-devel/2016-April/104142.html
--- drivers/gpu/drm/i915/intel_display.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/intel_display.c +9 -5
@@ -10059,13 +10059,10 @@ struct drm_display_mode *intel_crtc_mode {struct drm_i915_private *dev_priv =to_i915 (dev);struct intel_crtc *intel_crtc =to_intel_crtc (crtc); -enum transcoder cpu_transcoder = intel_crtc->config->cpu_transcoder; +enum transcoder cpu_transcoder;struct drm_display_mode *mode;struct intel_crtc_state *pipe_config; -int htot =I915_READ (HTOTAL (cpu_transcoder)); -int hsync =I915_READ (HSYNC (cpu_transcoder)); -int vtot =I915_READ (VTOTAL (cpu_transcoder)); -int vsync =I915_READ (VSYNC (cpu_transcoder)); +u32 htot, hsync, vtot, vsync;enum pipe pipe = intel_crtc->pipe; mode =kzalloc (sizeof (*mode),GFP_KERNEL );
@@ -10093,6 +10090,13 @@ struct drm_display_mode *intel_crtc_modei9xx_crtc_clock_get (intel_crtc, pipe_config); mode->clock = pipe_config->port_clock / pipe_config->pixel_multiplier; + + cpu_transcoder = pipe_config->cpu_transcoder; + htot =I915_READ (HTOTAL (cpu_transcoder)); + hsync =I915_READ (HSYNC (cpu_transcoder)); + vtot =I915_READ (VTOTAL (cpu_transcoder)); + vsync =I915_READ (VSYNC (cpu_transcoder)); + mode->hdisplay = (htot &0xffff ) +1 ; mode->htotal = ((htot &0xffff0000 ) >>16 ) +1 ; mode->hsync_start = (hsync &0xffff ) +1 ;
Patches currently in stable-queue which might be from [email protected] are
queue-4.13/drm-i915-bios-parse-ddi-ports-also-for-chv-for-hdmi-ddc-pin-and-dp-aux-channel.patch queue-4.13/drm-i915-read-timings-from-the-correct-transcoder-in-intel_crtc_mode_get.patch