diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/soc21.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/soc21.c | 8 | 
1 files changed, 5 insertions, 3 deletions
| diff --git a/drivers/gpu/drm/amd/amdgpu/soc21.c b/drivers/gpu/drm/amd/amdgpu/soc21.c index 620f7409825d..061793d390cc 100644 --- a/drivers/gpu/drm/amd/amdgpu/soc21.c +++ b/drivers/gpu/drm/amd/amdgpu/soc21.c @@ -111,6 +111,7 @@ static int soc21_query_video_codecs(struct amdgpu_device *adev, bool encode,  	switch (adev->ip_versions[UVD_HWIP][0]) {  	case IP_VERSION(4, 0, 0):  	case IP_VERSION(4, 0, 2): +	case IP_VERSION(4, 0, 4):  		if (adev->vcn.harvest_config & AMDGPU_VCN_HARVEST_VCN0) {  			if (encode)  				*codecs = &vcn_4_0_0_video_codecs_encode_vcn1; @@ -291,9 +292,10 @@ static int soc21_read_register(struct amdgpu_device *adev, u32 se_num,  	*value = 0;  	for (i = 0; i < ARRAY_SIZE(soc21_allowed_read_registers); i++) {  		en = &soc21_allowed_read_registers[i]; -		if (adev->reg_offset[en->hwip][en->inst] && -		    reg_offset != (adev->reg_offset[en->hwip][en->inst][en->seg] -				   + en->reg_offset)) +		if (!adev->reg_offset[en->hwip][en->inst]) +			continue; +		else if (reg_offset != (adev->reg_offset[en->hwip][en->inst][en->seg] +					+ en->reg_offset))  			continue;  		*value = soc21_get_register_value(adev, |