]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-4.19/revert-drm-nouveau-add-kconfig-option-to-turn-off-nouveau-legacy-contexts.-v3.patch
Linux 5.1.10
[thirdparty/kernel/stable-queue.git] / queue-4.19 / revert-drm-nouveau-add-kconfig-option-to-turn-off-nouveau-legacy-contexts.-v3.patch
1 From 9523323691326f54ef3e4f47606775fd4b00da61 Mon Sep 17 00:00:00 2001
2 From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3 Date: Thu, 13 Jun 2019 09:36:32 +0200
4 Subject: Revert "drm/nouveau: add kconfig option to turn off nouveau legacy contexts. (v3)"
5
6 From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7
8 This reverts commit 610382337557bd2057d9b47f996af0b6ff827a2b which is
9 commit b30a43ac7132cdda833ac4b13dd1ebd35ace14b7 upstream.
10
11 Sven reports:
12 Commit 1e07d63749 ("drm/nouveau: add kconfig option to turn off nouveau
13 legacy contexts. (v3)") has caused a build failure for me when I
14 actually tried that option (CONFIG_NOUVEAU_LEGACY_CTX_SUPPORT=n):
15
16 ,----
17 | Kernel: arch/x86/boot/bzImage is ready (#1)
18 | Building modules, stage 2.
19 | MODPOST 290 modules
20 | ERROR: "drm_legacy_mmap" [drivers/gpu/drm/nouveau/nouveau.ko] undefined!
21 | scripts/Makefile.modpost:91: recipe for target '__modpost' failed
22 `----
23
24 Upstream does not have that problem, as commit bed2dd8421 ("drm/ttm:
25 Quick-test mmap offset in ttm_bo_mmap()") has removed the use of
26 drm_legacy_mmap from nouveau_ttm.c. Unfortunately that commit does not
27 apply in 5.1.9.
28
29 The ensuing discussion proposed a number of one-off patches, but no
30 solid agreement was made, so just revert the commit for now to get
31 people's systems building again.
32
33 Reported-by: Sven Joachim <svenjoac@gmx.de>
34 Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
35 Cc: Dave Airlie <airlied@redhat.com>
36 Cc: Thomas Backlund <tmb@mageia.org>
37 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
38 ---
39 drivers/gpu/drm/nouveau/Kconfig | 13 +------------
40 drivers/gpu/drm/nouveau/nouveau_drm.c | 7 ++-----
41 2 files changed, 3 insertions(+), 17 deletions(-)
42
43 --- a/drivers/gpu/drm/nouveau/Kconfig
44 +++ b/drivers/gpu/drm/nouveau/Kconfig
45 @@ -16,20 +16,9 @@ config DRM_NOUVEAU
46 select INPUT if ACPI && X86
47 select THERMAL if ACPI && X86
48 select ACPI_VIDEO if ACPI && X86
49 - help
50 - Choose this option for open-source NVIDIA support.
51 -
52 -config NOUVEAU_LEGACY_CTX_SUPPORT
53 - bool "Nouveau legacy context support"
54 - depends on DRM_NOUVEAU
55 select DRM_VM
56 - default y
57 help
58 - There was a version of the nouveau DDX that relied on legacy
59 - ctx ioctls not erroring out. But that was back in time a long
60 - ways, so offer a way to disable it now. For uapi compat with
61 - old nouveau ddx this should be on by default, but modern distros
62 - should consider turning it off.
63 + Choose this option for open-source NVIDIA support.
64
65 config NOUVEAU_PLATFORM_DRIVER
66 bool "Nouveau (NVIDIA) SoC GPUs"
67 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c
68 +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
69 @@ -1015,11 +1015,8 @@ nouveau_driver_fops = {
70 static struct drm_driver
71 driver_stub = {
72 .driver_features =
73 - DRIVER_GEM | DRIVER_MODESET | DRIVER_PRIME | DRIVER_RENDER
74 -#if defined(CONFIG_NOUVEAU_LEGACY_CTX_SUPPORT)
75 - | DRIVER_KMS_LEGACY_CONTEXT
76 -#endif
77 - ,
78 + DRIVER_GEM | DRIVER_MODESET | DRIVER_PRIME | DRIVER_RENDER |
79 + DRIVER_KMS_LEGACY_CONTEXT,
80
81 .load = nouveau_drm_load,
82 .unload = nouveau_drm_unload,