[PATCH v4 3/4] drm/vmwgfx: Fix handling of dumb buffers
Ian Forbes
ian.forbes at broadcom.com
Fri Jul 19 16:51:00 UTC 2024
On Thu, Jul 18, 2024 at 11:22 AM Zack Rusin <zack.rusin at broadcom.com> wrote:
> +bool vmw_user_object_is_mapped(struct vmw_user_object *uo)
> +{
> + struct vmw_bo *bo;
> +
> + if (!uo || vmw_user_object_is_null(uo))
> + return false;
> +
> + bo = vmw_user_object_buffer(uo);
> + WARN_ON(!bo);
> +
> + return (bo && bo->map.bo);
> +}
map.bo is set in ttm_bo_kmap but is not reset to NULL in
ttm_bo_kunmap. We only reset it in our vmw_bo_unmap. So we have to
ensure all unmaps go through our vmw_bo_unmap or use map.virtual
instead of map.bo to indicate the presence of a mapping. I prefer the
latter.
More information about the dri-devel
mailing list