Skip to contentSkip to conversation

nouveau: Fix alignment requirements on src and dst addresses

PATCH New Maarten Lankhorst 1 participant 1 message Jun 4, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nouveau: Fix alignment requirements on src and dst addresses

Linear copy works by adding the offset to the buffer address, which may end up not being 16-byte aligned.

Some tests I've written for prime_pcopy show that the engine allows this correctly, so the restriction on lowest 4 bits of address can be lifted safely.

The comments added were by envyas, I think because I used a newer version.

---

drivers/gpu/drm/nouveau/nva3_copy.fuc +2 -2
index abc3662..219850d 100644
@@ -119,9 +119,9 @@ dispatch_dma:
 // mthd 0x030c-0x0340, various stuff
 .b16 0xc3 14
 .b32 #ctx_src_address_high           ~0x000000ff
-.b32 #ctx_src_address_low            ~0xfffffff0
+.b32 #ctx_src_address_low            ~0xffffffff
 .b32 #ctx_dst_address_high           ~0x000000ff
-.b32 #ctx_dst_address_low            ~0xfffffff0
+.b32 #ctx_dst_address_low            ~0xffffffff
 .b32 #ctx_src_pitch                  ~0x0007ffff
 .b32 #ctx_dst_pitch                  ~0x0007ffff
 .b32 #ctx_xcnt                       ~0x0000ffff
drivers/gpu/drm/nouveau/nva3_copy.fuc.h +88 -2

340 lines not on this page · raw message

drivers/gpu/drm/nouveau/nvc0_copy.fuc.h +81 -2

310 lines not on this page · raw message