etnaviv: do proper cpu prep/fini when clearing allocated buffer
The debug memset 0 of all allocated buffers did not sync the buffer for CPU access as required by the UAPI. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7367>
This commit is contained in:
@@ -315,8 +315,10 @@ etna_resource_alloc(struct pipe_screen *pscreen, unsigned layout,
|
||||
}
|
||||
|
||||
if (DBG_ENABLED(ETNA_DBG_ZERO)) {
|
||||
void *map = etna_bo_map(bo);
|
||||
void *map = etna_bo_map(rsc->bo);
|
||||
etna_bo_cpu_prep(rsc->bo, DRM_ETNA_PREP_WRITE);
|
||||
memset(map, 0, size);
|
||||
etna_bo_cpu_fini(rsc->bo);
|
||||
}
|
||||
|
||||
mtx_init(&rsc->lock, mtx_recursive);
|
||||
|
||||
Reference in New Issue
Block a user