Re: [PATCH] dma-buf: Fix ifnullfree.cocci warnings

2017-11-23 Thread Sumit Semwal
ive(dma_buf_debugfs_dir); > + debugfs_remove_recursive(dma_buf_debugfs_dir); > } > #else > static inline int dma_buf_init_debugfs(void) > -- > 1.9.1 > -- Thanks and regards, Sumit Semwal Linaro Mobile Group - Kernel Team Lead Linaro.org │ Open source software for ARM SoCs

Re: [PATCH 0/4] dma-buf: Silence dma_fence __rcu sparse warnings

2017-11-07 Thread Sumit Semwal
it wrong ;) >> >> Cc: Dave Airlie >> Cc: Jason Ekstrand >> Cc: linaro-mm-...@lists.linaro.org >> Cc: linux-media@vger.kernel.org >> Cc: Alex Deucher >> Cc: Christian König >> Cc: Sumit Semwal >> Cc: Chris Wilson >> >> Chris Wils

Re: [PATCH 0/4] DMA-buf: Fine-tuning for four function implementations

2017-05-08 Thread Sumit Semwal
Hello Markus, On 8 May 2017 at 14:40, SF Markus Elfring wrote: > From: Markus Elfring > Date: Mon, 8 May 2017 11:05:05 +0200 > > A few update suggestions were taken into account > from static source code analysis. > > Markus Elfring (4): > Combine two function calls into one in dma_buf_debug_s

Re: [PATCHv4 00/12] Ion cleanup in preparation for moving out of staging

2017-04-21 Thread Sumit Semwal
is a new version to address that. I also > addressed some minor comments on the patch to collapse header files. For the series, please feel free to apply my Acked-by: Sumit Semwal > > Thanks, > Laura > > Laura Abbott (12): > cma: Store a name in the cma structure >

Re: [Intel-gfx] [PATCH v2] dma-buf: Rename dma-ops to prevent conflict with kunmap_atomic macro

2017-04-20 Thread Sumit Semwal
--- a/drivers/staging/android/ion/ion.c >>> +++ b/drivers/staging/android/ion/ion.c >>> @@ -1020,10 +1020,10 @@ static const struct dma_buf_ops dma_buf_ops = { >>> .release = ion_dma_buf_release, >>> .begin_cpu_access = ion_dma_buf_begin_cpu_access, >>> .end_cpu_access = ion_dma_buf_end_cpu_access, >>> - .kmap_atomic = ion_dma_buf_kmap, >>> - .kunmap_atomic = ion_dma_buf_kunmap, >>> - .kmap = ion_dma_buf_kmap, >>> - .kunmap = ion_dma_buf_kunmap, >>> + .map_atomic = ion_dma_buf_kmap, >>> + .unmap_atomic = ion_dma_buf_kunmap, >>> + .map = ion_dma_buf_kmap, >>> + .unmap = ion_dma_buf_kunmap, >>> }; >>> >>> struct dma_buf *ion_share_dma_buf(struct ion_client *client, >>> diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h >>> index bfb3704..79f27d6 100644 >>> --- a/include/linux/dma-buf.h >>> +++ b/include/linux/dma-buf.h >>> @@ -39,13 +39,13 @@ struct dma_buf_attachment; >>> >>> /** >>>* struct dma_buf_ops - operations possible on struct dma_buf >>> - * @kmap_atomic: maps a page from the buffer into kernel address >>> - * space, users may not block until the subsequent unmap >>> call. >>> - * This callback must not sleep. >>> - * @kunmap_atomic: [optional] unmaps a atomically mapped page from the >>> buffer. >>> - *This Callback must not sleep. >>> - * @kmap: maps a page from the buffer into kernel address space. >>> - * @kunmap: [optional] unmaps a page from the buffer. >>> + * @map_atomic: maps a page from the buffer into kernel address >>> + * space, users may not block until the subsequent unmap >>> call. >>> + * This callback must not sleep. >>> + * @unmap_atomic: [optional] unmaps a atomically mapped page from the >>> buffer. >>> + * This Callback must not sleep. >>> + * @map: maps a page from the buffer into kernel address space. >>> + * @unmap: [optional] unmaps a page from the buffer. >>>* @vmap: [optional] creates a virtual mapping for the buffer into >>> kernel >>>* address space. Same restrictions as for vmap and friends apply. >>>* @vunmap: [optional] unmaps a vmap from the buffer >>> @@ -206,10 +206,10 @@ struct dma_buf_ops { >>> * to be restarted. >>> */ >>> int (*end_cpu_access)(struct dma_buf *, enum dma_data_direction); >>> - void *(*kmap_atomic)(struct dma_buf *, unsigned long); >>> - void (*kunmap_atomic)(struct dma_buf *, unsigned long, void *); >>> - void *(*kmap)(struct dma_buf *, unsigned long); >>> - void (*kunmap)(struct dma_buf *, unsigned long, void *); >>> + void *(*map_atomic)(struct dma_buf *, unsigned long); >>> + void (*unmap_atomic)(struct dma_buf *, unsigned long, void *); >>> + void *(*map)(struct dma_buf *, unsigned long); >>> + void (*unmap)(struct dma_buf *, unsigned long, void *); >>> >>> /** >>> * @mmap: > > > Best regards > -- > Marek Szyprowski, PhD > Samsung R&D Institute Poland > -- Thanks and regards, Sumit Semwal Linaro Mobile Group - Kernel Team Lead Linaro.org │ Open source software for ARM SoCs

Re: [Intel-gfx] [PATCH v2] dma-buf: Rename dma-ops to prevent conflict with kunmap_atomic macro

2017-04-20 Thread Sumit Semwal
istency I've renamed all four of kmap* and kunmap* to be >> map* and unmap*. (Even though only kmap_atomic presently conflicts.) >> >> [1] https://www.spinics.net/lists/target-devel/msg15070.html >> >> Signed-off-by: Logan Gunthorpe >> Reviewed-by: Sinclair Y

Re: [PATCH] dma-buf: align debugfs output

2017-04-03 Thread Sumit Semwal
Hi Russell, On 31 March 2017 at 15:33, Russell King wrote: > Align the heading with the values output from debugfs. > > Signed-off-by: Russell King Thanks for your patch; applied to drm-misc-next. > --- > drivers/dma-buf/dma-buf.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >

Re: [RFC PATCH 08/12] cma: Store a name in the cma structure

2017-03-10 Thread Sumit Semwal
Hi Laura, Thanks for the patch. On 3 March 2017 at 03:14, Laura Abbott wrote: > > Frameworks that may want to enumerate CMA heaps (e.g. Ion) will find it > useful to have an explicit name attached to each region. Store the name > in each CMA structure. > > Signed-off-by: Laura Abbott > --- > d

Re: [PATCH] dma-buf: add support for compat ioctl

2017-02-22 Thread Sumit Semwal
is Reviewed-by: Christian König >> . > Thanks much for spotting this! > Since you have commit rights for drm-misc, care to push this to > drm-misc-next-fixes pls? Also I think this warrants a cc: stable, > clearly an obvious screw-up in creating this api on our side :( So > feel free

Re: [PATCH] dma-buf/sw_sync: mark sync_timeline_create() static

2016-09-20 Thread Sumit Semwal
uf/sw_sync.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) > > Thanks for finding this. Thanks for the patch; this doesn't apply to mainline yet, since the de-staging of sw_sync code is queued for 4.9 via Greg-KH's tree. CC'ing him. Greg, would it be possible to

Re: [PATCH] dma-buf/sync-file: Avoid enable fence signaling if poll(.timeout=0)

2016-09-13 Thread Sumit Semwal
only install the callback once, the overhead comes from the atomic >> bit test that also causes serialisation between threads. >> >> Signed-off-by: Chris Wilson >> Cc: Sumit Semwal >> Cc: Gustavo Padovan >> Cc: linux-media@vger.kernel.org >&

Re: [PATCH v2 2/2] Documentation/sphinx: link dma-buf rsts

2016-08-23 Thread Sumit Semwal
Hi Jon, On 23 August 2016 at 18:38, Jonathan Corbet wrote: > On Tue, 23 Aug 2016 08:01:35 +0200 > Daniel Vetter wrote: > >> I'm also not too sure about whether dma-buf really should be it's own >> subdirectory. It's plucked from the device-drivers.tmpl, I think an >> overall device-drivers/ for

[PATCH v2 1/2] Documentation: move dma-buf documentation to rst

2016-08-22 Thread Sumit Semwal
comments from Jonathan Corbet and Markus Heiser. Signed-off-by: Sumit Semwal --- Documentation/DocBook/device-drivers.tmpl | 41 --- Documentation/dma-buf-sharing.txt | 482 Documentation/dma-buf/guide.rst | 507

[PATCH v2 0/2] doc: dma-buf: sphinx conversion

2016-08-22 Thread Sumit Semwal
Convert dma-buf documentation over to sphinx. While at that, convert dma-buf-sharing.txt as well, and make it the dma-buf API guide. There is no content change yet; only format conversion and creation of some hyperlinks. v2: Address review comments from Jonathan Corbet and Markus Heiser. Sumit

[PATCH v2 2/2] Documentation/sphinx: link dma-buf rsts

2016-08-22 Thread Sumit Semwal
Include dma-buf sphinx documentation into top level index. Signed-off-by: Sumit Semwal --- Documentation/index.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/index.rst b/Documentation/index.rst index e0fc72963e87..8d05070122c2 100644 --- a/Documentation/index.rst +++ b

Re: [PATCH] dma-buf: fix kernel-doc warning and typos

2016-08-16 Thread Sumit Semwal
rning: No description found for > parameter 'signal_on_any' > > Signed-off-by: Randy Dunlap > Cc: Sumit Semwal > Cc: linux-media@vger.kernel.org > Cc: dri-de...@lists.freedesktop.org > Cc: linaro-mm-...@lists.linaro.org > --- > drivers/dma-buf/f

Re: [RFC 0/4] doc: dma-buf: sphinx conversion and cleanup

2016-08-11 Thread Sumit Semwal
Hi Jon! On 11 August 2016 at 20:06, Jonathan Corbet wrote: > On Thu, 11 Aug 2016 16:17:56 +0530 > Sumit Semwal wrote: > >> Convert dma-buf documentation over to sphinx; also cleanup to >> address sphinx warnings. >> >> While at that, convert dma-buf-sharing.tx

Re: [RFC 3/4] Documentation: move dma-buf documentation to rst

2016-08-11 Thread Sumit Semwal
ructs: > http://www.sphinx-doc.org/en/stable/markup/index.html > * Sphinx domains: http://www.sphinx-doc.org/en/stable/domains.html > * Sphinx cross references: > http://www.sphinx-doc.org/en/stable/markup/inline.html#cross-referencing-arbitrary-locations > > Am 11.08.2016 um 12:4

Re: [RFC 3/4] Documentation: move dma-buf documentation to rst

2016-08-11 Thread Sumit Semwal
Hello Jani, On 11 August 2016 at 17:17, Jani Nikula wrote: > On Thu, 11 Aug 2016, Sumit Semwal wrote: >> diff --git a/Documentation/dma-buf/guide.rst >> b/Documentation/dma-buf/guide.rst >> new file mode 100644 >> index ..fd3534fdccb3 >> --- /dev/nu

[RFC 0/4] doc: dma-buf: sphinx conversion and cleanup

2016-08-11 Thread Sumit Semwal
Convert dma-buf documentation over to sphinx; also cleanup to address sphinx warnings. While at that, convert dma-buf-sharing.txt as well, and make it the dma-buf API guide. There is no content change yet; only format conversion and creation of some hyperlinks. Sumit Semwal (4): dma-buf/fence

[RFC 4/4] Documentation/sphinx: link dma-buf rsts

2016-08-11 Thread Sumit Semwal
Include dma-buf sphinx documentation into top level index. Signed-off-by: Sumit Semwal --- Documentation/index.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/index.rst b/Documentation/index.rst index 43c722f15292..2fe8e82d7d8c 100644 --- a/Documentation/index.rst +++ b

[RFC 2/4] dma-buf/fence: kerneldoc: remove spurious section header

2016-08-11 Thread Sumit Semwal
Commit e941759c74a44d6ac2eed21bb0a38b21fe4559e2 ("fence: dma-buf cross-device synchronization (v18)") had a spurious kerneldoc section header that caused Sphinx to complain. Fix it. Fixes: e941759c74a4 ("fence: dma-buf cross-device synchronization (v18)") Signed-

[RFC 1/4] dma-buf/fence: kerneldoc: remove unused struct members

2016-08-11 Thread Sumit Semwal
Commit 0431b9065f28ecf6c320fefebe0241620049984f ("staging/android: bring struct sync_pt back") removed child_list and active_list from struct fence, but left it in kernel doc. Delete them. Fixes: 0431b9065f28 ("staging/android: bring struct sync_pt back") Signed-

[RFC 3/4] Documentation: move dma-buf documentation to rst

2016-08-11 Thread Sumit Semwal
Branch out dma-buf related documentation into its own rst file to allow adding it to the sphinx documentation generated. While at it, move dma-buf-sharing.txt into rst as the dma-buf guide too. Signed-off-by: Sumit Semwal --- Documentation/DocBook/device-drivers.tmpl | 37 --- Documentation

[RFC 0/4] doc: dma-buf: sphinx conversion and cleanup

2016-08-11 Thread Sumit Semwal
Convert dma-buf documentation over to sphinx; also cleanup to address sphinx warnings. While at that, convert dma-buf-sharing.txt as well, and make it the dma-buf API guide. There is no content change yet; only format conversion and creation of some hyperlinks. Sumit Semwal (4): dma-buf/fence

Re: [PATCH] dma-buf: Release module reference on creation failure

2016-07-18 Thread Sumit Semwal
Signed-off-by: Chris Wilson >> Reviewed-by: Joonas Lahtinen >> Cc: Joonas Lahtinen >> Cc: Sumit Semwal >> Cc: Daniel Vetter >> Cc: linux-media@vger.kernel.org >> Cc: dri-de...@lists.freedesktop.org >> Cc: linaro-mm-...@lists.linaro.org >> --- >> drive

Re: [PATCH 0/3] dma-buf: debugfs fixes

2016-06-20 Thread Sumit Semwal
2 -- > 2 files changed, 14 insertions(+), 32 deletions(-) > > -- > 1.7.10.4 > -- Thanks and regards, Sumit Semwal Linaro Mobile Group - Kernel Team Lead Linaro.org │ Open source software for ARM SoCs -- To unsubscribe from this list: send the line "unsubscribe linux-media"

Re: [PATCH] of: reserved_mem: restore old behavior when no region is defined

2016-06-08 Thread Sumit Semwal
; 1 file changed, 1 insertion(+), 1 deletion(-) > Looks reasonable; FWIW Reviewed-by: Sumit Semwal > Acked-by: Rob Herring > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailma

[GIT PULL]: minor dma-buf updates for 4.7

2016-05-31 Thread Sumit Semwal
Hi Linus, A tiny pull request with mostly cosmetic changes in dma-buf for 4.7; may I request you to please pull? The following changes since commit 852f42a69b93dc71507adedeed876d57b8c2c2fa: Merge branch 'uuid' (lib/uuid fixes from Andy) (2016-05-30 15:27:07 -0700) are available in the git re

Re: [RESEND] fence: add missing descriptions for fence

2016-04-11 Thread Sumit Semwal
Hi Luis, On 12 April 2016 at 04:03, Luis de Bethencourt wrote: > On 11/04/16 21:09, Gustavo Padovan wrote: >> Hi Luis, >> >> 2016-04-11 Luis de Bethencourt : >> >>> The members child_list and active_list were added to the fence struct >>> without descriptions for the Documentation. Adding these.

Re: [PATCH] dma-buf: Update docs for SYNC ioctl

2016-03-21 Thread Sumit Semwal
On 21 March 2016 at 13:00, Daniel Vetter wrote: > Just a bit of wording polish plus mentioning that it can fail and must > be restarted. > > Requested by Sumit. > > Cc: Chris Wilson > Cc: Tiago Vignatti > Cc: Stéphane Marchesin > Cc: David Herrmann > Cc: Sum

Re: [PATCH] dma-buf, drm, ion: Propagate error code from dma_buf_start_cpu_access()

2016-03-20 Thread Sumit Semwal
851e >> Author: Daniel Vetter >> Date: Thu Feb 11 20:04:51 2016 -0200 >> >> dma-buf: Add ioctls to allow userspace to flush >> >> Testcase: igt/gem_concurrent_blit/*dmabuf*interruptible >> Testcase: igt/prime_mmap_coherency/ioctl-errors >> Sign

[GIT PULL]: dma-buf changes for 4.2

2015-06-26 Thread Sumit Semwal
-counting for kernel modules as exporters - minor code style fixes Jagan Teki (1): dma-buf: Minor coding style fixes Sumit Semwal (1): dma-buf: add ref counting for module as exporter drivers/dma-buf/dma-buf.c | 19

Re: [Linaro-mm-sig] [RFCv3 2/2] dma-buf: add helpers for sharing attacher constraints with dma-parms

2015-06-03 Thread Sumit Semwal
On 3 June 2015 at 15:07, Hans Verkuil wrote: > On 06/03/15 10:41, Russell King - ARM Linux wrote: >> On Wed, Jun 03, 2015 at 08:39:55AM +0200, Hans Verkuil wrote: >>> Hi Sumit, >>> >>> On 05/05/2015 04:41 PM, Sumit Semwal wrote: >>>> Hi Russell, eve

Re: [RFC] Export alignment requirements for buffers

2015-06-02 Thread Sumit Semwal
sn't have to necessarily know of the constraints, and some negotiation can happen in the kernel itself. It doesn't at the moment concern with taking care of sharing those back to userspace, but I think that's an orthogonal thing to handle. Absolutely, it'd be great if

Re: [PATCH] dma-buf: Minor coding style fixes

2015-05-20 Thread Sumit Semwal
Hi Jagan, On 21 May 2015 at 01:09, Jagan Teki wrote: > - WARNING: Missing a blank line after declarations > - WARNING: line over 80 characters > - WARNING: please, no space before tabs > > Signed-off-by: Jagan Teki > Cc: Sumit Semwal Thanks for the patch; I've queued i

[PATCH v3] dma-buf: add ref counting for module as exporter

2015-05-08 Thread Sumit Semwal
as possible, per gregkh's comment. v2: move owner to struct dma_buf, and use DEFINE_DMA_BUF_EXPORT_INFO macro to simplify the change. Signed-off-by: Sumit Semwal [1]: https://lkml.org/lkml/2012/8/8/163 --- drivers/dma-buf/dma-buf.c | 10 +- include/linux/dma-buf.h | 10

[PATCH v2] dma-buf: add ref counting for module as exporter

2015-05-07 Thread Sumit Semwal
dma_buf, and use DEFINE_DMA_BUF_EXPORT_INFO macro to simplify the change. Signed-off-by: Sumit Semwal [1]: https://lkml.org/lkml/2012/8/8/163 --- drivers/dma-buf/dma-buf.c | 10 +- include/linux/dma-buf.h | 10 -- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a

Re: [PATCH] dma-buf: add ref counting for module as exporter

2015-05-07 Thread Sumit Semwal
On 7 May 2015 at 13:40, Greg KH wrote: > On Thu, May 07, 2015 at 01:00:52PM +0530, Sumit Semwal wrote: >> Add reference counting on a kernel module that exports dma-buf and >> implements its operations. This prevents the module from being unloaded >> while DMABUF file

[PATCH] dma-buf: add ref counting for module as exporter

2015-05-07 Thread Sumit Semwal
[tomasz: Original author] Signed-off-by: Tomasz Stanislawski Acked-by: Daniel Vetter [sumits: updated & rebased as per review comments] Signed-off-by: Sumit Semwal [1]: https://lkml.org/lkml/2012/8/8/163 --- drivers/dma-buf/dma-buf.c | 9 - drivers/

Re: [RFCv3 2/2] dma-buf: add helpers for sharing attacher constraints with dma-parms

2015-05-05 Thread Sumit Semwal
Hi Russell, everyone, First up, sincere apologies for being awol for sometime; had some personal / medical things to take care of, and then I thought I'd wait for the merge window to get over before beginning to discuss this again. On 11 February 2015 at 21:53, Russell King - ARM Linux wrote: >

[GIT PULL]: dma-buf updates for 4.1-rc1

2015-04-24 Thread Sumit Semwal
rection of copy-paste stupidity while doing the cleanup -------- Sumit Semwal (2): dma-buf: cleanup dma_buf_export() to make it easily extensible staging: android: ion: fix wrong init of dma_buf_export_info Documentation/dma-

[GIT PULL]: dma-buf fixes for 4.0

2015-03-03 Thread Sumit Semwal
Hi Linus, May I please request you to pull a couple of fixes in dma-buf for 4.0-rc3? The following changes since commit b942c653ae265abbd31032f3b4f5f857e5c7c723: Merge tag 'trace-sh-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace (2015-01-22 06:26:07 +1200) are ava

Re: [GIT PULL]: few dma-buf updates for 3.20-rc1

2015-02-22 Thread Sumit Semwal
Hi Linus, On 22 February 2015 at 01:42, Linus Torvalds wrote: > On Fri, Feb 20, 2015 at 8:27 AM, Sumit Semwal wrote: >> >> Could you please pull a few dma-buf changes for 3.20-rc1? Nothing >> fancy, minor cleanups. > > No. > > I pulled, and immediately unpulled

[GIT PULL]: few dma-buf updates for 3.20-rc1

2015-02-20 Thread Sumit Semwal
ion: wait only with non-zero timeout specified (v3) dma-buf/fence: don't wait when specified timeout is zero Michel Dänzer (1): reservation: Remove shadowing local variable 'ret' Sumit Semwal (1): dma-buf: cleanup dma_buf_export() to make it easily extensible Docu

Re: [RFCv3 2/2] dma-buf: add helpers for sharing attacher constraints with dma-parms

2015-02-01 Thread Sumit Semwal
Hi Russell, On 30 January 2015 at 00:56, Russell King - ARM Linux wrote: > On Thu, Jan 29, 2015 at 01:52:09PM -0500, Rob Clark wrote: >> Quite possibly for some of these edge some of cases, some of the >> dma-buf exporters are going to need to get more clever (ie. hand off >> different scatterlis

Re: [RFCv3 2/2] dma-buf: add helpers for sharing attacher constraints with dma-parms

2015-01-29 Thread Sumit Semwal
On 29 January 2015 at 21:17, Russell King - ARM Linux wrote: > On Thu, Jan 29, 2015 at 09:00:11PM +0530, Sumit Semwal wrote: >> So, short answer is, it is left to the exporter to decide. The dma-buf >> framework should not even attempt to decide or enforce any of the >>

Re: [RFCv3 2/2] dma-buf: add helpers for sharing attacher constraints with dma-parms

2015-01-29 Thread Sumit Semwal
Hi Russell! On 29 January 2015 at 20:09, Russell King - ARM Linux wrote: > On Tue, Jan 27, 2015 at 01:55:54PM +0530, Sumit Semwal wrote: >> +/* >> + * recalc_constraints - recalculates constraints for all attached devices; >> + * useful for detach() r

[PATCH v3] dma-buf: cleanup dma_buf_export() to make it easily extensible

2015-01-28 Thread Sumit Semwal
() with dma_buf_export(), and change all callers accordingly. Signed-off-by: Sumit Semwal --- v3: Daniel Thompson caught the C99 warning issue w/ using {0}; using {.exp_name = xxx} instead. v2: add macro to zero out local struct, and fill KBUILD_MODNAME by default drivers/dma-buf/dma-buf.c

Re: [PATCH v2] dma-buf: cleanup dma_buf_export() to make it easily extensible

2015-01-28 Thread Sumit Semwal
On 28 January 2015 at 16:50, Daniel Thompson wrote: > On 28/01/15 06:00, Sumit Semwal wrote: >> +/** >> + * helper macro for exporters; zeros and fills in most common values >> + */ >> +#define DEFINE_DMA_BUF_EXPORT_INFO(a)\ >> +

Re: [PATCH v3] dma-buf: cleanup dma_buf_export() to make it easily extensible

2015-01-28 Thread Sumit Semwal
Hi Mauro, On 28 January 2015 at 18:53, Mauro Carvalho Chehab wrote: > Em Wed, 28 Jan 2015 18:24:03 +0530 > Sumit Semwal escreveu: > >> +/** >> + * helper macro for exporters; zeros and fills in most common values >> + */ >> +#define DEFINE_DMA_BUF_EXPORT

[PATCH v2] dma-buf: cleanup dma_buf_export() to make it easily extensible

2015-01-27 Thread Sumit Semwal
() with dma_buf_export(), and change all callers accordingly. Signed-off-by: Sumit Semwal --- v2: add macro to zero out local struct, and fill KBUILD_MODNAME by default drivers/dma-buf/dma-buf.c | 47 +- drivers/gpu/drm/armada/armada_gem.c

[RFCv3 2/2] dma-buf: add helpers for sharing attacher constraints with dma-parms

2015-01-27 Thread Sumit Semwal
l the time, - dma_buf_recalc_constraints - which recalculates the constraints for all currently attached devices for the 'paranoid' ones amongst us. The idea of this patch is largely taken from Rob Clark's RFC at https://lkml.org/lkml/2012/7/19/285, and the comments received on it. Cc: Rob Clark Si

[RFCv3 1/2] device: add dma_params->max_segment_count

2015-01-27 Thread Sumit Semwal
[sumits: Minor updates wrt comments] Signed-off-by: Sumit Semwal --- v3: include Robin Murphy's fix[1] for handling '0' as a value for max_segment_count v2: minor updates wrt comments on the first version [1]: http://article.gmane.org/gmane.linux.kernel.iommu/8175/

Re: [RFCv2 2/2] dma-buf: add helpers for sharing attacher constraints with dma-parms

2015-01-26 Thread Sumit Semwal
Hi Russell! On 21 January 2015 at 23:01, Russell King - ARM Linux wrote: > On Wed, Jan 21, 2015 at 09:46:47AM +0530, Sumit Semwal wrote: >> +static int calc_constraints(struct device *dev, >> + struct dma_buf_constraints *calc_cons) >&g

[RFC] dma-buf: cleanup dma_buf_export() to make it easily extensible

2015-01-22 Thread Sumit Semwal
() with dma_buf_export(), and change all callers accordingly. Signed-off-by: Sumit Semwal --- drivers/dma-buf/dma-buf.c | 47 +- drivers/gpu/drm/armada/armada_gem.c| 12 +-- drivers/gpu/drm/drm_prime.c| 14

Re: [PATCH] reservation: Remove shadowing local variable 'ret'

2015-01-22 Thread Sumit Semwal
Hi Michel, On 22 January 2015 at 12:30, Michel Dänzer wrote: > From: Michel Dänzer > > It was causing the return value of fence_is_signaled to be ignored, making > reservation objects signal too early. > Thanks; pushed to my for-next. > Cc: sta...@vger.kernel.org > Reviewed-by: Maarten Lankhors

Re: [RFCv2 1/2] device: add dma_params->max_segment_count

2015-01-21 Thread Sumit Semwal
Hi Robin! On 22 January 2015 at 00:26, Robin Murphy wrote: > Hi Sumit, > > > On 21/01/15 04:16, Sumit Semwal wrote: >> >> From: Rob Clark >> >> For devices which have constraints about maximum number of segments in >> an sglist. For example, a de

[RFCv2 1/2] device: add dma_params->max_segment_count

2015-01-20 Thread Sumit Semwal
[sumits: Minor updates wrt comments on the first version] Signed-off-by: Sumit Semwal --- include/linux/device.h | 1 + include/linux/dma-mapping.h | 19 +++ 2 files changed, 20 insertions(+) diff --git a/include/linux/device.h b/include/linux/device.h index fb50673..a32f

[RFCv2 2/2] dma-buf: add helpers for sharing attacher constraints with dma-parms

2015-01-20 Thread Sumit Semwal
the comments received on it. Cc: Rob Clark Signed-off-by: Sumit Semwal --- drivers/dma-buf/dma-buf.c | 132 +- include/linux/dma-buf.h | 22 2 files changed, 153 insertions(+), 1 deletion(-) diff --git a/drivers/dma-buf/dma-buf.c b/driver

[RFCv2 0/2] dma-parms, constraints and helpers for dma-buf

2015-01-20 Thread Sumit Semwal
the RFC for this one, to get feedback on whether this mechanism seems ok to everyone. [1] https://lkml.org/lkml/2014/10/10/340 [2] https://lkml.org/lkml/2012/7/19/285 Rob Clark (1): device: add dma_params->max_segment_count Sumit Semwal (1): dma-buf: add helpers for sharing attache

Re: [RFC 1/4] dma-buf: Add constraints sharing information

2014-12-10 Thread Sumit Semwal
Hi Daniel, Thanks a bunch for your review comments! A few comments, post our discussion at LPC; On 12 October 2014 at 00:25, Daniel Vetter wrote: > On Sat, Oct 11, 2014 at 01:37:55AM +0530, Sumit Semwal wrote: >> At present, struct device lacks a mechanism of exposing memory

Re: [Linaro-mm-sig] [RFC 2/4] cenalloc: Constraint-Enabled Allocation helpers for dma-buf

2014-10-14 Thread Sumit Semwal
Hi Laura, On 13 October 2014 14:05, Laura Abbott wrote: > On 10/10/2014 1:07 PM, Sumit Semwal wrote: >> >> Devices sharing buffers using dma-buf could benefit from sharing their >> constraints via struct device, and dma-buf framework would manage the >> common c

Re: [RFC 2/4] cenalloc: Constraint-Enabled Allocation helpers for dma-buf

2014-10-14 Thread Sumit Semwal
Hi Greg, Daniel! On 12 October 2014 00:10, Daniel Vetter wrote: > On Fri, Oct 10, 2014 at 04:09:00PM -0700, Greg Kroah-Hartman wrote: >> On Sat, Oct 11, 2014 at 01:37:56AM +0530, Sumit Semwal wrote: >> > Devices sharing buffers using dma-buf could benefit from sharing their &g

Re: [Linaro-mm-sig] [RFC 0/4] dma-buf Constraints-Enabled Allocation helpers

2014-10-14 Thread Sumit Semwal
Hi Laura, On 13 October 2014 13:42, Laura Abbott wrote: > On 10/10/2014 1:07 PM, Sumit Semwal wrote: >> >> Hi, >> >> Why: >> >> While sharing buffers using dma-buf, currently there's no mechanism to >> let >> devices share thei

[RFC 0/4] dma-buf Constraints-Enabled Allocation helpers

2014-10-10 Thread Sumit Semwal
egards, ~Sumit. [1]: 'C'onstraints 'EN'abled 'ALLOC'ation helpers = cenalloc: it might not be a very appealing name, so suggestions are very welcome! Benjamin Gaignard (1): cenalloc: a sample allocator for contiguous page allocation Sumit Semwal (3): dma-buf: Add constraint

[RFC 3/4] cenalloc: Build files for constraint-enabled allocation helpers

2014-10-10 Thread Sumit Semwal
Add the build files for cenalloc, the constraints-enabled allocation helper framework for dma-buf. Signed-off-by: Sumit Semwal Cc: linux-ker...@vger.kernel.org Cc: Greg Kroah-Hartman Cc: linux-media@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Cc: linaro-mm-...@lists.linaro.org

[RFC 2/4] cenalloc: Constraint-Enabled Allocation helpers for dma-buf

2014-10-10 Thread Sumit Semwal
c_buffer_free to free the buffer if refcount reaches zero; ** IMPORTANT** This mechanism of delayed allocation based on constraint-enablement will work *ONLY IF* the first map_attachment() call is made AFTER all attach() calls are done. Signed-off-by: Sumit Semwal Cc: linux-ker...@vger.kernel.org C

[RFC 1/4] dma-buf: Add constraints sharing information

2014-10-10 Thread Sumit Semwal
asis, while defining some common masks. Signed-off-by: Sumit Semwal Cc: linux-ker...@vger.kernel.org Cc: Greg Kroah-Hartman Cc: linux-media@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Cc: linaro-mm-...@lists.linaro.org --- drivers/dma-buf/dma-buf.c

[RFC 4/4] cenalloc: a sample allocator for contiguous page allocation

2014-10-10 Thread Sumit Semwal
From: Benjamin Gaignard Signed-off-by: Benjamin Gaignard Signed-off-by: Sumit Semwal Cc: linux-ker...@vger.kernel.org Cc: Greg Kroah-Hartman Cc: linux-media@vger.kernel.org Cc: dri-de...@lists.freedesktop.org Cc: linaro-mm-...@lists.linaro.org --- drivers/cenalloc/Makefile

[GIT PULL]: few dma-buf updates for 3.17-rc3

2014-08-28 Thread Sumit Semwal
Hi Linus, The major changes for 3.17 already went via Greg-KH's tree this time as well; this is a small pull request for dma-buf - all documentation related. Could you please pull? The following changes since commit f1bd473f95e02bc382d4dae94d7f82e2a455e05d: Merge branch 'sec-v3.17-rc2' of gi

Re: [PATCH v2 0/9] Updated fence patch series

2014-07-08 Thread Sumit Semwal
day. >> >> btw should we add you as a (co)maintainer for driver/core/dma-buf since >> you seem to want to keep a closer tab on what the insane gfx folks are up >> to in there? > > Sure, why not, what's one more maintainership... > > Oh, does that mean you want

Re: [PATCH v2 0/9] Updated fence patch series

2014-07-07 Thread Sumit Semwal
Hi Greg, On 2 July 2014 11:07, Greg KH wrote: > On Tue, Jul 01, 2014 at 12:57:02PM +0200, Maarten Lankhorst wrote: >> So after some more hacking I've moved dma-buf to its own subdirectory, >> drivers/dma-buf and applied the fence patches to its new place. I believe >> that the >> first patch sho

Re: [REPOST PATCH 1/8] fence: dma-buf cross-device synchronization (v17)

2014-06-18 Thread Sumit Semwal
On 19 June 2014 10:24, Greg KH wrote: > On Thu, Jun 19, 2014 at 09:57:35AM +0530, Sumit Semwal wrote: >> Hi Greg, >> >> >> >> >> Who is going to sign up to maintain this code? (hint, it's not me...) >> > >> > that would be

Re: [REPOST PATCH 1/8] fence: dma-buf cross-device synchronization (v17)

2014-06-18 Thread Sumit Semwal
>> Explicitly include linux/atomic.h. >>> v16: >>> Add trace events. >>> Import changes required by android syncpoints. >>> v17: >>> Use wake_up_state instead of try_to_wake_up. (Colin Cross) >>> Fix up commit description for

Re: [PATCH] Documentation/dma-buf-sharing.txt: update API descriptions

2014-05-20 Thread Sumit Semwal
struct sg_table *, >> +enum dma_data_direction); >> >> unmap_dma_buf signifies the end-of-DMA for the attachment provided. Like >> map_dma_buf, this API also must be implemented by the exporter. >> -- >> 1.7.9.5

[GIT PULL]: dma-buf updates for 3.14

2014-02-17 Thread Sumit Semwal
for you to fetch changes up to c0b00a525c127d0055c1df6283300e17f601a1a1: dma-buf: update debugfs output (2014-02-13 10:08:52 +0530) Small dma-buf pull request for 3.14 -------- Sumit Sem

[PATCH] dma-buf: update debugfs output

2014-02-03 Thread Sumit Semwal
Russell King observed 'wierd' looking output from debugfs, and also suggested better ways of getting device names (use KBUILD_MODNAME, dev_name()) This patch addresses these issues to make the debugfs output correct and better looking. Signed-off-by: Sumit Semwal --- drivers/base

Re: [GIT PULL]: dma-buf updates for 3.12

2013-09-11 Thread Sumit Semwal
Hi Linus. Sincere apologies for the html post; this request is now in plain-text. (it has been convenient using the gmail interface, but I promise this is the last time you'll see a non-plain-text email from me. Apologies again! Best regards, ~Sumit. On 11 September 2013 17:07, Sumit S

[GIT PULL]: dma-buf updates for 3.10

2013-05-01 Thread Sumit Semwal
6:22 +0530) 3.10 dma-buf updates Added debugfs support to dma-buf. -------- Sumit Semwal (2): dma-buf: replace dma_buf_export() with dma_buf_export_named() dma-buf: Add debugfs support Documentation/dma-buf-sharing

Re: [PATCH v3 0/2] dma-buf: Add support for debugfs

2013-04-07 Thread Sumit Semwal
Hi All, On 4 April 2013 11:58, Sumit Semwal wrote: > The patch series adds a much-missed support for debugfs to dma-buf framework. > > Based on the feedback received on v1 of this patch series, support is also > added to allow exporters to provide name-strings that will prove us

[PATCH v3 2/2] dma-buf: Add debugfs support

2013-04-03 Thread Sumit Semwal
Add debugfs support to make it easier to print debug information about the dma-buf buffers. Cc: Dave Airlie [minor fixes on init and warning fix] Signed-off-by: Sumit Semwal --- changes since v2: (based on review comments from Laurent Pinchart) - reordered functions to avoid forward

[PATCH v3 1/2] dma-buf: replace dma_buf_export() with dma_buf_export_named()

2013-04-03 Thread Sumit Semwal
e themselves, a #define dma_buf_export() is also made available, which adds a __FILE__ instead of 'exp_name'. Cc: Daniel Vetter [Thanks for the idea!] Reviewed-by: Daniel Vetter Signed-off-by: Sumit Semwal --- Documentation/dma-buf-sharing.txt | 13 +++-- drivers/base/dm

[PATCH v3 0/2] dma-buf: Add support for debugfs

2013-04-03 Thread Sumit Semwal
with dma_buf_export_named(), per suggestion from Daniel Vetter. - fixes on init and warnings as reported and corrected by Dave Airlie. - added locking while walking attachment list - reported by Daniel Vetter. Sumit Semwal (2): dma-buf: replace dma_buf_export() with dma_buf_export_named()

Re: [PATCH 2/2] dma-buf: Add debugfs support

2013-03-26 Thread Sumit Semwal
Hi Laurent! Thanks for the review: On 27 March 2013 05:38, Laurent Pinchart wrote: > Hi Sumit, > > Thanks for the patch. > > On Monday 25 March 2013 16:50:46 Sumit Semwal wrote: >> Add debugfs support to make it easier to print debug information >> about the dma-

Re: [PATCH 3/3] dma-buf: restore args on failure of dma_buf_mmap

2013-03-25 Thread Sumit Semwal
On 19 March 2013 05:19, Mauro Carvalho Chehab wrote: > Em Thu, 07 Feb 2013 15:54:52 +0530 > Sumit Semwal escreveu: > >> Hi John, >> >> On Thursday 07 February 2013 05:33 AM, John Sheu wrote: >> > From: John Sheu >> > >> > Callers to

[PATCH 2/2] dma-buf: Add debugfs support

2013-03-25 Thread Sumit Semwal
Add debugfs support to make it easier to print debug information about the dma-buf buffers. Cc: Dave Airlie [minor fixes on init and warning fix] Signed-off-by: Sumit Semwal --- changes since v1: - fixes on init and warnings as reported and corrected by Dave Airlie. - add locking while

[PATCH 1/2] dma-buf: replace dma_buf_export() with dma_buf_export_named()

2013-03-25 Thread Sumit Semwal
e themselves, a #define dma_buf_export() is also made available, which adds a __FILE__ instead of 'exp_name'. Cc: Daniel Vetter [Thanks for the idea!] Signed-off-by: Sumit Semwal --- Documentation/dma-buf-sharing.txt | 13 +++-- drivers/base/dma-buf.c| 11 +

[PATCH v2 0/2] dma-buf: Add support for debugfs

2013-03-25 Thread Sumit Semwal
debugging, but we'll leave that for the time being. Best regards, ~Sumit. Sumit Semwal (2): dma-buf: replace dma_buf_export() with dma_buf_export_named() dma-buf: Add debugfs support Documentation/dma-buf-sharing.txt | 13 ++- drivers/base/dma-buf.c|

[GIT PULL]: dma-buf updates for 3.9

2013-02-27 Thread Sumit Semwal
Hi Linus, Here's the 3.9 pull request for dma-buf framework updates: could you please pull? Thanks and best regards, ~Sumit. The following changes since commit d895cb1af15c04c522a25c79cc429076987c089b: Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs (2013-0

Re: [Linaro-mm-sig] [PATCH] CHROMIUM: dma-buf: restore args on failure of dma_buf_mmap

2013-02-14 Thread Sumit Semwal
t) { >> + /* restore old parameters on failure */ >> + vma->vm_file = oldfile; >> + fput(dmabuf->file); >> + } else { >> + if (oldfile) >> + fput(oldfile); >> + } >> + return ret; >> } >&

Re: [PATCH] CHROMIUM: dma-buf: restore args on failure of dma_buf_mmap

2013-02-12 Thread Sumit Semwal
;> + /* restore old parameters on failure */ >> + vma->vm_file = oldfile; >> + fput(dmabuf->file); >> + } else { >> + if (oldfile) >> + fput(oldfile); >> + } >> +

Re: [PATCH 3/3] dma-buf: restore args on failure of dma_buf_mmap

2013-02-07 Thread Sumit Semwal
Hi John, On Thursday 07 February 2013 05:33 AM, John Sheu wrote: From: John Sheu Callers to dma_buf_mmap expect to fput() the vma struct's vm_file themselves on failure. Not restoring the struct's data on failure causes a double-decrement of the vm_file's refcount. Thanks for your patch; coul

[GIT PULL]: dma-buf updates for 3.8

2012-12-19 Thread Sumit Semwal
Hi Linus, A fairly small dma-buf pull request for 3.8 - only 2 patches. Could you please pull? Thanks! ~Sumit. The following changes since commit f01af9f85855e38fbd601e033a8eac204cc4cc1c: Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc (2012-12-19 20:31:02 -0800) are availabl

Re: [Linaro-mm-sig] [PATCH] dma-buf: Add debugfs support

2012-12-17 Thread Sumit Semwal
On 17 December 2012 14:25, Sumit Semwal wrote: Apologies for re-sending, since the gmail ui 'decided' to set some formatting options by default! > Hi Maarten, > > On 14 December 2012 17:27, Maarten Lankhorst > wrote: >> >> Op 14-12-12 10:36, sumit.sem...@ti.co

