drm/amdgpu: change encode ib size alignment to 4 bytes
Subsystems (2)
PATCH 1/1 drm/amdgpu: change encode ib size alignment to 4 bytes
From: Boyuan Zhang <[email protected]>
All encode ibs must be dword aligned for address/size.
It's been working because all ib based addresses are normally page aligned, and all encode FW interface structure sizes are dword aligned. However, it might cause issue when UMD tries to align size based on alignment reported by kernel.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +3 -3
@@ -387,7 +387,7 @@ static int amdgpu_hw_ip_info(struct amdgpu_device *adev,if (adev->vce.ring[i].sched.ready) ++num_rings; ib_start_alignment =4 ; - ib_size_alignment =1 ; + ib_size_alignment =4 ;break ;case AMDGPU_HW_IP_UVD_ENC : type =AMD_IP_BLOCK_TYPE_UVD ;
@@ -400,7 +400,7 @@ static int amdgpu_hw_ip_info(struct amdgpu_device *adev, ++num_rings; } ib_start_alignment =64 ; - ib_size_alignment =64 ; + ib_size_alignment =4 ;break ;case AMDGPU_HW_IP_VCN_DEC : type =AMD_IP_BLOCK_TYPE_VCN ;
@@ -415,7 +415,7 @@ static int amdgpu_hw_ip_info(struct amdgpu_device *adev,if (adev->vcn.ring_enc[i].sched.ready) ++num_rings; ib_start_alignment =64 ; - ib_size_alignment =1 ; + ib_size_alignment =4 ;break ;case AMDGPU_HW_IP_VCN_JPEG : type =AMD_IP_BLOCK_TYPE_VCN ;
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): [email protected]
Christian König
Acked-byAm 15.04.19 um 16:23 schrieb [email protected]:
Quoted 9 lines
From: Boyuan Zhang <[email protected]>
All encode ibs must be dword aligned for address/size.
It's been working because all ib based addresses are normally page aligned, and all encode FW interface structure sizes are dword aligned. However, it might cause issue when UMD tries to align size based on alignment reported by kernel.
Signed-off-by Boyuan Zhang <[email protected]>
Quoted 27 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +2
-2@@ -387,7 +387,7 @@ static int amdgpu_hw_ip_info(struct amdgpu_device *adev,if (adev->vce.ring[i].sched.ready) ++num_rings; ib_start_alignment =4 ; - ib_size_alignment =1 ; + ib_size_alignment =4 ;break ;case AMDGPU_HW_IP_UVD_ENC : type =AMD_IP_BLOCK_TYPE_UVD ;@@ -400,7 +400,7 @@ static int amdgpu_hw_ip_info(struct amdgpu_device *adev, ++num_rings; } ib_start_alignment =64 ; - ib_size_alignment =64 ; + ib_size_alignment =4 ;break ;case AMDGPU_HW_IP_VCN_DEC : type =AMD_IP_BLOCK_TYPE_VCN ;
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c static int amdgpu_hw_ip_info(struct amdgpu_device *adev, · line 421
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +1
-1@@ -415,7 +415,7 @@ static int amdgpu_hw_ip_info(struct amdgpu_device *adev,if (adev->vcn.ring_enc[i].sched.ready) ++num_rings; ib_start_alignment =64 ; - ib_size_alignment =1 ; + ib_size_alignment =4 ;break ;case AMDGPU_HW_IP_VCN_JPEG : type =AMD_IP_BLOCK_TYPE_VCN ;
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx