]> Git Repo - linux.git/blobdiff - drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
Merge tag 'block-6.7-2023-12-22' of git://git.kernel.dk/linux
[linux.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_debugfs.c
index a53f436fa9f1ae7c0129f8e58dd212ad70dfd0aa..0e61ebdb3f3e5999dc34f8f2f478e0a8ba41ae45 100644 (file)
@@ -638,6 +638,9 @@ static ssize_t amdgpu_debugfs_regs_didt_read(struct file *f, char __user *buf,
        if (size & 0x3 || *pos & 0x3)
                return -EINVAL;
 
+       if (!adev->didt_rreg)
+               return -EOPNOTSUPP;
+
        r = pm_runtime_get_sync(adev_to_drm(adev)->dev);
        if (r < 0) {
                pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
@@ -694,6 +697,9 @@ static ssize_t amdgpu_debugfs_regs_didt_write(struct file *f, const char __user
        if (size & 0x3 || *pos & 0x3)
                return -EINVAL;
 
+       if (!adev->didt_wreg)
+               return -EOPNOTSUPP;
+
        r = pm_runtime_get_sync(adev_to_drm(adev)->dev);
        if (r < 0) {
                pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
This page took 0.033082 seconds and 4 git commands to generate.