From: "Michel Dänzer" <michel@daenzer.net>
To: "Christian König" <deathsimple@vodafone.de>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/radeon: optimize CIK VM handling v2
Date: Wed, 28 May 2014 12:29:44 +0900 [thread overview]
Message-ID: <53855828.4080701@daenzer.net> (raw)
In-Reply-To: <1401214228-1804-1-git-send-email-deathsimple@vodafone.de>
On 28.05.2014 03:10, Christian König wrote:
> From: Christian König <christian.koenig@amd.com>
>
> Fill VM page tables from the GART page table if applicable.
>
> v2: fix copy&paste error
>
> Signed-off-by: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/radeon/cik_sdma.c | 21 ++++++++++++++++++++-
> 1 file changed, 20 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/radeon/cik_sdma.c b/drivers/gpu/drm/radeon/cik_sdma.c
> index f7e46cf..3c2407b 100644
> --- a/drivers/gpu/drm/radeon/cik_sdma.c
> +++ b/drivers/gpu/drm/radeon/cik_sdma.c
> @@ -741,7 +741,26 @@ void cik_sdma_vm_set_page(struct radeon_device *rdev,
>
> trace_radeon_vm_set_page(pe, addr, count, incr, flags);
>
> - if (flags & R600_PTE_SYSTEM) {
> + if (flags == R600_PTE_GART) {
> + uint64_t src = rdev->gart.table_addr + (addr >> 12) * 8;
> + while (count) {
> + unsigned bytes = count * 8;
> + if (bytes > 0x1FFFF8)
> + bytes = 0x1FFFF8;
> +
> + ib->ptr[ib->length_dw++] = SDMA_PACKET(SDMA_OPCODE_COPY, SDMA_WRITE_SUB_OPCODE_LINEAR, 0);
> + ib->ptr[ib->length_dw++] = bytes;
> + ib->ptr[ib->length_dw++] = 0; /* src/dst endian swap */
> + ib->ptr[ib->length_dw++] = src & 0xffffffff;
> + ib->ptr[ib->length_dw++] = upper_32_bits(src);
> + ib->ptr[ib->length_dw++] = pe & 0xffffffff;
Masking with 0xffffffff is superfluous here.
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2014-05-28 3:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-27 18:10 [PATCH] drm/radeon: optimize CIK VM handling v2 Christian König
2014-05-28 3:29 ` Michel Dänzer [this message]
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=53855828.4080701@daenzer.net \
--to=michel@daenzer.net \
--cc=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox