From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org, Paul Hordiienko <pvt.gord@gmail.com>,
William Brown <william@blackhats.net.au>,
Lukas Wunner <lukas@wunner.de>,
Bruno Bierbaumer <bruno@bierbaumer.net>,
Jesse Barnes <jbarnes@virtuousgeek.org>,
Jani Nikula <jani.nikula@intel.com>
Subject: [PATCH 4.1 011/102] drm/i915: Preserve SSC earlier
Date: Sat, 19 Sep 2015 10:27:23 -0700 [thread overview]
Message-ID: <20150919171745.973671003@linuxfoundation.org> (raw)
In-Reply-To: <20150919171745.474069671@linuxfoundation.org>
4.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lukas Wunner <lukas@wunner.de>
commit 69f92f67b68ab7028ffe15f0eea76b59f8859383 upstream.
Commit 92122789b2d6 ("drm/i915: preserve SSC if previously set v3")
added code to intel_modeset_gem_init to override the SSC status read
from VBT with the SSC status set by BIOS.
However, intel_modeset_gem_init is invoked *after* intel_modeset_init,
which calls intel_setup_outputs, which *modifies* SSC status by way of
intel_init_pch_refclk. So unlike advertised, intel_modeset_gem_init
doesn't preserve the SSC status set by BIOS but whatever
intel_init_pch_refclk decided on.
This is a problem on dual gpu laptops such as the MacBook Pro which
require either a handler to switch DDC lines, or the discrete gpu
to proxy DDC/AUX communication: Both the handler and the discrete
gpu may initialize after the i915 driver, and consequently, an LVDS
connector may initially seem disconnected and the SSC therefore
is disabled by intel_init_pch_refclk, but on reprobe the connector
may turn out to be connected and the SSC must then be enabled.
Due to 92122789b2d6 however, the SSC is not enabled on reprobe since
it is assumed BIOS disabled it while in fact it was disabled by
intel_init_pch_refclk.
Also, because the SSC status is preserved so late, the preserved value
only ever gets used on resume but not on panel initialization:
intel_modeset_init calls intel_init_display which indirectly calls
intel_panel_use_ssc via multiple subroutines, *before* the BIOS value
overrides the VBT value in intel_modeset_gem_init (intel_panel_use_ssc
is the sole user of dev_priv->vbt.lvds_use_ssc).
Fix this by moving the code introduced by 92122789b2d6 from
intel_modeset_gem_init to intel_modeset_init before the invocation
of intel_setup_outputs and intel_init_display.
Add a DRM_DEBUG_KMS as suggested way back by Jani:
http://lists.freedesktop.org/archives/intel-gfx/2014-June/046666.html
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=88861
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61115
Tested-by: Paul Hordiienko <pvt.gord@gmail.com>
[MBP 6,2 2010 intel ILK + nvidia GT216 pre-retina]
Tested-by: William Brown <william@blackhats.net.au>
[MBP 8,2 2011 intel SNB + amd turks pre-retina]
Tested-by: Lukas Wunner <lukas@wunner.de>
[MBP 9,1 2012 intel IVB + nvidia GK107 pre-retina]
Tested-by: Bruno Bierbaumer <bruno@bierbaumer.net>
[MBP 11,3 2013 intel HSW + nvidia GK107 retina -- work in progress]
Fixes: 92122789b2d6 ("drm/i915: preserve SSC if previously set v3")
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/i915/intel_display.c | 29 ++++++++++++++++++-----------
1 file changed, 18 insertions(+), 11 deletions(-)
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -13781,6 +13781,24 @@ void intel_modeset_init(struct drm_devic
if (INTEL_INFO(dev)->num_pipes == 0)
return;
+ /*
+ * There may be no VBT; and if the BIOS enabled SSC we can
+ * just keep using it to avoid unnecessary flicker. Whereas if the
+ * BIOS isn't using it, don't assume it will work even if the VBT
+ * indicates as much.
+ */
+ if (HAS_PCH_IBX(dev) || HAS_PCH_CPT(dev)) {
+ bool bios_lvds_use_ssc = !!(I915_READ(PCH_DREF_CONTROL) &
+ DREF_SSC1_ENABLE);
+
+ if (dev_priv->vbt.lvds_use_ssc != bios_lvds_use_ssc) {
+ DRM_DEBUG_KMS("SSC %sabled by BIOS, overriding VBT which says %sabled\n",
+ bios_lvds_use_ssc ? "en" : "dis",
+ dev_priv->vbt.lvds_use_ssc ? "en" : "dis");
+ dev_priv->vbt.lvds_use_ssc = bios_lvds_use_ssc;
+ }
+ }
+
intel_init_display(dev);
intel_init_audio(dev);
@@ -14266,7 +14284,6 @@ void intel_modeset_setup_hw_state(struct
void intel_modeset_gem_init(struct drm_device *dev)
{
- struct drm_i915_private *dev_priv = dev->dev_private;
struct drm_crtc *c;
struct drm_i915_gem_object *obj;
int ret;
@@ -14275,16 +14292,6 @@ void intel_modeset_gem_init(struct drm_d
intel_init_gt_powersave(dev);
mutex_unlock(&dev->struct_mutex);
- /*
- * There may be no VBT; and if the BIOS enabled SSC we can
- * just keep using it to avoid unnecessary flicker. Whereas if the
- * BIOS isn't using it, don't assume it will work even if the VBT
- * indicates as much.
- */
- if (HAS_PCH_IBX(dev) || HAS_PCH_CPT(dev))
- dev_priv->vbt.lvds_use_ssc = !!(I915_READ(PCH_DREF_CONTROL) &
- DREF_SSC1_ENABLE);
-
intel_modeset_init_hw(dev);
intel_setup_overlay(dev);
next prev parent reply other threads:[~2015-09-19 17:27 UTC|newest]
Thread overview: 103+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-19 17:27 [PATCH 4.1 000/102] 4.1.8-stable review Greg Kroah-Hartman
2015-09-19 17:27 ` [PATCH 4.1 001/102] x86/ldt: Make modify_ldt synchronous Greg Kroah-Hartman
2015-09-19 17:27 ` [PATCH 4.1 002/102] x86/ldt: Correct LDT access in single stepping logic Greg Kroah-Hartman
2015-09-19 17:27 ` [PATCH 4.1 003/102] x86/ldt: Correct FPU emulation access to LDT Greg Kroah-Hartman
2015-09-19 17:27 ` [PATCH 4.1 004/102] x86/ldt: Further fix FPU emulation Greg Kroah-Hartman
2015-09-19 17:27 ` [PATCH 4.1 005/102] DRM - radeon: Dont link train DisplayPort on HPD until we get the dpcd Greg Kroah-Hartman
2015-09-19 17:27 ` [PATCH 4.1 006/102] drm/i915: apply the PCI_D0/D3 hibernation workaround everywhere on pre GEN6 Greg Kroah-Hartman
2015-09-19 17:27 ` [PATCH 4.1 010/102] drm/radeon: fix HDMI quantization_range for pre-DCE5 asics Greg Kroah-Hartman
2015-09-19 17:27 ` Greg Kroah-Hartman [this message]
2015-09-19 17:27 ` [PATCH 4.1 012/102] drm/qxl: validate monitors config modes Greg Kroah-Hartman
2015-09-19 17:27 ` [PATCH 4.1 016/102] s390/sclp: fix compile error Greg Kroah-Hartman
2015-09-19 17:27 ` [PATCH 4.1 017/102] s390/setup: fix novx parameter Greg Kroah-Hartman
2015-09-19 17:27 ` [PATCH 4.1 018/102] iio: bmg160: IIO_BUFFER and IIO_TRIGGERED_BUFFER are required Greg Kroah-Hartman
2015-09-19 17:27 ` [PATCH 4.1 019/102] iio: event: Remove negative error code from iio_event_poll Greg Kroah-Hartman
2015-09-19 17:27 ` [PATCH 4.1 020/102] iio: industrialio-buffer: Fix iio_buffer_poll return value Greg Kroah-Hartman
2015-09-19 17:27 ` [PATCH 4.1 021/102] iio: adis16400: Fix adis16448 gyroscope scale Greg Kroah-Hartman
2015-09-19 17:27 ` [PATCH 4.1 022/102] iio: Add inverse unit conversion macros Greg Kroah-Hartman
2015-09-19 17:27 ` [PATCH 4.1 023/102] iio: adis16480: Fix scale factors Greg Kroah-Hartman
2015-09-19 17:27 ` [PATCH 4.1 025/102] staging: comedi: adl_pci7x3x: fix digital output on PCI-7230 Greg Kroah-Hartman
2015-09-19 17:27 ` [PATCH 4.1 026/102] staging: comedi: usbduxsigma: dont clobber ai_timer in command test Greg Kroah-Hartman
2015-09-19 17:27 ` [PATCH 4.1 027/102] staging: comedi: usbduxsigma: dont clobber ao_timer " Greg Kroah-Hartman
2015-09-19 17:27 ` [PATCH 4.1 028/102] PM / clk: dont return int on __pm_clk_enable() Greg Kroah-Hartman
2015-09-19 17:27 ` [PATCH 4.1 029/102] clk: rockchip: rk3288: add CLK_SET_RATE_PARENT to sclk_mac Greg Kroah-Hartman
2015-09-19 17:27 ` [PATCH 4.1 030/102] clk: exynos4: Fix wrong clock for Exynos4x12 ADC Greg Kroah-Hartman
2015-09-19 17:27 ` [PATCH 4.1 031/102] clk: s5pv210: add missing call to samsung_clk_of_add_provider() Greg Kroah-Hartman
2015-09-19 17:27 ` [PATCH 4.1 032/102] clk: pistachio: Fix override of clk-pll settings from boot loader Greg Kroah-Hartman
2015-09-19 17:27 ` [PATCH 4.1 033/102] clk: pistachio: correct critical clock list Greg Kroah-Hartman
2015-09-19 17:27 ` [PATCH 4.1 034/102] clk: versatile: off by one in clk_sp810_timerclken_of_get() Greg Kroah-Hartman
2015-09-19 17:27 ` [PATCH 4.1 035/102] clk: pxa: fix core frequency reporting unit Greg Kroah-Hartman
2015-09-19 17:27 ` [PATCH 4.1 036/102] clk: qcom: Set CLK_SET_RATE_PARENT on ce1 clocks Greg Kroah-Hartman
2015-09-19 17:27 ` [PATCH 4.1 037/102] clk: qcom: Fix MSM8916 prng clock enable bit Greg Kroah-Hartman
2015-09-19 17:27 ` [PATCH 4.1 038/102] PCI: Fix TI816X class code quirk Greg Kroah-Hartman
2015-09-19 17:27 ` [PATCH 4.1 039/102] PCI: Add dev_flags bit to access VPD through function 0 Greg Kroah-Hartman
2015-09-19 17:27 ` [PATCH 4.1 040/102] PCI: Add VPD function 0 quirk for Intel Ethernet devices Greg Kroah-Hartman
2015-09-19 17:27 ` [PATCH 4.1 041/102] PCI: Disable async suspend/resume for JMicron multi-function SATA/AHCI Greg Kroah-Hartman
2015-09-19 17:27 ` [PATCH 4.1 042/102] spi: bcm2835: set up spi-mode before asserting cs-gpio Greg Kroah-Hartman
2015-09-19 17:27 ` [PATCH 4.1 043/102] spi: Fix regression in spi-bitbang-txrx.h Greg Kroah-Hartman
2015-09-19 17:27 ` [PATCH 4.1 044/102] spi: sh-msiof: Fix FIFO size to 64 word from 256 word Greg Kroah-Hartman
2015-09-19 17:27 ` [PATCH 4.1 045/102] spi: img-spfi: check for timeout error before proceeding Greg Kroah-Hartman
2015-09-19 17:27 ` [PATCH 4.1 046/102] spi: img-spfi: fix multiple calls to request gpio Greg Kroah-Hartman
2015-09-19 17:27 ` [PATCH 4.1 047/102] spi: img-spfi: fix kbuild test robot warning Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 048/102] spi: dw: Allow interface drivers to limit data I/O to word sizes Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 049/102] USB: symbolserial: Use usb_get_serial_port_data Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 050/102] USB: qcserial: add HP lt4111 LTE/EV-DO/HSPA+ Gobi 4G Module Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 051/102] USB: ftdi_sio: Added custom PID for CustomWare products Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 052/102] USB: pl2303: fix baud-rate divisor calculations Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 053/102] libxfs: readahead of dir3 data blocks should use the read verifier Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 054/102] xfs: Fix xfs_attr_leafblock definition Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 055/102] xfs: Fix file type directory corruption for btree directories Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 056/102] usb: gadget: m66592-udc: forever loop in set_feature() Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 057/102] doc: usb: gadget-testing: using the updated testusb.c Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 058/102] usb: dwc3: ep0: Fix mem corruption on OUT transfers of more than 512 bytes Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 059/102] usb: gadget: f_uac2: finalize wMaxPacketSize according to bandwidth Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 060/102] usb: host: ehci-sys: delete useless bus_to_hcd conversion Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 061/102] tty: serial: men_z135_uart.c: Fix race between IRQ and set_termios() Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 062/102] ASoC: rt5640: fix line out no sound issue Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 063/102] ASoC: samsung: Remove redundant arndale_audio_remove Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 064/102] ASoC: adav80x: Remove .read_flag_mask setting from adav80x_regmap_config Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 065/102] ASoC: arizona: Fix gain settings of FLL in free-run mode Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 066/102] ASoC: arizona: Poll for FLL clock OK rather than use interrupts Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 067/102] serial: 8250: dont bind to SMSC IrCC IR port Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 068/102] serial: 8250: bind to ALi Fast Infrared Controller (ALI5123) Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 069/102] serial: 8250_pci: Add support for Pericom PI7C9X795[1248] Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 070/102] serial: samsung: fix DMA mode enter condition for small FIFO sizes Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 071/102] serial: samsung: fix DMA for FIFO smaller than cache line size Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 072/102] crypto: vmx - Fixing GHASH Key issue on little endian Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 073/102] crypto: ghash-clmulni: specify context size for ghash async algorithm Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 074/102] HID: usbhid: Fix the check for HID_RESET_PENDING in hid_io_error Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 075/102] HID: cp2112: fix byte order in SMBUS operations Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 076/102] HID: cp2112: fix I2C_SMBUS_BYTE write Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 077/102] KVM: MMU: fix validation of mmio page fault Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 078/102] KVM: PPC: Book3S HV: Exit on H_DOORBELL if HOST_IPI is set Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 079/102] KVM: PPC: Book3S HV: Fix race in reading change bit when removing HPTE Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 080/102] KVM: x86: Use adjustment in guest cycles when handling MSR_IA32_TSC_ADJUST Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 081/102] xtensa: fix threadptr reload on return to userspace Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 082/102] xtensa: fix kernel register spilling Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 083/102] devres: fix devres_get() Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 084/102] Doc: ABI: testing: configfs-usb-gadget-loopback Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 085/102] Doc: ABI: testing: configfs-usb-gadget-sourcesink Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 086/102] spi/spi-xilinx: Fix spurious IRQ ACK on irq mode Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 087/102] spi/spi-xilinx: Fix mixed poll/irq mode Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 088/102] auxdisplay: ks0108: fix refcount Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 089/102] regulator: pbias: Fix broken pbias disable functionality Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 090/102] x86/mce: Reenable CMCI banks when swiching back to interrupt mode Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 091/102] soc/tegra: pmc: Avoid usage of uninitialized variable Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 092/102] of/address: Dont loop forever in of_find_matching_node_by_address() Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 093/102] ARM: orion5x: fix legacy orion5x IRQ numbers Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 094/102] ARM: dts: fix clock-frequency of display timing0 for exynos3250-rinato Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 095/102] ARM: OMAP2+: DRA7: clockdomain: change l4per2_7xx_clkdm to SW_WKUP Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 096/102] ARM: rockchip: fix the CPU soft reset Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 097/102] ARM: dts: rockchip: fix rk3288 watchdog irq Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 098/102] ACPI, PCI: Penalize legacy IRQ used by ACPI SCI Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 099/102] drivercore: Fix unregistration path of platform devices Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 100/102] fs: Set the size of empty dirs to 0 Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 101/102] hpfs: update ctime and mtime on directory modification Greg Kroah-Hartman
2015-09-19 17:28 ` [PATCH 4.1 102/102] fs: create and use seq_show_option for escaping Greg Kroah-Hartman
2015-09-19 20:38 ` [PATCH 4.1 000/102] 4.1.8-stable review Guenter Roeck
2015-09-20 0:25 ` Guenter Roeck
2015-09-20 5:28 ` Willy Tarreau
2015-09-20 7:51 ` Sudip Mukherjee
2015-09-21 1:36 ` Greg Kroah-Hartman
2015-09-21 5:42 ` Sudip Mukherjee
2015-09-21 16:22 ` Shuah Khan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150919171745.973671003@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=bruno@bierbaumer.net \
--cc=jani.nikula@intel.com \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=pvt.gord@gmail.com \
--cc=stable@vger.kernel.org \
--cc=william@blackhats.net.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).