diff options
author | Rob Clark <robdclark@chromium.org> | 2023-08-03 01:21:50 +0300 |
---|---|---|
committer | Rob Clark <robdclark@chromium.org> | 2023-08-10 20:44:02 +0300 |
commit | 6ba5daa5d5ad54b78aeac8912092f986e8d4c38f (patch) | |
tree | c30c83d083cfc24db4a4ceb1811d27536f8780ee /drivers/gpu/drm/msm/msm_gpu.c | |
parent | 1a8b612ef09bcba3708443339adfad9802d3e9d8 (diff) | |
download | linux-6ba5daa5d5ad54b78aeac8912092f986e8d4c38f.tar.xz |
drm/msm: Use drm_gem_object in submit bos table
Basically everywhere wants the base ptr type. So store that instead of
msm_gem_object.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Patchwork: https://patchwork.freedesktop.org/patch/551021/
Diffstat (limited to 'drivers/gpu/drm/msm/msm_gpu.c')
-rw-r--r-- | drivers/gpu/drm/msm/msm_gpu.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/gpu/drm/msm/msm_gpu.c b/drivers/gpu/drm/msm/msm_gpu.c index 8a9bacc920eb..5c10b559a595 100644 --- a/drivers/gpu/drm/msm/msm_gpu.c +++ b/drivers/gpu/drm/msm/msm_gpu.c @@ -219,36 +219,36 @@ static void msm_gpu_devcoredump_free(void *data) } static void msm_gpu_crashstate_get_bo(struct msm_gpu_state *state, - struct msm_gem_object *obj, u64 iova, bool full) + struct drm_gem_object *obj, u64 iova, bool full) { struct msm_gpu_state_bo *state_bo = &state->bos[state->nr_bos]; /* Don't record write only objects */ - state_bo->size = obj->base.size; + state_bo->size = obj->size; state_bo->iova = iova; - BUILD_BUG_ON(sizeof(state_bo->name) != sizeof(obj->name)); + BUILD_BUG_ON(sizeof(state_bo->name) != sizeof(to_msm_bo(obj)->name)); - memcpy(state_bo->name, obj->name, sizeof(state_bo->name)); + memcpy(state_bo->name, to_msm_bo(obj)->name, sizeof(state_bo->name)); if (full) { void *ptr; - state_bo->data = kvmalloc(obj->base.size, GFP_KERNEL); + state_bo->data = kvmalloc(obj->size, GFP_KERNEL); if (!state_bo->data) goto out; - msm_gem_lock(&obj->base); - ptr = msm_gem_get_vaddr_active(&obj->base); - msm_gem_unlock(&obj->base); + msm_gem_lock(obj); + ptr = msm_gem_get_vaddr_active(obj); + msm_gem_unlock(obj); if (IS_ERR(ptr)) { kvfree(state_bo->data); state_bo->data = NULL; goto out; } - memcpy(state_bo->data, ptr, obj->base.size); - msm_gem_put_vaddr(&obj->base); + memcpy(state_bo->data, ptr, obj->size); + msm_gem_put_vaddr(obj); } out: state->nr_bos++; |