drm/amdgpu: cache the pasid in amdgpu_device_gpu_recover
Subsystems (2)
PATCH 1/1 drm/amdgpu: cache the pasid in amdgpu_device_gpu_recover
The job might already be freed up here. So cache the pasid for later use.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3 -2
@@ -6506,8 +6506,9 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,struct list_head device_list;bool job_signaled = false;struct amdgpu_hive_info *hive =NULL ; -int r =0 ;bool need_emergency_restart = false; +unsigned int pasid = job->pasid; +int r =0 ;/* * If it reaches here because of hang/timeout and a RAS error is
@@ -6605,7 +6606,7 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,struct amdgpu_task_info *ti =NULL ;if (job) - ti =amdgpu_vm_get_task_info_pasid (adev, job->pasid); + ti =amdgpu_vm_get_task_info_pasid (adev, pasid);drm_dev_wedged_event (adev_to_drm (adev),DRM_WEDGE_RECOVERY_NONE , ti ? &ti->task :NULL );
Signature · 1 line
2.43.0
Quoted 5 lines · Christian König
The job might already be freed up here. So cache the pasid for later use.
Signed-off-by Christian König <[email protected]>Suggested-by Philipp Stanner <[email protected]>
No! :D
You read the wrong quote.
Matthew found your issue (in the middle of my time zone's night, while I was peacefully asleep).
Quoted 1 line
Fixes a72002cb181f ("drm/amdgpu: Make use of drm_wedge_task_info")
I think there was a gitlab ticket about that a month ago? Could be added to Closes:
P.
Quoted 28 lines
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +++--1 file changed, 3 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2
-1@@ -6506,8 +6506,9 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev, struct list_head device_list; bool job_signaled = false; struct amdgpu_hive_info *hive = NULL; -int r =0 ; bool need_emergency_restart = false; +unsigned int pasid = job->pasid; +int r =0 ;
/*
* If it reaches here because of hang/timeout and a RAS error isdrivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-0@@ -6605,7 +6606,7 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev, struct amdgpu_task_info *ti = NULL;
if (job)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1
-1- ti =amdgpu_vm_get_task_info_pasid (adev, job->pasid); + ti =amdgpu_vm_get_task_info_pasid (adev, pasid);
drm_dev_wedged_event(adev_to_drm(adev), DRM_WEDGE_RECOVERY_NONE, ti ? &ti->task : NULL);
Quoted 26 lines · Philipp Stanner
Quoted 5 lines · Christian König
The job might already be freed up here. So cache the pasid for later use.
Signed-off-by Christian König <[email protected]>Suggested-by Philipp Stanner <[email protected]>No! :D
You read the wrong quote.
Matthew found your issue (in the middle of my time zone's night, while I was peacefully asleep).Quoted 1 line
Fixes a72002cb181f ("drm/amdgpu: Make use of drm_wedge_task_info")I think there was a gitlab ticket about that a month ago? Could be added to Closes:
P.
Quoted 4 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
Quoted 11 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c int amdgpu_device_gpu_recover(struct amdgpu_device *adev, · line 6510
Quoted 11 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1
-1@@ -6506,8 +6506,9 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,struct list_head device_list;bool job_signaled = false;struct amdgpu_hive_info *hive =NULL ; -int r =0 ;bool need_emergency_restart = false; +unsigned int pasid = job->pasid;
I think job can be NULL here.
Alex
Quoted 14 lines
Quoted 13 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2
-1+int r =0 ;/* * If it reaches here because of hang/timeout and a RAS error is @@ -6605,7 +6606,7 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,struct amdgpu_task_info *ti =NULL ;if (job) - ti =amdgpu_vm_get_task_info_pasid (adev, job->pasid); + ti =amdgpu_vm_get_task_info_pasid (adev, pasid);drm_dev_wedged_event (adev_to_drm (adev),DRM_WEDGE_RECOVERY_NONE , ti ? &ti->task :NULL );
Quoted 4 lines · Philipp Stanner
Quoted 3 lines · Christian König
The job might already be freed up here. So cache the pasid for later use.
Quoted 8 lines
Quoted 2 lines
Signed-off-by Christian König <[email protected]>Suggested-by Philipp Stanner <[email protected]>No! :D
You read the wrong quote.
Matthew found your issue (in the middle of my time zone's night, while I was peacefully asleep).
Oh, good point. Sorry the credits go to Matthew of course.
Quoted 5 lines
Quoted 2 lines
Fixes a72002cb181f ("drm/amdgpu: Make use of drm_wedge_task_info")I think there was a gitlab ticket about that a month ago? Could be added to Closes:
Yeah, I remember that as well but I can't find it of hand.
Does anybody have the right link at hand?
Thanks,
Christian.
Quoted 33 lines
P.
Quoted 28 lines
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +++--1 file changed, 3 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2
-1@@ -6506,8 +6506,9 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev, struct list_head device_list; bool job_signaled = false; struct amdgpu_hive_info *hive = NULL; -int r =0 ; bool need_emergency_restart = false; +unsigned int pasid = job->pasid; +int r =0 ;
/*
* If it reaches here because of hang/timeout and a RAS error isdrivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-0@@ -6605,7 +6606,7 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev, struct amdgpu_task_info *ti = NULL;
if (job)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1
-1- ti =amdgpu_vm_get_task_info_pasid (adev, job->pasid); + ti =amdgpu_vm_get_task_info_pasid (adev, pasid);
drm_dev_wedged_event(adev_to_drm(adev), DRM_WEDGE_RECOVERY_NONE, ti ? &ti->task : NULL);
Quoted 18 lines · Christian König
Quoted 4 lines · Philipp Stanner
Quoted 3 lines · Christian König
The job might already be freed up here. So cache the pasid for later use.
Quoted 8 lines
Quoted 2 lines
Signed-off-by Christian König <[email protected]>Suggested-by Philipp Stanner <[email protected]>No! :D
You read the wrong quote.
Matthew found your issue (in the middle of my time zone's night, while I was peacefully asleep).Oh, good point. Sorry the credits go to Matthew of course.
Quoted 1 line
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Fixes a72002cb181f ("drm/amdgpu: Make use of drm_wedge_task_info")I think there was a gitlab ticket about that a month ago? Could be added to Closes:
Yeah, I remember that as well but I can't find it of hand.
Does anybody have the right link at hand?
I looked for it yesterday, but couldn't find it.
Alex
Quoted 38 lines
Thanks,
Christian.Quoted 33 lines
P.
Quoted 28 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3
-2@@ -6506,8 +6506,9 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,struct list_head device_list;bool job_signaled = false;struct amdgpu_hive_info *hive =NULL ; -int r =0 ;bool need_emergency_restart = false; +unsigned int pasid = job->pasid; +int r =0 ;/* * If it reaches here because of hang/timeout and a RAS error is @@ -6605,7 +6606,7 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,struct amdgpu_task_info *ti =NULL ;if (job) - ti =amdgpu_vm_get_task_info_pasid (adev, job->pasid); + ti =amdgpu_vm_get_task_info_pasid (adev, pasid);drm_dev_wedged_event (adev_to_drm (adev),DRM_WEDGE_RECOVERY_NONE , ti ? &ti->task :NULL );
Quoted 22 lines · Alex Deucher
Quoted 20 lines · Christian König
Quoted 4 lines · Philipp Stanner
Quoted 3 lines · Christian König
The job might already be freed up here. So cache the pasid for later use.
Quoted 8 lines
Quoted 2 lines
Signed-off-by Christian König <[email protected]>Suggested-by Philipp Stanner <[email protected]>No! :D
You read the wrong quote.
Matthew found your issue (in the middle of my time zone's night, while I was peacefully asleep).Oh, good point. Sorry the credits go to Matthew of course.
Quoted 3 lines
Quoted 2 lines
Fixes a72002cb181f ("drm/amdgpu: Make use of drm_wedge_task_info")
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
I think there was a gitlab ticket about that a month ago? Could be added to Closes:
Yeah, I remember that as well but I can't find it of hand.
Does anybody have the right link at hand?
I looked for it yesterday, but couldn't find it.
I think the original reporter was Hans-Kristian (+Cc).
The link I had seen floating around was
https://github.com/HansKristian-Work/vkd3d-proton/pull/2670
P.
Quoted 41 lines
Alex
Quoted 38 lines
Thanks,
Christian.Quoted 33 lines
P.
Quoted 28 lines
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +++--1 file changed, 3 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3
-2@@ -6506,8 +6506,9 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev, struct list_head device_list; bool job_signaled = false; struct amdgpu_hive_info *hive = NULL; - int r = 0; bool need_emergency_restart = false; + unsigned int pasid = job->pasid; + int r = 0; /** If it reaches here because of hang/timeout and a RAS error is @@ -6605,7 +6606,7 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev, struct amdgpu_task_info *ti = NULL; if (job) - ti = amdgpu_vm_get_task_info_pasid(adev, job->pasid); + ti = amdgpu_vm_get_task_info_pasid(adev, pasid); drm_dev_wedged_event(adev_to_drm(adev), DRM_WEDGE_RECOVERY_NONE, ti ? &ti->task : NULL);