linux/drivers/gpu/drm
Daniel Vetter 1b1d539705 drm/fb-helper: don't sleep for screen unblank when an oopps is in progress
Otherwise the system will burn even brighter and worse, leave the user
wondering what's going on exactly.

Since we already have a panic handler which will (try) to restore the
entire fbdev console mode, we can just bail out. Inspired by a patch
from Konstantin Khlebnikov. The callchain leading to this, cut&pasted
from Konstantin's original patch:

callstack:
panic()
bust_spinlocks(1)
unblank_screen()
vc->vc_sw->con_blank()
fbcon_blank()
fb_blank()
info->fbops->fb_blank()
drm_fb_helper_blank()
drm_fb_helper_dpms()
drm_modeset_lock_all()
mutex_lock(&dev->mode_config.mutex)

Note that the entire locking in the fb helper around panic/sysrq and
kdbg is ... non-existant. So we have a decent change of blowing up
everything. But since reworking this ties in with funny concepts like
the fbdev notifier chain or the impressive things which happen around
console_lock while oopsing, I'll leave that as an exercise for braver
souls than me.

v2: Drop the -EBUSY return value I've copied, we don't need it since
the we'll take care of things ourselves anyway.

Cc: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
References: https://patchwork.kernel.org/patch/1878181/
Reviewed-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-02-14 00:08:33 +01:00
..
ast drm/<drivers>: simplify ->fb_probe callback 2013-02-14 00:07:58 +01:00
cirrus drm/<drivers>: simplify ->fb_probe callback 2013-02-14 00:07:58 +01:00
exynos drm/<drivers>: simplify ->fb_probe callback 2013-02-14 00:07:58 +01:00
gma500 drm/<drivers>: simplify ->fb_probe callback 2013-02-14 00:07:58 +01:00
i2c drm/i2c: give i2c it's own Kconfig 2013-02-08 13:34:07 +10:00
i810
i915 drm/<drivers>: simplify ->fb_probe callback 2013-02-14 00:07:58 +01:00
mga
mgag200 drm/<drivers>: simplify ->fb_probe callback 2013-02-14 00:07:58 +01:00
nouveau drm/<drivers>: simplify ->fb_probe callback 2013-02-14 00:07:58 +01:00
r128
radeon drm/<drivers>: simplify ->fb_probe callback 2013-02-14 00:07:58 +01:00
savage
shmobile drm/shmobile: use drm_modeset_lock_all 2013-01-20 22:16:51 +01:00
sis
tdfx
tegra drm/tegra: don't set up initial fbcon config twice 2013-02-14 00:07:53 +01:00
ttm Merge branch 'for-airlied' of git://people.freedesktop.org/~mlankhorst/linux into drm-next 2013-02-08 14:02:32 +10:00
udl drm/<drivers>: simplify ->fb_probe callback 2013-02-14 00:07:58 +01:00
via
vmwgfx Merge branch 'for-airlied' of git://people.freedesktop.org/~mlankhorst/linux into drm-next 2013-02-08 14:02:32 +10:00
ati_pcigart.c
drm_agpsupport.c
drm_auth.c
drm_buffer.c
drm_bufs.c
drm_cache.c
drm_context.c
drm_crtc.c drm: review locking for drm_fb_helper_restore_fbdev_mode 2013-02-14 00:07:50 +01:00
drm_crtc_helper.c drm: don't hold crtc mutexes for connector ->detect callbacks 2013-01-20 22:17:15 +01:00
drm_debugfs.c
drm_dma.c
drm_dp_helper.c drm/doc: add new dp helpers into drm DocBook 2012-11-28 20:26:53 +10:00
drm_drv.c
drm_edid.c drm/edid: Add drm_rgb_quant_range_selectable() 2013-01-20 13:09:44 +01:00
drm_edid_load.c
drm_edid_modes.h
drm_encoder_slave.c
drm_fb_cma_helper.c drm/<drivers>: simplify ->fb_probe callback 2013-02-14 00:07:58 +01:00
drm_fb_helper.c drm/fb-helper: don't sleep for screen unblank when an oopps is in progress 2013-02-14 00:08:33 +01:00
drm_fops.c drm: revamp locking around fb creation/destruction 2013-01-20 22:16:58 +01:00
drm_gem.c
drm_gem_cma_helper.c
drm_global.c
drm_hashtab.c drm: Add a hash-tab rcu-safe API 2012-11-28 18:36:05 +10:00
drm_info.c
drm_ioc32.c
drm_ioctl.c drm: add support for monotonic vblank timestamps 2012-11-20 16:06:16 +10:00
drm_irq.c drm: make frame duration time calculation more precise 2013-02-08 14:00:48 +10:00
drm_lock.c
drm_memory.c
drm_mm.c Merge branch 'drm-kms-locking' of git://people.freedesktop.org/~danvet/drm-intel into drm-next 2013-01-21 07:44:58 +10:00
drm_modes.c drm_modes: add of_videomode helpers 2013-01-24 09:04:14 +01:00
drm_pci.c drm/pci: Use PCI Express Capability accessors 2013-02-08 13:54:31 +10:00
drm_platform.c
drm_prime.c drm: add prime helpers 2013-02-08 13:39:08 +10:00
drm_proc.c
drm_scatter.c
drm_stub.c drm: add support for monotonic vblank timestamps 2012-11-20 16:06:16 +10:00
drm_sysfs.c drm: remove legacy drm_connector_property fxns 2012-11-30 10:30:48 -06:00
drm_trace.h
drm_trace_points.c
drm_usb.c drm/usb: bind driver to correct device 2013-02-07 12:37:41 +10:00
drm_vm.c
Kconfig drm/i2c: give i2c it's own Kconfig 2013-02-08 13:34:07 +10:00
Makefile drm: only build ati_pcigart if PCI enabled 2012-11-28 20:12:29 +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