Mesa (master): radeon/uvd: adjust the buffer offset when relocation is used
Nicolai Hähnle
nh at kemper.freedesktop.org
Fri Sep 30 10:46:09 UTC 2016
Module: Mesa
Branch: master
Commit: 3e7cced4b999478dee955e647bb777e1893f8cc6
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3e7cced4b999478dee955e647bb777e1893f8cc6
Author: Nicolai Hähnle <nicolai.haehnle at amd.com>
Date: Thu Sep 29 16:50:10 2016 +0200
radeon/uvd: adjust the buffer offset when relocation is used
We don't plan to use sub-allocated buffers with UVD, but just in case one
slips through, this increases the chances of things working out anyway.
Reviewed-by: Christian König <christian.koenig at amd.com>
---
src/gallium/drivers/radeon/radeon_uvd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/gallium/drivers/radeon/radeon_uvd.c b/src/gallium/drivers/radeon/radeon_uvd.c
index 3ae0eaa..9c376cb 100644
--- a/src/gallium/drivers/radeon/radeon_uvd.c
+++ b/src/gallium/drivers/radeon/radeon_uvd.c
@@ -123,6 +123,7 @@ static void send_cmd(struct ruvd_decoder *dec, unsigned cmd,
set_reg(dec, RUVD_GPCOM_VCPU_DATA0, addr);
set_reg(dec, RUVD_GPCOM_VCPU_DATA1, addr >> 32);
} else {
+ off += dec->ws->buffer_get_virtual_address(buf);
set_reg(dec, RUVD_GPCOM_VCPU_DATA0, off);
set_reg(dec, RUVD_GPCOM_VCPU_DATA1, reloc_idx * 4);
}
More information about the mesa-commit
mailing list