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> --- 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 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx