Преглед изворни кода

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: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Maarten Lankhorst пре 12 година
родитељ
комит
979ee290ff
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      drivers/gpu/drm/nouveau/nouveau_gem.c

+ 1 - 1
drivers/gpu/drm/nouveau/nouveau_gem.c

@@ -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;