All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Clark <rob.clark@linaro.org>
To: Robert Morell <rmorell@nvidia.com>
Cc: linux-kernel@vger.kernel.org, sumit.semwal@linaro.org,
	airlied@linux.ie, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] dma-buf: Use EXPORT_SYMBOL
Date: Sun, 19 Feb 2012 15:20:14 -0600	[thread overview]
Message-ID: <CAN_cFWPv1X+tb998ejstf9svENhZweG9zWwtFbaCNrFi482qEQ@mail.gmail.com> (raw)
In-Reply-To: <1326845297-6233-2-git-send-email-rmorell@nvidia.com>

On Tue, Jan 17, 2012 at 6:08 PM, Robert Morell <rmorell@nvidia.com> wrote:
> EXPORT_SYMBOL_GPL is intended to be used for "an internal implementation
> issue, and not really an interface".  The dma-buf infrastructure is
> explicitly intended as an interface between modules/drivers, so it
> should use EXPORT_SYMBOL instead.


We discussed this topic at the kernel-gfx mini-summit at ELC.
Following the discussion, I agree that dma-buf infrastructure is
intended as an interface between driver subsystems.  And because (for
now) all the other arm SoC gl(es) stacks unfortunately involve a
closed src userspace, and since I consider userspace and kernel as
tightly coupled in the realm of graphics stacks, I don't think we can
really claim the moral high-ground here.  So I can't object to use of
EXPORT_SYMBOL() instead of EXPORT_SYMBOL_GPL().

That said, I expect the dma-buf infrastructure to still be evolving
and it is the responsibility for out-of-tree users of the API (GPL or
otherwise) to adapt as the dma-buf API changes.  And there isn't much
the in-tree drivers can do when it comes to debugging of buffer
sharing issues with out-of-tree drivers (binary or otherwise), leaving
the debugging responsibility to the owners of different out-of-tree
drivers.

BR,
-R

> Signed-off-by: Robert Morell <rmorell@nvidia.com>
> ---
>  drivers/base/dma-buf.c |   16 ++++++++--------
>  1 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/base/dma-buf.c b/drivers/base/dma-buf.c
> index e38ad24..4ed5a5d 100644
> --- a/drivers/base/dma-buf.c
> +++ b/drivers/base/dma-buf.c
> @@ -101,7 +101,7 @@ struct dma_buf *dma_buf_export(void *priv, struct dma_buf_ops *ops,
>
>        return dmabuf;
>  }
> -EXPORT_SYMBOL_GPL(dma_buf_export);
> +EXPORT_SYMBOL(dma_buf_export);
>
>
>  /**
> @@ -126,7 +126,7 @@ int dma_buf_fd(struct dma_buf *dmabuf)
>
>        return fd;
>  }
> -EXPORT_SYMBOL_GPL(dma_buf_fd);
> +EXPORT_SYMBOL(dma_buf_fd);
>
>  /**
>  * dma_buf_get - returns the dma_buf structure related to an fd
> @@ -152,7 +152,7 @@ struct dma_buf *dma_buf_get(int fd)
>
>        return file->private_data;
>  }
> -EXPORT_SYMBOL_GPL(dma_buf_get);
> +EXPORT_SYMBOL(dma_buf_get);
>
>  /**
>  * dma_buf_put - decreases refcount of the buffer
> @@ -167,7 +167,7 @@ void dma_buf_put(struct dma_buf *dmabuf)
>
>        fput(dmabuf->file);
>  }
> -EXPORT_SYMBOL_GPL(dma_buf_put);
> +EXPORT_SYMBOL(dma_buf_put);
>
>  /**
>  * dma_buf_attach - Add the device to dma_buf's attachments list; optionally,
> @@ -213,7 +213,7 @@ err_attach:
>        mutex_unlock(&dmabuf->lock);
>        return ERR_PTR(ret);
>  }
> -EXPORT_SYMBOL_GPL(dma_buf_attach);
> +EXPORT_SYMBOL(dma_buf_attach);
>
>  /**
>  * dma_buf_detach - Remove the given attachment from dmabuf's attachments list;
> @@ -235,7 +235,7 @@ void dma_buf_detach(struct dma_buf *dmabuf, struct dma_buf_attachment *attach)
>        mutex_unlock(&dmabuf->lock);
>        kfree(attach);
>  }
> -EXPORT_SYMBOL_GPL(dma_buf_detach);
> +EXPORT_SYMBOL(dma_buf_detach);
>
>  /**
>  * dma_buf_map_attachment - Returns the scatterlist table of the attachment;
> @@ -265,7 +265,7 @@ struct sg_table *dma_buf_map_attachment(struct dma_buf_attachment *attach,
>
>        return sg_table;
>  }
> -EXPORT_SYMBOL_GPL(dma_buf_map_attachment);
> +EXPORT_SYMBOL(dma_buf_map_attachment);
>
>  /**
>  * dma_buf_unmap_attachment - unmaps and decreases usecount of the buffer;might
> @@ -288,4 +288,4 @@ void dma_buf_unmap_attachment(struct dma_buf_attachment *attach,
>        mutex_unlock(&attach->dmabuf->lock);
>
>  }
> -EXPORT_SYMBOL_GPL(dma_buf_unmap_attachment);
> +EXPORT_SYMBOL(dma_buf_unmap_attachment);
> --
> 1.7.3.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

  parent reply	other threads:[~2012-02-19 21:20 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-06 15:06 [git pull] dma-buf tree Dave Airlie
2012-01-08 22:08 ` Linus Torvalds
2012-01-09  6:44   ` Sumit Semwal
2012-01-13  9:08     ` Dave Airlie
2012-01-13  9:38       ` Sumit Semwal
2012-01-13  9:40         ` Dave Airlie
2012-01-18  0:08 ` Expanding the use of DMA buffers in 3.3 Robert Morell
2012-01-18  0:08   ` [PATCH] dma-buf: Use EXPORT_SYMBOL Robert Morell
2012-01-18  9:10     ` Semwal, Sumit
2012-01-18 12:14       ` Arnd Bergmann
2012-01-18 12:21         ` Dave Airlie
2012-01-18 12:21           ` Dave Airlie
2012-01-18 13:55           ` Ilija Hadzic
2012-01-18 13:55             ` Ilija Hadzic
2012-01-18 14:00             ` Dave Airlie
2012-01-19  1:11               ` Robert Morell
2012-01-18 14:39             ` Arnd Bergmann
2012-01-18 14:39               ` Arnd Bergmann
2012-01-18 12:23         ` Mauro Carvalho Chehab
2012-01-19  7:26           ` Dave Airlie
2012-01-20 18:04       ` Robert Morell
2012-01-20 18:12         ` Konrad Rzeszutek Wilk
2012-01-21 17:32         ` Daniel Vetter
2012-01-25  5:34           ` Semwal, Sumit
2012-01-25 12:30             ` Alan Cox
2012-01-25 12:30               ` Alan Cox
2012-01-25 13:46               ` Mauro Carvalho Chehab
2012-01-25 13:48                 ` Mauro Carvalho Chehab
2012-01-18 11:48     ` Alan Cox
2012-02-19 21:20     ` Rob Clark [this message]
2012-01-18 11:53   ` Expanding the use of DMA buffers in 3.3 Alan Cox
2012-01-18 11:53     ` Alan Cox
2012-01-19  6:43   ` Pekka Enberg
2012-01-19  6:43     ` Pekka Enberg
2012-10-10 15:56 [PATCH] dma-buf: Use EXPORT_SYMBOL Robert Morell
2012-10-10 15:56 ` Robert Morell
2012-10-10 16:23 ` Mauro Carvalho Chehab
2012-10-10 16:23   ` Mauro Carvalho Chehab
2012-10-10 18:17 ` Alan Cox
2012-10-10 21:02   ` Rob Clark
2012-10-11  6:57     ` Hans Verkuil
2012-10-11  6:57       ` Hans Verkuil
2012-10-11 11:34       ` Alan Cox
2012-10-11 11:34         ` Alan Cox
2012-10-11 11:36         ` Hans Verkuil
2012-10-11 12:10           ` Hans Verkuil
2012-10-11 12:52           ` Laurent Pinchart
2012-10-16 21:22       ` Robert Morell
2012-10-17  9:53         ` Alan Cox
2012-10-10 23:22   ` Dave Airlie
2012-10-11  1:11     ` Mauro Carvalho Chehab
2012-10-11  2:50       ` Dave Airlie
2012-10-11 11:37         ` Alan Cox
2012-10-11  7:20       ` Hans Verkuil
2012-10-11  7:51         ` Hans Verkuil
2012-10-11  9:10           ` Maarten Lankhorst
2012-10-11 11:13         ` Mauro Carvalho Chehab
2012-10-11 13:47           ` Rob Clark
2012-10-11 14:55             ` Mauro Carvalho Chehab
2012-10-11 11:30         ` Alan Cox

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=CAN_cFWPv1X+tb998ejstf9svENhZweG9zWwtFbaCNrFi482qEQ@mail.gmail.com \
    --to=rob.clark@linaro.org \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmorell@nvidia.com \
    --cc=sumit.semwal@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.