diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/nv.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/nv.c | 9 | 
1 files changed, 6 insertions, 3 deletions
| diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c b/drivers/gpu/drm/amd/amdgpu/nv.c index 59eafa31c626..2ec1ffb36b1f 100644 --- a/drivers/gpu/drm/amd/amdgpu/nv.c +++ b/drivers/gpu/drm/amd/amdgpu/nv.c @@ -183,6 +183,7 @@ static int nv_query_video_codecs(struct amdgpu_device *adev, bool encode,  	switch (adev->ip_versions[UVD_HWIP][0]) {  	case IP_VERSION(3, 0, 0):  	case IP_VERSION(3, 0, 64): +	case IP_VERSION(3, 0, 192):  		if (amdgpu_sriov_vf(adev)) {  			if (encode)  				*codecs = &sriov_sc_video_codecs_encode; @@ -731,8 +732,10 @@ static int nv_common_early_init(void *handle)  #define MMIO_REG_HOLE_OFFSET (0x80000 - PAGE_SIZE)  	struct amdgpu_device *adev = (struct amdgpu_device *)handle; -	adev->rmmio_remap.reg_offset = MMIO_REG_HOLE_OFFSET; -	adev->rmmio_remap.bus_addr = adev->rmmio_base + MMIO_REG_HOLE_OFFSET; +	if (!amdgpu_sriov_vf(adev)) { +		adev->rmmio_remap.reg_offset = MMIO_REG_HOLE_OFFSET; +		adev->rmmio_remap.bus_addr = adev->rmmio_base + MMIO_REG_HOLE_OFFSET; +	}  	adev->smc_rreg = NULL;  	adev->smc_wreg = NULL;  	adev->pcie_rreg = &nv_pcie_rreg; @@ -1032,7 +1035,7 @@ static int nv_common_hw_init(void *handle)  	 * for the purpose of expose those registers  	 * to process space  	 */ -	if (adev->nbio.funcs->remap_hdp_registers) +	if (adev->nbio.funcs->remap_hdp_registers && !amdgpu_sriov_vf(adev))  		adev->nbio.funcs->remap_hdp_registers(adev);  	/* enable the doorbell aperture */  	nv_enable_doorbell_aperture(adev, true); |