drm: v3d: Switch to use drm_gem_object reservation_object
Now that the base struct drm_gem_object has a reservation_object, use it and remove the private BO one. Cc: Eric Anholt <eric@anholt.net> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: David Airlie <airlied@linux.ie> Cc: dri-devel@lists.freedesktop.org Signed-off-by: Rob Herring <robh@kernel.org> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20190202154158.10443-5-robh@kernel.org Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
此提交包含在:
@@ -155,9 +155,6 @@ struct v3d_bo *v3d_bo_create(struct drm_device *dev, struct drm_file *file_priv,
|
||||
return bo;
|
||||
obj = &bo->base;
|
||||
|
||||
bo->resv = &bo->_resv;
|
||||
reservation_object_init(bo->resv);
|
||||
|
||||
ret = v3d_bo_get_pages(bo);
|
||||
if (ret)
|
||||
goto free_mm;
|
||||
@@ -194,8 +191,6 @@ void v3d_free_object(struct drm_gem_object *obj)
|
||||
v3d->bo_stats.pages_allocated -= obj->size >> PAGE_SHIFT;
|
||||
mutex_unlock(&v3d->bo_lock);
|
||||
|
||||
reservation_object_fini(&bo->_resv);
|
||||
|
||||
v3d_bo_put_pages(bo);
|
||||
|
||||
if (obj->import_attach)
|
||||
@@ -212,13 +207,6 @@ void v3d_free_object(struct drm_gem_object *obj)
|
||||
kfree(bo);
|
||||
}
|
||||
|
||||
struct reservation_object *v3d_prime_res_obj(struct drm_gem_object *obj)
|
||||
{
|
||||
struct v3d_bo *bo = to_v3d_bo(obj);
|
||||
|
||||
return bo->resv;
|
||||
}
|
||||
|
||||
static void
|
||||
v3d_set_mmap_vma_flags(struct vm_area_struct *vma)
|
||||
{
|
||||
@@ -291,7 +279,7 @@ v3d_prime_import_sg_table(struct drm_device *dev,
|
||||
return ERR_CAST(bo);
|
||||
obj = &bo->base;
|
||||
|
||||
bo->resv = attach->dmabuf->resv;
|
||||
obj->resv = attach->dmabuf->resv;
|
||||
|
||||
bo->sgt = sgt;
|
||||
obj->import_attach = attach;
|
||||
|
新增問題並參考
封鎖使用者