drm/amdgpu: wait for IB test on first device open
Subsystems (2)
PATCH 1/1 drm/amdgpu: wait for IB test on first device open
Instead of delaying that to the first query. Otherwise we could try to use the SDMA for VM updates before the IB tests are done.
--- 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
@@ -467,9 +467,6 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_fileif (!info->return_size || !info->return_pointer)return -EINVAL ; -/* Ensure IB tests are run on ring */ -flush_delayed_work (&adev->late_init_work); -switch (info->query) {case AMDGPU_INFO_ACCEL_WORKING : ui32 = adev->accel_working;
@@ -950,6 +947,9 @@ int amdgpu_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)struct amdgpu_fpriv *fpriv;int r, pasid; +/* Ensure IB tests are run on ring */ +flush_delayed_work (&adev->late_init_work); + file_priv->driver_priv =NULL ; r =pm_runtime_get_sync (dev->dev);
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): 20181102084431.5979-1-christian.koenig-5C7GfCeVMHo@public.gmane.org
Zhou, David(ChunMing)
Reviewed-by Chunming ZhouQuoted 45 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Christian K?nig
Sent: Friday, November 02, 2018 4:45 PM
To: [email protected]
Subject: [PATCH] drm/amdgpu: wait for IB test on first device openInstead of delaying that to the first query. Otherwise we could try to use the SDMA for VM updates before the IB tests are done.
Signed-off-by Christian König <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +0
-0@@ -467,9 +467,6 @@ static int amdgpu_info_ioctl(struct drm_device *dev,void *data, struct
drm_filedrivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +3
-3if (!info->return_size || !info->return_pointer)return -EINVAL ; -/* Ensure IB tests are run on ring */ -flush_delayed_work (&adev->late_init_work); -switch (info->query) {case AMDGPU_INFO_ACCEL_WORKING : ui32 = adev->accel_working;@@ -950,6 +947,9 @@ int amdgpu_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)struct amdgpu_fpriv *fpriv;int r, pasid; +/* Ensure IB tests are run on ring */ +flush_delayed_work (&adev->late_init_work); + file_priv->driver_priv =NULL ;r =
pm_runtime_get_sync(dev->dev);
--
2.17.1
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 2 lines · Christian König
Instead of delaying that to the first query. Otherwise we could try to use the SDMA for VM updates before the IB tests are done.
Be curious:
Does that happen when App opens dri node without libdrm? since device init always queries info at first.
Regards,
Jerry
Quoted 21 lines
Signed-off-by Christian König <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +0
-3@@ -467,9 +467,6 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_fileif (!info->return_size || !info->return_pointer)return -EINVAL ; -/* Ensure IB tests are run on ring */ -flush_delayed_work (&adev->late_init_work); -switch (info->query) {case AMDGPU_INFO_ACCEL_WORKING : ui32 = adev->accel_working;
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c int amdgpu_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv) · line 955
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +3
-0@@ -950,6 +947,9 @@ int amdgpu_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)struct amdgpu_fpriv *fpriv;int r, pasid; +/* Ensure IB tests are run on ring */ +flush_delayed_work (&adev->late_init_work); + file_priv->driver_priv =NULL ; r =pm_runtime_get_sync (dev->dev);
_______________________________________________
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): 9b392658-4e13-9261-3637-3e91af51295d-5C7GfCeVMHo@public.gmane.org
Am 02.11.18 um 10:19 schrieb Zhang, Jerry(Junwei):
Quoted 7 lines · Christian König
Quoted 2 lines
Instead of delaying that to the first query. Otherwise we could try to use the SDMA for VM updates before the IB tests are done.
Be curious:
Does that happen when App opens dri node without libdrm? since device init always queries info at first.
The problem is at this point we have already created the root PD and cleared it using the SDMA.
So we can end up with the sequence root PD clear -> IB test.
Not much of an issue, but I just noticed this during one of my tests.
Christian.
Quoted 24 lines
Regards,
JerryQuoted 21 lines
Signed-off-by Christian König <[email protected]>---
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c| 6 +++---1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +0
-0@@ -467,9 +467,6 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file if (!info->return_size || !info->return_pointer) return -EINVAL;- /* Ensure IB tests are run on ring */
-flush_delayed_work(&adev->late_init_work);
-
switch (info->query) {
caseAMDGPU_INFO_ACCEL_WORKING:
ui32 =adev->accel_working;drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +0
-0@@ -950,6 +947,9 @@ int amdgpu_driver_open_kms(struct drm_device
Quoted 9 lines
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +0
-0*dev, struct drm_file *file_priv) struct amdgpu_fpriv *fpriv; int r, pasid;+ /* Ensure IB tests are run on ring */
+flush_delayed_work(&adev->late_init_work);
+
file_priv->driver_priv= NULL;
r =pm_runtime_get_sync(dev->dev);
_______________________________________________
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): b3d40d8b-acee-8cc7-7599-b3e12c2a1713-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Zhang, Jerry(Junwei)
Reviewed-by Junwei ZhangQuoted 9 lines · Christian König
Am 02.11.18 um 10:19 schrieb Zhang, Jerry(Junwei):
Quoted 7 lines · Christian König
Quoted 2 lines
Instead of delaying that to the first query. Otherwise we could try to use the SDMA for VM updates before the IB tests are done.
Be curious:
Does that happen when App opens dri node without libdrm? since device init always queries info at first.
Quoted 5 lines
The problem is at this point we have already created the root PD and cleared it using the SDMA.
So we can end up with the sequence root PD clear -> IB test.
Not much of an issue, but I just noticed this during one of my tests.
Yeah, indeed.
Hope that delay work is executed prior to later root PD clear operation.
Anyway, feel free to add
Jerry
Quoted 37 lines
Christian.
Quoted 33 lines
Regards,
JerryQuoted 29 lines
Signed-off-by Christian König <[email protected]>---
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c| 6 +++---1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +0
-0@@ -467,9 +467,6 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file if (!info->return_size || !info->return_pointer) return -EINVAL;- /* Ensure IB tests are run on ring */
-flush_delayed_work(&adev->late_init_work);
-
switch (info->query) {
caseAMDGPU_INFO_ACCEL_WORKING:
ui32 =adev->accel_working;drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +0
-0@@ -950,6 +947,9 @@ int amdgpu_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv) struct amdgpu_fpriv *fpriv; int r, pasid;+ /* Ensure IB tests are run on ring */
+flush_delayed_work(&adev->late_init_work);
+
file_priv->driver_priv= NULL;
r =pm_runtime_get_sync(dev->dev);
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx