[PATCH 06/11] drm/i915: Check the framebuffer offset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 31 Oct 2012 17:50:19 +0200
ville.syrjala at linux.intel.com wrote:

> From: Ville Syrj?l? <ville.syrjala at linux.intel.com>
> 
> The current code can't deal with framebuffers with an offset. Return an
> error when trying to create such a framebuffer until the rest of the
> code is fixed to handle them.
> 
> Signed-off-by: Ville Syrj?l? <ville.syrjala at linux.intel.com>
> ---
> 
> I had an earlier version that actually added the handling for the offsets,
> but as I still haven't managed to write test cases for that, I decided
> that just refusing any offset is a good enough solution for now.
> 
>  drivers/gpu/drm/i915/intel_display.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index f431f2a..a3496f5 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -8276,6 +8276,10 @@ int intel_framebuffer_init(struct drm_device *dev,
>  		return -EINVAL;
>  	}
>  
> +	/* FIXME need to adjust LINOFF/TILEOFF accordingly. */
> +	if (mode_cmd->offsets[0] != 0)
> +		return -EINVAL;
> +
>  	ret = drm_framebuffer_init(dev, &intel_fb->base, &intel_fb_funcs);
>  	if (ret) {
>  		DRM_ERROR("framebuffer init failed %d\n", ret);

Userspace doesn't use this today at all even in the panning case?  I
know it worked at one point at least, but that may have been back in
the UMS days...

-- 
Jesse Barnes, Intel Open Source Technology Center


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux