[bug report] drm/amdgpu: add initial VCN2.0 support (v2)
Dan Carpenter
dan.carpenter at oracle.com
Tue Nov 26 12:13:17 UTC 2019
Hello Leo Liu,
The patch 1b61de45dfaf: "drm/amdgpu: add initial VCN2.0 support (v2)"
from Oct 15, 2018, leads to the following static checker warning:
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c:1083 vcn_v2_0_stop()
error: uninitialized symbol 'r'.
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
1069 static int vcn_v2_0_stop(struct amdgpu_device *adev)
1070 {
1071 uint32_t tmp;
1072 int r;
1073
1074 if (adev->pg_flags & AMD_PG_SUPPORT_VCN_DPG) {
1075 r = vcn_v2_0_stop_dpg_mode(adev);
1076 if (r)
1077 return r;
1078 goto power_off;
1079 }
1080
1081 /* wait for uvd idle */
1082 SOC15_WAIT_ON_RREG(VCN, 0, mmUVD_STATUS, UVD_STATUS__IDLE, 0x7, r);
1083 if (r)
r is only set on error, not success.
1084 return r;
1085
1086 tmp = UVD_LMI_STATUS__VCPU_LMI_WRITE_CLEAN_MASK |
1087 UVD_LMI_STATUS__READ_CLEAN_MASK |
1088 UVD_LMI_STATUS__WRITE_CLEAN_MASK |
1089 UVD_LMI_STATUS__WRITE_CLEAN_RAW_MASK;
1090 SOC15_WAIT_ON_RREG(VCN, 0, mmUVD_LMI_STATUS, tmp, tmp, r);
1091 if (r)
1092 return r;
regards,
dan carpenter
More information about the amd-gfx
mailing list