答复: [PATCH] drm/amdgpu: execute amdgpu_ring_patch_cond_exec() only for valid job

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

 



it should be omited when coding.
Reviewed-by: Jim Qu <Jim.Qu at amd.com>

Thanks
JimQu

________________________________________
å??件人: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> 代表 Shirish S <shirish.s at amd.com>
å??é??æ?¶é?´: 2018å¹´7æ??9æ?¥ 18:30:14
�件人: Liu, Monk; Deucher, Alexander; Koenig, Christian
æ??é??: amd-gfx at lists.freedesktop.org; S, Shirish
主�: [PATCH] drm/amdgpu: execute amdgpu_ring_patch_cond_exec() only for valid job

issue:
BUG_ON(ring->ring[offset] != 0x55aa55aa) is hit on resume from
S3 state.

fix & analysis:

fix is  to check for valid job, which in continuation to the below patch:
113890e drm/amdgpu: cond_exec only for schedule with a job

Since cond_exec is not initialised if there is no job,
0x55aa55aa is not written to ring, as a result in
patch_cond_exec callback, BUG_ON is hit where it checks for the
same 0x55aa55aa value in register.

Signed-off-by: Shirish S <shirish.s at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
index 31f8170..3381ada 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
@@ -249,7 +249,7 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,
                                       fence_flags | AMDGPU_FENCE_FLAG_64BIT);
        }

-       if (patch_offset != ~0 && ring->funcs->patch_cond_exec)
+       if (job && patch_offset != ~0 && ring->funcs->patch_cond_exec)
                amdgpu_ring_patch_cond_exec(ring, patch_offset);

        ring->current_ctx = fence_ctx;
--
2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx at lists.freedesktop.org
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