intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: intel-gfx@lists.freedesktop.org
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: [PATCH 5/5] drm/i915: fix relaxed tiling on gen2: tile height
Date: Tue, 19 Apr 2011 22:46:04 +0200	[thread overview]
Message-ID: <1303245964-3022-6-git-send-email-daniel.vetter@ffwll.ch> (raw)
In-Reply-To: <1303245964-3022-1-git-send-email-daniel.vetter@ffwll.ch>

A tile on gen2 has a size of 2kb, stride of 128 bytes and 16 rows.

Userspace was broken and assumed 8 rows. Chris Wilson noted that the
kernel unfortunately can't reliable check that because libdrm rounds
up the size to the next bucket.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/i915/i915_gem.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 6471d51..262fa45 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1504,8 +1504,9 @@ i915_gem_get_unfenced_gtt_alignment(struct drm_i915_gem_object *obj)
 	 * edge of an even tile row (where tile rows are counted as if the bo is
 	 * placed in a fenced gtt region).
 	 */
-	if (IS_GEN2(dev) ||
-	    (obj->tiling_mode == I915_TILING_Y && HAS_128_BYTE_Y_TILING(dev)))
+	if (IS_GEN2(dev))
+		tile_height = 16;
+	else if (obj->tiling_mode == I915_TILING_Y && HAS_128_BYTE_Y_TILING(dev))
 		tile_height = 32;
 	else
 		tile_height = 8;
-- 
1.7.4.1

  parent reply	other threads:[~2011-04-19 19:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-19 20:45 [PATCH 0/5] various small patches for -next Daniel Vetter
2011-04-19 20:46 ` [PATCH 1/5] drm/i915: downgrade non-lethal BUG_ONs Daniel Vetter
2011-04-20  8:18   ` Chris Wilson
2011-04-20 14:27     ` Ben Widawsky
2011-04-20 14:36       ` Chris Wilson
2011-04-19 20:46 ` [PATCH 2/5] drm/i915: not finding a fence is a non-recoverable condition Daniel Vetter
2011-04-19 20:46 ` [PATCH 3/5] drm/i915: check gpu_write_list in move_to_flushing Daniel Vetter
2011-04-19 20:46 ` [PATCH 4/5] drm/i915: fix relaxed tiling on gen2: y-tiling on i855gm Daniel Vetter
2011-04-19 20:46 ` Daniel Vetter [this message]
2011-04-21  9:23 ` [PATCH 0/5] various small patches for -next Chris Wilson

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=1303245964-3022-6-git-send-email-daniel.vetter@ffwll.ch \
    --to=daniel.vetter@ffwll.ch \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).