mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-18 06:33:43 -04:00
drm/ttm: remove bdev from ttm_tt
I want to split this structure up and use it differently, step one remove bdev pointer from it and pass it explicitly. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200826014428.828392-4-airlied@gmail.com
This commit is contained in:
@@ -539,7 +539,8 @@ const struct vmw_sg_table *vmw_bo_sg_table(struct ttm_buffer_object *bo)
|
||||
}
|
||||
|
||||
|
||||
static int vmw_ttm_bind(struct ttm_tt *ttm, struct ttm_resource *bo_mem)
|
||||
static int vmw_ttm_bind(struct ttm_bo_device *bdev,
|
||||
struct ttm_tt *ttm, struct ttm_resource *bo_mem)
|
||||
{
|
||||
struct vmw_ttm_tt *vmw_be =
|
||||
container_of(ttm, struct vmw_ttm_tt, dma_ttm.ttm);
|
||||
@@ -573,7 +574,8 @@ static int vmw_ttm_bind(struct ttm_tt *ttm, struct ttm_resource *bo_mem)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void vmw_ttm_unbind(struct ttm_tt *ttm)
|
||||
static void vmw_ttm_unbind(struct ttm_bo_device *bdev,
|
||||
struct ttm_tt *ttm)
|
||||
{
|
||||
struct vmw_ttm_tt *vmw_be =
|
||||
container_of(ttm, struct vmw_ttm_tt, dma_ttm.ttm);
|
||||
@@ -594,7 +596,7 @@ static void vmw_ttm_unbind(struct ttm_tt *ttm)
|
||||
}
|
||||
|
||||
|
||||
static void vmw_ttm_destroy(struct ttm_tt *ttm)
|
||||
static void vmw_ttm_destroy(struct ttm_bo_device *bdev, struct ttm_tt *ttm)
|
||||
{
|
||||
struct vmw_ttm_tt *vmw_be =
|
||||
container_of(ttm, struct vmw_ttm_tt, dma_ttm.ttm);
|
||||
@@ -612,7 +614,8 @@ static void vmw_ttm_destroy(struct ttm_tt *ttm)
|
||||
}
|
||||
|
||||
|
||||
static int vmw_ttm_populate(struct ttm_tt *ttm, struct ttm_operation_ctx *ctx)
|
||||
static int vmw_ttm_populate(struct ttm_bo_device *bdev,
|
||||
struct ttm_tt *ttm, struct ttm_operation_ctx *ctx)
|
||||
{
|
||||
struct vmw_ttm_tt *vmw_tt =
|
||||
container_of(ttm, struct vmw_ttm_tt, dma_ttm.ttm);
|
||||
@@ -640,7 +643,8 @@ static int vmw_ttm_populate(struct ttm_tt *ttm, struct ttm_operation_ctx *ctx)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void vmw_ttm_unpopulate(struct ttm_tt *ttm)
|
||||
static void vmw_ttm_unpopulate(struct ttm_bo_device *bdev,
|
||||
struct ttm_tt *ttm)
|
||||
{
|
||||
struct vmw_ttm_tt *vmw_tt = container_of(ttm, struct vmw_ttm_tt,
|
||||
dma_ttm.ttm);
|
||||
@@ -796,7 +800,7 @@ int vmw_bo_create_and_populate(struct vmw_private *dev_priv,
|
||||
|
||||
ret = ttm_bo_reserve(bo, false, true, NULL);
|
||||
BUG_ON(ret != 0);
|
||||
ret = vmw_ttm_populate(bo->ttm, &ctx);
|
||||
ret = vmw_ttm_populate(bo->bdev, bo->ttm, &ctx);
|
||||
if (likely(ret == 0)) {
|
||||
struct vmw_ttm_tt *vmw_tt =
|
||||
container_of(bo->ttm, struct vmw_ttm_tt, dma_ttm.ttm);
|
||||
|
||||
Reference in New Issue
Block a user