artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
caf3362
)
drm/amdgpu: fall back to INPUT power for AVG power via INFO IOCTL
author
jsg
<jsg@openbsd.org>
Mon, 29 Jan 2024 01:58:43 +0000
(
01:58
+0000)
committer
jsg
<jsg@openbsd.org>
Mon, 29 Jan 2024 01:58:43 +0000
(
01:58
+0000)
From Alex Deucher
836e236b878a385911db619b38393d624a4d7eae
in linux-6.6.y/6.6.14
d02069850fc102b07ae923535d5e212f2c8a34e9
in mainline linux
sys/dev/pci/drm/amd/amdgpu/amdgpu_kms.c
patch
|
blob
|
history
diff --git
a/sys/dev/pci/drm/amd/amdgpu/amdgpu_kms.c
b/sys/dev/pci/drm/amd/amdgpu/amdgpu_kms.c
index
e47abc6
..
be9f213
100644
(file)
--- a/
sys/dev/pci/drm/amd/amdgpu/amdgpu_kms.c
+++ b/
sys/dev/pci/drm/amd/amdgpu/amdgpu_kms.c
@@
-1026,7
+1026,12
@@
int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
if (amdgpu_dpm_read_sensor(adev,
AMDGPU_PP_SENSOR_GPU_AVG_POWER,
(void *)&ui32, &ui32_size)) {
- return -EINVAL;
+ /* fall back to input power for backwards compat */
+ if (amdgpu_dpm_read_sensor(adev,
+ AMDGPU_PP_SENSOR_GPU_INPUT_POWER,
+ (void *)&ui32, &ui32_size)) {
+ return -EINVAL;
+ }
}
ui32 >>= 8;
break;