linux/drivers/gpu/drm
Paulo Zanoni 0c14c7f957 drm/i915: properly alternate between DVI and HDMI
This solves problems that happen when you alternate between HDMI and
DVI on the same port. I can reproduce these problems using DP->HDMI
and DP->DVI adapters on a DP port.

When you first plug HDMI and then plug DVI, you need to stop sending
DIPs, even if the port is in DVI mode (see the HDMI register spec). If
you don't stop sending DIPs, you'll see a pink vertical line on the
left side of the screen, some modes will give you a black screen, some
modes won't work correctly.

When you first plug DVI and then plug HDMI, you need to properly
enable the DIPs, otherwise the HW won't send them. After spending a
lot of time investigating this, I concluded that if the DIPs are
disabled, we should not write to the DIP register again because when
we do this, we also set the AVI InfoFrame frequency to "once", and
this seems to really confuse our hardware. Since this problem was not
exactly easy to debug, I'm adopting the defensive behavior and not
just avoing the "disable twice" sequence, but also explicitly
selecting the AVI InfoFrame and setting its frequency to a correct
one.

Also, move the "is_dvi" check from intel_set_infoframe to the
set_infoframes functions since now they're going to be the first ones
to deal with the DIP registers.

This patch adds the code to fix the problem, but it depends on the
removal of some code that can't be removed right now and will come
later in the patch series. The patch that we need is:
  - drm/i915: don't write 0 to DIP control at HDMI init

[danvet: Paulo clarified that this additional patch is only required
to make the fix complete, this patch here alone doesn't introduce a
regression but only partially solves the problem of randomly clearing
the dip registers.]

