linux/drivers/gpu/drm
Chris Wilson edd5b13313 drm/i915: Do not clobber config status after a forced restore of hw state
We call intel_modeset_setup_hw_state() along two paths, driver
load/resume and after a lid event notification. During initialisation of
the driver, it is imperative that we reset the config state. This
correctly sets up the initial connector statuses and prepares the
hardware for a thorough probing. However, during a lid event, we only
want to undo the damage caused by the bios by resetting our last known
mode. In this cirumstance, we do not want to clobber our desired state.

In order to try and keep sanity between the config state and our own
tracking, do the drm_mode_config_reset() first along the load/resume
paths before reading out the hw state and apply any definite known
corrections.

v2: "As discussed on irc I don't think we should force the connector
state to anything here: Imo connector->status should reflect what we
believe to be the true output connection state, whereas connector->encoder
reflects whether this connector is wired up to a pipe. And since we no
longer reject modeset on disconnected connectors and never nuked the pipe
if the connector gets disconnected there's no reason for that - such policy
is userspace's job.

This regression has been introduced in

commit 2e9388923e
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Thu Oct 11 20:08:24 2012 +0200

    drm/i915/crt: explicitly set up HOTPLUG_BITS on resume"
so sayeth Daniel.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: stable@vger.kernel.org (v3.8 and later)
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-03 23:15:46 +01:00
..
armada DRM: Armada: convert to use simple_open() 2013-11-06 12:02:36 +10:00
ast drm: Add separate Kconfig option for fbdev helpers 2013-10-11 23:36:58 +02:00
cirrus drm/cirrus: use drm_set_preferred_mode 2013-11-06 13:36:19 +10:00
exynos drm: Add separate Kconfig option for fbdev helpers 2013-10-11 23:36:58 +02:00
gma500 drm/gma500/mrst: Add SDVO to output init 2013-11-08 16:23:19 +01:00
i2c drm/i2c: tda998x: set VIF for full range, underscanned display 2013-10-18 15:58:32 +01:00
i810 drm: Kill drm perf counter leftovers 2013-10-09 15:55:33 +10:00
i915 drm/i915: Do not clobber config status after a forced restore of hw state 2013-12-03 23:15:46 +01:00
mga drm: Kill drm perf counter leftovers 2013-10-09 15:55:33 +10:00
mgag200 drm/mgag200: drop pointless info print. 2013-11-08 15:49:43 +10:00
msm Merge branch 'msm-next' of git://people.freedesktop.org/~robclark/linux into drm-next 2013-11-10 18:27:31 +10:00
nouveau drm/nouveau: fix 32-bit build 2013-11-10 09:24:24 +10:00
omapdrm drm: Add separate Kconfig option for fbdev helpers 2013-10-11 23:36:58 +02:00
qxl qxl: add a connector property to denote hotplug should rescan modes. 2013-11-06 15:23:26 +10:00
r128 drm: rip out drm_core_has_MTRR checks 2013-08-19 14:11:44 +10:00
radeon Revert "drm/radeon/audio: don't set speaker allocation on DCE4+" 2013-11-08 13:07:51 -05:00
rcar-du drm: Add separate Kconfig option for fbdev helpers 2013-10-11 23:36:58 +02:00
savage drm: rip out drm_core_has_MTRR checks 2013-08-19 14:11:44 +10:00
shmobile drm: shmob_drm: Convert to clk_prepare/unprepare 2013-11-10 18:48:38 +10:00
sis drm: rip out drm_core_has_MTRR checks 2013-08-19 14:11:44 +10:00
tdfx drm: rip out drm_core_has_MTRR checks 2013-08-19 14:11:44 +10:00
tegra drm/tegra: Changes for v3.13-rc1 2013-11-05 16:21:00 +10:00
tilcdc drm: Add separate Kconfig option for fbdev helpers 2013-10-11 23:36:58 +02:00
ttm Merge branch 'ttm-next-3.13' of git://people.freedesktop.org/~thomash/linux into drm-next 2013-11-14 09:52:10 +10:00
udl drm: Add separate Kconfig option for fbdev helpers 2013-10-11 23:36:58 +02:00
via drm: Kill ctx_count from struct drm_device 2013-10-09 15:55:32 +10:00
vmwgfx Merge branch 'vmwgfx-next-3.13' of git://people.freedesktop.org/~thomash/linux into drm-next 2013-11-14 09:51:43 +10:00
ati_pcigart.c
drm_agpsupport.c drm/agp: move AGP cleanup paths to drm_agpsupport.c 2013-08-07 10:14:24 +10:00
drm_auth.c
drm_buffer.c
drm_bufs.c drm: remove the dma_ioctl special-case 2013-08-19 14:15:50 +10:00
drm_cache.c
drm_context.c drm: Kill ctx_count from struct drm_device 2013-10-09 15:55:32 +10:00
drm_crtc_helper.c drm: eliminate bit-copy restoration of crtc 2013-11-06 14:27:51 +10:00
drm_crtc.c drm: Pretty print pixel format in drm_fb_get_bpp_depth() and format_check() 2013-11-06 13:29:34 +10:00
drm_debugfs.c drm: Make drm_debugfs_list const 2013-11-06 12:05:21 +10:00
drm_dma.c drm: mark dma setup/teardown as legacy systems 2013-08-19 10:04:21 +10:00
drm_dp_helper.c drm/dp: constify DP DPCD helpers 2013-10-01 15:28:57 +10:00
drm_drv.c Merge tag 'drm-intel-fixes-2013-11-07' of git://people.freedesktop.org/~danvet/drm-intel into drm-next 2013-11-08 16:34:39 +10:00
drm_edid_load.c drm: Try loading builtin EDIDs first 2013-10-09 15:55:28 +10:00
drm_edid.c drm/edid: compare actual vrefresh for all modes for quirks 2013-11-11 11:08:12 -05:00
drm_encoder_slave.c
drm_fb_cma_helper.c drm: Make drm_fb_cma_describe() static 2013-08-21 12:47:41 +10:00
drm_fb_helper.c Merge tag 'v3.12' into drm-intel-next 2013-11-04 16:28:52 +01:00
drm_flip_work.c drm: add flip-work helper 2013-08-19 10:32:26 +10:00
drm_fops.c drm: Do not drop root privileges for a fancier younger process 2013-11-06 14:27:35 +10:00
drm_gem_cma_helper.c Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2013-09-05 10:17:26 -07:00
drm_gem.c drm: kill ->gem_init_object() and friends 2013-10-09 14:38:02 +10:00
drm_global.c drm: Remove unused variable in drm_global_item_ref() 2013-10-01 15:28:58 +10:00
drm_hashtab.c
drm_info.c drm: Collect per-crtc vblank stuff to a struct 2013-10-09 15:55:31 +10:00
drm_ioc32.c
drm_ioctl.c drm: Add a STEREO_3D capability to the SET_CLIENT_CAP ioctl 2013-10-01 07:45:27 +02:00
drm_irq.c drm: Push latency sensitive bits of vblank scanoutpos timestamping into kms drivers. 2013-11-06 11:53:41 +10:00
drm_lock.c drm: Kill drm perf counter leftovers 2013-10-09 15:55:33 +10:00
drm_memory.c drm/memory: don't export agp helpers 2013-08-19 10:05:53 +10:00
drm_mm.c Merge tag 'drm-intel-next-2013-08-23' of git://people.freedesktop.org/~danvet/drm-intel into drm-next 2013-08-30 09:47:41 +10:00
drm_modes.c drm: copy mode type in drm_mode_connector_list_update() 2013-10-23 14:21:12 +01:00
drm_pci.c drm: Pass pointers to virt_to_page() 2013-11-06 13:23:20 +10:00
drm_platform.c drm: introduce drm_dev_free() to fix error paths 2013-10-09 15:55:09 +10:00
drm_prime.c drm: Remove unused variable in drm_prime_sg_to_page_addr_arrays() 2013-10-01 15:28:58 +10:00
drm_rect.c
drm_scatter.c drm: disallow legacy sg ioctls for modesetting drivers 2013-08-19 10:04:06 +10:00
drm_stub.c drm: delay minor destruction to drm_dev_free() 2013-11-06 14:53:25 +10:00
drm_sysfs.c drm/sysfs: Remove stale comments about calling drm_sysfs_connector_add() multiple times 2013-11-06 13:41:37 +10:00
drm_trace_points.c
drm_trace.h drm: fix print format of sequence in trace point 2013-07-04 10:55:27 +10:00
drm_usb.c drm: introduce drm_dev_free() to fix error paths 2013-10-09 15:55:09 +10:00
drm_vm.c drm: Pass pointers to virt_to_page() 2013-11-06 13:23:20 +10:00
drm_vma_manager.c drm/vma: add access management helpers 2013-08-27 11:54:54 +10:00
Kconfig drm/tegra: Changes for v3.13-rc1 2013-11-05 16:21:00 +10:00
Makefile drm/tegra: Changes for v3.13-rc1 2013-11-05 16:21:00 +10: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