drm/amdgpu/sriov: Only sriov runtime support use kiq
Subsystems (2)
PATCH v2 1/1 drm/amdgpu/sriov: Only sriov runtime support use kiq
Refine the code style, add brackets.
For sriov, don't use kiq in exclusive mode, as don't know how long time it will take, some times it will occur exclusive timeout.
--- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +1 -1
@@ -320,7 +320,7 @@ signed long amdgpu_kiq_reg_write_reg_wait(struct amdgpu_device *adev,struct amdgpu_kiq *kiq = &adev->gfx.kiq;struct amdgpu_ring *ring = &kiq->ring; -if (!ring->ready) +if (!ring->ready || (!amdgpu_sriov_runtime (adev) &&amdgpu_sriov_vf (adev)))return -EINVAL ;spin_lock_irqsave (&kiq->ring_lock, flags);
Signature · 6 lines
2.7.4 _______________________________________________ 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): 1534828612-6608-1-git-send-email-Emily.Deng-5C7GfCeVMHo@public.gmane.org
Am 21.08.2018 um 07:16 schrieb Emily Deng:
Quoted 15 lines
Refine the code style, add brackets.
For sriov, don't use kiq in exclusive mode, as don't know how long time it will take, some times it will occur exclusive timeout.
Signed-off-by Emily Deng <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +0
-0
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c signed long amdgpu_kiq_reg_write_reg_wait(struct amdgpu_device *adev, · line 323
Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +1
-1@@ -320,7 +320,7 @@ signed long amdgpu_kiq_reg_write_reg_wait(struct amdgpu_device *adev,struct amdgpu_kiq *kiq = &adev->gfx.kiq;struct amdgpu_ring *ring = &kiq->ring; -if (!ring->ready) +if (!ring->ready || (!amdgpu_sriov_runtime (adev) &&amdgpu_sriov_vf (adev)))
Please rework the code flow a bit to make it more obvious what happens here.
E.g. move the check into the caller instead of returning an error code here.
Christian.
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c signed long amdgpu_kiq_reg_write_reg_wait(struct amdgpu_device *adev, · line 326
Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +0
-0return -EINVAL ;spin_lock_irqsave (&kiq->ring_lock, flags);
_______________________________________________
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): 03c57e23-8f97-9d95-27d9-214fea8b7529-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Quoted 27 lines
-----Original Message-----
From: Christian König <[email protected]>
Sent: Tuesday, August 21, 2018 3:51 PM
To: Deng, Emily <[email protected]>; [email protected]
Subject: Re: [PATCH v2] drm/amdgpu/sriov: Only sriov runtime support use kiqAm 21.08.2018 um 07:16 schrieb Emily Deng:
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c signed long amdgpu_kiq_reg_write_reg_wait(struct
Quoted 16 lines
Refine the code style, add brackets.
For sriov, don't use kiq in exclusive mode, as don't know how long time it will take, some times it will occur exclusive timeout.
Signed-off-by Emily Deng <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +0
-0@@ -320,7 +320,7 @@ signed long amdgpu_kiq_reg_write_reg_wait(struct
amdgpu_device*adev,Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +0
-0struct amdgpu_kiq *kiq = &adev->gfx.kiq;struct amdgpu_ring *ring = &kiq->ring;
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c signed long amdgpu_kiq_reg_write_reg_wait(struct · line 324
Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +2
-1-if (!ring->ready) +if (!ring->ready || (!amdgpu_sriov_runtime (adev) && +amdgpu_sriov_vf (adev)))Please rework the code flow a bit to make it more obvious what happens here.
E.g. move the check into the caller instead of returning an error code here.
Thanks, will refine.
Quoted 5 lines
Christian.
Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +0
-0return -EINVAL ;spin_lock_irqsave (&kiq->ring_lock, flags);
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx