dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org
Subject: [PATCH libdrm 02/25] tegra: Remove unused IOCTL implementations
Date: Fri, 27 Aug 2021 15:22:42 +0200	[thread overview]
Message-ID: <20210827132305.3572077-3-thierry.reding@gmail.com> (raw)
In-Reply-To: <20210827132305.3572077-1-thierry.reding@gmail.com>

From: Thierry Reding <treding@nvidia.com>

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.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 tegra/tegra-symbols.txt |  4 --
 tegra/tegra.c           | 95 -----------------------------------------
 tegra/tegra.h           | 12 ------
 3 files changed, 111 deletions(-)

diff --git a/tegra/tegra-symbols.txt b/tegra/tegra-symbols.txt
index 5e3e955f2901..9422696c1416 100644
--- a/tegra/tegra-symbols.txt
+++ b/tegra/tegra-symbols.txt
@@ -1,11 +1,7 @@
-drm_tegra_bo_get_flags
 drm_tegra_bo_get_handle
-drm_tegra_bo_get_tiling
 drm_tegra_bo_map
 drm_tegra_bo_new
 drm_tegra_bo_ref
-drm_tegra_bo_set_flags
-drm_tegra_bo_set_tiling
 drm_tegra_bo_unmap
 drm_tegra_bo_unref
 drm_tegra_bo_wrap
diff --git a/tegra/tegra.c b/tegra/tegra.c
index 3caf0bc4e65e..94840ad42795 100644
--- a/tegra/tegra.c
+++ b/tegra/tegra.c
@@ -235,98 +235,3 @@ drm_public int drm_tegra_bo_unmap(struct drm_tegra_bo *bo)
 
     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;
-}
diff --git a/tegra/tegra.h b/tegra/tegra.h
index 62205a5174b4..c6b4f984de45 100644
--- a/tegra/tegra.h
+++ b/tegra/tegra.h
@@ -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_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__ */
-- 
2.32.0


  parent reply	other threads:[~2021-08-27 13:23 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-27 13:22 [PATCH libdrm 00/25] Update Tegra support Thierry Reding
2021-08-27 13:22 ` [PATCH libdrm 01/25] tegra: Indent according to .editorconfig Thierry Reding
2021-08-27 13:22 ` Thierry Reding [this message]
2021-08-27 13:22 ` [PATCH libdrm 03/25] tegra: Extract common buffer object allocation code Thierry Reding
2021-08-27 13:22 ` [PATCH libdrm 04/25] tegra: Fix mmap() of GEM buffer objects Thierry Reding
2021-08-27 13:22 ` [PATCH libdrm 05/25] tegra: Add flink helpers Thierry Reding
2021-08-27 13:22 ` [PATCH libdrm 06/25] tegra: Add PRIME support helpers Thierry Reding
2021-08-27 13:22 ` [PATCH libdrm 07/25] tegra: Make API more consistent Thierry Reding
2021-08-27 13:22 ` [PATCH libdrm 08/25] tegra: Install tegra-openclose test Thierry Reding
2021-08-27 13:22 ` [PATCH libdrm 09/25] tegra: Update for new UABI Thierry Reding
2021-08-27 13:22 ` [PATCH libdrm 10/25] tegra: Include private.h in list of source files Thierry Reding
2021-08-27 13:22 ` [PATCH libdrm 11/25] tegra: Add channel APIs Thierry Reding
2021-08-27 13:22 ` [PATCH libdrm 12/25] tegra: Add job and push buffer APIs Thierry Reding
2021-08-27 13:22 ` [PATCH libdrm 13/25] tegra: Add syncpoint APIs Thierry Reding
2021-08-27 13:22 ` [PATCH libdrm 14/25] tests: tegra: Add helper library for tests Thierry Reding
2021-08-27 13:22 ` [PATCH libdrm 15/25] tests: tegra: Add gr2d-fill test Thierry Reding
2021-08-27 13:22 ` [PATCH libdrm 16/25] tests: tegra: Add syncpt-wait test Thierry Reding
2021-08-27 13:22 ` [PATCH libdrm 17/25] tests: tegra: Add syncpoint timeout test Thierry Reding
2021-08-27 13:22 ` [PATCH libdrm 18/25] tests: tegra: Add VIC support Thierry Reding
2021-08-27 13:22 ` [PATCH libdrm 19/25] tests: tegra: Add VIC 3.0 support Thierry Reding
2021-08-27 14:06   ` Michał Mirosław
2021-08-27 13:23 ` [PATCH libdrm 20/25] tests: tegra: Add VIC 4.0 support Thierry Reding
2021-08-27 13:23 ` [PATCH libdrm 21/25] tests: tegra: Add VIC 4.1 support Thierry Reding
2021-08-27 13:23 ` [PATCH libdrm 22/25] tests: tegra: Add VIC 4.2 support Thierry Reding
2021-08-27 13:23 ` [PATCH libdrm 23/25] tests: tegra: Add VIC clear test Thierry Reding
2021-08-27 13:23 ` [PATCH libdrm 24/25] tests: tegra: Add VIC blit test Thierry Reding
2021-08-27 13:23 ` [PATCH libdrm 25/25] tests: tegra: Add VIC flip test Thierry Reding
2021-09-20 16:43 ` [PATCH libdrm 00/25] Update Tegra support Dmitry Osipenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210827132305.3572077-3-thierry.reding@gmail.com \
    --to=thierry.reding@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-tegra@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).