Hello Mauro,

On 12/15/2016 09:37 AM, Mauro Carvalho Chehab wrote:

[snip]

> 
> What happens is that omap3isp driver calls media_device_unregister()
> too early. Right now, it is called at omap3isp_video_device_release(),
> with happens when a driver unbind is ordered by userspace, and not after
> the last usage of all /dev/video?? devices.
> 
> There are two possible fixes:
> 
> 1) at omap3isp_video_device_release(), streamoff all streams and mark
> that the media device will be gone.
> 
> 2) instead of using video_device_release_empty for the video->video.release,
> create a omap3isp_video_device_release() that will call
> media_device_unregister() when destroying the last /dev/video?? devnode.
>

There's also option (3), to have a proper refcounting to make sure that
the media device node is not freed until all references to it are gone.

I understand that's what Sakari's RFC patches do. I'll try to make some
time tomorrow to test and review his patches.
 
Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America
--
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

Reply via email to