drm/amdgpu: don't remap HDP registers if page size is > 4K
Subsystems (2)
Alex Deucher
maintainerPATCH 1/1 drm/amdgpu: don't remap HDP registers if page size is > 4K
We remap the HDP registers to an open part of the MMIO aperture if page size is <= 4K, but if it's > 4k, we remap the HDP registers back to themselves. Rather than doing that, just skip the remap.
Signed-off-by Alex Deucher <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/nv.c | 3 ++- drivers/gpu/drm/amd/amdgpu/soc15.c | 3 ++- drivers/gpu/drm/amd/amdgpu/soc21.c | 3 ++- drivers/gpu/drm/amd/amdgpu/soc24.c | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/nv.c +2 -1
@@ -1002,7 +1002,8 @@ static int nv_common_hw_init(struct amdgpu_ip_block *ip_block)* for the purpose of expose those registers * to process space */ -if (adev->nbio.funcs->remap_hdp_registers && !amdgpu_sriov_vf (adev)) +if (adev->nbio.funcs->remap_hdp_registers && !amdgpu_sriov_vf (adev) && + (PAGE_SIZE <=4096 )) adev->nbio.funcs->remap_hdp_registers (adev);/* enable the doorbell aperture */ adev->nbio.funcs->enable_doorbell_aperture (adev, true);
drivers/gpu/drm/amd/amdgpu/soc15.c +2 -1
@@ -1297,7 +1297,8 @@ static int soc15_common_hw_init(struct amdgpu_ip_block *ip_block)* for the purpose of expose those registers * to process space */ -if (adev->nbio.funcs->remap_hdp_registers && !amdgpu_sriov_vf (adev)) +if (adev->nbio.funcs->remap_hdp_registers && !amdgpu_sriov_vf (adev) && + (PAGE_SIZE <=4096 )) adev->nbio.funcs->remap_hdp_registers (adev);/* enable the doorbell aperture */
drivers/gpu/drm/amd/amdgpu/soc21.c +2 -1
@@ -877,7 +877,8 @@ static int soc21_common_hw_init(struct amdgpu_ip_block *ip_block)* for the purpose of expose those registers * to process space */ -if (adev->nbio.funcs->remap_hdp_registers && !amdgpu_sriov_vf (adev)) +if (adev->nbio.funcs->remap_hdp_registers && !amdgpu_sriov_vf (adev) && + (PAGE_SIZE <=4096 )) adev->nbio.funcs->remap_hdp_registers (adev);/* enable the doorbell aperture */ adev->nbio.funcs->enable_doorbell_aperture (adev, true);
drivers/gpu/drm/amd/amdgpu/soc24.c +1 -1
@@ -486,7 +486,7 @@ static int soc24_common_hw_init(struct amdgpu_ip_block *ip_block)* for the purpose of expose those registers * to process space */ -if (adev->nbio.funcs->remap_hdp_registers) +if (adev->nbio.funcs->remap_hdp_registers && (PAGE_SIZE <=4096 )) adev->nbio.funcs->remap_hdp_registers (adev);if (adev->df.funcs->hw_init)
Signature · 1 line
2.49.0