[Intel-gfx] [PATCH 7/7] drm/i915/skl: Allow Y (and Yf) frame buffer creation
Damien Lespiau
damien.lespiau at intel.com
Tue Feb 24 11:30:22 PST 2015
On Mon, Feb 23, 2015 at 03:56:01PM +0000, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
>
> By this patch all underlying bits have been implemented and this
> patch actually enables the feature.
>
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> ---
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 at intel.com>
--
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 at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
More information about the Intel-gfx
mailing list