mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-23 16:53:58 -05:00
gpu: host1x: Always return syncpoint value when waiting
The new TegraDRM UAPI uses syncpoint waiting with timeout set to
zero to indicate reading the syncpoint value. To support that we
need to return the syncpoint value always when waiting.
Fixes: 44e9613813
("drm/tegra: Implement syncpoint wait UAPI")
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
This commit is contained in:
parent
22d7ee32f1
commit
184b58fa81
1 changed files with 2 additions and 17 deletions
|
@ -234,27 +234,12 @@ int host1x_syncpt_wait(struct host1x_syncpt *sp, u32 thresh, long timeout,
|
|||
void *ref;
|
||||
struct host1x_waitlist *waiter;
|
||||
int err = 0, check_count = 0;
|
||||
u32 val;
|
||||
|
||||
if (value)
|
||||
*value = 0;
|
||||
|
||||
/* first check cache */
|
||||
if (host1x_syncpt_is_expired(sp, thresh)) {
|
||||
if (value)
|
||||
*value = host1x_syncpt_load(sp);
|
||||
*value = host1x_syncpt_load(sp);
|
||||
|
||||
if (host1x_syncpt_is_expired(sp, thresh))
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* try to read from register */
|
||||
val = host1x_hw_syncpt_load(sp->host, sp);
|
||||
if (host1x_syncpt_is_expired(sp, thresh)) {
|
||||
if (value)
|
||||
*value = val;
|
||||
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (!timeout) {
|
||||
err = -EAGAIN;
|
||||
|
|
Loading…
Add table
Reference in a new issue