linux/drivers/gpu/drm
Ville Syrjälä e0fce78f04 drm/i915: Implement PHY lane power gating for CHV
Powergate the PHY lanes when they're not needed. For HDMI all four lanes
are needed always, but for DP we can enable only the needed lanes. To
power down the unused lanes we use some power down override bits in the
DISPLAY_PHY_CONTROL register. Without the overrides it appears that the
hardware always powers on all the lanes. When the port is disabled the
power down override is not needed and the lanes will shut off on their
own. That also means the override is critical to actually be able to
access the DPIO registers before the port is actually enabled.

Additionally the common lanes will power down when not needed. CL1
remains on as long as anything else is on, CL2 will shut down when
all the lanes in the same channel will shut down. There is one exception
for CL2 that will be dealt in a separate patch for clarity.

With potentially some lanes powered down, the DP code now has to check
the number of active lanes before accessing PCS/TX registers. All
registers in powered down blocks will reads as 0xffffffff, and soe we
would drown in warnings from vlv_dpio_read() if we allowed the code
to access all those registers.

Another important detail in the DP code is the "TX latency optimal"
setting. Normally the second TX lane acts as some kind of reset master,
with the other lanes as slaves. But when only a single lane is enabled,
that single lane obviously has to be the master.

A bit of extra care is needed to reconstruct the initial state of the
DISPLAY_PHY_CONTROL register since it can't be read safely. So instead
read the actual lane status from the DPLL/PHY_STATUS registers and
use that to determine which lanes ought to be powergated initially.

We also need to switch the PHY power modes to "deep PSR" to avoid
a hard system hang when powering down the single channel PHY.

Also sprinkle a few debug prints around so that we can monitor the
DISPLAY_PHY_STATUS changes without having to read it and risk
corrupting it.

