Skip to content

Commit

Permalink
drm/nouveau: increase reservation sequence every retry
Browse files Browse the repository at this point in the history
This is temporary until the fence framework can be used. With the
lru/reservation atomicity removal it is possible to see your old
sequence number and the buffer being reserved, leading to erroneously
reporting -EDEADLK.

Workaround it by bumping the sequence number every retry.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
  • Loading branch information
Maarten Lankhorst committed Jan 15, 2013
1 parent 42f6e3d commit 979ee29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/nouveau/nouveau_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,8 @@ validate_init(struct nouveau_channel *chan, struct drm_file *file_priv,
int trycnt = 0;
int ret, i;

sequence = atomic_add_return(1, &drm->ttm.validate_sequence);
retry:
sequence = atomic_add_return(1, &drm->ttm.validate_sequence);
if (++trycnt > 100000) {
NV_ERROR(drm, "%s failed and gave up.\n", __func__);
return -EINVAL;
Expand Down

0 comments on commit 979ee29

Please sign in to comment.