From: 김승우 <sw0312.kim@samsung.com>
To: Dave Airlie <airlied@gmail.com>
Cc: daniel.vetter@ffwll.ch, dri-devel@lists.freedesktop.org,
rob.clark@linaro.org, kyungmin.park@samsung.com,
alexander.deucher@amd.com
Subject: Re: [PATCH] drm/prime: drop reference on imported dma-buf come from gem
Date: Tue, 18 Dec 2012 15:59:07 +0900 [thread overview]
Message-ID: <50D0143B.1080702@samsung.com> (raw)
In-Reply-To: <CAPM=9tymVti=X=7s4CqJ1QqoJ6Rx3O_jgdV8Zk7ibNcgSHFJsQ@mail.gmail.com>
Hi Dave,
On 2012년 12월 18일 15:30, Dave Airlie wrote:
> On Thu, Sep 27, 2012 at 4:30 PM, Seung-Woo Kim <sw0312.kim@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 decrease
>> because of exported dma-buf.
>>
>> So I add dma_buf_put() for imported gem come from its own gem into each drivers
>> having prime_import and prime_export capabilities. With this, only gem ref
>> count is increased if importing gem exported from gem of same driver.
>
> Okay its taken me a while to circle around and get back to this, but
> yes I admit this is needed, but I hate implementing it like this
>
> But I think I'll push it and work out a cleaner solution, I should
> also go back and look at the older patches.
I want to also report some strange thing in dma-buf prime export.
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);
Best Regards,
- Seung-Woo Kim
>
> Dave.
>
--
Seung-Woo Kim
Samsung Software R&D Center
--
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2012-12-18 6:59 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-27 6:30 [PATCH] drm/prime: drop reference on imported dma-buf come from gem Seung-Woo Kim
2012-09-27 6:52 ` Rob Clark
2012-09-27 7:14 ` 김승우
2012-09-27 7:38 ` Rob Clark
2012-09-27 13:43 ` Jani Nikula
2012-11-03 7:59 ` 김승우
2012-11-15 3:52 ` [RESEND][PATCH] " Seung-Woo Kim
2012-11-19 8:40 ` Inki Dae
2012-11-19 10:27 ` Maarten Lankhorst
2012-11-20 1:03 ` 김승우
2012-11-20 10:26 ` Maarten Lankhorst
2012-11-21 5:28 ` 김승우
2012-12-18 6:30 ` [PATCH] " Dave Airlie
2012-12-18 6:59 ` 김승우 [this message]
2012-12-20 0:48 ` Dave Airlie
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=50D0143B.1080702@samsung.com \
--to=sw0312.kim@samsung.com \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=kyungmin.park@samsung.com \
--cc=rob.clark@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox