mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
gpu: nvgpu: Remove NVGPU_IOCTL_GET_BUFFER_INFO
The IOCTL was introduced for making efficient query of buffer identity and size. It was never taken into use, and it adds a dependency to Tegra specific dma_buf API, so remove it. JIRA NVGPU-4 Change-Id: I194d7bb1f54997900a3be8d39c93331befa225c7 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1648001 Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Konsta Holtta <kholtta@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
f229149f97
commit
8ca1a765ee
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
@@ -140,7 +140,6 @@ int gk20a_dmabuf_alloc_drvdata(struct dma_buf *dmabuf, struct device *dev)
|
||||
{
|
||||
struct gk20a *g = gk20a_get_platform(dev)->g;
|
||||
struct gk20a_dmabuf_priv *priv;
|
||||
static u64 priv_count = 0;
|
||||
|
||||
priv = dma_buf_get_drvdata(dmabuf, dev);
|
||||
if (likely(priv))
|
||||
@@ -159,7 +158,6 @@ int gk20a_dmabuf_alloc_drvdata(struct dma_buf *dmabuf, struct device *dev)
|
||||
|
||||
nvgpu_mutex_init(&priv->lock);
|
||||
nvgpu_init_list_node(&priv->states);
|
||||
priv->buffer_id = ++priv_count;
|
||||
priv->g = g;
|
||||
dma_buf_set_drvdata(dmabuf, dev, priv, gk20a_mm_delete_priv);
|
||||
|
||||
@@ -214,34 +212,3 @@ out:
|
||||
*state = s;
|
||||
return err;
|
||||
}
|
||||
|
||||
int gk20a_mm_get_buffer_info(struct device *dev, int dmabuf_fd,
|
||||
u64 *buffer_id, u64 *buffer_len)
|
||||
{
|
||||
struct dma_buf *dmabuf;
|
||||
struct gk20a_dmabuf_priv *priv;
|
||||
int err = 0;
|
||||
|
||||
dmabuf = dma_buf_get(dmabuf_fd);
|
||||
if (IS_ERR(dmabuf)) {
|
||||
dev_warn(dev, "%s: fd %d is not a dmabuf", __func__, dmabuf_fd);
|
||||
return PTR_ERR(dmabuf);
|
||||
}
|
||||
|
||||
err = gk20a_dmabuf_alloc_drvdata(dmabuf, dev);
|
||||
if (err) {
|
||||
dev_warn(dev, "Failed to allocate dmabuf drvdata (err = %d)",
|
||||
err);
|
||||
goto clean_up;
|
||||
}
|
||||
|
||||
priv = dma_buf_get_drvdata(dmabuf, dev);
|
||||
if (likely(priv)) {
|
||||
*buffer_id = priv->buffer_id;
|
||||
*buffer_len = dmabuf->size;
|
||||
}
|
||||
|
||||
clean_up:
|
||||
dma_buf_put(dmabuf);
|
||||
return err;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user