Re: [enable VCN2.0 for NV12 SRIOV 4/6] drm/amdgpu: cleanup ring/ib test for SRIOV vcn2.0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch is:

Reviewed-by: Leo Liu <leo.liu@xxxxxxx>

On 2020-03-05 8:33 a.m., Monk Liu wrote:
support IB test on dec/enc ring
disable ring test on dec/enc ring (MMSCH limitation)

Signed-off-by: Monk Liu <Monk.Liu@xxxxxxx>
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 11 +++--------
  drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c   |  3 +++
  2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
index f96464e..ae9754f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
@@ -497,10 +497,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 +523,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 +660,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);
diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
index 421e5bf..dd500d1 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
@@ -1647,6 +1647,9 @@ int vcn_v2_0_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, 4);
  	if (r)
_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux