Re: [PATCH] drm/i915: Allow legacy interface for legacy Y tiled display

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

 



On Wed, Apr 01, 2015 at 10:53:45AM +0100, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
> 
> Makes it easier for userspace to start supporting Y tiled display,
> for at least the legacy format.
> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
> Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Cc: Daniel Vetter <daniel.vetter@xxxxxxxx>

For the record: The point here is that we'll get a user for fb modifiers
by enabling Y tiling, not enabling Y tiling itself ... On that goal this
patch falls short, so nacked.
-Daniel

> ---
>  drivers/gpu/drm/i915/intel_display.c | 15 ++++++++++++---
>  1 file changed, 12 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 1813190..de50631 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -13347,10 +13347,19 @@ static int intel_framebuffer_init(struct drm_device *dev,
>  			return -EINVAL;
>  		}
>  	} else {
> -		if (obj->tiling_mode == I915_TILING_X)
> +		switch (obj->tiling_mode) {
> +		case I915_TILING_NONE:
> +			mode_cmd->modifier[0] = DRM_FORMAT_MOD_NONE;
> +			break;
> +		case I915_TILING_X:
>  			mode_cmd->modifier[0] = I915_FORMAT_MOD_X_TILED;
> -		else if (obj->tiling_mode == I915_TILING_Y) {
> -			DRM_DEBUG("No Y tiling for legacy addfb\n");
> +			break;
> +		case I915_TILING_Y:
> +			mode_cmd->modifier[0] = I915_FORMAT_MOD_Y_TILED;
> +			break;
> +		default:
> +			DRM_DEBUG("Unsupported fb obj tiling %u!\n",
> +				  obj->tiling_mode);
>  			return -EINVAL;
>  		}
>  	}
> -- 
> 2.3.2
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
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