linux_dsm_epyc7002/drivers/gpu/drm
Marcin Slusarz 5e60ee780e drm/nouveau: initialize chan->fence.lock before use
Fence lock needs to be initialized before any call to nouveau_channel_put
because it calls nouveau_channel_idle->nouveau_fence_update which uses
fence lock.

BUG: spinlock bad magic on CPU#0, test/24134
 lock: ffff88019f90dba8, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
Pid: 24134, comm: test Not tainted 3.0.0-nv+ #800
Call Trace:
 spin_bug+0x9c/0xa3
 do_raw_spin_lock+0x29/0x13c
 _raw_spin_lock+0x1e/0x22
 nouveau_fence_update+0x2d/0xf1
 nouveau_channel_idle+0x22/0xa0
 nouveau_channel_put_unlocked+0x84/0x1bd
 nouveau_channel_put+0x20/0x24
 nouveau_channel_alloc+0x4ec/0x585
 nouveau_ioctl_fifo_alloc+0x50/0x130
 drm_ioctl+0x289/0x361
 do_vfs_ioctl+0x4dd/0x52c
 sys_ioctl+0x42/0x65
 system_call_fastpath+0x16/0x1b

It's easily triggerable from userspace.

Additionally remove double initialization of chan->fence.pending.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-11-10 08:58:53 +10:00
..
exynos drm/exynos: fixed build warnings and comments. 2011-10-18 10:01:19 +01:00
i2c gpu: add module.h to drivers/gpu files as required. 2011-10-31 19:32:03 -04:00
i810 gpu: add module.h to drivers/gpu files as required. 2011-10-31 19:32:03 -04:00
i915 gpu: add module.h to drivers/gpu files as required. 2011-10-31 19:32:03 -04:00
mga gpu: add module.h to drivers/gpu files as required. 2011-10-31 19:32:03 -04:00
nouveau drm/nouveau: initialize chan->fence.lock before use 2011-11-10 08:58:53 +10:00
r128 gpu: add module.h to drivers/gpu files as required. 2011-10-31 19:32:03 -04:00
radeon Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux 2011-11-07 10:01:56 -08:00
savage gpu: add module.h to drivers/gpu files as required. 2011-10-31 19:32:03 -04:00
sis gpu: add module.h to drivers/gpu files as required. 2011-10-31 19:32:03 -04:00
tdfx gpu: add module.h to drivers/gpu files as required. 2011-10-31 19:32:03 -04:00
ttm gpu: Add export.h as required to drivers/gpu files. 2011-10-31 19:32:03 -04:00
via gpu: add module.h to drivers/gpu files as required. 2011-10-31 19:32:03 -04:00
vmwgfx Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux 2011-11-07 10:01:56 -08:00
ati_pcigart.c gpu: Add export.h as required to drivers/gpu files. 2011-10-31 19:32:03 -04:00
drm_agpsupport.c drm: kill drm_agp_chipset_flush 2010-11-23 20:14:44 +00:00
drm_auth.c
drm_buffer.c gpu: Add export.h as required to drivers/gpu files. 2011-10-31 19:32:03 -04:00
drm_bufs.c gpu: Add export.h as required to drivers/gpu files. 2011-10-31 19:32:03 -04:00
drm_cache.c gpu: Add export.h as required to drivers/gpu files. 2011-10-31 19:32:03 -04:00
drm_context.c
drm_crtc_helper.c gpu: add moduleparam.h to drivers/gpu/drm/drm_crtc_helper.c 2011-10-31 19:32:04 -04:00
drm_crtc.c Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux 2011-11-07 10:01:56 -08:00
drm_debugfs.c gpu: Add export.h as required to drivers/gpu files. 2011-10-31 19:32:03 -04:00
drm_dma.c gpu: Add export.h as required to drivers/gpu files. 2011-10-31 19:32:03 -04:00
drm_dp_i2c_helper.c
drm_drv.c gpu: Add export.h as required to drivers/gpu files. 2011-10-31 19:32:03 -04:00
drm_edid_modes.h drm: Mark constant arrays of drm_display_mode const 2011-02-23 11:13:11 +10:00
drm_edid.c gpu: Add export.h as required to drivers/gpu files. 2011-10-31 19:32:03 -04:00
drm_encoder_slave.c gpu: add module.h to drivers/gpu files as required. 2011-10-31 19:32:03 -04:00
drm_fb_helper.c gpu: add module.h to drivers/gpu files as required. 2011-10-31 19:32:03 -04:00
drm_fops.c gpu: add module.h to drivers/gpu files as required. 2011-10-31 19:32:03 -04:00
drm_gem.c drm/gem: add functions for mmap offset creation 2011-08-30 11:06:06 +01:00
drm_global.c
drm_hashtab.c gpu: Add export.h as required to drivers/gpu files. 2011-10-31 19:32:03 -04:00
drm_info.c Merge remote branch 'intel/drm-intel-next' of ../drm-next into drm-core-next 2011-03-14 14:15:13 +10:00
drm_ioc32.c gpu: Add export.h as required to drivers/gpu files. 2011-10-31 19:32:03 -04:00
drm_ioctl.c drm/vblank: update recently added vbl interface to be more future proof. 2011-03-24 21:28:46 +10:00
drm_irq.c drm: make sure drm_vblank_init() has been called before touching vbl_lock 2011-11-10 08:57:55 +10:00
drm_lock.c drm: readd drm_lock_free in drm_unlock 2010-09-26 13:35:49 +10:00
drm_memory.c gpu: Add export.h as required to drivers/gpu files. 2011-10-31 19:32:03 -04:00
drm_mm.c gpu: Add export.h as required to drivers/gpu files. 2011-10-31 19:32:03 -04:00
drm_modes.c gpu: Add export.h as required to drivers/gpu files. 2011-10-31 19:32:03 -04:00
drm_pci.c gpu: Add export.h as required to drivers/gpu files. 2011-10-31 19:32:03 -04:00
drm_platform.c gpu: Add export.h as required to drivers/gpu files. 2011-10-31 19:32:03 -04:00
drm_proc.c gpu: Add export.h as required to drivers/gpu files. 2011-10-31 19:32:03 -04:00
drm_scatter.c drivers: use kzalloc/kcalloc instead of 'kmalloc+memset', where possible 2011-07-25 20:57:13 -07:00
drm_sman.c gpu: Add export.h as required to drivers/gpu files. 2011-10-31 19:32:03 -04:00
drm_stub.c drm: Create and use drm_err 2011-04-28 14:53:02 +10:00
drm_sysfs.c gpu: Add export.h as required to drivers/gpu files. 2011-10-31 19:32:03 -04:00
drm_trace_points.c
drm_trace.h
drm_usb.c gpu: Add export.h as required to drivers/gpu files. 2011-10-31 19:32:03 -04:00
drm_vm.c gpu: Add export.h as required to drivers/gpu files. 2011-10-31 19:32:03 -04:00
Kconfig vmwgfx: Take the driver out of staging 2011-10-11 13:06:36 +01:00
Makefile DRM: add DRM Driver for Samsung SoC EXYNOS4210. 2011-10-05 10:27:31 +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