Re: [PATCH] dma-buf: Add debugfs support

2012-12-17 Thread Sumit Semwal
! Will update in next version. > > -- > Daniel Vetter > Software Engineer, Intel Corporation > +41 (0) 79 365 57 48 - http://blog.ffwll.ch Best regards, Sumit Semwal -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] dma-buf: might_sleep() in dma_buf_unmap_attachment()

2012-09-28 Thread Sumit Semwal
On Friday 28 September 2012 01:09 PM, Maarten Lankhorst wrote: Op 28-09-12 09:29, Rob Clark schreef: From: Rob Clark We never really clarified if unmap could be done in atomic context. But since mapping might require sleeping, this implies mutex in use to synchronize mapping/unmapping, so unma

Re: [PATCH] dma-buf: add reference counting for exporter module

2012-08-08 Thread Sumit Semwal
t;> >>if (WARN_ON(!priv || !ops >> >> +|| !ops->owner >> >> Thank you for spotting this. >> I didn'y know that try_get_module returned true is module was NULL. >> >> BTW. Is it worth to add ".owner = THIS_MODULE,

Re: [PATCH 1/3] dma-fence: dma-buf synchronization (v7)

2012-08-07 Thread Sumit Semwal
maturely while > keeping everything stable. As such, aborting requests should only be done > in exceptional circumstances, in this case hardware died and things are > already locked up anyhow.. > > ~Maarten > -- Thanks and best regards, Sumit Semwal -- To unsubscribe from thi

Re: [RFC PATCH 1/3] dma-fence: dma-buf synchronization (v5)

2012-08-05 Thread Sumit Semwal
Hi Maarten, On 27 July 2012 19:09, Maarten Lankhorst wrote: > A dma-fence can be attached to a buffer which is being filled or consumed > by hw, to allow userspace to pass the buffer without waiting to another > device. For example, userspace can call page_flip ioctl to display the > next frame o

  1   2   >