Re: [PATCH 3/3] drm/radeon: optimize CIK VM handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 27.05.2014 17:44, schrieb Alex Deucher:
On Tue, May 27, 2014 at 10:47 AM, Christian König
<deathsimple@xxxxxxxxxxx> wrote:
From: Christian König <christian.koenig@xxxxxxx>

Fill VM page tables from the GART page table if applicable.

Signed-off-by: Christian König <christian.koenig@xxxxxxx>
---
  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..5bd3fe8 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_WRITE, SDMA_WRITE_SUB_OPCODE_LINEAR, 0);

Copy paste typo?  This should be SDMA_OPCODE_COPY, SDMA_COPY_SUB_OPCODE_LINEAR.

Oh, yes indeed. Thanks for the info.

Going to resend this patch in a minute. Can you add them to your 3.16-wip branch?

Thanks,
Christian.


With that fixed, this patch is:

Reviewed-by: Alex Deucher <alexander.deucher@xxxxxxx>

+                       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;
+                       ib->ptr[ib->length_dw++] = upper_32_bits(pe);
+
+                       pe += bytes;
+                       src += bytes;
+                       count -= bytes / 8;
+               }
+       } else if (flags & R600_PTE_SYSTEM) {
                 while (count) {
                         ndw = count * 2;
                         if (ndw > 0xFFFFE)
--
1.9.1

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

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





[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux