-off-by: Shuah Khan <shua...@osg.samsung.com>
---
drivers/media/usb/au0828/au0828-core.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/drivers/media/usb/au0828/au0828-core.c
b/drivers/media/usb/au0828/au0828-core.c
index de9ab11..abdb956 100644
--- a/drivers/media/usb/au0828/
On 03/18/2016 03:52 AM, Mauro Carvalho Chehab wrote:
> Em Thu, 17 Mar 2016 16:46:36 -0600
> Shuah Khan <shua...@osg.samsung.com> escreveu:
>
>> When all drivers except usb-core driver is unbound, destroy the media device
>> resource. Other wise, media device resourc
Adding Takashi Iwai
On 03/16/2016 08:58 PM, Shuah Khan wrote:
> media_snd_stream_delete() fails to release resources during unbind. This
> leads to use-after-free in media_gobj_create() on a subsequent bind.
>
> [ 1445.086410] BUG: KASAN: use-after-free in media_gobj_create+0x3a1/0x4
] [] ? __slab_alloc+0x50/0x70
[ 1445.086878] [] ? media_snd_mixer_init+0x16c/0x500
[snd_usb_audio]
[ 1445.086884] [] ? kasan_unpoison_shadow+0x36/0x50
[ 1445.086890] [] ? kasan_unpoison_shadow+0x36/0x50
[ 1445.086895] [] ? kasan_kmalloc+0x5e/0x70
Signed-off-by: Shuah Khan <shua...@osg.samsung.
Fix to release stream resources from media_snd_device_delete() before
media device is unregistered. Without this change, stream resource free
is attempted after the media device is unregistered which would result
in use-after-free errors.
Signed-off-by: Shuah Khan <shua...@osg.samsung.
;
Looks good. Tested it doing bind/unbind, rmmod/modprobe on both
au0828 and snd-usb-audio drivers. Also generated graphs when after
bind/unbind, rmmod/modprobe. Graphs look good.
Tested-by: Shuah Khan <shua...@osg.samsung.com>
thanks,
-- Shuah
> ---
>
> v2: The kref is now used
On 03/11/2016 09:52 AM, Shuah Khan wrote:
> On 03/11/2016 09:34 AM, Mauro Carvalho Chehab wrote:
>> Em Fri, 11 Mar 2016 09:27:40 -0700
>> Shuah Khan <shua...@osg.samsung.com> escreveu:
>>
>>> On 03/11/2016 08:55 AM, Mauro Carvalho Chehab wrote:
>>>&g
On 03/11/2016 09:34 AM, Mauro Carvalho Chehab wrote:
> Em Fri, 11 Mar 2016 09:27:40 -0700
> Shuah Khan <shua...@osg.samsung.com> escreveu:
>
>> On 03/11/2016 08:55 AM, Mauro Carvalho Chehab wrote:
>>> For au0828_enable_source() to work, the tuner links should be
>
Disable tuner to demod link in au0828_media_device_register(). This step
should be done after dvb graph is created.
Signed-off-by: Shuah Khan <shua...@osg.samsung.com>
---
drivers/media/usb/au0828/au0828-core.c | 26 ++
drivers/media/usb/au0828/au0828-video.
On 03/28/2016 12:28 PM, Mauro Carvalho Chehab wrote:
> Hi Shuah,
>
> I reviewed the entire patch series, but I'm adding the comments only here,
> as the other patches are coherent with this one.
That is fine.
>
> Em Fri, 25 Mar 2016 22:38:42 -0600
> Shuah Khan <
On 03/28/2016 12:28 PM, Mauro Carvalho Chehab wrote:
> Em Fri, 25 Mar 2016 22:38:44 -0600
> Shuah Khan <shua...@osg.samsung.com> escreveu:
>
>> Add refcount to keep track of media device registrations to avoid release
>> of media device when one of the drivers does u
On 03/28/2016 12:28 PM, Mauro Carvalho Chehab wrote:
> Em Fri, 25 Mar 2016 22:38:43 -0600
> Shuah Khan <shua...@osg.samsung.com> escreveu:
>
>> Add Media Device Allocator API documentation.
>
> Please merge this with the previous patch.
Yes. I will merge them.
-
On 04/05/2016 12:10 AM, Takashi Iwai wrote:
> On Tue, 05 Apr 2016 05:35:55 +0200,
> Shuah Khan wrote:
>>
>> There are known problems with media device life time management. When media
>> device is released while an media ioctl is in progress, ioctls fail with
>> us
Remove Managed Media Interfaces:
media_device_get_devres()
media_device_find_devres()
Using these interfaces leads to use-after-free race conditions on the
shared media device during media device unregister by drivers using it.
Signed-off-by: Shuah Khan <shua...@osg.samsung.com>
---
d
On 03/19/2016 04:39 AM, Mauro Carvalho Chehab wrote:
> Em Fri, 18 Mar 2016 23:57:08 -0300
> Mauro Carvalho Chehab <mche...@osg.samsung.com> escreveu:
>
>> Em Fri, 18 Mar 2016 20:50:31 -0600
>> Shuah Khan <shua...@osg.samsung.com> escreveu:
>>
&
On 03/19/2016 06:10 AM, Mauro Carvalho Chehab wrote:
> Em Fri, 18 Mar 2016 20:50:31 -0600
> Shuah Khan <shua...@osg.samsung.com> escreveu:
>
>> Fix to release stream resources from media_snd_device_delete() before
>> media device is unregistered. Without this c
is released
in media_device_unregister().
Signed-off-by: Shuah Khan <shua...@osg.samsung.com>
---
drivers/media/media-device.c | 28 ++--
1 file changed, 22 insertions(+), 6 deletions(-)
diff --git a/drivers/media/media-device.c b/drivers/media/media-device.c
index 0
unregister()
would imply that there has to be some cleanup releasing resources.
I wouldn't make this change.
thanks,
-- Shuah
--
Shuah Khan
Sr. Linux Kernel Developer
Open Source Innovation Group
Samsung Research America (Silicon Valley)
shua...@osg.samsung.com | (970) 217-8978
--
To unsubscr
On 03/18/2016 08:12 AM, Javier Martinez Canillas wrote:
> Hello Shuah,
>
> On 03/18/2016 11:01 AM, Shuah Khan wrote:
>> On 03/18/2016 07:05 AM, Mauro Carvalho Chehab wrote:
>>> Now that media_device_unregister() also does a cleanup, rename it
>>> t
On 03/19/2016 07:31 AM, Shuah Khan wrote:
> On 03/19/2016 06:10 AM, Mauro Carvalho Chehab wrote:
>> Em Fri, 18 Mar 2016 20:50:31 -0600
>> Shuah Khan <shua...@osg.samsung.com> escreveu:
>>
>>> Fix to release stream resources from media_snd_device_delete() bef
/0x170
[ 260.993681] [] syscall_return_slowpath+0x16a/0x1a0
[ 260.993754] [] entry_SYSCALL_64_fastpath+0xa6/0xa8
Signed-off-by: Shuah Khan <shua...@osg.samsung.com>
---
drivers/media/usb/au0828/au0828-video.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/med
On 03/21/2016 10:01 PM, Shuah Khan wrote:
> On 03/19/2016 07:31 AM, Shuah Khan wrote:
>> On 03/19/2016 06:10 AM, Mauro Carvalho Chehab wrote:
>>> Em Fri, 18 Mar 2016 20:50:31 -0600
>>> Shuah Khan <shua...@osg.samsung.com> escreveu:
>>>
On 03/21/2016 10:04 PM, Shuah Khan wrote:
> au0828_v4l2_close() check for dev_state == DEV_DISCONNECTED will fail to
> detect the device disconnected state correctly, if au0828_v4l2_open() runs
> to set the DEV_INITIALIZED bit. A loop test of bind/unbind found this bug
> b
On 03/22/2016 07:03 AM, Shuah Khan wrote:
> On 03/21/2016 10:01 PM, Shuah Khan wrote:
>> On 03/19/2016 07:31 AM, Shuah Khan wrote:
>>> On 03/19/2016 06:10 AM, Mauro Carvalho Chehab wrote:
>>>> Em Fri, 18 Mar 2016 20:50:31 -0600
>>>> Shuah Khan <shua
't see any lock warnings on a
KASAN enabled kernel (lock testing enabled). No use-after-free errors
during these runs.
Ran device removal test and rmmod and modprobe tests on both drivers.
Generated graph after the runs and the graph looks good.
Reviewed-by: Shuah Khan <shua...@osg.samsung.com
Generated graph after the runs and the graph looks good.
Reviewed-by: Shuah Khan <shua...@osg.samsung.com>
Tested-by: Shuah Khan <shua...@osg.samsung.com>
thanks,
-- Shuah
> ---
> drivers/media/media-device.c | 48
> +++-
> include/med
ar/test with the
> bitops.
>
> Cc: sta...@vger.kernel.org
> Signed-off-by: Mauro Carvalho Chehab <mche...@osg.samsung.com>
> ---
> Shuah,
>
> Please test.
Looks good. Tested running bind/unbind au0828 loop for 1000 times.
Didn't see any problems and the v4l2_qu
On 03/22/2016 01:56 PM, Shuah Khan wrote:
> On 03/16/2016 06:04 AM, 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.
>>
>&
any lock warnings on a
KASAN enabled kernel (lock testing enabled). No use-after-free errors
during these runs.
Ran device removal test and rmmod and modprobe tests on both drivers.
Generated graph after the runs and the graph looks good.
Reviewed-by: Shuah Khan <shua...@osg.s
d.
For the au0828 and snd_usb_audio change:
Reviewed-by: Shuah Khan <shua...@osg.samsung.com>
Tested-by: Shuah Khan <shua...@osg.samsung.com>
thanks,
-- Shuah
> ---
> drivers/media/common/siano/smsdvb-main.c | 1 -
> drivers/media/media-device.c | 13
uns and the graph looks good.
Reviewed-by: Shuah Khan <shua...@osg.samsung.com>
Tested-by: Shuah Khan <shua...@osg.samsung.com>
thanks,
-- Shuah
>
> drivers/media/media-device.c | 117
> +
> drivers/media/usb/au0828/au0828-
o 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
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
On 03/16/2016 08:25 AM, Mauro Carvalho Chehab wrote:
> Em Wed, 16 Mar 2016 08:05:15 -0600
> Shuah Khan <shua...@osg.samsung.com> escreveu:
>
>> On 03/16/2016 06:04 AM, Mauro Carvalho Chehab wrote:
>>> Now that the media_device can be used by multiple drivers,
>
Add Media Device Allocator API documentation.
Signed-off-by: Shuah Khan <shua...@osg.samsung.com>
---
include/media/media-dev-allocator.h | 32
1 file changed, 32 insertions(+)
diff --git a/include/media/media-dev-allocator.h
b/include/media/med
early review to see if
this solution is viable.
Shuah Khan (4):
media: Add Media Device Allocator API
media: Add Media Device Allocator API documentation
media: Add refcount to keep track of media device registrations
drivers: change au0828, uvcvideo, snd-usb-audio to use Media Device
refcount. Change media_open() to get media device reference and put the
reference in media_release().
Signed-off-by: Shuah Khan <shua...@osg.samsung.com>
---
drivers/media/media-device.c | 53 +++
drivers/media/media-devnode.c | 3 +++
include/media
provides interfaces to allocate a refcounted media
device from system wide global list and maintains the state until the
last user of the media device releases it.
Signed-off-by: Shuah Khan <shua...@osg.samsung.com>
---
drivers/media/Makefile | 3 +-
drivers/media/med
Change au0828, uvcvideo, snd-usb-audio to use Media Device Allocator and
new Media Controller API media_device_unregister_put().
Signed-off-by: Shuah Khan <shua...@osg.samsung.com>
---
drivers/media/usb/au0828/au0828-core.c | 7 +--
drivers/media/usb/au0828/au0828.h | 1 +
d
]
[ 548.460792] PGD b820e067 PUD bb3df067 PMD 0
[ 548.465582] Oops: [#1] SMP
Signed-off-by: Shuah Khan <shua...@osg.samsung.com>
Reported-by: Olli Salonen <olli.salo...@iki.fi>
---
drivers/media/v4l2-core/v4l2-mc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/driver
Add missing prefixes for DVB, V4L, and ALSA interface types.
Signed-off-by: Shuah Khan <shua...@osg.samsung.com>
---
drivers/media/media-entity.c | 32
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/drivers/media/media-entity.c b/drivers
On 02/28/2016 07:46 PM, Laurent Pinchart wrote:
> Hi Shuah,
>
> Thank you for the patch.
>
> On Thursday 11 February 2016 16:41:19 Shuah Khan wrote:
>> Add Audio Function Entities
>>
>> Signed-off-by: Shuah Khan <shua...@osg.samsung.com>
>> ---
>&g
Add missing prefixes for DVB, V4L, and ALSA interface types.
Signed-off-by: Shuah Khan <shua...@osg.samsung.com>
---
Changes since v1:
Addresses Hans's comments on v1
drivers/media/media-entity.c | 34 +-
1 file changed, 17 insertions(+), 17 deletions(-)
Hi Hans,
Thanks for the review.
Mauro,
Do you prefer dvb-conditional-access or dvb-ca?
thanks,
-- Shuah
On 03/04/2016 01:25 AM, Hans Verkuil wrote:
>
>
> On 03/04/2016 01:08 AM, Shuah Khan wrote:
>> Add missing prefixes for DVB, V4L, and ALSA interface types.
>>
>>
representing the logical connection for a composite
> + signal. It corresponds to the logical input or output
> + associated with the a single signal that carries both
> + chrominance and luminance information (Y+C).
>
>
On 03/02/2016 01:41 PM, Dan Carpenter wrote:
> On Wed, Mar 02, 2016 at 09:50:31AM -0700, Shuah Khan wrote:
>> +mctl = kzalloc(sizeof(*mctl), GFP_KERNEL);
>> +if (!mctl)
>> +return -ENOMEM;
>> +
>> +mctl->media_dev = mdev;
>> +
created prior to registering the notify
handler.
Signed-off-by: Shuah Khan <shua...@osg.samsung.com>
Reported-by: Mauro Carvalho Chehab <mche...@osg.samsung.com>
---
Tested by black listing au0828 to force
snd_usb_audio to load first and then modprobe
au0828. Generated graphs to verify
On 03/03/2016 07:59 AM, Hans Verkuil wrote:
> On 02/12/16 00:41, Shuah Khan wrote:
>> Declare the interface types to be used on alsa for
>> the new G_TOPOLOGY ioctl.
>>
>> Signed-off-by: Shuah Khan <shua...@osg.samsung.com>
>> ---
>> drivers/media/med
Fix to use meaningful names instead of numbered goto labels
Signed-off-by: Shuah Khan <shua...@osg.samsung.com>
---
sound/usb/media.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/sound/usb/media.c b/sound/usb/media.c
index b87d5b3..ab6a642
On 03/03/2016 03:36 AM, Dan Carpenter wrote:
> On Wed, Mar 02, 2016 at 03:57:03PM -0700, Shuah Khan wrote:
>> On 03/02/2016 01:41 PM, Dan Carpenter wrote:
>>> On Wed, Mar 02, 2016 at 09:50:31AM -0700, Shuah Khan wrote:
>>>> + mctl = kzalloc(sizeof(*mctl),
On 03/03/2016 11:21 AM, Mauro Carvalho Chehab wrote:
> Em Wed, 2 Mar 2016 15:57:03 -0700
> Shuah Khan <shua...@osg.samsung.com> escreveu:
>
>> On 03/02/2016 01:41 PM, Dan Carpenter wrote:
>>> On Wed, Mar 02, 2016 at 09:50:31AM -0700, Shuah Khan wrote:
>&
On 03/03/2016 01:39 PM, Olli Salonen wrote:
> Hello Shuah,
>
> This patch seems to cause issues with my setup. Basically, when I try
> to tune to a channel, I get an oops. I'm using TechnoTrend CT2-4650
> PCIe DVB-T tuner (cx23885).
>
> Here's the oops:
>
> [ 548.44
On 03/03/2016 02:18 PM, Shuah Khan wrote:
> On 03/03/2016 01:39 PM, Olli Salonen wrote:
>> Hello Shuah,
>>
>> This patch seems to cause issues with my setup. Basically, when I try
>> to tune to a channel, I get an oops. I'm using TechnoTrend CT2-4650
>> PCIe DV
On 03/05/2016 03:00 AM, Mauro Carvalho Chehab wrote:
> Em Wed, 2 Mar 2016 09:50:31 -0700
> Shuah Khan <shua...@osg.samsung.com> escreveu:
>
>> Change ALSA driver to use Media Controller API to
>> share media resources with DVB and V4L2 drivers
>> on a AU08
On 03/07/2016 07:16 AM, Shuah Khan wrote:
> On 03/05/2016 03:00 AM, Mauro Carvalho Chehab wrote:
>> Em Wed, 2 Mar 2016 09:50:31 -0700
>> Shuah Khan <shua...@osg.samsung.com> escreveu:
>>
>>> Change ALSA driver to use Media Controller API to
>>> sh
On 03/05/2016 03:00 AM, Mauro Carvalho Chehab wrote:
> Em Wed, 2 Mar 2016 09:50:31 -0700
> Shuah Khan <shua...@osg.samsung.com> escreveu:
>
>> Change ALSA driver to use Media Controller API to
>> share media resources with DVB and V4L2 drivers
>> on a AU08
On 03/05/2016 03:00 AM, Mauro Carvalho Chehab wrote:
> Em Wed, 2 Mar 2016 09:50:31 -0700
> Shuah Khan <shua...@osg.samsung.com> escreveu:
>
>> Change ALSA driver to use Media Controller API to
>> share media resources with DVB and V4L2 drivers
>> on a AU08
;graph_obj.mdev;
> struct au0828_dev *dev;
> @@ -453,8 +449,8 @@ static void au0828_disable_source(struct media_entity
> *entity)
>
> end:
> mutex_unlock(>graph_mutex);
> -#endif
> }
> +#endif
>
> static int au0828_media_device_register(struct au0828_de
register count.
Change media_open() to get media device reference and put the reference
in media_release().
Signed-off-by: Shuah Khan <shua...@osg.samsung.com>
---
drivers/media/media-device.c | 49 ++-
drivers/media/media-devnode.
is removed and then ioctls fail when cdev_get() looks
for the owning module as au0828 is very often the module that owns the
media devnode. This is a cdev related issue that needs to be resolved and
Media Device Allocator can't solve this one.
Shuah Khan (5):
media: Add Media Device
provides interfaces to allocate a refcounted media
device instance from system wide global list and maintains the state until
the last user of the media device releases it.
Signed-off-by: Shuah Khan <shua...@osg.samsung.com>
---
drivers/media/Makefile | 3 +-
drivers/media/med
Change uvcvideo to use Media Device Allocator API and new Media Controller
media_device_unregister_put() interface.
Signed-off-by: Shuah Khan <shua...@osg.samsung.com>
---
drivers/media/usb/uvc/uvc_driver.c | 36 ++--
drivers/media/usb/uvc/uvcvideo.h | 3
snd_usb_hw_free(). If resource is busy, -EBUSY is returned.
Media Controller API specific cleanup is done in usb_audio_disconnect().
Signed-off-by: Shuah Khan <shua...@osg.samsung.com>
---
Changes since the revert:
- Consolidated fixes to regressions in this patch.
- Tested on a USB Audio device in ad
Change au0828 to use Media Device Allocator API and new Media Controller
media_device_unregister_put() interface. Fix to unregister entity_notify
hook.
Signed-off-by: Shuah Khan <shua...@osg.samsung.com>
---
drivers/media/usb/au0828/au0828-core.c | 40 --
d
://patchwork.linuxtv.org/patch/33441/
Please include the above fix in your pull request for rc2
thanks,
-- Shuah
--
Shuah Khan
Sr. Linux Kernel Developer
Open Source Innovation Group
Samsung Research America (Silicon Valley)
shua...@osg.samsung.com
--
To unsubscribe from this list: send the line
On 03/26/2016 06:50 AM, Joe Perches wrote:
> On Fri, 2016-03-25 at 22:38 -0600, Shuah Khan wrote:
>> Add Media Device Allocator API to manage Media Device life time problems.
>> There are known problems with media device life time management. When media
>> device is released
l/2016/3/15/238
thanks,
-- Shuah
>
> When I attach USB sound card to USB hub following output appears in dmesg
> output:
>
> [ 83.074063] usb 3-6: new high-speed USB device number 10 using xhci_hcd
> [ 83.239600] usb 3-6: New USB device found, idVendor=041e, idProduct=322c
ri Ailus <sakari.ai...@linux.intel.com>
>
Please add my
Ran bind/unbind loop test on both au0828 and snd_usb_audio. On au08282, ran into
the media device lifetime related use-after-free which is a known issue present
in older releases. I did include the following bug fix for my testing:
2_dev.ctrl_handler = >v4l2_ctrl_hdl;
thanks,
-- Shuah
--
Shuah Khan
Sr. Linux Kernel Developer
Open Source Innovation Group
Samsung Research America (Silicon Valley)
shua...@osg.samsung.com
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a mes
device_register().
>
> Found by Linux Driver Verification project (linuxtesting.org).
>
> Signed-off-by: Alexey Khoroshilov <khoroshi...@ispras.ru>
I sent a fix in for this a few weeks ago:
https://lkml.org/lkml/2016/3/28/453
thanks,
-- Shuah
> ---
> drivers/media/usb/au0828/au082
media_open() releases media_devnode_lock before open is complete. Hold
the lock to call mdev->fops->open and release at the end.
Signed-off-by: Shuah Khan <shua...@osg.samsung.com>
---
drivers/media/media-devnode.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
On 04/28/2016 05:41 AM, Mauro Carvalho Chehab wrote:
> Em Wed, 27 Apr 2016 16:20:56 -0600
> Shuah Khan <shuah...@samsung.com> escreveu:
>
>> On 03/24/2016 05:37 AM, Mauro Carvalho Chehab wrote:
>>> Em Thu, 24 Mar 2016 10:24:44 +0200
>>> Laurent Pinc
I can base my work on it.
Lars gave a few comments on the patch I sent out in the code that makes
devnode dynamic which are relevant to be folded into your patch. Added
Lars to this thread.
P.S: removed alsa folks and alsa list and added linux-media
thanks,
-- Shuah
>>
>> We have the e
On 04/27/2016 10:43 AM, Lars-Peter Clausen wrote:
> Looks mostly good, a few comments.
>
> On 04/27/2016 05:08 AM, Shuah Khan wrote:
> [...]
>> @@ -428,7 +428,7 @@ static long media_device_ioctl(struct file *filp,
>> unsigned int cmd,
>>
] [] ? __fget_light+0x139/0x200
[ 472.432358] [] SyS_ioctl+0x79/0x90
[ 472.432381] [] entry_SYSCALL_64_fastpath+0x18/0xa8
Signed-off-by: Shuah Khan <shua...@osg.samsung.com>
---
drivers/media/media-device.c | 32
drivers/media/media-dev
Hi Mauro,
On 04/27/2016 03:55 AM, Mauro Carvalho Chehab wrote:
> Hi Shuah,
>
> Good work! I have a few notes below.
>
> Em Tue, 26 Apr 2016 21:08:32 -0600
> Shuah Khan <shua...@osg.samsung.com> escreveu:
>
>> When driver unbind is run while media_ioctl is in
On 04/28/2016 01:19 AM, Lars-Peter Clausen wrote:
> On 04/27/2016 11:56 PM, Shuah Khan wrote:
>>>>dev_dbg(mdev->dev, "Media device unregistered\n");
>>>> }
>>>> diff --git a/drivers/media/media-devnode.c b/drivers/media/media-devnode.c
&
Hi Mauro,
On 04/28/2016 09:04 AM, Mauro Carvalho Chehab wrote:
> Em Thu, 28 Apr 2016 08:50:59 -0600
> Shuah Khan <shua...@osg.samsung.com> escreveu:
>
>> On 04/28/2016 05:41 AM, Mauro Carvalho Chehab wrote:
>>> Em Wed, 27 Apr 2016 16:20:56 -0600
>>> Shu
the references are released.
Signed-off-by: Shuah Khan <shua...@osg.samsung.com>
---
drivers/media/Makefile | 3 +-
drivers/media/media-dev-allocator.c | 120
include/media/media-dev-allocator.h | 85 +
3 files c
*_allocate().
- Dropped media_device_unregister_put(). au0828 calls media_device_delete()
instead.
Shuah Khan (2):
media: Media Device Allocator API
media: change au0828 to use Media Device Allocator API
drivers/media/Makefile | 3 +-
drivers/media/media-dev-allocator.c| 120
Change au0828 to use Media Device Allocator API to allocate media device
with the parent usb struct device as the key, so it can be shared with the
snd usb audio driver.
Signed-off-by: Shuah Khan <shua...@osg.samsung.com>
---
drivers/media/usb/au0828/au0828-core.c | 12
d
On 05/23/2016 05:26 AM, Hans Verkuil wrote:
> Hi Shuah,
>
> Some comments below:
Thanks for the review.
>
> On 05/13/2016 07:09 PM, Shuah Khan wrote:
>> Media Device Allocator API to allows multiple drivers share a media device.
>> Using this API, drivers
On 05/23/2016 05:39 AM, Hans Verkuil wrote:
> On 05/13/2016 07:09 PM, Shuah Khan wrote:
>> Add media_device_unregister_put() interface to release reference to a media
>> device allocated using the Media Device Allocator API. The media device is
>> unregistered and freed
kept separate instead of merged into struct media_device (I don't
>> remember why though).
>>
>> There are two possible fixes for this problem:
>>
>> 1. Handling structure lifetime in drivers with propagation of the release
>> callback from media device to drivers.
and
freed in the kref put handler.
Signed-off-by: Shuah Khan <shua...@osg.samsung.com>
---
drivers/media/media-device.c | 11 +++
include/media/media-device.h | 15 +++
2 files changed, 26 insertions(+)
diff --git a/drivers/media/media-device.c b/drivers/media/media-de
Change au0828 to use Media Device Allocator API to allocate media device
with the parent usb struct device as the key, so it can be shared with the
snd usb audio driver.
Signed-off-by: Shuah Khan <shua...@osg.samsung.com>
---
drivers/media/usb/au0828/au0828-core.c | 12
d
the references are released.
This patch series has been tested with au0828 and snd-usb-audio drivers.
snd-usb-audio patch isn't included in this series. Once this patch series
is reviews and gets a stable state, I will send out the snd-usb-audio
patch.
Shuah Khan (3):
media: Media Device
the references are released.
Signed-off-by: Shuah Khan <shua...@osg.samsung.com>
---
drivers/media/Makefile | 3 +-
drivers/media/media-dev-allocator.c | 139
include/media/media-dev-allocator.h | 118 ++
3
: [ 193.601360] [] ? exit_to_usermode_loop+0xe7/0x170
kernel: [ 193.601368] [] exit_to_usermode_loop+0x120/0x170
kernel: [ 193.601376] [] syscall_return_slowpath+0x16a/0x1a0
kernel: [ 193.601386] [] entry_SYSCALL_64_fastpath+0xa6/0xa8
Signed-off-by: Shuah Khan <shua...@osg.samsung.
] [] ? exit_to_usermode_loop+0xe7
kernel: [ 193.601368] [] exit_to_usermode_loop+0x120
kernel: [ 193.601376] [] syscall_return_slowpath+0x16a
kernel: [ 193.601386] [] entry_SYSCALL_64_fastpath+0xa6
Signed-off-by: Shuah Khan <shua...@osg.samsung.com>
---
Changes since v1:
- Addressed
On 05/02/2016 04:16 AM, Lars-Peter Clausen wrote:
> On 04/30/2016 12:37 AM, Shuah Khan wrote:
> [...]
>> diff --git a/include/media/media-devnode.h b/include/media/media-devnode.h
>> index 5bb3b0e..ce9b051 100644
>> --- a/include/media/media-devnode.h
>> +++ b
rivers referencing graph_mutex
directly?
thanks,
-- Shuah
>
> Signed-off-by: Sakari Ailus <sakari.ai...@linux.intel.com>
> ---
> drivers/media/media-device.c | 47
> ++--
> 1 file changed, 28 insertions(+), 19 deletions(-)
>
&
] [] ? exit_to_usermode_loop+0xe7
kernel: [ 193.601368] [] exit_to_usermode_loop+0x120
kernel: [ 193.601376] [] syscall_return_slowpath+0x16a
kernel: [ 193.601386] [] entry_SYSCALL_64_fastpath+0xa6
Signed-off-by: Shuah Khan <shua...@osg.samsung.com>
---
Changes since v2:
- Changed pr_info()s to pr_debug()s
C
On 04/14/2016 03:08 PM, Mauro Carvalho Chehab wrote:
> Em Thu, 14 Apr 2016 10:31:20 -0600
> Shuah Khan <shua...@osg.samsung.com> escreveu:
>
>> media_dev alloc error path does kfree when alloc fails. Fix it to not call
>> kfree when media_dev alloc fails.
>
> No
media_dev alloc error path does kfree when alloc fails. Fix it to not call
kfree when media_dev alloc fails.
Signed-off-by: Shuah Khan <shua...@osg.samsung.com>
---
drivers/media/pci/saa7134/saa7134-core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/med
On 07/14/2016 06:46 AM, Javier Martinez Canillas wrote:
> Hello Shuah,
>
> On 07/12/2016 08:33 PM, Shuah Khan wrote:
>> Removing unnecessary error messages as appropriate error code is returned.
>>
>> Signed-off-by: Shuah Khan <shua...@osg.samsung.com>
>>
Removed unnecessary error message as appropriate error code is returned.
Changed error message into a debug.
Signed-off-by: Shuah Khan <shua...@osg.samsung.com>
---
Changes since v1:
- Changed EBUSY error message to a debug message.
drivers/media/platform/s5p-mfc/s5p_mfc.c | 3 +--
Missing blank lines after declarations are making it hard to read the
code. Fix them and also fix other checkpatch warnings at the same time.
Signed-off-by: Shuah Khan <shua...@osg.samsung.com>
---
drivers/media/platform/s5p-jpeg/jpeg-core.c | 13 ++---
1 file changed, 10 inse
Removing unnecessary error messages as appropriate error code is returned.
Signed-off-by: Shuah Khan <shua...@osg.samsung.com>
---
drivers/media/platform/s5p-mfc/s5p_mfc.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c
b/drivers/media/platfo
ications.? This changes
the behavior and user applications now get dmabuf map error at a
later stage in the call sequence.
The change itself looks consistent with the change described.
-- Shuah
>
> Best regards,
> Javier
>
> drivers/media/v4l2-core/videobuf2-core.c | 88
>
401 - 500 of 661 matches
Mail list logo