Re: [PATCH v4 3/4] drm/vmwgfx: Fix handling of dumb buffers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 18, 2024 at 11:22 AM Zack Rusin <zack.rusin@xxxxxxxxxxxx> 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.





[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux