[PATCH] drm/prime: drop reference on imported dma-buf come from gem

2012-12-20 Thread Dave Airlie
> In drm_prime_handle_to_fd_ioctl(), flags is cleared to only support > DRM_CLOEXEC but in gem_prime_export() callbacks of each driver, it uses > 0600 as flags for dma_buf_export() like following. > > return dma_buf_export(obj, _dmabuf_ops, obj->base.size, 0600); Oops, nice catch, radeon and

Re: [PATCH] drm/prime: drop reference on imported dma-buf come from gem

2012-12-19 Thread Dave Airlie
In drm_prime_handle_to_fd_ioctl(), flags is cleared to only support DRM_CLOEXEC but in gem_prime_export() callbacks of each driver, it uses 0600 as flags for dma_buf_export() like following. return dma_buf_export(obj, i915_dmabuf_ops, obj-base.size, 0600); Oops, nice catch, radeon and

[PATCH] drm/prime: drop reference on imported dma-buf come from gem

2012-12-18 Thread Dave Airlie
On Thu, Sep 27, 2012 at 4:30 PM, Seung-Woo Kim wrote: > Increasing ref counts of both dma-buf and gem for imported dma-buf come from > gem > makes memory leak. release function of dma-buf cannot be called because > f_count > of dma-buf increased by importing gem and gem ref count cannot be

[PATCH] drm/prime: drop reference on imported dma-buf come from gem

2012-12-18 Thread 김승우
Hi Dave, On 2012? 12? 18? 15:30, Dave Airlie wrote: > On Thu, Sep 27, 2012 at 4:30 PM, Seung-Woo Kim > wrote: >> Increasing ref counts of both dma-buf and gem for imported dma-buf come from >> gem >> makes memory leak. release function of dma-buf cannot be called because >> f_count >> of

Re: [PATCH] drm/prime: drop reference on imported dma-buf come from gem

2012-12-17 Thread 김승우
Hi Dave, On 2012년 12월 18일 15:30, Dave Airlie wrote: On Thu, Sep 27, 2012 at 4:30 PM, Seung-Woo Kim sw0312@samsung.com wrote: Increasing ref counts of both dma-buf and gem for imported dma-buf come from gem makes memory leak. release function of dma-buf cannot be called because f_count

[RESEND][PATCH] drm/prime: drop reference on imported dma-buf come from gem

2012-11-21 Thread 김승우
On 2012? 11? 20? 19:26, Maarten Lankhorst wrote: > Op 20-11-12 02:03, ??? schreef: >> Hi Maarten, >> >> On 2012? 11? 19? 19:27, Maarten Lankhorst wrote: >>> Op 15-11-12 04:52, Seung-Woo Kim schreef: Increasing ref counts of both dma-buf and gem for imported dma-buf come from gem makes

[RESEND][PATCH] drm/prime: drop reference on imported dma-buf come from gem

2012-11-20 Thread Maarten Lankhorst
Op 20-11-12 02:03, ??? schreef: > Hi Maarten, > > On 2012? 11? 19? 19:27, Maarten Lankhorst wrote: >> Op 15-11-12 04:52, Seung-Woo Kim schreef: >>> Increasing ref counts of both dma-buf and gem for imported dma-buf >>> come from gem makes memory leak. release function of dma-buf cannot >>> be

[RESEND][PATCH] drm/prime: drop reference on imported dma-buf come from gem

2012-11-20 Thread 김승우
Hi Maarten, On 2012? 11? 19? 19:27, Maarten Lankhorst wrote: > Op 15-11-12 04:52, Seung-Woo Kim schreef: >> Increasing ref counts of both dma-buf and gem for imported dma-buf >> come from gem makes memory leak. release function of dma-buf cannot >> be called because f_count of dma-buf increased

Re: [RESEND][PATCH] drm/prime: drop reference on imported dma-buf come from gem

2012-11-20 Thread Maarten Lankhorst
Op 20-11-12 02:03, 김승우 schreef: Hi Maarten, On 2012년 11월 19일 19:27, Maarten Lankhorst wrote: Op 15-11-12 04:52, Seung-Woo Kim schreef: Increasing ref counts of both dma-buf and gem for imported dma-buf come from gem makes memory leak. release function of dma-buf cannot be called because

Re: [RESEND][PATCH] drm/prime: drop reference on imported dma-buf come from gem

