All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <deathsimple@vodafone.de>
To: dri-devel@lists.freedesktop.org
Subject: [PATCH 05/16] drm/radeon: fix ring commit padding
Date: Mon,  9 Jul 2012 12:41:52 +0200	[thread overview]
Message-ID: <1341830523-30320-6-git-send-email-deathsimple@vodafone.de> (raw)
In-Reply-To: <1341830523-30320-1-git-send-email-deathsimple@vodafone.de>

We don't need to pad anything if the number of dwords
written to the ring already matches the requirements.

Fixes some "writting more dword to ring than expected"
warnings.

Signed-off-by: Christian König <deathsimple@vodafone.de>
---
 drivers/gpu/drm/radeon/radeon_ring.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_ring.c b/drivers/gpu/drm/radeon/radeon_ring.c
index 0826e77..674aaba 100644
--- a/drivers/gpu/drm/radeon/radeon_ring.c
+++ b/drivers/gpu/drm/radeon/radeon_ring.c
@@ -272,13 +272,8 @@ int radeon_ring_lock(struct radeon_device *rdev, struct radeon_ring *ring, unsig
 
 void radeon_ring_commit(struct radeon_device *rdev, struct radeon_ring *ring)
 {
-	unsigned count_dw_pad;
-	unsigned i;
-
 	/* We pad to match fetch size */
-	count_dw_pad = (ring->align_mask + 1) -
-		       (ring->wptr & ring->align_mask);
-	for (i = 0; i < count_dw_pad; i++) {
+	while (ring->wptr & ring->align_mask) {
 		radeon_ring_write(ring, ring->nop);
 	}
 	DRM_MEMORYBARRIER();
-- 
1.7.9.5

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2012-07-09 10:42 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-09 10:41 [RFC] drm/radeon: restoring ring commands in case of a lockup Christian König
2012-07-09 10:41 ` [PATCH 01/16] drm/radeon: add error handling to fence_wait_empty_locked Christian König
2012-07-09 10:41 ` [PATCH 02/16] drm/radeon: add error handling to radeon_vm_unbind_locked Christian König
2012-07-09 10:41 ` [PATCH 03/16] drm/radeon: fix fence related segfault in CS Christian König
2012-07-09 10:41 ` [PATCH 04/16] drm/radeon: add an exclusive lock for GPU reset v2 Christian König
2012-07-09 10:41 ` Christian König [this message]
2012-07-09 10:41 ` [PATCH 06/16] drm/radeon: fix fence value access Christian König
2012-07-09 10:41 ` [PATCH 07/16] drm/radeon: fix fence init after resume Christian König
2012-07-09 10:41 ` [PATCH 08/16] drm/radeon: remove FIXME comment from chipset suspend Christian König
2012-07-09 10:41 ` [PATCH 09/16] drm/radeon: make cp init on cayman more robust Christian König
2012-07-09 14:43   ` Jerome Glisse
2012-07-09 15:11     ` Christian König
2012-07-09 10:41 ` [PATCH 10/16] drm/radeon: remove ip_pool start/suspend Christian König
2012-07-09 10:41 ` [PATCH 11/16] drm/radeon: remove r600_blit_suspend Christian König
2012-07-09 10:41 ` [PATCH 12/16] drm/radeon: remove vm_manager start/suspend Christian König
2012-07-09 10:42 ` [PATCH 13/16] drm/radeon: move radeon_ib_ring_tests out of chipset code Christian König
2012-07-09 15:06   ` Michel Dänzer
2012-07-09 15:22     ` Christian König
2012-07-09 15:36       ` Michel Dänzer
2012-07-09 10:42 ` [PATCH 14/16] drm/radeon: make align a ring_init parameter Christian König
2012-07-09 10:42 ` [PATCH 15/16] drm/radeon: implement ring commit tracking Christian König
2012-07-09 15:36   ` Jerome Glisse
2012-07-09 15:48     ` Christian König
2012-07-09 16:12       ` Jerome Glisse
2012-07-09 10:42 ` [PATCH 16/16] drm/radeon: implement ring saving on reset Christian König
2012-07-09 15:06   ` Michel Dänzer
2012-07-09 15:24     ` Christian König
2012-07-09 15:59 ` [RFC] drm/radeon: restoring ring commands in case of a lockup Michel Dänzer
2012-07-09 16:10   ` Jerome Glisse
2012-07-10 12:54     ` Christian König

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=1341830523-30320-6-git-send-email-deathsimple@vodafone.de \
    --to=deathsimple@vodafone.de \
    --cc=dri-devel@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.