linux_dsm_epyc7002/drivers/gpu/drm
Sonika Jindal 237ed86c69 drm/i915: Check live status before reading edid
The Bspec is very clear that Live status must be checked about before
trying to read EDID over DDC channel. This patch makes sure that HDMI
EDID is read only when live status is up.

The live status doesn't seem to perform very consistent across various
platforms when tested with different monitors. The reason behind that is
some monitors are late to provide right voltage to set live_status up.
So, after getting the interrupt, for a small duration, live status reg
fluctuates, and then settles down showing the correct staus.

This is explained here in, in a rough way:
HPD line  ________________
			 |\ T1 = Monitor Hotplug causing IRQ
			 | \______________________________________
			 | |
                         | |
			 | |   T2 = Live status is stable
			 | |  _____________________________________
			 | | /|
Live status _____________|_|/ |
			 | |  |
			 | |  |
			 | |  |
			T0 T1  T2

(Between T1 and T2 Live status fluctuates or can be even low, depending on
 the monitor)

After several experiments, we have concluded that a max delay
of 30ms is enough to allow the live status to settle down with
most of the monitors. This total delay of 30ms has been split into
a resolution of 3 retries of 10ms each, for the better cases.

This delay is kept at 30ms, keeping in consideration that, HDCP compliance
expect the HPD handler to respond a plug out in 100ms, by disabling port.

v2: Adding checks for VLV/CHV as well. Reusing old ibx and g4x functions
to check digital port status. Adding a separate function to get bxt live
status (Daniel)
v3: Using intel_encoder->hpd_pin to check the live status (Siva)
Moving the live status read to intel_hdmi_probe and passing parameter
to read/not to read the edid. (me)
v4:
* Added live status check for all platforms using
intel_digital_port_connected.
* Rebased on top of Jani's DP cleanup series
* Some monitors take time in setting the live status. So retry for few
times if this is a connect HPD
v5: Removed extra "drm/i915" from commit message. Adding Shashank's sob
    which was missed.
v6: Drop the (!detect_edid && !live_status check) check because for DDI
ports which are enumerated as hdmi as well as DP, we don't have a
mechanism to differentiate between DP and hdmi inside the encoder's
hot_plug. This leads to call to the hdmi's hot_plug hook for DP as well
as hdmi which leads to issues during unplug because of the above check.
v7: Make intel_digital_port_connected global in this patch, some
reformatting of while loop, adding a print when live status is not
up. (Rodrigo)
v8: Rebase it on nightly which involved skipping the hot_plug hook for now
and letting the live_status check happen in detect until the hpd handling
part is finalized (Daniel)

