提交 f7e5838b 编写于 作者: C Chris Wilson

drm/i915: Simplify reset_counter handling during atomic modesetting

Now that the reset_counter is stored on the request, we can rearrange
the code to handle reading the counter versus waiting during the atomic
modesetting for readibility (by deleting the hairiest of codes).
Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1460565315-7748-8-git-send-email-chris@chris-wilson.co.uk
上级 299259a3
...@@ -13424,9 +13424,9 @@ static int intel_atomic_prepare_commit(struct drm_device *dev, ...@@ -13424,9 +13424,9 @@ static int intel_atomic_prepare_commit(struct drm_device *dev,
return ret; return ret;
ret = drm_atomic_helper_prepare_planes(dev, state); ret = drm_atomic_helper_prepare_planes(dev, state);
if (!ret && !async && !i915_reset_in_progress_or_wedged(&dev_priv->gpu_error)) { mutex_unlock(&dev->struct_mutex);
mutex_unlock(&dev->struct_mutex);
if (!ret && !async) {
for_each_plane_in_state(state, plane, plane_state, i) { for_each_plane_in_state(state, plane, plane_state, i) {
struct intel_plane_state *intel_plane_state = struct intel_plane_state *intel_plane_state =
to_intel_plane_state(plane_state); to_intel_plane_state(plane_state);
...@@ -13440,19 +13440,15 @@ static int intel_atomic_prepare_commit(struct drm_device *dev, ...@@ -13440,19 +13440,15 @@ static int intel_atomic_prepare_commit(struct drm_device *dev,
/* Swallow -EIO errors to allow updates during hw lockup. */ /* Swallow -EIO errors to allow updates during hw lockup. */
if (ret == -EIO) if (ret == -EIO)
ret = 0; ret = 0;
if (ret) {
if (ret) mutex_lock(&dev->struct_mutex);
drm_atomic_helper_cleanup_planes(dev, state);
mutex_unlock(&dev->struct_mutex);
break; break;
}
} }
if (!ret)
return 0;
mutex_lock(&dev->struct_mutex);
drm_atomic_helper_cleanup_planes(dev, state);
} }
mutex_unlock(&dev->struct_mutex);
return ret; return ret;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册