v2: Add locking to chv_powergate_phy_lanes()
v3: Actually enable dynamic powerdown in the PHY and deal with the
    fallout

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Deepak S <deepak.s@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-08-26 14:34:41 +02:00
..
amd Merge tag 'drm-intel-fixes-2015-08-14' into drm-intel-next-fixes 2015-08-14 18:11:30 +02:00
armada Merge branch 'drm-armada-fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm into drm-fixes 2015-07-17 10:06:04 +10:00
ast
atmel-hlcdc Merge tag 'drm-intel-fixes-2015-08-14' into drm-intel-next-fixes 2015-08-14 18:11:30 +02:00
bochs
bridge drm/exynos: atomic dpms support 2015-06-20 00:32:52 +09:00
cirrus
exynos drm/atomic: pass old crtc state to atomic_begin/flush. 2015-07-27 16:23:22 +02:00
gma500
i2c Merge branch 'drm-tda998x-fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm 2015-08-07 04:48:46 +03:00
i810
i915 drm/i915: Implement PHY lane power gating for CHV 2015-08-26 14:34:41 +02:00
imx drm/imx: tve: fix media bus format for VGA output 2015-07-10 11:02:47 +02:00
mga
mgag200 Merge tag 'topic/drm-misc-2015-07-23' of git://anongit.freedesktop.org/drm-intel into drm-next 2015-07-24 14:28:16 +10:00
msm Merge tag 'drm-intel-fixes-2015-08-14' into drm-intel-next-fixes 2015-08-14 18:11:30 +02:00
nouveau Merge tag 'drm-intel-fixes-2015-08-14' into drm-intel-next-fixes 2015-08-14 18:11:30 +02:00
omapdrm drm/omap: replace ALIGN(PAGE_SIZE) by PAGE_ALIGN 2015-07-02 15:58:07 +03:00
panel drm/panel: simple: Add bus format for HannStar HSD100PXN1 2015-06-12 16:40:42 +02:00
qxl drm/qxl: Propagate correctly errors from qxlhw_handle_to_bo 2015-06-05 11:00:52 +10:00
r128
radeon Merge tag 'drm-intel-fixes-2015-08-14' into drm-intel-next-fixes 2015-08-14 18:11:30 +02:00
rcar-du drm/atomic: pass old crtc state to atomic_begin/flush. 2015-07-27 16:23:22 +02:00
rockchip Merge branch 'drm-rockchip-2015-07-13' of https://github.com/markyzq/kernel-drm-rockchip into drm-fixes 2015-07-17 10:25:02 +10:00
savage
shmobile drm: Simplify drm_for_each_legacy_plane arguments 2015-07-22 16:25:45 +02:00
sis
sti drm/atomic: pass old crtc state to atomic_begin/flush. 2015-07-27 16:23:22 +02:00
tdfx
tegra drm: Make the connector dpms callback return a value, v2. 2015-07-27 16:23:28 +02:00
tilcdc
ttm drm/ttm: recognize ARM64 arch in ioprot handler 2015-07-24 11:51:14 +10:00
udl
vgem drm/vgem: Set unique to "vgem" 2015-06-24 11:20:46 +10:00
via
virtio virtio-gpu: add locking for vbuf pool 2015-06-16 11:22:41 +02:00
vmwgfx drm: Make the connector dpms callback return a value, v2. 2015-07-27 16:23:28 +02:00
ati_pcigart.c
drm_agpsupport.c
drm_atomic_helper.c Merge tag 'drm-intel-fixes-2015-08-14' into drm-intel-next-fixes 2015-08-14 18:11:30 +02:00
drm_atomic.c Merge tag 'topic/connector-locking-2015-07-23' of git://anongit.freedesktop.org/drm-intel into drm-next 2015-07-24 14:30:29 +10:00
drm_auth.c
drm_bridge.c
drm_bufs.c
drm_cache.c drm: Avoid the double clflush on the last cache line in drm_clflush_virt_range() 2015-06-19 17:25:17 +02:00
drm_context.c drm: Convert drm_legacy_ctxbitmap_init to void return type 2015-07-02 17:00:48 +02:00
drm_crtc_helper.c drm: Make the connector dpms callback return a value, v2. 2015-07-27 16:23:28 +02:00
drm_crtc_internal.h
drm_crtc.c Merge tag 'drm-intel-fixes-2015-08-14' into drm-intel-next-fixes 2015-08-14 18:11:30 +02:00
drm_debugfs.c
drm_dma.c
drm_dp_helper.c
drm_dp_mst_topology.c drm/dp-mst: Remove debug WARN_ON 2015-08-04 11:10:16 +02:00
drm_drv.c Merge tag 'topic/connector-locking-2015-07-23' of git://anongit.freedesktop.org/drm-intel into drm-next 2015-07-24 14:30:29 +10:00
drm_edid_load.c
drm_edid.c drm: Roll out drm_for_each_connector more 2015-07-22 16:25:47 +02:00
drm_encoder_slave.c
drm_fb_cma_helper.c drm: Roll out drm_for_each_{plane,crtc,encoder} 2015-07-22 17:29:37 +02:00
drm_fb_helper.c Merge tag 'topic/connector-locking-2015-07-23' of git://anongit.freedesktop.org/drm-intel into drm-next 2015-07-24 14:30:29 +10:00
drm_flip_work.c
drm_fops.c
drm_gem_cma_helper.c drm/cma-helper: Fix locking in drm_fb_cma_debugfs_show 2015-07-22 17:29:24 +02:00
drm_gem.c drm/gem: rip out drm vma accounting for gem mmaps 2015-07-14 12:18:45 +02:00
drm_global.c
drm_hashtab.c
drm_info.c
drm_internal.h
drm_ioc32.c Merge tag 'topic/drm-misc-2015-07-23' of git://anongit.freedesktop.org/drm-intel into drm-next 2015-07-24 14:28:16 +10:00
drm_ioctl.c Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2015-06-26 13:18:51 -07:00
drm_irq.c Merge tag 'drm-intel-fixes-2015-08-14' into drm-intel-next-fixes 2015-08-14 18:11:30 +02:00
drm_legacy.h drm: Convert drm_legacy_ctxbitmap_init to void return type 2015-07-02 17:00:48 +02:00
drm_lock.c drm: Reject DRI1 hw lock ioctl functions for kms drivers 2015-07-02 17:00:48 +02:00
drm_memory.c
drm_mipi_dsi.c
drm_mm.c drm: clean up drm_mm debugfs output 2015-05-29 09:17:57 +10:00
drm_modes.c
drm_modeset_lock.c drm: Roll out drm_for_each_{plane,crtc,encoder} 2015-07-22 17:29:37 +02:00
drm_of.c drm: Add modeset object iterators 2015-07-22 16:25:45 +02:00
drm_panel.c
drm_pci.c
drm_plane_helper.c drm/atomic: pass old crtc state to atomic_begin/flush. 2015-07-27 16:23:22 +02:00
drm_platform.c
drm_prime.c drm: prime: Document gem_prime_mmap 2015-06-19 17:50:05 +02:00
drm_probe_helper.c drm/probe-helper: Grab mode_config.mutex in poll_init/enable 2015-07-22 16:25:45 +02:00
drm_rect.c
drm_scatter.c
drm_sysfs.c Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2015-06-26 13:18:51 -07:00
drm_trace_points.c
drm_trace.h
drm_vm.c
drm_vma_manager.c
Kconfig drm/amdgpu: add core driver (v4) 2015-06-03 21:03:15 -04:00
Makefile drm/amdgpu: add core driver (v4) 2015-06-03 21:03:15 -04:00