[Intel-gfx] [PATCH] drm: Propagate failure from setting crtc base.
Chris Wilson
chris at chris-wilson.co.uk
Wed Feb 11 15:57:31 CET 2009
On Wed, 2009-02-11 at 14:26 +0000, Chris Wilson wrote:
> Check the error paths within intel_pipe_set_base() to first cleanup and
> then report back the error.
>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> ---
> drivers/gpu/drm/drm_crtc_helper.c | 13 ++++--
> drivers/gpu/drm/i915/intel_display.c | 75 ++++++++++++++++++++++------------
> include/drm/drm_crtc_helper.h | 10 ++--
> 3 files changed, 63 insertions(+), 35 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
> index 964c5eb..7203fb2 100644
> --- a/drivers/gpu/drm/drm_crtc_helper.c
> +++ b/drivers/gpu/drm/drm_crtc_helper.c
> Start = obj_priv->gtt_offset;
> Offset = y * crtc->fb->pitch + x * (crtc->fb->bits_per_pixel / 8);
> @@ -419,7 +438,9 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
> break;
> default:
> DRM_ERROR("Unknown color depth\n");
> - return;
> + i915_gem_object_unpin(intel_fb->obj);
> + mutex_unlock(&dev->struct_mutex);
> + return -EINVAL;
> }
> I915_WRITE(dspcntr_reg, dspcntr);
This return -EINVAL occurs after we write to the dspstride register. So
we need to reorder the guard to prevent an incomplete update.
-ickle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-drm-Propagate-failure-from-setting-crtc-base.patch
Type: text/x-patch
Size: 7867 bytes
Desc:
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20090211/38cd8cb6/attachment.bin>
More information about the Intel-gfx
mailing list