2012-11-20 Thread 김승우
On 2012년 11월 20일 19:26, Maarten Lankhorst wrote: Op 20-11-12 02:03, 김승우 schreef: Hi Maarten, On 2012년 11월 19일 19:27, Maarten Lankhorst wrote: Op 15-11-12 04:52, Seung-Woo Kim schreef: Increasing ref counts of both dma-buf and gem for imported dma-buf come from gem makes memory leak. release

[RESEND][PATCH] drm/prime: drop reference on imported dma-buf come from gem

2012-11-19 Thread Inki Dae
Hi All, This patch has been tested with only Exynos driver so other maintainers may need to test this. Acked-by: Inki Dae 2012/11/15 Seung-Woo Kim > Increasing ref counts of both dma-buf and gem for imported dma-buf > come from gem makes memory leak. release function of dma-buf cannot > be

[RESEND][PATCH] drm/prime: drop reference on imported dma-buf come from gem

2012-11-19 Thread Maarten Lankhorst
Op 15-11-12 04:52, Seung-Woo Kim schreef: > Increasing ref counts of both dma-buf and gem for imported dma-buf > come from gem makes memory leak. release function of dma-buf cannot > be called because f_count of dma-buf increased by importing gem and > gem ref count cannot be decrease because of

Re: [RESEND][PATCH] drm/prime: drop reference on imported dma-buf come from gem

2012-11-19 Thread Inki Dae
Hi All, This patch has been tested with only Exynos driver so other maintainers may need to test this. Acked-by: Inki Dae inki@samsung.com 2012/11/15 Seung-Woo Kim sw0312@samsung.com Increasing ref counts of both dma-buf and gem for imported dma-buf come from gem makes memory leak.

Re: [RESEND][PATCH] drm/prime: drop reference on imported dma-buf come from gem

2012-11-19 Thread Maarten Lankhorst
Op 15-11-12 04:52, Seung-Woo Kim schreef: Increasing ref counts of both dma-buf and gem for imported dma-buf come from gem makes memory leak. release function of dma-buf cannot be called because f_count of dma-buf increased by importing gem and gem ref count cannot be decrease because of

Re: [RESEND][PATCH] drm/prime: drop reference on imported dma-buf come from gem

2012-11-19 Thread 김승우
Hi Maarten, On 2012년 11월 19일 19:27, Maarten Lankhorst wrote: Op 15-11-12 04:52, Seung-Woo Kim schreef: Increasing ref counts of both dma-buf and gem for imported dma-buf come from gem makes memory leak. release function of dma-buf cannot be called because f_count of dma-buf increased by

[RESEND][PATCH] drm/prime: drop reference on imported dma-buf come from gem

2012-11-15 Thread Seung-Woo Kim
Increasing ref counts of both dma-buf and gem for imported dma-buf come from gem makes memory leak. release function of dma-buf cannot be called because f_count of dma-buf increased by importing gem and gem ref count cannot be decrease because of exported dma-buf. So I add dma_buf_put() for

[RESEND][PATCH] drm/prime: drop reference on imported dma-buf come from gem

2012-11-14 Thread Seung-Woo Kim
Increasing ref counts of both dma-buf and gem for imported dma-buf come from gem makes memory leak. release function of dma-buf cannot be called because f_count of dma-buf increased by importing gem and gem ref count cannot be decrease because of exported dma-buf. So I add dma_buf_put() for

[PATCH] drm/prime: drop reference on imported dma-buf come from gem

2012-11-03 Thread 김승우
Hi Jani, Sorry for late reply. On 2012? 09? 27? 22:43, Jani Nikula wrote: > On Thu, 27 Sep 2012, Seung-Woo Kim wrote: >> Increasing ref counts of both dma-buf and gem for imported dma-buf come from >> gem >> makes memory leak. release function of dma-buf cannot be called because >> f_count >>

Re: [PATCH] drm/prime: drop reference on imported dma-buf come from gem

2012-11-03 Thread 김승우
Hi Jani, Sorry for late reply. On 2012년 09월 27일 22:43, Jani Nikula wrote: On Thu, 27 Sep 2012, Seung-Woo Kim sw0312@samsung.com wrote: Increasing ref counts of both dma-buf and gem for imported dma-buf come from gem makes memory leak. release function of dma-buf cannot be called because

[PATCH] drm/prime: drop reference on imported dma-buf come from gem

2012-09-27 Thread Jani Nikula
On Thu, 27 Sep 2012, Seung-Woo Kim wrote: > Increasing ref counts of both dma-buf and gem for imported dma-buf come from > gem > makes memory leak. release function of dma-buf cannot be called because > f_count > of dma-buf increased by importing gem and gem ref count cannot be decrease >

[PATCH] drm/prime: drop reference on imported dma-buf come from gem

