summaryrefslogtreecommitdiff
path: root/SOURCES
diff options
context:
space:
mode:
Diffstat (limited to 'SOURCES')
-rw-r--r--SOURCES/0001-drm-amd-pm-correct-the-metrics-version-for-SMU-11.0..patch108
-rw-r--r--SOURCES/kernel-aarch64-debug-fedora.config2
-rw-r--r--SOURCES/kernel-aarch64-fedora.config2
-rw-r--r--SOURCES/kernel-armv7hl-debug-fedora.config2
-rw-r--r--SOURCES/kernel-armv7hl-fedora.config2
-rw-r--r--SOURCES/kernel-armv7hl-lpae-debug-fedora.config2
-rw-r--r--SOURCES/kernel-armv7hl-lpae-fedora.config2
-rw-r--r--SOURCES/kernel-ppc64le-debug-fedora.config2
-rw-r--r--SOURCES/kernel-ppc64le-fedora.config2
-rw-r--r--SOURCES/kernel-s390x-debug-fedora.config2
-rw-r--r--SOURCES/kernel-s390x-fedora.config2
-rw-r--r--SOURCES/kernel-x86_64-debug-fedora.config2
-rw-r--r--SOURCES/kernel-x86_64-fedora.config2
-rw-r--r--SOURCES/patch-5.17-redhat.patch4
-rw-r--r--SOURCES/simpledrm-nvidia.patch87
15 files changed, 209 insertions, 14 deletions
diff --git a/SOURCES/0001-drm-amd-pm-correct-the-metrics-version-for-SMU-11.0..patch b/SOURCES/0001-drm-amd-pm-correct-the-metrics-version-for-SMU-11.0..patch
new file mode 100644
index 0000000..a3f267e
--- /dev/null
+++ b/SOURCES/0001-drm-amd-pm-correct-the-metrics-version-for-SMU-11.0..patch
@@ -0,0 +1,108 @@
+From 1b2aa4971d18ae1db3ac0c6c3d9a2fd6b01a1ee1 Mon Sep 17 00:00:00 2001
+From: Evan Quan <evan.quan@amd.com>
+Date: Wed, 6 Apr 2022 14:14:50 +0800
+Subject: [PATCH] drm/amd/pm: correct the metrics version for SMU 11.0.11/12/13
+
+Correct the metrics version used for SMU 11.0.11/12/13.
+
+Signed-off-by: Evan Quan <evan.quan@amd.com>
+--
+v1->v2:
+ - updated to fit 5.16.18 kernel
+v2->v3:
+ - add some verbose debug outputs
+---
+ .../amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 50 +++++++++++++++++--
+ 1 file changed, 46 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
+index 59e1b92f0..b0897e2f4 100644
+--- a/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
++++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
+@@ -547,11 +547,29 @@ static int sienna_cichlid_get_smu_metrics_data(struct smu_context *smu,
+ &(((SmuMetricsExternal_t *)(smu_table->metrics_table))->SmuMetrics);
+ SmuMetrics_V2_t *metrics_v2 =
+ &(((SmuMetricsExternal_t *)(smu_table->metrics_table))->SmuMetrics_V2);
+- bool use_metrics_v2 = ((smu->adev->ip_versions[MP1_HWIP][0] == IP_VERSION(11, 0, 7)) &&
+- (smu->smc_fw_version >= 0x3A4300)) ? true : false;
++ bool use_metrics_v2 = false;
+ uint16_t average_gfx_activity;
+ int ret = 0;
+
++ switch (smu->adev->ip_versions[MP1_HWIP][0]) {
++ case IP_VERSION(11, 0, 7):
++ if (smu->smc_fw_version >= 0x3A4300)
++ use_metrics_v2 = true;
++ break;
++ case IP_VERSION(11, 0, 11):
++ if (smu->smc_fw_version >= 0x412D00)
++ use_metrics_v2 = true;
++ break;
++ case IP_VERSION(11, 0, 12):
++ if (smu->smc_fw_version >= 0x3B2300)
++ use_metrics_v2 = true;
++ break;
++ case IP_VERSION(11, 0, 13):
++ if (smu->smc_fw_version >= 0x491100)
++ use_metrics_v2 = true;
++ break;
++ }
++
+ mutex_lock(&smu->metrics_lock);
+
+ ret = smu_cmn_get_metrics_table_locked(smu,
+@@ -654,6 +672,9 @@ static int sienna_cichlid_get_smu_metrics_data(struct smu_context *smu,
+ break;
+ case METRICS_CURR_FANSPEED:
+ *value = use_metrics_v2 ? metrics_v2->CurrFanSpeed : metrics->CurrFanSpeed;
++ dev_info(smu->adev->dev, "%s: fanspeed %d\n",
++ use_metrics_v2 ? "metrics_v2" : "metrics_v1",
++ *value);
+ break;
+ default:
+ *value = UINT_MAX;
+@@ -3624,11 +3645,29 @@ static ssize_t sienna_cichlid_get_gpu_metrics(struct smu_context *smu,
+ SmuMetrics_V2_t *metrics_v2 =
+ &(metrics_external.SmuMetrics_V2);
+ struct amdgpu_device *adev = smu->adev;
+- bool use_metrics_v2 = ((adev->ip_versions[MP1_HWIP][0] == IP_VERSION(11, 0, 7)) &&
+- (smu->smc_fw_version >= 0x3A4300)) ? true : false;
++ bool use_metrics_v2 = false;
+ uint16_t average_gfx_activity;
+ int ret = 0;
+
++ switch (adev->ip_versions[MP1_HWIP][0]) {
++ case IP_VERSION(11, 0, 7):
++ if (smu->smc_fw_version >= 0x3A4300)
++ use_metrics_v2 = true;
++ break;
++ case IP_VERSION(11, 0, 11):
++ if (smu->smc_fw_version >= 0x412D00)
++ use_metrics_v2 = true;
++ break;
++ case IP_VERSION(11, 0, 12):
++ if (smu->smc_fw_version >= 0x3B2300)
++ use_metrics_v2 = true;
++ break;
++ case IP_VERSION(11, 0, 13):
++ if (smu->smc_fw_version >= 0x491100)
++ use_metrics_v2 = true;
++ break;
++ }
++
+ mutex_lock(&smu->metrics_lock);
+ ret = smu_cmn_get_metrics_table_locked(smu,
+ &metrics_external,
+@@ -3704,6 +3743,9 @@ static ssize_t sienna_cichlid_get_gpu_metrics(struct smu_context *smu,
+ sienna_cichlid_throttler_map);
+
+ gpu_metrics->current_fan_speed = use_metrics_v2 ? metrics_v2->CurrFanSpeed : metrics->CurrFanSpeed;
++ dev_info(smu->adev->dev, "%s: curret fanspeed %d\n",
++ use_metrics_v2 ? "metrics_v2" : "metrics_v1",
++ (int)gpu_metrics->current_fan_speed);
+
+ if (((adev->ip_versions[MP1_HWIP][0] == IP_VERSION(11, 0, 7)) && smu->smc_fw_version > 0x003A1E00) ||
+ ((adev->ip_versions[MP1_HWIP][0] == IP_VERSION(11, 0, 11)) && smu->smc_fw_version > 0x00410400)) {
+--
+2.29.0
+
diff --git a/SOURCES/kernel-aarch64-debug-fedora.config b/SOURCES/kernel-aarch64-debug-fedora.config
index 2090fd4..2c7833c 100644
--- a/SOURCES/kernel-aarch64-debug-fedora.config
+++ b/SOURCES/kernel-aarch64-debug-fedora.config
@@ -2135,7 +2135,7 @@ CONFIG_FAULT_INJECTION=y
# CONFIG_FB_CIRRUS is not set
# CONFIG_FB_CYBER2000 is not set
# CONFIG_FB_DA8XX is not set
-# CONFIG_FB_EFI is not set
+CONFIG_FB_EFI=y
# CONFIG_FB_FOREIGN_ENDIAN is not set
# CONFIG_FB_HYPERV is not set
# CONFIG_FB_I740 is not set
diff --git a/SOURCES/kernel-aarch64-fedora.config b/SOURCES/kernel-aarch64-fedora.config
index 0b0a0cd..5f17da1 100644
--- a/SOURCES/kernel-aarch64-fedora.config
+++ b/SOURCES/kernel-aarch64-fedora.config
@@ -2119,7 +2119,7 @@ CONFIG_FAT_KUNIT_TEST=m
# CONFIG_FB_CIRRUS is not set
# CONFIG_FB_CYBER2000 is not set
# CONFIG_FB_DA8XX is not set
-# CONFIG_FB_EFI is not set
+CONFIG_FB_EFI=y
# CONFIG_FB_FOREIGN_ENDIAN is not set
# CONFIG_FB_HYPERV is not set
# CONFIG_FB_I740 is not set
diff --git a/SOURCES/kernel-armv7hl-debug-fedora.config b/SOURCES/kernel-armv7hl-debug-fedora.config
index b630986..672f0be 100644
--- a/SOURCES/kernel-armv7hl-debug-fedora.config
+++ b/SOURCES/kernel-armv7hl-debug-fedora.config
@@ -2170,7 +2170,7 @@ CONFIG_FAULT_INJECTION=y
# CONFIG_FB_CIRRUS is not set
# CONFIG_FB_CYBER2000 is not set
# CONFIG_FB_DA8XX is not set
-# CONFIG_FB_EFI is not set
+CONFIG_FB_EFI=y
# CONFIG_FB_FOREIGN_ENDIAN is not set
# CONFIG_FB_HYPERV is not set
# CONFIG_FB_I740 is not set
diff --git a/SOURCES/kernel-armv7hl-fedora.config b/SOURCES/kernel-armv7hl-fedora.config
index e1067fb..92a6a8b 100644
--- a/SOURCES/kernel-armv7hl-fedora.config
+++ b/SOURCES/kernel-armv7hl-fedora.config
@@ -2155,7 +2155,7 @@ CONFIG_FAT_KUNIT_TEST=m
# CONFIG_FB_CIRRUS is not set
# CONFIG_FB_CYBER2000 is not set
# CONFIG_FB_DA8XX is not set
-# CONFIG_FB_EFI is not set
+CONFIG_FB_EFI=y
# CONFIG_FB_FOREIGN_ENDIAN is not set
# CONFIG_FB_HYPERV is not set
# CONFIG_FB_I740 is not set
diff --git a/SOURCES/kernel-armv7hl-lpae-debug-fedora.config b/SOURCES/kernel-armv7hl-lpae-debug-fedora.config
index 21a83d8..9165701 100644
--- a/SOURCES/kernel-armv7hl-lpae-debug-fedora.config
+++ b/SOURCES/kernel-armv7hl-lpae-debug-fedora.config
@@ -2124,7 +2124,7 @@ CONFIG_FAULT_INJECTION=y
# CONFIG_FB_CIRRUS is not set
# CONFIG_FB_CYBER2000 is not set
# CONFIG_FB_DA8XX is not set
-# CONFIG_FB_EFI is not set
+CONFIG_FB_EFI=y
# CONFIG_FB_FOREIGN_ENDIAN is not set
# CONFIG_FB_HYPERV is not set
# CONFIG_FB_I740 is not set
diff --git a/SOURCES/kernel-armv7hl-lpae-fedora.config b/SOURCES/kernel-armv7hl-lpae-fedora.config
index f96fda7..dbb9949 100644
--- a/SOURCES/kernel-armv7hl-lpae-fedora.config
+++ b/SOURCES/kernel-armv7hl-lpae-fedora.config
@@ -2109,7 +2109,7 @@ CONFIG_FAT_KUNIT_TEST=m
# CONFIG_FB_CIRRUS is not set
# CONFIG_FB_CYBER2000 is not set
# CONFIG_FB_DA8XX is not set
-# CONFIG_FB_EFI is not set
+CONFIG_FB_EFI=y
# CONFIG_FB_FOREIGN_ENDIAN is not set
# CONFIG_FB_HYPERV is not set
# CONFIG_FB_I740 is not set
diff --git a/SOURCES/kernel-ppc64le-debug-fedora.config b/SOURCES/kernel-ppc64le-debug-fedora.config
index 2fa6e19..492f79e 100644
--- a/SOURCES/kernel-ppc64le-debug-fedora.config
+++ b/SOURCES/kernel-ppc64le-debug-fedora.config
@@ -1695,7 +1695,7 @@ CONFIG_FAULT_INJECTION=y
# CONFIG_FB_CARMINE is not set
# CONFIG_FB_CIRRUS is not set
# CONFIG_FB_CYBER2000 is not set
-# CONFIG_FB_EFI is not set
+CONFIG_FB_EFI=y
# CONFIG_FB_FOREIGN_ENDIAN is not set
# CONFIG_FB_HYPERV is not set
# CONFIG_FB_I740 is not set
diff --git a/SOURCES/kernel-ppc64le-fedora.config b/SOURCES/kernel-ppc64le-fedora.config
index 1330106..8d6969d 100644
--- a/SOURCES/kernel-ppc64le-fedora.config
+++ b/SOURCES/kernel-ppc64le-fedora.config
@@ -1678,7 +1678,7 @@ CONFIG_FAT_KUNIT_TEST=m
# CONFIG_FB_CARMINE is not set
# CONFIG_FB_CIRRUS is not set
# CONFIG_FB_CYBER2000 is not set
-# CONFIG_FB_EFI is not set
+CONFIG_FB_EFI=y
# CONFIG_FB_FOREIGN_ENDIAN is not set
# CONFIG_FB_HYPERV is not set
# CONFIG_FB_I740 is not set
diff --git a/SOURCES/kernel-s390x-debug-fedora.config b/SOURCES/kernel-s390x-debug-fedora.config
index dc58e13..1ce9216 100644
--- a/SOURCES/kernel-s390x-debug-fedora.config
+++ b/SOURCES/kernel-s390x-debug-fedora.config
@@ -1703,7 +1703,7 @@ CONFIG_FAULT_INJECTION=y
# CONFIG_FB_CARMINE is not set
# CONFIG_FB_CIRRUS is not set
# CONFIG_FB_CYBER2000 is not set
-# CONFIG_FB_EFI is not set
+CONFIG_FB_EFI=y
# CONFIG_FB_FOREIGN_ENDIAN is not set
# CONFIG_FB_HYPERV is not set
# CONFIG_FB_I740 is not set
diff --git a/SOURCES/kernel-s390x-fedora.config b/SOURCES/kernel-s390x-fedora.config
index 8ccab5c..8014372 100644
--- a/SOURCES/kernel-s390x-fedora.config
+++ b/SOURCES/kernel-s390x-fedora.config
@@ -1686,7 +1686,7 @@ CONFIG_FAT_KUNIT_TEST=m
# CONFIG_FB_CARMINE is not set
# CONFIG_FB_CIRRUS is not set
# CONFIG_FB_CYBER2000 is not set
-# CONFIG_FB_EFI is not set
+CONFIG_FB_EFI=y
# CONFIG_FB_FOREIGN_ENDIAN is not set
# CONFIG_FB_HYPERV is not set
# CONFIG_FB_I740 is not set
diff --git a/SOURCES/kernel-x86_64-debug-fedora.config b/SOURCES/kernel-x86_64-debug-fedora.config
index 5ebb241..54034f0 100644
--- a/SOURCES/kernel-x86_64-debug-fedora.config
+++ b/SOURCES/kernel-x86_64-debug-fedora.config
@@ -1857,7 +1857,7 @@ CONFIG_FAULT_INJECTION=y
# CONFIG_FB_CARMINE is not set
# CONFIG_FB_CIRRUS is not set
# CONFIG_FB_CYBER2000 is not set
-# CONFIG_FB_EFI is not set
+CONFIG_FB_EFI=y
# CONFIG_FB_FOREIGN_ENDIAN is not set
# CONFIG_FB_GEODE is not set
# CONFIG_FB_HGA is not set
diff --git a/SOURCES/kernel-x86_64-fedora.config b/SOURCES/kernel-x86_64-fedora.config
index c54bc65..d1aeed8 100644
--- a/SOURCES/kernel-x86_64-fedora.config
+++ b/SOURCES/kernel-x86_64-fedora.config
@@ -1840,7 +1840,7 @@ CONFIG_FAT_KUNIT_TEST=m
# CONFIG_FB_CARMINE is not set
# CONFIG_FB_CIRRUS is not set
# CONFIG_FB_CYBER2000 is not set
-# CONFIG_FB_EFI is not set
+CONFIG_FB_EFI=y
# CONFIG_FB_FOREIGN_ENDIAN is not set
# CONFIG_FB_GEODE is not set
# CONFIG_FB_HGA is not set
diff --git a/SOURCES/patch-5.17-redhat.patch b/SOURCES/patch-5.17-redhat.patch
index 07901a9..42a316d 100644
--- a/SOURCES/patch-5.17-redhat.patch
+++ b/SOURCES/patch-5.17-redhat.patch
@@ -111,7 +111,7 @@ index 000000000000..733a26bd887a
+
+endmenu
diff --git a/Makefile b/Makefile
-index 3cf179812f0f..ca873b29f0b2 100644
+index aba139bbd1c7..01a8c0b291ac 100644
--- a/Makefile
+++ b/Makefile
@@ -18,6 +18,10 @@ $(if $(filter __%, $(MAKECMDGOALS)), \
@@ -1917,7 +1917,7 @@ index d1f34229e11a..e828504cc396 100644
if (error < 0)
return error;
diff --git a/fs/nfs/fs_context.c b/fs/nfs/fs_context.c
-index ea17fa1f31ec..e2d59bb5e6bb 100644
+index d20891162145..9a16897e8dc6 100644
--- a/fs/nfs/fs_context.c
+++ b/fs/nfs/fs_context.c
@@ -80,6 +80,7 @@ enum nfs_param {
diff --git a/SOURCES/simpledrm-nvidia.patch b/SOURCES/simpledrm-nvidia.patch
new file mode 100644
index 0000000..48be3c8
--- /dev/null
+++ b/SOURCES/simpledrm-nvidia.patch
@@ -0,0 +1,87 @@
+From 205bec68a0ea67b6bff6fea9603b7b8aeacc9d46 Mon Sep 17 00:00:00 2001
+From: Javier Martinez Canillas <javierm@redhat.com>
+Date: Thu, 19 May 2022 14:40:07 +0200
+Subject: [PATCH 1/2] drivers/firmware: skip simpledrm if nvidia-drm.modeset=1
+ is set
+
+The Nvidia proprietary driver has some bugs that leads to issues if used
+with the simpledrm driver. The most noticeable is that does not register
+an emulated fbdev device.
+
+It just relies on a fbdev to be registered by another driver, that could
+be that could be attached to the framebuffer console. On UEFI machines,
+this is the efifb driver.
+
+This means that disabling the efifb driver will cause virtual consoles to
+not be present in the system when using the Nvidia driver. Legacy BIOS is
+not affected just because fbcon is not used there, but instead vgacon.
+
+Unless a VGA mode is specified using the vga= kernel command line option,
+in that case the vesafb driver is used instead and its fbdev attached to
+the fbcon.
+
+This is a problem because with CONFIG_SYSFB_SIMPLEFB=y, the sysfb platform
+code attempts to register a "simple-framebuffer" platform device (that is
+matched against simpledrm) and only registers either an "efi-framebuffer"
+or "vesa-framebuffer" if this fails to be registered due the video modes
+not being compatible.
+
+The Nvidia driver relying on another driver to register the fbdev is quite
+fragile, since it can't really assume those will stick around. For example
+there are patches posted to remove the EFI and VESA platform devices once
+a real DRM or fbdev driver probes.
+
+But in any case, moving to a simpledrm + emulated fbdev only breaks this
+assumption and causes users to not have VT if the Nvidia driver is used.
+
+So to prevent this, let's add a workaround and make the sysfb to skip the
+"simple-framebuffer" registration when nvidia-drm.modeset=1 option is set.
+
+This is quite horrible, but honestly I can't think of any other approach.
+
+For this to work, the CONFIG_FB_EFI and CONFIG_FB_VESA config options must
+be enabled besides CONFIG_DRM_SIMPLEDRM.
+
+Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
+---
+ drivers/firmware/sysfb.c | 18 +++++++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/firmware/sysfb.c b/drivers/firmware/sysfb.c
+index 2bfbb05f7d89..a504f7234f35 100644
+--- a/drivers/firmware/sysfb.c
++++ b/drivers/firmware/sysfb.c
+@@ -34,6 +34,22 @@
+ #include <linux/screen_info.h>
+ #include <linux/sysfb.h>
+
++static int skip_simpledrm;
++
++static int __init simpledrm_disable(char *opt)
++{
++ if (!opt)
++ return -EINVAL;
++
++ get_option(&opt, &skip_simpledrm);
++
++ if (skip_simpledrm)
++ pr_info("The simpledrm driver will not be probed\n");
++
++ return 0;
++}
++early_param("nvidia-drm.modeset", simpledrm_disable);
++
+ static __init int sysfb_init(void)
+ {
+ struct screen_info *si = &screen_info;
+@@ -45,7 +61,7 @@ static __init int sysfb_init(void)
+
+ /* try to create a simple-framebuffer device */
+ compatible = sysfb_parse_mode(si, &mode);
+- if (compatible) {
++ if (compatible && !skip_simpledrm) {
+ ret = sysfb_create_simplefb(si, &mode);
+ if (!ret)
+ return 0;
+--
+GitLab