Re: [PATCH 4/4] drm/i915: Add support for variable cursor size on 845/865

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

 



On Tue, Aug 12, 2014 at 07:39:55PM +0300, ville.syrjala@xxxxxxxxxxxxxxx wrote:
>  	/* Check for which cursor types we support */
> -	if (!((width == 64 && height == 64) ||
> -			(width == 128 && height == 128 && !IS_GEN2(dev)) ||
> -			(width == 256 && height == 256 && !IS_GEN2(dev)))) {
> -		DRM_DEBUG("Cursor dimension not supported\n");
> -		return -EINVAL;
> +	if (IS_845G(dev) || IS_I865G(dev)) {
> +		if (width == 0 || height == 0 || (width & 63) != 0 ||
> +		    width > (IS_845G(dev) ? 64 : 512) || height > 1023) {
> +			DRM_DEBUG("Cursor dimension not supported\n");
> +			return -EINVAL;
> +		}


This is the cursor size in pixels and cannot be greater than the stride value being used.
[DevBDG]: In all modes the size is fixed to be 64. 
[DevSDG]: In all modes the size must be an integer mutliple of 64.

That does the right thing, though I had to read it through a couple of times.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




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