linux57/58-tkg: Add a reverting patch to restore amdgpu overdrive functionality, which has regressed recently.
https://gitlab.freedesktop.org/drm/amd/-/issues/1243
This commit is contained in:
parent
8d133ff30c
commit
a3c869423d
@ -151,7 +151,7 @@ sha256sums=('de8163bb62f822d84f7a3983574ec460060bf013a78ff79cd7c979ff1ec1d7e0'
|
||||
'b2a2ae866fc3f1093f67e69ba59738827e336b8f800fb0487599127f7f3ef881'
|
||||
'49262ce4a8089fa70275aad742fc914baa28d9c384f710c9a62f64796d13e104'
|
||||
'6821f92bd2bde3a3938d17b070d70f18a2f33cae81647567b5a4d94c9cd75f3d'
|
||||
'78b6d2c1ca0e2bb16619194bc8909903199c259739ecfcfdf5d0965baa8d54a6')
|
||||
'b9f724ada90bc7c87c77429278ddbe20cfcbd768bd3cb1e1c132a0f1eda3625f')
|
||||
|
||||
export KBUILD_BUILD_HOST=archlinux
|
||||
export KBUILD_BUILD_USER=$pkgbase
|
||||
|
@ -104,3 +104,38 @@ index 86ffa0c2880f..710edc70e37e 100644
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
|
||||
index 02e6f8c4dde0..ebb8a28ff002 100644
|
||||
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
|
||||
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
|
||||
@@ -778,7 +778,8 @@ static ssize_t amdgpu_set_pp_od_clk_voltage(struct device *dev,
|
||||
tmp_str++;
|
||||
while (isspace(*++tmp_str));
|
||||
|
||||
- while ((sub_str = strsep(&tmp_str, delimiter)) != NULL) {
|
||||
+ while (tmp_str[0]) {
|
||||
+ sub_str = strsep(&tmp_str, delimiter);
|
||||
ret = kstrtol(sub_str, 0, ¶meter[parameter_size]);
|
||||
if (ret)
|
||||
return -EINVAL;
|
||||
@@ -1038,7 +1039,8 @@ static ssize_t amdgpu_read_mask(const char *buf, size_t count, uint32_t *mask)
|
||||
memcpy(buf_cpy, buf, bytes);
|
||||
buf_cpy[bytes] = '\0';
|
||||
tmp = buf_cpy;
|
||||
- while ((sub_str = strsep(&tmp, delimiter)) != NULL) {
|
||||
+ while (tmp[0]) {
|
||||
+ sub_str = strsep(&tmp, delimiter);
|
||||
if (strlen(sub_str)) {
|
||||
ret = kstrtol(sub_str, 0, &level);
|
||||
if (ret)
|
||||
@@ -1635,7 +1637,8 @@ static ssize_t amdgpu_set_pp_power_profile_mode(struct device *dev,
|
||||
i++;
|
||||
memcpy(buf_cpy, buf, count-i);
|
||||
tmp_str = buf_cpy;
|
||||
- while ((sub_str = strsep(&tmp_str, delimiter)) != NULL) {
|
||||
+ while (tmp_str[0]) {
|
||||
+ sub_str = strsep(&tmp_str, delimiter);
|
||||
ret = kstrtol(sub_str, 0, ¶meter[parameter_size]);
|
||||
if (ret)
|
||||
return -EINVAL;
|
||||
|
@ -135,7 +135,7 @@ sha256sums=('ace7c02ad8577c8fc19b2e6b5d0aeeee06721511527bc38dd975b2c56982ccec'
|
||||
'19661ec0d39f9663452b34433214c755179894528bf73a42f6ba52ccf572832a'
|
||||
'cd225e86d72eaf6c31ef3d7b20df397f4cc44ddd04389850691292cdf292b204'
|
||||
'49262ce4a8089fa70275aad742fc914baa28d9c384f710c9a62f64796d13e104'
|
||||
'78b6d2c1ca0e2bb16619194bc8909903199c259739ecfcfdf5d0965baa8d54a6')
|
||||
'b9f724ada90bc7c87c77429278ddbe20cfcbd768bd3cb1e1c132a0f1eda3625f')
|
||||
|
||||
export KBUILD_BUILD_HOST=archlinux
|
||||
export KBUILD_BUILD_USER=$pkgbase
|
||||
|
@ -104,3 +104,38 @@ index 86ffa0c2880f..710edc70e37e 100644
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
|
||||
index 02e6f8c4dde0..ebb8a28ff002 100644
|
||||
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
|
||||
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
|
||||
@@ -778,7 +778,8 @@ static ssize_t amdgpu_set_pp_od_clk_voltage(struct device *dev,
|
||||
tmp_str++;
|
||||
while (isspace(*++tmp_str));
|
||||
|
||||
- while ((sub_str = strsep(&tmp_str, delimiter)) != NULL) {
|
||||
+ while (tmp_str[0]) {
|
||||
+ sub_str = strsep(&tmp_str, delimiter);
|
||||
ret = kstrtol(sub_str, 0, ¶meter[parameter_size]);
|
||||
if (ret)
|
||||
return -EINVAL;
|
||||
@@ -1038,7 +1039,8 @@ static ssize_t amdgpu_read_mask(const char *buf, size_t count, uint32_t *mask)
|
||||
memcpy(buf_cpy, buf, bytes);
|
||||
buf_cpy[bytes] = '\0';
|
||||
tmp = buf_cpy;
|
||||
- while ((sub_str = strsep(&tmp, delimiter)) != NULL) {
|
||||
+ while (tmp[0]) {
|
||||
+ sub_str = strsep(&tmp, delimiter);
|
||||
if (strlen(sub_str)) {
|
||||
ret = kstrtol(sub_str, 0, &level);
|
||||
if (ret)
|
||||
@@ -1635,7 +1637,8 @@ static ssize_t amdgpu_set_pp_power_profile_mode(struct device *dev,
|
||||
i++;
|
||||
memcpy(buf_cpy, buf, count-i);
|
||||
tmp_str = buf_cpy;
|
||||
- while ((sub_str = strsep(&tmp_str, delimiter)) != NULL) {
|
||||
+ while (tmp_str[0]) {
|
||||
+ sub_str = strsep(&tmp_str, delimiter);
|
||||
ret = kstrtol(sub_str, 0, ¶meter[parameter_size]);
|
||||
if (ret)
|
||||
return -EINVAL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user