diff options
author | Nicolai Hähnle <[email protected]> | 2016-10-04 10:50:55 +0200 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2016-10-04 16:37:44 +0200 |
commit | dfc1afda83a22d8e6b23f003748cd78fd089a0ac (patch) | |
tree | f37c99fa34c76032019ecfef3d1df86012be3586 /src/gallium/drivers/radeon/radeon_winsys.h | |
parent | 71a5cf6f3b8c6baee8ec71f1a2bef3b2efa5b91a (diff) |
winsys/radeon: add buffer_get_reloc_offset
Really fix the bug that was supposed to be fixed by commits 3e7cced4b and
a48bf02d: even when virtual addresses are used, the legacy relocation-based
method with offsets relative to the kernel's buffer object are used for
video submissions.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97969
Reviewed-by: Christian König <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon/radeon_winsys.h')
-rw-r--r-- | src/gallium/drivers/radeon/radeon_winsys.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeon/radeon_winsys.h b/src/gallium/drivers/radeon/radeon_winsys.h index e8fc6d62c43..7146737c826 100644 --- a/src/gallium/drivers/radeon/radeon_winsys.h +++ b/src/gallium/drivers/radeon/radeon_winsys.h @@ -515,6 +515,18 @@ struct radeon_winsys { uint64_t (*buffer_get_virtual_address)(struct pb_buffer *buf); /** + * Return the offset of this buffer relative to the relocation base. + * This is only non-zero for sub-allocated buffers. + * + * This is only supported in the radeon winsys, since amdgpu uses virtual + * addresses in submissions even for the video engines. + * + * \param buf A winsys buffer object + * \return the offset for relocations + */ + unsigned (*buffer_get_reloc_offset)(struct pb_buffer *buf); + + /** * Query the initial placement of the buffer from the kernel driver. */ enum radeon_bo_domain (*buffer_get_initial_domain)(struct pb_buffer *buf); |