On Mon, Feb 23, 2015 at 03:56:01PM +0000, Tvrtko Ursulin wrote: > From: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx> > > By this patch all underlying bits have been implemented and this > patch actually enables the feature. > > Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx> > --- Ville noticed that it didn't seem we were properly returning -EINVAL when userspace sets reserved bits in the modifiers field. Otherwise, what's here seems to progress in the right direction: Reviewed-by: Damien Lespiau <damien.lespiau@xxxxxxxxx> -- Damien > drivers/gpu/drm/i915/intel_display.c | 13 ++++++++----- > 1 file changed, 8 insertions(+), 5 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c > index 74d4923..f100086 100644 > --- a/drivers/gpu/drm/i915/intel_display.c > +++ b/drivers/gpu/drm/i915/intel_display.c > @@ -12781,6 +12781,14 @@ static int intel_framebuffer_init(struct drm_device *dev, > DRM_DEBUG("tiling_mode doesn't match fb modifier\n"); > return -EINVAL; > } > + > + if (INTEL_INFO(dev)->gen < 9 && > + (mode_cmd->modifier[0] == I915_FORMAT_MOD_Y_TILED || > + mode_cmd->modifier[0] == I915_FORMAT_MOD_Yf_TILED)) { > + DRM_DEBUG("Unsupported tiling 0x%llx!\n", > + mode_cmd->modifier[0]); > + return -EINVAL; > + } > } else { > if (obj->tiling_mode == I915_TILING_X) > mode_cmd->modifier[0] = I915_FORMAT_MOD_X_TILED; > @@ -12790,11 +12798,6 @@ static int intel_framebuffer_init(struct drm_device *dev, > } > } > > - if (mode_cmd->modifier[0] == I915_FORMAT_MOD_Y_TILED) { > - DRM_DEBUG("hardware does not support tiling Y\n"); > - return -EINVAL; > - } > - > stride_alignment = intel_fb_stride_alignment(dev, mode_cmd->modifier[0], > mode_cmd->pixel_format); > if (mode_cmd->pitches[0] & (stride_alignment - 1)) { > -- > 2.3.0 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@xxxxxxxxxxxxxxxxxxxxx > http://lists.freedesktop.org/mailman/listinfo/intel-gfx _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx