mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
Merge tag 'drm-intel-fixes-2016-12-01' of git://anongit.freedesktop.org/git/drm-intel into drm-fixes
2 intel fixes. * tag 'drm-intel-fixes-2016-12-01' of git://anongit.freedesktop.org/git/drm-intel: drm/i915: drop the struct_mutex when wedged or trying to reset drm/i915: Don't touch NULL sg on i915_gem_object_get_pages_gtt() error
This commit is contained in:
commit
ab7cd8d83e
2 changed files with 5 additions and 3 deletions
|
@ -2268,7 +2268,7 @@ i915_gem_object_get_pages_gtt(struct drm_i915_gem_object *obj)
|
||||||
page = shmem_read_mapping_page(mapping, i);
|
page = shmem_read_mapping_page(mapping, i);
|
||||||
if (IS_ERR(page)) {
|
if (IS_ERR(page)) {
|
||||||
ret = PTR_ERR(page);
|
ret = PTR_ERR(page);
|
||||||
goto err_pages;
|
goto err_sg;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef CONFIG_SWIOTLB
|
#ifdef CONFIG_SWIOTLB
|
||||||
|
@ -2311,8 +2311,9 @@ i915_gem_object_get_pages_gtt(struct drm_i915_gem_object *obj)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err_pages:
|
err_sg:
|
||||||
sg_mark_end(sg);
|
sg_mark_end(sg);
|
||||||
|
err_pages:
|
||||||
for_each_sgt_page(page, sgt_iter, st)
|
for_each_sgt_page(page, sgt_iter, st)
|
||||||
put_page(page);
|
put_page(page);
|
||||||
sg_free_table(st);
|
sg_free_table(st);
|
||||||
|
|
|
@ -12260,7 +12260,7 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc,
|
||||||
intel_crtc->reset_count = i915_reset_count(&dev_priv->gpu_error);
|
intel_crtc->reset_count = i915_reset_count(&dev_priv->gpu_error);
|
||||||
if (i915_reset_in_progress_or_wedged(&dev_priv->gpu_error)) {
|
if (i915_reset_in_progress_or_wedged(&dev_priv->gpu_error)) {
|
||||||
ret = -EIO;
|
ret = -EIO;
|
||||||
goto cleanup;
|
goto unlock;
|
||||||
}
|
}
|
||||||
|
|
||||||
atomic_inc(&intel_crtc->unpin_work_count);
|
atomic_inc(&intel_crtc->unpin_work_count);
|
||||||
|
@ -12352,6 +12352,7 @@ cleanup_unpin:
|
||||||
intel_unpin_fb_obj(fb, crtc->primary->state->rotation);
|
intel_unpin_fb_obj(fb, crtc->primary->state->rotation);
|
||||||
cleanup_pending:
|
cleanup_pending:
|
||||||
atomic_dec(&intel_crtc->unpin_work_count);
|
atomic_dec(&intel_crtc->unpin_work_count);
|
||||||
|
unlock:
|
||||||
mutex_unlock(&dev->struct_mutex);
|
mutex_unlock(&dev->struct_mutex);
|
||||||
cleanup:
|
cleanup:
|
||||||
crtc->primary->fb = old_fb;
|
crtc->primary->fb = old_fb;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue