<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Am 27.03.2018 um 08:46 schrieb Evan
      Quan:<br>
    </div>
    <blockquote type="cite"
      cite="mid:1522133191-31247-1-git-send-email-evan.quan@amd.com">
      <pre wrap="">Sriov still wants these error messags on timeout. So, for sriov
use case, the timeout setting on compute rings is kept.

Change-Id: Id0af6959a8023c8d683ff680de7c583f84cfeab3
Signed-off-by: Evan Quan <a class="moz-txt-link-rfc2396E" href="mailto:evan.quan@amd.com"><evan.quan@amd.com></a>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
index 455a81e..2cc5a75 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
@@ -435,7 +435,8 @@ int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring,
        if (ring->funcs->type != AMDGPU_RING_TYPE_KIQ) {
                r = drm_sched_init(&ring->sched, &amdgpu_sched_ops,
                                   num_hw_submission, amdgpu_job_hang_limit,
-                                  (ring->funcs->type == AMDGPU_RING_TYPE_COMPUTE) ?
+                                  /* for non-sriov case, no timeout enforce on compute ring */
+                                  ((ring->funcs->type == AMDGPU_RING_TYPE_COMPUTE) && !amdgpu_sriov_vf(ring->adev)) ?</pre>
    </blockquote>
    <br>
    This starts to look a bit messy, can you add a local variable and
    separate the exceptions, e.g. something like:<br>
    <br>
    long timeout = <span class="pl-c1">msecs_to_jiffies</span>(amdgpu_lockup_timeout);<br>
    <br>
    if (ring->funcs->type == AMDGPU_RING_TYPE_COMPUTE) &&
    !amdgpu_sriov_vf(ring->adev))<br>
        timeout = MAX_SCHEDULE_TIMEOUT;<br>
    <br>
    ....<br>
    <br>
    Apart from that the patch looks good to me,<br>
    Christian.<br>
    <br>
    <blockquote type="cite"
      cite="mid:1522133191-31247-1-git-send-email-evan.quan@amd.com">
      <pre wrap="">                                MAX_SCHEDULE_TIMEOUT : msecs_to_jiffies(amdgpu_lockup_timeout),
                                   ring->name);
                if (r) {
</pre>
    </blockquote>
    <br>
  </body>
</html>