From: "Christian König" <deathsimple@vodafone.de>
To: alexdeucher@gmail.com
Cc: Alex Deucher <alexander.deucher@amd.com>,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/radeon: update ib_execute for SI
Date: Tue, 17 Jul 2012 11:59:19 +0200 [thread overview]
Message-ID: <50053777.9030802@vodafone.de> (raw)
In-Reply-To: <1342473246-3148-1-git-send-email-alexdeucher@gmail.com>
On 16.07.2012 23:14, alexdeucher@gmail.com wrote:
> From: Alex Deucher <alexander.deucher@amd.com>
>
> When submitting a CONST_IB, emit a SWITCH_BUFFER
> packet before the CONST_IB. This isn't strictly necessary
> (the driver will work fine without it), but is good practice
> and allows for more flexible DE/CE sychronization options
> in the future. Current userspace drivers do not take
> advantage of the CE yet.
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
> drivers/gpu/drm/radeon/si.c | 6 ++++++
> drivers/gpu/drm/radeon/sid.h | 1 +
> 2 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c
> index 53e313b..191a3cd 100644
> --- a/drivers/gpu/drm/radeon/si.c
> +++ b/drivers/gpu/drm/radeon/si.c
> @@ -1778,6 +1778,12 @@ void si_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib)
> else
> header = PACKET3(PACKET3_INDIRECT_BUFFER, 2);
>
> + if (ib->is_const_ib) {
> + /* set switch buffer packet before const IB */
> + radeon_ring_write(ring, PACKET3(PACKET3_SWITCH_BUFFER, 0));
> + radeon_ring_write(ring, 0);
> + }
> +
Additional to that I don't think the read cache flush and rptr saving is
appropriate for a const IB, but on the other side I don't claim that I
have understood the CE/DE separation fully yet.
Christian.
> radeon_ring_write(ring, header);
> radeon_ring_write(ring,
> #ifdef __BIG_ENDIAN
> diff --git a/drivers/gpu/drm/radeon/sid.h b/drivers/gpu/drm/radeon/sid.h
> index db40679..7869089 100644
> --- a/drivers/gpu/drm/radeon/sid.h
> +++ b/drivers/gpu/drm/radeon/sid.h
> @@ -901,5 +901,6 @@
> #define PACKET3_WAIT_ON_DE_COUNTER_DIFF 0x88
> #define PACKET3_SET_CE_DE_COUNTERS 0x89
> #define PACKET3_WAIT_ON_AVAIL_BUFFER 0x8A
> +#define PACKET3_SWITCH_BUFFER 0x8B
>
> #endif
next prev parent reply other threads:[~2012-07-17 9:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-13 14:08 [PATCH 1/3] drm/radeon: return an error if there is nothing to wait for Christian König
2012-07-13 14:08 ` [PATCH 2/3] drm/radeon: let sa manager block for fences " Christian König
2012-07-13 14:14 ` Tom Stellard
2012-07-13 14:08 ` [PATCH 3/3] drm/radeon: fix const IB handling Christian König
2012-07-13 14:17 ` Tom Stellard
2012-07-17 9:50 ` Christian König
2012-07-17 14:25 ` Jerome Glisse
2012-07-17 14:32 ` Christian König
2012-07-13 14:53 ` Jerome Glisse
2012-07-16 21:14 ` [PATCH] drm/radeon: update ib_execute for SI alexdeucher
2012-07-17 9:59 ` Christian König [this message]
2012-07-17 12:33 ` Alex Deucher
2012-07-17 16:37 ` [PATCH] drm/radeon: update ib_execute for SI (v2) alexdeucher
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=50053777.9030802@vodafone.de \
--to=deathsimple@vodafone.de \
--cc=alexander.deucher@amd.com \
--cc=alexdeucher@gmail.com \
--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.