Merge branch 'drm-next-4.4' of git://people.freedesktop.org/~agd5f/linux into drm-next
- Updated register headers for GFX 8.1 for Stoney - Add some new CZ revisions - minor pageflip optimizations - Fencing clean up - Warning fix - More fence cleanup - oops fix - Fiji fixes * 'drm-next-4.4' of git://people.freedesktop.org/~agd5f/linux: (29 commits) drm/amdgpu: group together common fence implementation drm/amdgpu: remove AMDGPU_FENCE_OWNER_MOVE drm/amdgpu: remove now unused fence functions drm/amdgpu: fix fence fallback check drm/amdgpu: fix stoping the scheduler timeout drm/amdgpu: cleanup on error in amdgpu_cs_ioctl() drm/amdgpu: update Fiji's Golden setting drm/amdgpu: update Fiji's rev id drm/amdgpu: extract common code in vi_common_early_init drm/amd/scheduler: don't oops on failure to load drm/amdgpu: don't oops on failure to load (v2) drm/amdgpu: don't VT switch on suspend drm/amdgpu: Make amdgpu_mn functions inline drm/amdgpu: remove amdgpu_fence_ref/unref drm/amdgpu: use common fence for sync drm/amdgpu: use the new fence_is_later drm/amdgpu: use common fences for VMID management v2 drm/amdgpu: move ring_from_fence to common code drm/amdgpu: switch to common fence_wait_any_timeout v2 drm/amdgpu: remove unneeded fence functions ...
This commit is contained in:
commit
793423ffcb
26 changed files with 31360 additions and 502 deletions
|
|
@ -279,6 +279,22 @@ fence_is_signaled(struct fence *fence)
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* fence_is_later - return if f1 is chronologically later than f2
|
||||
* @f1: [in] the first fence from the same context
|
||||
* @f2: [in] the second fence from the same context
|
||||
*
|
||||
* Returns true if f1 is chronologically later than f2. Both fences must be
|
||||
* from the same context, since a seqno is not re-used across contexts.
|
||||
*/
|
||||
static inline bool fence_is_later(struct fence *f1, struct fence *f2)
|
||||
{
|
||||
if (WARN_ON(f1->context != f2->context))
|
||||
return false;
|
||||
|
||||
return f1->seqno - f2->seqno < INT_MAX;
|
||||
}
|
||||
|
||||
/**
|
||||
* fence_later - return the chronologically later fence
|
||||
* @f1: [in] the first fence from the same context
|
||||
|
|
@ -298,14 +314,15 @@ static inline struct fence *fence_later(struct fence *f1, struct fence *f2)
|
|||
* set if enable_signaling wasn't called, and enabling that here is
|
||||
* overkill.
|
||||
*/
|
||||
if (f2->seqno - f1->seqno <= INT_MAX)
|
||||
return fence_is_signaled(f2) ? NULL : f2;
|
||||
else
|
||||
if (fence_is_later(f1, f2))
|
||||
return fence_is_signaled(f1) ? NULL : f1;
|
||||
else
|
||||
return fence_is_signaled(f2) ? NULL : f2;
|
||||
}
|
||||
|
||||
signed long fence_wait_timeout(struct fence *, bool intr, signed long timeout);
|
||||
|
||||
signed long fence_wait_any_timeout(struct fence **fences, uint32_t count,
|
||||
bool intr, signed long timeout);
|
||||
|
||||
/**
|
||||
* fence_wait - sleep until the fence gets signaled
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue