Commit 979ee290 authored by Maarten Lankhorst's avatar Maarten Lankhorst

drm/nouveau: increase reservation sequence every retry

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: default avatarMaarten Lankhorst <maarten.lankhorst@canonical.com>
parent 42f6e3da
...@@ -321,8 +321,8 @@ validate_init(struct nouveau_channel *chan, struct drm_file *file_priv, ...@@ -321,8 +321,8 @@ validate_init(struct nouveau_channel *chan, struct drm_file *file_priv,
int trycnt = 0; int trycnt = 0;
int ret, i; int ret, i;
sequence = atomic_add_return(1, &drm->ttm.validate_sequence);
retry: retry:
sequence = atomic_add_return(1, &drm->ttm.validate_sequence);
if (++trycnt > 100000) { if (++trycnt > 100000) {
NV_ERROR(drm, "%s failed and gave up.\n", __func__); NV_ERROR(drm, "%s failed and gave up.\n", __func__);
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment