android_kernel_motorola_sm6225/drivers/gpu/drm
Jesse Barnes 40a518d9f1 drm: initial KMS config fixes
When mode setting is first initialized, the driver will call into
drm_helper_initial_config() to set up an initial output and framebuffer
configuration.  This routine is responsible for probing the available
connectors, encoders, and crtcs, looking for modes and putting together
something reasonable (where reasonable is defined as "allows kernel
messages to be visible on as many displays as possible").

However, the code was a bit too aggressive in setting default modes when
none were found on a given connector.  Even if some connectors had modes,
any connectors found lacking modes would have the default 800x600 mode added
to their mode list, which in some cases could cause problems later down the
line.  In my case, the LVDS was perfectly available, but the initial config
code added 800x600 modes to both of the detected but unavailable HDMI
connectors (which are on my non-existent docking station).  This ended up
preventing later code from setting a mode on my LVDS, which is bad.

This patch fixes that behavior by making the initial config code walk
through the connectors first, counting the available modes, before it decides
to add any default modes to a possibly connected output.  It also fixes the
logic in drm_target_preferred() that was causing zeroed out modes to be set
as the preferred mode for a given connector, even if no modes were available.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2009-01-16 18:40:54 +10:00
..
i810 drm: reorganise drm tree to be more future proof. 2008-07-14 10:45:01 +10:00
i830 drm: reorganise drm tree to be more future proof. 2008-07-14 10:45:01 +10:00
i915 drm/i915: setup sarea properly in master_priv 2009-01-12 22:01:34 +10:00
mga drm: move drm vblank initialization/cleanup to driver load/unload 2008-11-25 09:49:03 +10:00
r128 drm: move drm vblank initialization/cleanup to driver load/unload 2008-11-25 09:49:03 +10:00
radeon drm/radeon: use locked rmmap to remove sarea mapping. 2008-12-29 17:47:24 +10:00
savage drm: reorganise drm tree to be more future proof. 2008-07-14 10:45:01 +10:00
sis SiS DRM: fix a pointer cast warning 2008-10-18 07:10:10 +10:00
tdfx drm: reorganise drm tree to be more future proof. 2008-07-14 10:45:01 +10:00
via drm: move drm vblank initialization/cleanup to driver load/unload 2008-11-25 09:49:03 +10:00
ati_pcigart.c drm: reorganise drm tree to be more future proof. 2008-07-14 10:45:01 +10:00
drm_agpsupport.c i915: Map status page cached for chips with GTT-based HWS location. 2008-10-18 07:10:53 +10:00
drm_auth.c drm: move to kref per-master structures. 2008-12-29 17:47:22 +10:00
drm_bufs.c drm/radeon: use locked rmmap to remove sarea mapping. 2008-12-29 17:47:24 +10:00
drm_cache.c drm: wbinvd is cache coherent. 2008-10-18 07:10:53 +10:00
drm_context.c drm: move to kref per-master structures. 2008-12-29 17:47:22 +10:00
drm_crtc.c trivial: replace last usages of __FUNCTION__ in kernel 2009-01-07 15:48:54 -08:00
drm_crtc_helper.c drm: initial KMS config fixes 2009-01-16 18:40:54 +10:00
drm_dma.c drm: reorganise drm tree to be more future proof. 2008-07-14 10:45:01 +10:00
drm_drawable.c drm: Avoid oops in DRM_IOCTL_RM_DRAW if a bad handle is supplied. 2008-10-23 13:46:54 +10:00
drm_drv.c drm: fix ordering of driver unload vs agp unload. 2009-01-07 11:54:57 +10:00
drm_edid.c drm: fix useless gcc unused variable warning 2008-12-29 17:47:24 +10:00
drm_fops.c Check fops_get() return value 2009-01-06 15:59:11 -08:00
drm_gem.c drm: PAGE_CACHE_WC is x86 only so far 2008-12-29 17:47:24 +10:00
drm_hashtab.c drm: GEM mmap support 2008-12-29 17:47:22 +10:00
drm_ioc32.c drm: Add 32-bit compatibility for DRM_IOCTL_UPDATE_DRAW. 2008-10-23 13:46:33 +10:00
drm_ioctl.c drm: fix leak of uninitialized data to userspace 2008-12-29 17:47:22 +10:00
drm_irq.c drm/i915: set vblank enabled flag correctly across IRQ install/uninstall 2009-01-11 08:59:52 +10:00
drm_lock.c drm: move to kref per-master structures. 2008-12-29 17:47:22 +10:00
drm_memory.c drm: Add GEM ("graphics execution manager") to i915 driver. 2008-10-18 07:10:12 +10:00
drm_mm.c DRM: add mode setting support 2008-12-29 17:47:23 +10:00
drm_modes.c DRM: add mode setting support 2008-12-29 17:47:23 +10:00
drm_pci.c drm: reorganise drm tree to be more future proof. 2008-07-14 10:45:01 +10:00
drm_proc.c drm: Add a debug node for vblank state. 2008-12-29 17:47:27 +10:00
drm_scatter.c drm: reorganise drm tree to be more future proof. 2008-07-14 10:45:01 +10:00
drm_sman.c drm: reorganise drm tree to be more future proof. 2008-07-14 10:45:01 +10:00
drm_stub.c DRM: add mode setting support 2008-12-29 17:47:23 +10:00
drm_sysfs.c gpu: struct device - replace bus_id with dev_name(), dev_set_name() 2009-01-06 10:44:41 -08:00
drm_vm.c drm: GEM mmap support 2008-12-29 17:47:22 +10:00
Kconfig drm: kconfig have drm core select i2c for kms 2008-12-29 17:47:24 +10:00
Makefile DRM: add mode setting support 2008-12-29 17:47:23 +10:00
README.drm drm: reorganise drm tree to be more future proof. 2008-07-14 10:45:01 +10:00

************************************************************
* 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