mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-27 04:30:37 +02:00
ac/virtio: fix alignment of metadata command
Command size must be aligned to 8.
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Fixes: 22263616ed ("amd: amdgpu-virtio implementation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34470>
This commit is contained in:
parent
7c6fb24067
commit
3210484fe2
1 changed files with 2 additions and 1 deletions
|
|
@ -18,6 +18,7 @@
|
|||
#include "amdgpu_virtio_private.h"
|
||||
|
||||
#include "util/log.h"
|
||||
#include "util/u_math.h"
|
||||
|
||||
int
|
||||
amdvgpu_query_info(amdvgpu_device_handle dev, struct drm_amdgpu_info *info)
|
||||
|
|
@ -156,7 +157,7 @@ int
|
|||
amdvgpu_bo_set_metadata(amdvgpu_device_handle dev, uint32_t res_id,
|
||||
struct amdgpu_bo_metadata *info)
|
||||
{
|
||||
unsigned req_len = sizeof(struct amdgpu_ccmd_set_metadata_req) + info->size_metadata;
|
||||
unsigned req_len = align(sizeof(struct amdgpu_ccmd_set_metadata_req) + info->size_metadata, 8);
|
||||
unsigned rsp_len = sizeof(struct amdgpu_ccmd_rsp);
|
||||
|
||||
uint8_t buf[req_len];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue