All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Intel-gfx@lists.freedesktop.org
Subject: [PATCH 8/8] drm/i915/skl: Allow Y (and Yf) frame buffer creation
Date: Fri, 27 Feb 2015 11:15:24 +0000	[thread overview]
Message-ID: <1425035724-7123-9-git-send-email-tvrtko.ursulin@linux.intel.com> (raw)
In-Reply-To: <1425035724-7123-1-git-send-email-tvrtko.ursulin@linux.intel.com>

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

By this patch all underlying bits have been implemented and this
patch actually enables the feature.

v2: Validate passed in fb modifiers to reject garbage. (Daniel Vetter)
v3: Rearrange validation checks per code review comments. (Daniel Vetter)

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com> (v1)
---
 drivers/gpu/drm/i915/intel_display.c | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 4056fad..1dd0326 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -12825,8 +12825,21 @@ 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");
+	/* Passed in modifier sanity checking. */
+	switch (mode_cmd->modifier[0]) {
+	case I915_FORMAT_MOD_Y_TILED:
+	case I915_FORMAT_MOD_Yf_TILED:
+		if (INTEL_INFO(dev)->gen < 9) {
+			DRM_DEBUG("Unsupported tiling 0x%llx!\n",
+				  mode_cmd->modifier[0]);
+			return -EINVAL;
+		}
+	case DRM_FORMAT_MOD_NONE:
+	case I915_FORMAT_MOD_X_TILED:
+		break;
+	default:
+		DRM_ERROR("Unsupported fb modifier 0x%llx!\n",
+				mode_cmd->modifier[0]);
 		return -EINVAL;
 	}
 
-- 
2.3.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2015-02-27 11:15 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-27 11:15 [PATCH v5 0/8] Skylake Y tiled scanout Tvrtko Ursulin
2015-02-27 11:15 ` [PATCH 1/8] drm/i915/skl: Add new displayable tiling formats Tvrtko Ursulin
2015-02-27 11:15 ` [PATCH 2/8] drm/i915/skl: Allow scanning out Y and Yf fbs Tvrtko Ursulin
2015-02-27 11:15 ` [PATCH 3/8] drm/i915/skl: Adjust intel_fb_align_height() for Yb/Yf tiling Tvrtko Ursulin
2015-02-27 11:15 ` [PATCH 4/8] drm/i915/skl: Teach pin_and_fence_fb_obj() about Y tiling constraints Tvrtko Ursulin
2015-02-27 11:15 ` [PATCH 5/8] drm/i915/skl: Adjust get_plane_config() to support Yb/Yf tiling Tvrtko Ursulin
2015-02-27 11:15 ` [PATCH 6/8] drm/i915/skl: Updated watermark programming Tvrtko Ursulin
2015-02-27 11:15 ` [PATCH 7/8] drm/i915/skl: Update watermarks for Y tiling Tvrtko Ursulin
2015-02-27 15:12   ` Tvrtko Ursulin
2015-02-27 11:15 ` Tvrtko Ursulin [this message]
2015-02-27 15:27 ` [PATCH v5 0/8] Skylake Y tiled scanout Daniel Vetter
  -- strict thread matches above, loose matches on Subject: below --
2015-02-25 16:47 [PATCH v4 " Tvrtko Ursulin
2015-02-25 16:47 ` [PATCH 8/8] drm/i915/skl: Allow Y (and Yf) frame buffer creation Tvrtko Ursulin
2015-02-26 14:55   ` shuang.he
2015-02-26 16:44   ` Daniel Vetter
2015-02-27  9:45     ` Tvrtko Ursulin
2015-02-27 14:20       ` Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1425035724-7123-9-git-send-email-tvrtko.ursulin@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=Intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.