Lines 934-951
wait_for_timelines(struct drm_i915_private *i915,
Link Here
|
934 |
int i915_gem_wait_for_idle(struct drm_i915_private *i915, |
934 |
int i915_gem_wait_for_idle(struct drm_i915_private *i915, |
935 |
unsigned int flags, long timeout) |
935 |
unsigned int flags, long timeout) |
936 |
{ |
936 |
{ |
|
|
937 |
long start = ticks; |
938 |
printf("\nStart of i915_gem_wait_for_idle()\n"); |
937 |
/* If the device is asleep, we have no requests outstanding */ |
939 |
/* If the device is asleep, we have no requests outstanding */ |
938 |
if (!intel_gt_pm_is_awake(&i915->gt)) |
940 |
if (!intel_gt_pm_is_awake(&i915->gt)) |
939 |
return 0; |
941 |
return 0; |
940 |
|
942 |
|
941 |
GEM_TRACE("flags=%x (%s), timeout=%ld%s\n", |
943 |
printf("flags=%x (%s), timeout=%ld%s\n", |
942 |
flags, flags & I915_WAIT_LOCKED ? "locked" : "unlocked", |
944 |
flags, flags & I915_WAIT_LOCKED ? "locked" : "unlocked", |
943 |
timeout, timeout == MAX_SCHEDULE_TIMEOUT ? " (forever)" : ""); |
945 |
timeout, timeout == MAX_SCHEDULE_TIMEOUT ? " (forever)" : ""); |
944 |
|
946 |
|
945 |
timeout = wait_for_timelines(i915, flags, timeout); |
947 |
printf("\nCalling wait_for_timelines()\n"); |
|
|
948 |
//timeout = wait_for_timelines(i915, flags, timeout); |
949 |
timeout = wait_for_timelines(i915, flags, MAX_SCHEDULE_TIMEOUT); |
950 |
|
951 |
printf("flags=%x (%s), timeout=%ld%s\n", |
952 |
flags, flags & I915_WAIT_LOCKED ? "locked" : "unlocked", |
953 |
timeout, timeout == MAX_SCHEDULE_TIMEOUT ? " (forever)" : ""); |
954 |
|
946 |
if (timeout < 0) |
955 |
if (timeout < 0) |
947 |
return timeout; |
956 |
return timeout; |
948 |
|
957 |
|
|
|
958 |
printf("\nEnd of i915_gem_wait_for_idle() in %ld tick(s)\n", ticks - start); |
949 |
if (flags & I915_WAIT_LOCKED) { |
959 |
if (flags & I915_WAIT_LOCKED) { |
950 |
lockdep_assert_held(&i915->drm.struct_mutex); |
960 |
lockdep_assert_held(&i915->drm.struct_mutex); |
951 |
|
961 |
|