V2: Be even more defensive by selecting AVI and setting its frequency
outside the "is_dvi" check.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-05-30 21:38:21 +02:00
..
ast drm/kms: fix Kconfig for new drivers. 2012-05-20 10:10:53 +01:00
cirrus drm/kms: fix Kconfig for new drivers. 2012-05-20 10:10:53 +01:00
exynos Merge branch 'exynos-drm-fixes' of git://git.infradead.org/users/kmpark/linux-2.6-samsung into drm-fixes 2012-04-27 08:20:35 +01:00
gma500 gma500: fix build warning 2012-05-17 11:17:33 +01:00
i2c drm: add convenience function to create an range property 2012-02-09 10:15:25 +00:00
i810 kill mm argument of vm_munmap() 2012-04-21 01:58:20 -04:00
i915 drm/i915: properly alternate between DVI and HDMI 2012-05-30 21:38:21 +02:00
mga drm: move pci bus master enable into driver. 2012-02-16 18:31:07 +00:00
mgag200 drm/kms: fix Kconfig for new drivers. 2012-05-20 10:10:53 +01:00
nouveau vga_switcheroo: Introduce struct vga_switcheroo_client_ops 2012-05-13 11:24:09 +02:00
r128 drm: move pci bus master enable into driver. 2012-02-16 18:31:07 +00:00
radeon drm/radeon/hdmi: use new AFMT structs 2012-05-17 12:16:03 +01:00
savage drm: checking the wrong variable in savage_do_init_bci() 2012-05-17 11:42:27 +01:00
sis drm: move pci bus master enable into driver. 2012-02-16 18:31:07 +00:00
tdfx
ttm Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2012-03-22 13:08:22 -07:00
udl mm, drm/udl: fixup vma flags on mmap 2012-04-02 11:08:17 +01:00
via drm: move pci bus master enable into driver. 2012-02-16 18:31:07 +00:00
vmwgfx Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2012-03-22 13:08:22 -07:00
ati_pcigart.c
drm_agpsupport.c
drm_auth.c drm: Fix authentication kernel crash 2012-01-25 09:27:45 +00:00
drm_buffer.c
drm_bufs.c VM: add "vm_mmap()" helper function 2012-04-20 17:29:13 -07:00
drm_cache.c Merge branch 'drm-intel-next' of git://people.freedesktop.org/~danvet/drm-intel into drm-core-next 2012-04-12 10:27:01 +01:00
drm_context.c drm: Unify and fix idr error handling 2012-04-24 09:50:20 +01:00
drm_crtc.c drm: add CRTC properties 2012-05-17 11:11:46 +01:00
drm_crtc_helper.c drm: Move drm_format_num_planes() to drm_crtc.c 2012-04-20 12:37:11 +01:00
drm_debugfs.c
drm_dma.c
drm_dp_i2c_helper.c
drm_drv.c drm: add generic ioctls to get/set properties on any object 2012-05-17 11:11:22 +01:00
drm_edid.c drm: Store vendor IDs directly in the EDID quirk structure 2012-04-27 08:25:13 +01:00
drm_edid_load.c drm/edid: fix collision between two patches breaking build 2012-04-30 07:26:16 +01:00
drm_edid_modes.h drm: replace open-coded ARRAY_SIZE with macro 2012-04-20 13:12:16 +01:00
drm_encoder_slave.c
drm_fb_helper.c drm/edid: Allow drm_mode_find_dmt to hunt for reduced-blanking modes 2012-04-20 12:57:03 +01:00
drm_fops.c drm: Releasing FBs before releasing GEM objects during drm_release 2012-04-19 14:40:41 +01:00
drm_gem.c drm: pass dev to drm_vm_{open,close}_locked() 2012-05-11 17:37:46 +01:00
drm_global.c
drm_hashtab.c
drm_info.c
drm_ioc32.c drivers/gpu/drm/drm_ioc32.c: initialize all fields 2012-02-03 09:47:32 +00:00
drm_ioctl.c drm/prime: expose capability flags for userspace. 2012-05-18 11:12:16 +01:00
drm_irq.c drm: remove unused code 2012-02-29 10:18:29 +00:00
drm_lock.c
drm_memory.c drm: remove unused code 2012-02-29 10:18:29 +00:00
drm_mm.c
drm_modes.c drm: Add drm_mode_copy() 2012-03-15 09:52:51 +00:00
drm_pci.c drm: move pci bus master enable into driver. 2012-02-16 18:31:07 +00:00
drm_platform.c drm: cope with platformdev->id == -1 2012-03-07 14:03:40 +00:00
drm_prime.c drm: base prime/dma-buf support (v5) 2012-03-30 11:52:44 +01:00
drm_proc.c
drm_scatter.c
drm_stub.c drm: Unify and fix idr error handling 2012-04-24 09:50:20 +01:00
drm_sysfs.c drm/sysfs: protect sysfs removal code against being run twice. 2012-03-15 13:35:31 +00:00
drm_trace.h
drm_trace_points.c
drm_usb.c drm/usb: fix module license on drm/usb layer. 2012-04-19 09:33:32 +01:00
drm_vm.c drm: pass dev to drm_vm_{open,close}_locked() 2012-05-11 17:37:46 +01:00
Kconfig drm/kms: driver for virtual cirrus under qemu 2012-05-17 11:02:24 +01:00
Makefile drm/kms: driver for virtual cirrus under qemu 2012-05-17 11:02:24 +01:00
README.drm

************************************************************
* For the very latest on DRI development, please see:      *
*     http://dri.freedesktop.org/                          *
************************************************************

The Direct Rendering Manager (drm) is a device-independent kernel-level
device driver that provides support for the XFree86 Direct Rendering
Infrastructure (DRI).

The DRM supports the Direct Rendering Infrastructure (DRI) in four major
ways:

    1. The DRM provides synchronized access to the graphics hardware via
       the use of an optimized two-tiered lock.

    2. The DRM enforces the DRI security policy for access to the graphics
       hardware by only allowing authenticated X11 clients access to
       restricted regions of memory.

    3. The DRM provides a generic DMA engine, complete with multiple
       queues and the ability to detect the need for an OpenGL context
       switch.

    4. The DRM is extensible via the use of small device-specific modules
       that rely extensively on the API exported by the DRM module.


Documentation on the DRI is available from:
    http://dri.freedesktop.org/wiki/Documentation
    http://sourceforge.net/project/showfiles.php?group_id=387
    http://dri.sourceforge.net/doc/

For specific information about kernel-level support, see:

    The Direct Rendering Manager, Kernel Support for the Direct Rendering
    Infrastructure
    http://dri.sourceforge.net/doc/drm_low_level.html

    Hardware Locking for the Direct Rendering Infrastructure
    http://dri.sourceforge.net/doc/hardware_locking_low_level.html

    A Security Analysis of the Direct Rendering Infrastructure
    http://dri.sourceforge.net/doc/security_low_level.html