tegra: Remove unused IOCTL implementations

The DRM_TEGRA_GEM_{GET,SET}_FLAGS and DRM_TEGRA_GEM_{GET,SET}_TILING
IOCTLs were badly designed and have since been obsoleted by framebuffer
modifiers. Remove these implementations to make it clear their usage is
discouraged.

Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
main
Thierry Reding 2021-07-09 19:53:52 +02:00
parent bca42ae004
commit bec2a28e98
3 changed files with 0 additions and 111 deletions

View File

@ -1,11 +1,7 @@
drm_tegra_bo_get_flags
drm_tegra_bo_get_handle drm_tegra_bo_get_handle
drm_tegra_bo_get_tiling
drm_tegra_bo_map drm_tegra_bo_map
drm_tegra_bo_new drm_tegra_bo_new
drm_tegra_bo_ref drm_tegra_bo_ref
drm_tegra_bo_set_flags
drm_tegra_bo_set_tiling
drm_tegra_bo_unmap drm_tegra_bo_unmap
drm_tegra_bo_unref drm_tegra_bo_unref
drm_tegra_bo_wrap drm_tegra_bo_wrap

View File

@ -231,98 +231,3 @@ drm_public int drm_tegra_bo_unmap(struct drm_tegra_bo *bo)
return 0; return 0;
} }
drm_public int drm_tegra_bo_get_flags(struct drm_tegra_bo *bo, uint32_t *flags)
{
struct drm_tegra_gem_get_flags args;
struct drm_tegra *drm = bo->drm;
int err;
if (!bo)
return -EINVAL;
memset(&args, 0, sizeof(args));
args.handle = bo->handle;
err = drmCommandWriteRead(drm->fd, DRM_TEGRA_GEM_GET_FLAGS, &args,
sizeof(args));
if (err < 0)
return -errno;
if (flags)
*flags = args.flags;
return 0;
}
drm_public int drm_tegra_bo_set_flags(struct drm_tegra_bo *bo, uint32_t flags)
{
struct drm_tegra_gem_get_flags args;
struct drm_tegra *drm = bo->drm;
int err;
if (!bo)
return -EINVAL;
memset(&args, 0, sizeof(args));
args.handle = bo->handle;
args.flags = flags;
err = drmCommandWriteRead(drm->fd, DRM_TEGRA_GEM_SET_FLAGS, &args,
sizeof(args));
if (err < 0)
return -errno;
return 0;
}
drm_public int
drm_tegra_bo_get_tiling(struct drm_tegra_bo *bo,
struct drm_tegra_bo_tiling *tiling)
{
struct drm_tegra_gem_get_tiling args;
struct drm_tegra *drm = bo->drm;
int err;
if (!bo)
return -EINVAL;
memset(&args, 0, sizeof(args));
args.handle = bo->handle;
err = drmCommandWriteRead(drm->fd, DRM_TEGRA_GEM_GET_TILING, &args,
sizeof(args));
if (err < 0)
return -errno;
if (tiling) {
tiling->mode = args.mode;
tiling->value = args.value;
}
return 0;
}
drm_public int
drm_tegra_bo_set_tiling(struct drm_tegra_bo *bo,
const struct drm_tegra_bo_tiling *tiling)
{
struct drm_tegra_gem_set_tiling args;
struct drm_tegra *drm = bo->drm;
int err;
if (!bo)
return -EINVAL;
memset(&args, 0, sizeof(args));
args.handle = bo->handle;
args.mode = tiling->mode;
args.value = tiling->value;
err = drmCommandWriteRead(drm->fd, DRM_TEGRA_GEM_SET_TILING, &args,
sizeof(args));
if (err < 0)
return -errno;
return 0;
}

View File

@ -44,17 +44,5 @@ int drm_tegra_bo_get_handle(struct drm_tegra_bo *bo, uint32_t *handle);
int drm_tegra_bo_map(struct drm_tegra_bo *bo, void **ptr); int drm_tegra_bo_map(struct drm_tegra_bo *bo, void **ptr);
int drm_tegra_bo_unmap(struct drm_tegra_bo *bo); int drm_tegra_bo_unmap(struct drm_tegra_bo *bo);
int drm_tegra_bo_get_flags(struct drm_tegra_bo *bo, uint32_t *flags);
int drm_tegra_bo_set_flags(struct drm_tegra_bo *bo, uint32_t flags);
struct drm_tegra_bo_tiling {
uint32_t mode;
uint32_t value;
};
int drm_tegra_bo_get_tiling(struct drm_tegra_bo *bo,
struct drm_tegra_bo_tiling *tiling);
int drm_tegra_bo_set_tiling(struct drm_tegra_bo *bo,
const struct drm_tegra_bo_tiling *tiling);
#endif /* __DRM_TEGRA_H__ */ #endif /* __DRM_TEGRA_H__ */