diff options
author | xinhui pan <xinhui.pan@amd.com> | 2019-03-07 14:01:11 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-03-19 15:36:51 -0500 |
commit | 1febb00ecb1af5093ff8442991965694af001467 (patch) | |
tree | 4c28548bfd5250a44f7721a9f6cf41039014c044 /drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | |
parent | b404ae82558e45b1d841e07a1a0bded73fa451da (diff) | |
download | lwn-1febb00ecb1af5093ff8442991965694af001467.tar.gz lwn-1febb00ecb1af5093ff8442991965694af001467.zip |
drm/amdgpu: export both supported and enabled ras features
Signed-off-by: xinhui pan <xinhui.pan@amd.com>
Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c index df40f35db89c..2ab5b3c45093 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c @@ -922,11 +922,14 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file return copy_to_user(out, &ui32, min(size, 4u)) ? -EFAULT : 0; case AMDGPU_INFO_RAS_ENABLED_FEATURES: { struct amdgpu_ras *ras = amdgpu_ras_get_context(adev); + uint64_t ras_mask; if (!ras) return -EINVAL; - return copy_to_user(out, &ras->features, - min_t(u32, size, sizeof(ras->features))) ? + ras_mask = (uint64_t)ras->supported << 32 | ras->features; + + return copy_to_user(out, &ras_mask, + min_t(u64, size, sizeof(ras_mask))) ? -EFAULT : 0; } default: |