Signed-off-by: Shashank Sharma <shashank.sharma@intel.com>
Signed-off-by: Sonika Jindal <sonika.jindal@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-09-23 10:18:45 +02:00
..
amd drm/amdgpu: wait on page directory changes. v2 2015-08-17 16:51:23 -04:00
armada drm/armada: Use new drm_fb_helper functions 2015-08-06 14:12:56 +02:00
ast drm/ast: Don't grab dev->struct_mutex for in mmap offset ioctl 2015-08-10 13:36:55 +02:00
atmel-hlcdc Linux 4.2-rc8 2015-08-24 16:36:42 +10:00
bochs drm/bochs: Don't grab dev->struct_mutex for in mmap offset ioctl 2015-08-10 13:37:04 +02:00
bridge drm/bridge: Put Kconfig entries in a separate menu 2015-08-14 21:35:36 +02:00
cirrus drm/cirrus: Don't grab dev->struct_mutex for in mmap offset ioctl 2015-08-10 13:37:27 +02:00
exynos drm/panel: Changes for v4.3-rc1 2015-08-17 15:53:05 +10:00
fsl-dcu drm/layerscape: Add Freescale DCU DRM driver 2015-08-19 22:23:04 -04:00
gma500 drm/gma500: Use new drm_fb_helper functions 2015-08-06 14:12:59 +02:00
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: Check live status before reading edid 2015-09-23 10:18:45 +02:00
imx drm/imx: tve: fix media bus format for VGA output 2015-07-10 11:02:47 +02:00
mga
mgag200 drm/mgag200: Add support for a new rev of G200e 2015-08-24 13:47:16 +10:00
msm Linux 4.2-rc7 2015-08-17 14:13:53 +10:00
nouveau Linux 4.2-rc7 2015-08-17 14:13:53 +10:00
omapdrm drm/omap: Use new drm_fb_helper functions 2015-08-06 14:13:03 +02:00
panel drm/panel: Add support for LG LG4573 480x800 4.3" panel 2015-08-14 21:35:35 +02:00
qxl drm/qxl: Don't take dev->struct_mutex in bo_force_delete 2015-08-11 12:04:16 +02:00
r128
radeon Linux 4.2-rc8 2015-08-24 16:36:42 +10:00
rcar-du drm/atomic: pass old crtc state to atomic_begin/flush. 2015-07-27 16:23:22 +02:00
rockchip drm/rockchip: Don't grab dev->struct_mutex for in mmap offset ioctl 2015-08-11 12:04:06 +02:00
savage
shmobile drm: Simplify drm_for_each_legacy_plane arguments 2015-07-22 16:25:45 +02:00
sis
sti Merge branch 'drm-sti-next-atomic-2015-08-11' of http://git.linaro.org/people/benjamin.gaignard/kernel into drm-next 2015-08-14 10:14:23 +10:00
tdfx
tegra drm/tegra: Changes for v4.3-rc1 2015-08-17 15:52:39 +10:00
tilcdc drm/tilcdc: Add DRM_TILCDC_SLAVE_COMPAT for ti,tilcdc,slave binding support 2015-05-27 13:13:33 +03:00
ttm Linux 4.2-rc7 2015-08-17 14:13:53 +10:00
udl drm/udl: Use new drm_fb_helper functions 2015-08-06 14:13:00 +02:00
vgem drm/vgem: Set unique to "vgem" 2015-06-24 11:20:46 +10:00
via
virtio drm/virtio: Use new drm_fb_helper functions 2015-08-06 14:13:07 +02:00
vmwgfx Merge branch 'vmwgfx-next' of git://people.freedesktop.org/~thomash/linux into drm-next 2015-08-17 16:03:48 +10:00
ati_pcigart.c
drm_agpsupport.c
drm_atomic_helper.c Linux 4.2-rc7 2015-08-17 14:13:53 +10:00
drm_atomic.c drm/atomic: Call ww_acquire_done after check phase is complete 2015-08-11 12:04:18 +02:00
drm_auth.c
drm_bridge.c drm/DocBook: Add more drm_bridge documentation 2015-05-21 13:56:51 +02:00
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 Linux 4.2-rc7 2015-08-17 14:13:53 +10:00
drm_debugfs.c
drm_dma.c
drm_dp_helper.c
drm_dp_mst_topology.c Linux 4.2-rc8 2015-08-24 16:36:42 +10: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/edid: Use ARRAY_SIZE in drm_add_modes_noedid 2015-08-11 12:04:16 +02:00
drm_encoder_slave.c
drm_fb_cma_helper.c drm/fb_cma_helper: Use new drm_fb_helper functions 2015-08-06 14:13:00 +02:00
drm_fb_helper.c drm/core: Set mode to NULL when connectors in a set drops to 0. 2015-08-11 12:04:19 +02:00
drm_flip_work.c drm/core: get rid of -Iinclude/drm 2015-05-13 11:28:22 +02:00
drm_fops.c drm/mode: Add user blob-creation ioctl 2015-05-22 16:18:28 +02:00
drm_gem_cma_helper.c drm/cma-helper: Don't grab dev->struct_mutex for in mmap offset ioctl 2015-08-10 13:37:36 +02:00
drm_gem.c drm/gem: Be more friendly with locking checks 2015-08-10 13:35:49 +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 drm: export the DRM permission check code 2015-08-12 10:06:18 -07:00
drm_irq.c Linux 4.2-rc7 2015-08-17 14:13:53 +10: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/mode: Unstatic kernel-userspace mode conversion 2015-05-22 16:18:21 +02:00
drm_modeset_lock.c drm: Remove __drm_modeset_lock_all 2015-08-06 14:13:02 +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 Merge branch 'drm-next-fsl-dcu' of https://github.com/Jianwei-Wang/linux-drm-fsl-dcu into drm-next 2015-08-20 14:11:17 +10:00
Makefile drm/layerscape: Add Freescale DCU DRM driver 2015-08-19 22:23:04 -04:00