linux_dsm_epyc7002/drivers/gpu/drm/nouveau
Daniel Vetter fc8fd40eb2 drm: Rip out totally bogus vga_switcheroo->can_switch locking
So I just wanted to add a new field to struct drm_device and
accidentally stumbled over something. According to comments
dev->open_count is protected by dev->count_lock, but that's totally
not the case. It's protected by drm_global_mutex.

Unfortunately the vga switcheroo callbacks took this comment at face
value. The problem is that we can't just take the drm_global_mutex
because:
- It would lead to a locking inversion with the driver load/unload
  paths.
- It wouldn't actually protect anything, for that we'd need to wrap
  the entire vga switcheroo code in the drm_global_mutex. And I'm not
  sure whether that would actually solve anything.

What we probably want is a try_to_grab_switcheroo reference kind of
thing which is used in the driver's ->open callback. Then we could
move all that ->can_switch madness into the vga switcheroo core where
it really belongs.

But since that would amount to real work take the easy way out and
just add a comment. It's definitely not going to make anything worse
since doing switcheroo state changes while restarting X just isn't
recommended. Even though the delayed switching code does exactly that.

v2:
- Simplify the ->can_switch implementations more (Thierry)
- Fix comment about the dev->open_count locking (Thierry)

Cc: Thierry Reding <treding@nvidia.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> (v1)
Reviewed-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-04-23 10:32:33 +02:00
..
core drm/nouveau/bios: fix a bit shift error introduced by 457e77b 2014-04-18 13:15:18 +10:00
dispnv04 drm: Replace crtc fb with primary plane fb (v3) 2014-04-01 20:18:28 -04:00
Kconfig ACPI / gpu / drm: Stop selecting VIDEO_OUTPUT_CONTROL 2014-03-20 02:37:22 +01:00
Makefile drm/gm107/gr: initial support 2014-03-26 14:08:15 +10:00
nouveau_abi16.c support for platform devices 2014-03-26 14:08:04 +10:00
nouveau_abi16.h
nouveau_acpi.c ACPI / nouveau: fix probing regression related to _DSM 2014-02-20 21:19:47 +01:00
nouveau_acpi.h
nouveau_agp.c support for platform devices 2014-03-26 14:08:04 +10:00
nouveau_agp.h
nouveau_backlight.c drm/sysfs: sort out minor and connector device object lifetimes. 2013-10-22 09:37:40 +01:00
nouveau_bios.c drm/nouveau: recognise higher link rate for available dp bw calculations 2014-03-26 14:08:21 +10:00
nouveau_bios.h drm/nv04/disp: hide all the cruft away in its own little hole 2013-04-26 15:37:51 +10:00
nouveau_bo.c support for platform devices 2014-03-26 14:08:04 +10:00
nouveau_bo.h drm/nouveau: embed gem object in nouveau_bo 2013-10-09 14:37:55 +10:00
nouveau_chan.c support for platform devices 2014-03-26 14:08:04 +10:00
nouveau_chan.h
nouveau_connector.c drm/nouveau/bios: add HDMI-C (mini) connector type 2014-03-26 14:00:58 +10:00
nouveau_connector.h drm/nouveau: remove prototype for non-existent nouveau_connector_bpp 2013-11-08 15:36:08 +10:00
nouveau_crtc.h
nouveau_debugfs.c
nouveau_debugfs.h
nouveau_display.c drm: Replace crtc fb with primary plane fb (v3) 2014-04-01 20:18:28 -04:00
nouveau_display.h drm/nouveau: implement hooks for needed for drm vblank timestamping support 2014-01-30 09:20:27 +10:00
nouveau_dma.c drm: Kill DRM_*MEMORYBARRIER 2013-12-18 11:35:21 +10:00
nouveau_dma.h drm: Kill DRM_*MEMORYBARRIER 2013-12-18 11:35:21 +10:00
nouveau_dp.c
nouveau_drm.c Merge tag 'drm-intel-fixes-2014-04-04' of git://anongit.freedesktop.org/drm-intel into drm-next 2014-04-05 16:14:21 +10:00
nouveau_drm.h drm/nouveau: use nv_debug for NV_DEBUG, make DRM a separate subflag 2014-03-26 13:59:32 +10:00
nouveau_encoder.h drm/nv04/disp: hide all the cruft away in its own little hole 2013-04-26 15:37:51 +10:00
nouveau_fbcon.c drm/nouveau: fix fbcon not being accelerated after suspend 2014-03-26 14:08:13 +10:00
nouveau_fbcon.h
nouveau_fence.c drm: Kill DRM_HZ 2013-12-18 11:33:24 +10:00
nouveau_fence.h drm/nouveau: delay busy bo vma removal until fence signals 2013-07-01 13:50:31 +10:00
nouveau_gem.c drm: init TTM dev_mapping in ttm_bo_device_init() 2014-03-16 12:23:42 +01:00
nouveau_gem.h drm: kill ->gem_init_object() and friends 2013-10-09 14:38:02 +10:00
nouveau_hwmon.c drm/nouveau/hwmon: replace strict_strtol() with kstrtol() 2014-03-26 13:59:31 +10:00
nouveau_hwmon.h drm/nouveau/drm/pm: remove everything except the hwmon interfaces to THERM 2013-11-08 15:40:00 +10:00
nouveau_ioc32.c drm/nouveau: fix up 32-bit ioctls and device wake up. 2013-09-02 09:52:55 +10:00
nouveau_ioctl.h drm/nouveau: fix up 32-bit ioctls and device wake up. 2013-09-02 09:52:55 +10:00
nouveau_prime.c drm/nouveau: embed gem object in nouveau_bo 2013-10-09 14:37:55 +10:00
nouveau_reg.h
nouveau_sgdma.c drm/nouveau/vm: reduce number of entry-points to vm_map() 2014-01-23 13:38:25 +10:00
nouveau_sysfs.c support for platform devices 2014-03-26 14:08:04 +10:00
nouveau_sysfs.h drm/nouveau: implement a simple sysfs interface to new pm code 2013-11-08 15:40:18 +10:00
nouveau_ttm.c support for platform devices 2014-03-26 14:08:04 +10:00
nouveau_ttm.h
nouveau_vga.c drm: Rip out totally bogus vga_switcheroo->can_switch locking 2014-04-23 10:32:33 +02:00
nouveau_vga.h
nv04_fbcon.c drm/nv11-: synchronise flips to vblank, unless async flip requested 2013-11-14 14:56:56 +10:00
nv04_fence.c
nv10_fence.c
nv10_fence.h
nv17_fence.c drm/nouveau: fix semaphore dmabuf obj 2013-07-30 16:46:55 +10:00
nv50_display.c drm: Replace crtc fb with primary plane fb (v3) 2014-04-01 20:18:28 -04:00
nv50_display.h
nv50_fbcon.c
nv50_fence.c drm/nouveau: fix semaphore dmabuf obj 2013-07-30 16:46:55 +10:00
nv84_fence.c
nvc0_fbcon.c
nvc0_fence.c