From: Shuah Khan <shuahkh@osg.samsung.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: "Linux Media Mailing List" <linux-media@vger.kernel.org>,
"Mauro Carvalho Chehab" <mchehab@infradead.org>,
"Jaroslav Kysela" <perex@perex.cz>,
"Takashi Iwai" <tiwai@suse.com>,
"Hans Verkuil" <hans.verkuil@cisco.com>,
"Javier Martinez Canillas" <javier@osg.samsung.com>,
"Rafael Lourenço de Lima Chehab" <chehabrafael@gmail.com>,
alsa-devel@alsa-project.org,
"Shuah Khan" <shuahkh@osg.samsung.com>
Subject: Re: [PATCH v2] [media] media-device: use kref for media_device instance
Date: Mon, 21 Mar 2016 07:42:34 -0600 [thread overview]
Message-ID: <56EFFA4A.6040002@osg.samsung.com> (raw)
In-Reply-To: <3052381.o5ho2okSRi@avalon>
On 03/21/2016 05:10 AM, Laurent Pinchart wrote:
> Hi Mauro,
>
> Thank you for the patch.
>
> On Friday 18 Mar 2016 21:42:16 Mauro Carvalho Chehab wrote:
>> Now that the media_device can be used by multiple drivers,
>> via devres, we need to be sure that it will be dropped only
>> when all drivers stop using it.
>
> I've discussed this with Shuah previously and I'm surprised to see that the
> problem hasn't been fixed : using devres for this purpose is just plain wrong.
> The empty media_device_release_devres() function should have given you a hint.
>
> What we need instead is a list of media devices indexed by struct device (for
> this use case) or by struct device_node (for DT use cases). It will both
> simplify the code and get rid of the devres abuse.
>
> Shuah, if I recall correctly you worked on implementing such a solution after
> our last discussion on the topic. Could you please update us on the status ?
>
It is work in progress. I have a working prototype for au0828 which is an easier
case. I am working on resolving a couple of issues to differentiate media devices
allocated using the global media device list vs. the ones embedded in the driver
data structures. We have many of those.
I had to put this work on the back burner to get the au0882 and snd-usb-audio
wrapped up. I can get the RFC patches on top of the au0882 and snd-usb-audio.
We can discuss them at the upcoming media summit.
> In the mean time, let's hold off on this patch, and merge a proper solution
> instead.
I think Mauro's restructure helps us with such differentiation and it will be
easy enough to change out devres to get media get API.
thanks,
-- Shuah
--
Shuah Khan
Sr. Linux Kernel Developer
Open Source Innovation Group
Samsung Research America (Silicon Valley)
shuahkh@osg.samsung.com | (970) 217-8978
next prev parent reply other threads:[~2016-03-21 13:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-19 0:42 [PATCH v2] [media] media-device: use kref for media_device instance Mauro Carvalho Chehab
2016-03-19 2:32 ` Shuah Khan
2016-03-21 11:10 ` Laurent Pinchart
2016-03-21 11:58 ` Mauro Carvalho Chehab
2016-03-21 13:52 ` Shuah Khan
2016-03-21 13:42 ` Shuah Khan [this message]
2016-03-23 9:15 ` Laurent Pinchart
2016-03-22 20:09 ` Shuah Khan
2016-03-23 16:57 ` Laurent Pinchart
2016-03-23 17:35 ` Mauro Carvalho Chehab
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=56EFFA4A.6040002@osg.samsung.com \
--to=shuahkh@osg.samsung.com \
--cc=alsa-devel@alsa-project.org \
--cc=chehabrafael@gmail.com \
--cc=hans.verkuil@cisco.com \
--cc=javier@osg.samsung.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=mchehab@osg.samsung.com \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
/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