OSDN Git Service

drm/i915/vlv_dsi: Double pixelclock on read-back for dual-link panels
authorHans de Goede <hdegoede@redhat.com>
Sun, 24 Oct 2021 15:50:20 +0000 (17:50 +0200)
committerHans de Goede <hdegoede@redhat.com>
Thu, 18 Nov 2021 11:49:54 +0000 (12:49 +0100)
commit4121113410fe16649d0a66c81715c8fab7740b14
treecad2fcc76b79bf44cacae42dc433c174b060310d
parenta59308a5fb231aca72b9b070a6577fa49ec2d72a
drm/i915/vlv_dsi: Double pixelclock on read-back for dual-link panels

In intel_dsi_get_config() double the pclk returned by foo_dsi_get_pclk()
for dual-link panels. This fixes the following WARN triggering:

 i915 0000:00:02.0: [drm] *ERROR* [CRTC:51:pipe A] mismatch in pixel_rate (expected 235710, found 118056)
 i915 0000:00:02.0: [drm] *ERROR* [CRTC:51:pipe A] mismatch in hw.pipe_mode.crtc_clock (expected 235710, found 118056)
 i915 0000:00:02.0: [drm] *ERROR* [CRTC:51:pipe A] mismatch in hw.adjusted_mode.crtc_clock (expected 235710, found 118056)
 i915 0000:00:02.0: [drm] *ERROR* [CRTC:51:pipe A] mismatch in port_clock (expected 235710, found 118056)
 ------------[ cut here ]------------
 pipe state doesn't match!
 WARNING: CPU: 3 PID: 136 at drivers/gpu/drm/i915/display/intel_display.c:9125 intel_display_finish_reset+0x1bd3/0x2050 [i915]
 ...

This has been tested on a Xiaomi Mi Pad 2 (with CHT x5-Z8500 SoC) tablet,
with a 1536x2048 dual-link DSI panel.

Note this fix was taken from icl_dsi.c which does the same in
its get_config().

Cc: Tsuchiya Yuto <kitakar@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211024155020.126328-1-hdegoede@redhat.com
drivers/gpu/drm/i915/display/vlv_dsi.c