diff options
author | Shuah Khan <shuah@kernel.org> | 2019-04-01 20:40:24 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-04-22 11:23:14 -0400 |
commit | bc81c1c796c7a3892ccd445f15a32e041c2174d6 (patch) | |
tree | f9d8ef8ab3feb5db611678ecc6178e5d3787e4cf /tools/testing/selftests/futex/functional | |
parent | 383b0e5b6ebb087bde22fbb5fcd9d567c5dbdb92 (diff) |
media: selftests: media_dev_allocator api test
Add a new test for Media Device Allocator API.
Media Device Allocator API to allows multiple drivers share a media device.
This API solves a very common use-case for media devices where one physical
device (an USB stick) provides both audio and video. When such media device
exposes a standard USB Audio class, a proprietary Video class, two or more
independent drivers will share a single physical USB bridge. In such cases,
it is necessary to coordinate access to the shared resource.
Using this API, drivers can allocate a media device with the shared struct
device as the key. Once the media device is allocated by a driver, other
drivers can get a reference to it. The media device is released when all
the references are released.
This test does a series of unbind/bind tests to make sure media device
is released correctly when it is no longer is use and when the last
driver releases the reference.
Signed-off-by: Shuah Khan <shuah@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'tools/testing/selftests/futex/functional')
0 files changed, 0 insertions, 0 deletions