2012-09-27 Thread 김승우
Hi Rob, On 2012? 09? 27? 15:52, Rob Clark wrote: > fwiw, I had a similar patch: > > https://patchwork.kernel.org/patch/1229161/ Yes, I already check your patch and even my patch's title is a bit from your patch. I thought locking issue blocks your patch, so I sent simple fixes on current

[PATCH] drm/prime: drop reference on imported dma-buf come from gem

2012-09-27 Thread Seung-Woo Kim
Increasing ref counts of both dma-buf and gem for imported dma-buf come from gem makes memory leak. release function of dma-buf cannot be called because f_count of dma-buf increased by importing gem and gem ref count cannot be decrease because of exported dma-buf. So I add dma_buf_put() for

[PATCH] drm/prime: drop reference on imported dma-buf come from gem

2012-09-27 Thread Rob Clark
On Thu, Sep 27, 2012 at 9:14 AM, ??? wrote: > Hi Rob, > > On 2012? 09? 27? 15:52, Rob Clark wrote: >> fwiw, I had a similar patch: >> >> https://patchwork.kernel.org/patch/1229161/ > > Yes, I already check your patch and even my patch's title is a bit from > your patch. > > I thought locking

[PATCH] drm/prime: drop reference on imported dma-buf come from gem

2012-09-27 Thread Rob Clark
fwiw, I had a similar patch: https://patchwork.kernel.org/patch/1229161/ although it was on top of some locking fixes from Daniel (which I think are also needed): https://patchwork.kernel.org/patch/1227251/ although that seemed to cause/trigger some explosions which I think still need to be

[PATCH] drm/prime: drop reference on imported dma-buf come from gem

2012-09-27 Thread Seung-Woo Kim
Increasing ref counts of both dma-buf and gem for imported dma-buf come from gem makes memory leak. release function of dma-buf cannot be called because f_count of dma-buf increased by importing gem and gem ref count cannot be decrease because of exported dma-buf. So I add dma_buf_put() for

Re: [PATCH] drm/prime: drop reference on imported dma-buf come from gem

2012-09-27 Thread Rob Clark
fwiw, I had a similar patch: https://patchwork.kernel.org/patch/1229161/ although it was on top of some locking fixes from Daniel (which I think are also needed): https://patchwork.kernel.org/patch/1227251/ although that seemed to cause/trigger some explosions which I think still need to be

Re: [PATCH] drm/prime: drop reference on imported dma-buf come from gem

2012-09-27 Thread 김승우
Hi Rob, On 2012년 09월 27일 15:52, Rob Clark wrote: fwiw, I had a similar patch: https://patchwork.kernel.org/patch/1229161/ Yes, I already check your patch and even my patch's title is a bit from your patch. I thought locking issue blocks your patch, so I sent simple fixes on current state.

Re: [PATCH] drm/prime: drop reference on imported dma-buf come from gem

2012-09-27 Thread Rob Clark
On Thu, Sep 27, 2012 at 9:14 AM, 김승우 sw0312@samsung.com wrote: Hi Rob, On 2012년 09월 27일 15:52, Rob Clark wrote: fwiw, I had a similar patch: https://patchwork.kernel.org/patch/1229161/ Yes, I already check your patch and even my patch's title is a bit from your patch. I thought

Re: [PATCH] drm/prime: drop reference on imported dma-buf come from gem

2012-09-27 Thread Jani Nikula
On Thu, 27 Sep 2012, Seung-Woo Kim sw0312@samsung.com wrote: Increasing ref counts of both dma-buf and gem for imported dma-buf come from gem makes memory leak. release function of dma-buf cannot be called because f_count of dma-buf increased by importing gem and gem ref count cannot be

[PATCH] drm/prime: drop reference on imported dma-buf

2012-09-05 Thread Daniel Vetter
On Tue, Sep 04, 2012 at 05:32:21PM -0500, Rob Clark wrote: > Dave, I just noticed that I still have this patch locally, but don't > see it in drm-next.. so just checking that it didn't get forgotten My locking fixes blew up :( -Daniel > > BR, > -R > > On Tue, Jul 24, 2012 at 3:05 AM, Daniel

[PATCH] drm/prime: drop reference on imported dma-buf

2012-09-05 Thread Rob Clark
On Wed, Sep 5, 2012 at 4:02 AM, Daniel Vetter wrote: > On Tue, Sep 04, 2012 at 05:32:21PM -0500, Rob Clark wrote: >> Dave, I just noticed that I still have this patch locally, but don't >> see it in drm-next.. so just checking that it didn't get forgotten > > My locking fixes blew up :( oh,

Re: [PATCH] drm/prime: drop reference on imported dma-buf

2012-09-05 Thread Daniel Vetter
On Tue, Sep 04, 2012 at 05:32:21PM -0500, Rob Clark wrote: Dave, I just noticed that I still have this patch locally, but don't see it in drm-next.. so just checking that it didn't get forgotten My locking fixes blew up :( -Daniel BR, -R On Tue, Jul 24, 2012 at 3:05 AM, Daniel Vetter

Re: [PATCH] drm/prime: drop reference on imported dma-buf

2012-09-05 Thread Rob Clark
On Wed, Sep 5, 2012 at 4:02 AM, Daniel Vetter dan...@ffwll.ch wrote: On Tue, Sep 04, 2012 at 05:32:21PM -0500, Rob Clark wrote: Dave, I just noticed that I still have this patch locally, but don't see it in drm-next.. so just checking that it didn't get forgotten My locking fixes blew up :(

[PATCH] drm/prime: drop reference on imported dma-buf

2012-09-04 Thread Rob Clark
Dave, I just noticed that I still have this patch locally, but don't see it in drm-next.. so just checking that it didn't get forgotten BR, -R On Tue, Jul 24, 2012 at 3:05 AM, Daniel Vetter wrote: > On Tue, Jul 24, 2012 at 1:07 AM, Rob Clark wrote: >> From: Rob Clark >> >> The GEM handle

Re: [PATCH] drm/prime: drop reference on imported dma-buf

2012-09-04 Thread Rob Clark
Dave, I just noticed that I still have this patch locally, but don't see it in drm-next.. so just checking that it didn't get forgotten BR, -R On Tue, Jul 24, 2012 at 3:05 AM, Daniel Vetter dan...@ffwll.ch wrote: On Tue, Jul 24, 2012 at 1:07 AM, Rob Clark rob.cl...@linaro.org wrote: From: Rob

[PATCH] drm/prime: drop reference on imported dma-buf

2012-07-24 Thread Daniel Vetter
On Tue, Jul 24, 2012 at 1:07 AM, Rob Clark wrote: > From: Rob Clark > > The GEM handle takes the reference. If a driver is actually importing a > foreign dmabuf, rather than just re-importing it's own dmabuf, it needs > to do a get_dma_buf(). > > Signed-off-by: Rob Clark [Maybe mention that

[PATCH] drm/prime: drop reference on imported dma-buf

2012-07-24 Thread Paul Menzel
Dear Rob, Am Montag, den 23.07.2012, 18:07 -0500 schrieb Rob Clark: > From: Rob Clark > > The GEM handle takes the reference. If a driver is actually importing a > foreign dmabuf, rather than just re-importing it's own dmabuf, it needs > to do a get_dma_buf(). > > Signed-off-by: Rob Clark >

Re: [PATCH] drm/prime: drop reference on imported dma-buf

2012-07-24 Thread Paul Menzel
Dear Rob, Am Montag, den 23.07.2012, 18:07 -0500 schrieb Rob Clark: From: Rob Clark r...@ti.com The GEM handle takes the reference. If a driver is actually importing a foreign dmabuf, rather than just re-importing it's own dmabuf, it needs to do a get_dma_buf(). Signed-off-by: Rob

Re: [PATCH] drm/prime: drop reference on imported dma-buf

2012-07-24 Thread Daniel Vetter
On Tue, Jul 24, 2012 at 1:07 AM, Rob Clark rob.cl...@linaro.org wrote: From: Rob Clark r...@ti.com The GEM handle takes the reference. If a driver is actually importing a foreign dmabuf, rather than just re-importing it's own dmabuf, it needs to do a get_dma_buf(). Signed-off-by: Rob Clark

[PATCH] drm/prime: drop reference on imported dma-buf

2012-07-23 Thread Rob Clark
From: Rob Clark The GEM handle takes the reference. If a driver is actually importing a foreign dmabuf, rather than just re-importing it's own dmabuf, it needs to do a get_dma_buf(). Signed-off-by: Rob Clark --- drivers/gpu/drm/drm_prime.c|7 +++

[PATCH] drm/prime: drop reference on imported dma-buf

2012-07-23 Thread Rob Clark
From: Rob Clark r...@ti.com The GEM handle takes the reference. If a driver is actually importing a foreign dmabuf, rather than just re-importing it's own dmabuf, it needs to do a get_dma_buf(). Signed-off-by: Rob Clark r...@ti.com --- drivers/gpu/drm/drm_prime.c|7 +++