mirror of
https://github.com/torvalds/linux.git
synced 2026-02-04 15:28:49 +08:00
gpu: host1x: Reset max value when freeing a syncpoint
With job recovery becoming optional, syncpoints may have a mismatch between their value and max value when freed. As such, when freeing, set the max value to the current value of the syncpoint so that it is in a sane state for the next user. Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
This commit is contained in:
committed by
Thierry Reding
parent
2aed4f5ab0
commit
aded42ada6
@@ -400,6 +400,8 @@ static void syncpt_release(struct kref *ref)
|
||||
{
|
||||
struct host1x_syncpt *sp = container_of(ref, struct host1x_syncpt, ref);
|
||||
|
||||
atomic_set(&sp->max_val, host1x_syncpt_read(sp));
|
||||
|
||||
mutex_lock(&sp->host->syncpt_mutex);
|
||||
|
||||
host1x_syncpt_base_free(sp->base);
|
||||
|
||||
Reference in New Issue
Block a user