[Intel-gfx] [PATCH] drm/i915: Allow legacy interface for legacy Y tiled display
Daniel Vetter
daniel at ffwll.ch
Wed Apr 1 05:20:53 PDT 2015
On Wed, Apr 01, 2015 at 10:53:45AM +0100, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
>
> Makes it easier for userspace to start supporting Y tiled display,
> for at least the legacy format.
>
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
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
More information about the Intel-gfx
mailing list