drm/amdgpu: enable vcn 2.0 for SRIOV on NV12
Subsystems (2)
PATCH 1/1 drm/amdgpu: enable vcn 2.0 for SRIOV on NV12
this a patch that port from SRIOV project branch
to fix those IB/RING test fail on VCN 2.0 rings
--- drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.c | 3 + drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 14 +- drivers/gpu/drm/amd/amdgpu/mmsch_v2_0.h | 141 ++++++++++ drivers/gpu/drm/amd/amdgpu/nv.c | 3 +- drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 303 ++++++++++++++++++++- .../amd/include/asic_reg/vcn/vcn_2_0_0_offset.h | 197 ++++++++++++++ 6 files changed, 637 insertions(+), 24 deletions(-) create mode 100644 drivers/gpu/drm/amd/amdgpu/mmsch_v2_0.h
drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.c +3 -0
@@ -181,6 +181,9 @@ int amdgpu_jpeg_dec_ring_test_ib(struct amdgpu_ring *ring, long timeout)struct dma_fence *fence =NULL ;long r =0 ; +if (amdgpu_sriov_vf (adev)) +return 0 ; + r =amdgpu_jpeg_dec_set_reg (ring,1 , &fence);if (r) goto error;
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +6 -8
@@ -359,6 +359,9 @@ int amdgpu_vcn_dec_ring_test_ring(struct amdgpu_ring *ring)unsigned i;int r; +if (amdgpu_sriov_vf (adev)) +return 0 ; +WREG32 (adev->vcn.inst[ring->me].external.scratch9,0xCAFEDEAD ); r =amdgpu_ring_alloc (ring,3 );if (r)
@@ -497,10 +500,6 @@ int amdgpu_vcn_dec_ring_test_ib(struct amdgpu_ring *ring, long timeout)struct dma_fence *fence;long r; -/* temporarily disable ib test for sriov */ -if (amdgpu_sriov_vf (adev)) -return 0 ; - r =amdgpu_vcn_dec_get_create_msg (ring,1 ,NULL );if (r) goto error;
@@ -527,6 +526,9 @@ int amdgpu_vcn_enc_ring_test_ring(struct amdgpu_ring *ring)unsigned i;int r; +if (amdgpu_sriov_vf (adev)) +return 0 ; + r =amdgpu_ring_alloc (ring,16 );if (r)return r;
@@ -661,10 +663,6 @@ int amdgpu_vcn_enc_ring_test_ib(struct amdgpu_ring *ring, long timeout)struct amdgpu_bo *bo =NULL ;long r; -/* temporarily disable ib test for sriov */ -if (amdgpu_sriov_vf (adev)) -return 0 ; - r =amdgpu_bo_create_reserved (ring->adev,128 *1024 ,PAGE_SIZE ,AMDGPU_GEM_DOMAIN_VRAM , &bo,NULL ,NULL );
drivers/gpu/drm/amd/amdgpu/mmsch_v2_0.h new file +141 -0
141 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/nv.c +2 -1
@@ -516,7 +516,8 @@ int nv_set_ip_blocks(struct amdgpu_device *adev) !amdgpu_sriov_vf(adev))amdgpu_device_ip_block_add (adev, &smu_v11_0_ip_block);amdgpu_device_ip_block_add (adev, &vcn_v2_0_ip_block); -amdgpu_device_ip_block_add (adev, &jpeg_v2_0_ip_block); +if (!amdgpu_sriov_vf (adev)) +amdgpu_device_ip_block_add (adev, &jpeg_v2_0_ip_block);break ;default :return -EINVAL ;
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c +288 -15
410 lines not on this page · raw message
drivers/gpu/drm/amd/include/asic_reg/vcn/vcn_2_0_0_offset.h +197 -0
203 lines not on this page · raw message
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Please separate the patch to a set of patches and add meaningful commit message about the changes to each of patches.
Leo
________________________________
From: amd-gfx <[email protected]> on behalf of Monk Liu <[email protected]>
Sent: March 5, 2020 4:48:37 AM
To: [email protected] <[email protected]>
Cc: Zhao, Jiange <[email protected]>; Opara, Darlington <[email protected]>; Liu, Monk <[email protected]>
Subject: [PATCH] drm/amdgpu: enable vcn 2.0 for SRIOV on NV12
this a patch that port from SRIOV project branch
to fix those IB/RING test fail on VCN 2.0 rings
--- drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.c | 3 + drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 14 +- drivers/gpu/drm/amd/amdgpu/mmsch_v2_0.h | 141 ++++++++++ drivers/gpu/drm/amd/amdgpu/nv.c | 3 +- drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 303 ++++++++++++++++++++- .../amd/include/asic_reg/vcn/vcn_2_0_0_offset.h | 197 ++++++++++++++ 6 files changed, 637 insertions(+), 24 deletions(-) create mode 100644 drivers/gpu/drm/amd/amdgpu/mmsch_v2_0.h
drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.c +3 -0
@@ -181,6 +181,9 @@ int amdgpu_jpeg_dec_ring_test_ib(struct amdgpu_ring *ring, long timeout)struct dma_fence *fence =NULL ;long r =0 ; +if (amdgpu_sriov_vf (adev)) +return 0 ; + r =amdgpu_jpeg_dec_set_reg (ring,1 , &fence);if (r) goto error;
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +6 -8
@@ -359,6 +359,9 @@ int amdgpu_vcn_dec_ring_test_ring(struct amdgpu_ring *ring)unsigned i;int r; +if (amdgpu_sriov_vf (adev)) +return 0 ; +WREG32 (adev->vcn.inst[ring->me].external.scratch9,0xCAFEDEAD ); r =amdgpu_ring_alloc (ring,3 );if (r)
@@ -497,10 +500,6 @@ int amdgpu_vcn_dec_ring_test_ib(struct amdgpu_ring *ring, long timeout)struct dma_fence *fence;long r; -/* temporarily disable ib test for sriov */ -if (amdgpu_sriov_vf (adev)) -return 0 ; - r =amdgpu_vcn_dec_get_create_msg (ring,1 ,NULL );if (r) goto error;
@@ -527,6 +526,9 @@ int amdgpu_vcn_enc_ring_test_ring(struct amdgpu_ring *ring)unsigned i;int r; +if (amdgpu_sriov_vf (adev)) +return 0 ; + r =amdgpu_ring_alloc (ring,16 );if (r)return r;
@@ -661,10 +663,6 @@ int amdgpu_vcn_enc_ring_test_ib(struct amdgpu_ring *ring, long timeout)struct amdgpu_bo *bo =NULL ;long r; -/* temporarily disable ib test for sriov */ -if (amdgpu_sriov_vf (adev)) -return 0 ; - r =amdgpu_bo_create_reserved (ring->adev,128 *1024 ,PAGE_SIZE ,AMDGPU_GEM_DOMAIN_VRAM , &bo,NULL ,NULL );
drivers/gpu/drm/amd/amdgpu/mmsch_v2_0.h new file +141 -0
141 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/nv.c +2 -1
@@ -516,7 +516,8 @@ int nv_set_ip_blocks(struct amdgpu_device *adev) !amdgpu_sriov_vf(adev))amdgpu_device_ip_block_add (adev, &smu_v11_0_ip_block);amdgpu_device_ip_block_add (adev, &vcn_v2_0_ip_block); -amdgpu_device_ip_block_add (adev, &jpeg_v2_0_ip_block); +if (!amdgpu_sriov_vf (adev)) +amdgpu_device_ip_block_add (adev, &jpeg_v2_0_ip_block);break ;default :return -EINVAL ;
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c +288 -15
410 lines not on this page · raw message
drivers/gpu/drm/amd/include/asic_reg/vcn/vcn_2_0_0_offset.h +197 -0
203 lines not on this page · raw message
--
2.7.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Cleo.liu%40amd.com%7C4c2fae0b5b374a86759d08d7c0ea6a4f%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637189985360189246&sdata=bzpOv%2FXbxWXKq00Wob%2FcjdCJJV4VfxdNtatel1uWybM%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Hi Leo
Please check my new patch serials , totally 6 sub patches
Thanks !
_____________________________________
Monk Liu|GPU Virtualization Team |AMD
[sig-cloud-gpu]
From: Liu, Leo <[email protected]>
Sent: Thursday, March 5, 2020 7:28 PM
To: Liu, Monk <[email protected]>; [email protected]
Cc: Zhao, Jiange <[email protected]>; Opara, Darlington <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: enable vcn 2.0 for SRIOV on NV12
Please separate the patch to a set of patches and add meaningful commit message about the changes to each of patches.
Leo
________________________________
From: amd-gfx <[email protected]<mailto:[email protected]>> on behalf of Monk Liu <[email protected]<mailto:[email protected]>>
Sent: March 5, 2020 4:48:37 AM
To: [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>>
Cc: Zhao, Jiange <[email protected]<mailto:[email protected]>>; Opara, Darlington <[email protected]<mailto:[email protected]>>; Liu, Monk <[email protected]<mailto:[email protected]>>
Subject: [PATCH] drm/amdgpu: enable vcn 2.0 for SRIOV on NV12
this a patch that port from SRIOV project branch
to fix those IB/RING test fail on VCN 2.0 rings
--- drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.c | 3 + drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 14 +- drivers/gpu/drm/amd/amdgpu/mmsch_v2_0.h | 141 ++++++++++ drivers/gpu/drm/amd/amdgpu/nv.c | 3 +- drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 303 ++++++++++++++++++++- .../amd/include/asic_reg/vcn/vcn_2_0_0_offset.h | 197 ++++++++++++++ 6 files changed, 637 insertions(+), 24 deletions(-) create mode 100644 drivers/gpu/drm/amd/amdgpu/mmsch_v2_0.h
drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.c +3 -0
@@ -181,6 +181,9 @@ int amdgpu_jpeg_dec_ring_test_ib(struct amdgpu_ring *ring, long timeout)struct dma_fence *fence =NULL ;long r =0 ; +if (amdgpu_sriov_vf (adev)) +return 0 ; + r =amdgpu_jpeg_dec_set_reg (ring,1 , &fence);if (r) goto error;
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +6 -8
@@ -359,6 +359,9 @@ int amdgpu_vcn_dec_ring_test_ring(struct amdgpu_ring *ring)unsigned i;int r; +if (amdgpu_sriov_vf (adev)) +return 0 ; +WREG32 (adev->vcn.inst[ring->me].external.scratch9,0xCAFEDEAD ); r =amdgpu_ring_alloc (ring,3 );if (r)
@@ -497,10 +500,6 @@ int amdgpu_vcn_dec_ring_test_ib(struct amdgpu_ring *ring, long timeout)struct dma_fence *fence;long r; -/* temporarily disable ib test for sriov */ -if (amdgpu_sriov_vf (adev)) -return 0 ; - r =amdgpu_vcn_dec_get_create_msg (ring,1 ,NULL );if (r) goto error;
@@ -527,6 +526,9 @@ int amdgpu_vcn_enc_ring_test_ring(struct amdgpu_ring *ring)unsigned i;int r; +if (amdgpu_sriov_vf (adev)) +return 0 ; + r =amdgpu_ring_alloc (ring,16 );if (r)return r;
@@ -661,10 +663,6 @@ int amdgpu_vcn_enc_ring_test_ib(struct amdgpu_ring *ring, long timeout)struct amdgpu_bo *bo =NULL ;long r; -/* temporarily disable ib test for sriov */ -if (amdgpu_sriov_vf (adev)) -return 0 ; - r =amdgpu_bo_create_reserved (ring->adev,128 *1024 ,PAGE_SIZE ,AMDGPU_GEM_DOMAIN_VRAM , &bo,NULL ,NULL );
drivers/gpu/drm/amd/amdgpu/mmsch_v2_0.h new file +141 -0
141 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/nv.c +2 -1
@@ -516,7 +516,8 @@ int nv_set_ip_blocks(struct amdgpu_device *adev) !amdgpu_sriov_vf(adev))amdgpu_device_ip_block_add (adev, &smu_v11_0_ip_block);amdgpu_device_ip_block_add (adev, &vcn_v2_0_ip_block); -amdgpu_device_ip_block_add (adev, &jpeg_v2_0_ip_block); +if (!amdgpu_sriov_vf (adev)) +amdgpu_device_ip_block_add (adev, &jpeg_v2_0_ip_block);break ;default :return -EINVAL ;
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c +288 -15
410 lines not on this page · raw message
drivers/gpu/drm/amd/include/asic_reg/vcn/vcn_2_0_0_offset.h +197 -0
203 lines not on this page · raw message
--
2.7.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Cleo.liu%40amd.com%7C4c2fae0b5b374a86759d08d7c0ea6a4f%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637189985360189246&sdata=bzpOv%2FXbxWXKq00Wob%2FcjdCJJV4VfxdNtatel1uWybM%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx