diff options
| author | Mikko Perttunen <mperttunen@nvidia.com> | 2021-06-10 14:04:43 +0300 |
|---|---|---|
| committer | Thierry Reding <treding@nvidia.com> | 2021-08-10 14:40:23 +0200 |
| commit | c78f837ae3d1e532ff4eb90155b42d7a2e892a3f (patch) | |
| tree | 1244b0c40c89580256677aeef5648986738ecd81 /drivers/gpu/host1x/syncpt.h | |
| parent | 687db2207b1bc94ca34743871167923a6de78d85 (diff) | |
| download | linux-c78f837ae3d1e532ff4eb90155b42d7a2e892a3f.tar.gz linux-c78f837ae3d1e532ff4eb90155b42d7a2e892a3f.tar.bz2 linux-c78f837ae3d1e532ff4eb90155b42d7a2e892a3f.zip | |
gpu: host1x: Add no-recovery mode
Add a new property for jobs to enable or disable recovery i.e.
CPU increments of syncpoints to max value on job timeout. This
allows for a more solid model for hanged jobs, where userspace
doesn't need to guess if a syncpoint increment happened because
the job completed, or because job timeout was triggered.
On job timeout, we stop the channel, NOP all future jobs on the
channel using the same syncpoint, mark the syncpoint as locked
and resume the channel from the next job, if any.
The future jobs are NOPed, since because we don't do the CPU
increments, the value of the syncpoint is no longer synchronized,
and any waiters would become confused if a future job incremented
the syncpoint. The syncpoint is marked locked to ensure that any
future jobs cannot increment the syncpoint either, until the
application has recognized the situation and reallocated the
syncpoint.
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/host1x/syncpt.h')
| -rw-r--r-- | drivers/gpu/host1x/syncpt.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/host1x/syncpt.h b/drivers/gpu/host1x/syncpt.h index a6766f8d55ee..95cd29b79d6d 100644 --- a/drivers/gpu/host1x/syncpt.h +++ b/drivers/gpu/host1x/syncpt.h @@ -40,6 +40,13 @@ struct host1x_syncpt { /* interrupt data */ struct host1x_syncpt_intr intr; + + /* + * If a submission incrementing this syncpoint fails, lock it so that + * further submission cannot be made until application has handled the + * failure. + */ + bool locked; }; /* Initialize sync point array */ @@ -115,4 +122,9 @@ static inline int host1x_syncpt_is_valid(struct host1x_syncpt *sp) return sp->id < host1x_syncpt_nb_pts(sp->host); } +static inline void host1x_syncpt_set_locked(struct host1x_syncpt *sp) +{ + sp->locked = true; +} + #endif |
