commit e25ab844f79ee70ff728dd45d12415c5d08ec1e6
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Fri Feb 18 13:57:11 2022 +0100
Update simpledrm.patch from javierm
nvidia-kmod-simpledrm.patch | 33 +++++++++++++++++----------------
1 file changed, 17 insertions(+), 16 deletions(-)
---
diff --git a/nvidia-kmod-simpledrm.patch b/nvidia-kmod-simpledrm.patch
index 8607bba..3ac1479 100644
--- a/nvidia-kmod-simpledrm.patch
+++ b/nvidia-kmod-simpledrm.patch
@@ -1,8 +1,8 @@
-From 4f64c5eb6abb6bc75d3d49d2a0b409366068f0e7 Mon Sep 17 00:00:00 2001
+From b1912480539b4dd23ce8ba901b1a16e915561437 Mon Sep 17 00:00:00 2001
From: Javier Martinez Canillas <javierm(a)redhat.com>
-Date: Fri, 21 Jan 2022 18:10:25 +0100
-Subject: [PATCH] nvidia-drm: remove existing generic drivers to take over the
- device
+Date: Fri, 18 Feb 2022 13:48:46 +0100
+Subject: [PATCH 1/2] nvidia-drm: remove existing generic drivers to take over
+ the device
There are drivers that register framebuffer devices very early in the boot
process and make use of the existing framebuffer as setup by the firmware.
@@ -16,11 +16,11 @@ early fbdev (i.e: simpledrm) to the one registered by the real DRM
drivers.
Signed-off-by: Javier Martinez Canillas <javierm(a)redhat.com>
---
- kernel/nvidia-drm/nvidia-drm-drv.c | 14 ++++++++++++++
- 1 file changed, 14 insertions(+)
+ kernel/nvidia-drm/nvidia-drm-drv.c | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
diff --git a/kernel/nvidia-drm/nvidia-drm-drv.c b/kernel/nvidia-drm/nvidia-drm-drv.c
-index 0d29d1d6bf4d..3f7725de6b91 100644
+index 0d29d1d6bf4d..9149f87b6244 100644
--- a/kernel/nvidia-drm/nvidia-drm-drv.c
+++ b/kernel/nvidia-drm/nvidia-drm-drv.c
@@ -60,6 +60,8 @@
@@ -41,18 +41,20 @@ index 0d29d1d6bf4d..3f7725de6b91 100644
DRM_DEBUG(
"Registering device for NVIDIA GPU ID 0x08%x",
gpu_info->gpu_id);
-@@ -917,6 +921,16 @@ static void nv_drm_register_drm_device(const nv_gpu_info_t
*gpu_info)
+@@ -917,6 +921,18 @@ static void nv_drm_register_drm_device(const nv_gpu_info_t
*gpu_info)
mutex_init(&nv_dev->lock);
#endif
-+ /* Remove existing drivers that may own the framebuffer memory. */
++ if (IS_ENABLED(CONFIG_DRM_SIMPLEDRM)) {
++ /* Remove existing drivers that may own the framebuffer memory. */
+
-+ ret = drm_aperture_remove_framebuffers(false, &nv_drm_driver);
-+ if (ret) {
-+ NV_DRM_DEV_LOG_ERR(nv_dev,
-+ "Failed to remove existing framebuffers - %d.\n",
-+ ret);
-+ return;
++ ret = drm_aperture_remove_framebuffers(false, &nv_drm_driver);
++ if (ret) {
++ NV_DRM_DEV_LOG_ERR(nv_dev,
++ "Failed to remove existing framebuffers - %d.\n",
++ ret);
++ return;
++ }
+ }
+
/* Allocate DRM device */
@@ -60,4 +62,3 @@ index 0d29d1d6bf4d..3f7725de6b91 100644
dev = drm_dev_alloc(&nv_drm_driver, device);
--
2.34.1
-
Show replies by date