xref: /linux/Documentation/driver-api/media/maintainer-entry-profile.rst (revision 03ab8e6297acd1bc0eedaa050e2a1635c576fd11)
186ee6729SMauro Carvalho ChehabMedia Subsystem Profile
286ee6729SMauro Carvalho Chehab=======================
386ee6729SMauro Carvalho Chehab
486ee6729SMauro Carvalho ChehabOverview
586ee6729SMauro Carvalho Chehab--------
686ee6729SMauro Carvalho Chehab
786ee6729SMauro Carvalho ChehabThe media subsystem covers support for a variety of devices: stream
886ee6729SMauro Carvalho Chehabcapture, analog and digital TV streams, cameras, remote controllers, HDMI CEC
986ee6729SMauro Carvalho Chehaband media pipeline control.
1086ee6729SMauro Carvalho Chehab
1186ee6729SMauro Carvalho ChehabIt covers, mainly, the contents of those directories:
1286ee6729SMauro Carvalho Chehab
1386ee6729SMauro Carvalho Chehab  - drivers/media
1486ee6729SMauro Carvalho Chehab  - drivers/staging/media
1586ee6729SMauro Carvalho Chehab  - Documentation/admin-guide/media
1686ee6729SMauro Carvalho Chehab  - Documentation/driver-api/media
1786ee6729SMauro Carvalho Chehab  - Documentation/userspace-api/media
1886ee6729SMauro Carvalho Chehab  - Documentation/devicetree/bindings/media/\ [1]_
1986ee6729SMauro Carvalho Chehab  - include/media
2086ee6729SMauro Carvalho Chehab
2186ee6729SMauro Carvalho Chehab.. [1] Device tree bindings are maintained by the
2286ee6729SMauro Carvalho Chehab       OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS maintainers
2386ee6729SMauro Carvalho Chehab       (see the MAINTAINERS file). So, changes there must be reviewed
2486ee6729SMauro Carvalho Chehab       by them before being merged via the media subsystem's development
2586ee6729SMauro Carvalho Chehab       tree.
2686ee6729SMauro Carvalho Chehab
2786ee6729SMauro Carvalho ChehabBoth media userspace and Kernel APIs are documented and the documentation
2886ee6729SMauro Carvalho Chehabmust be kept in sync with the API changes. It means that all patches that
2986ee6729SMauro Carvalho Chehabadd new features to the subsystem must also bring changes to the
3086ee6729SMauro Carvalho Chehabcorresponding API files.
3186ee6729SMauro Carvalho Chehab
3286ee6729SMauro Carvalho ChehabDue to the size and wide scope of the media subsystem, media's
3386ee6729SMauro Carvalho Chehabmaintainership model is to have sub-maintainers that have a broad
3486ee6729SMauro Carvalho Chehabknowledge of a specific aspect of the subsystem. It is the sub-maintainers'
3586ee6729SMauro Carvalho Chehabtask to review the patches, providing feedback to users if the patches are
3686ee6729SMauro Carvalho Chehabfollowing the subsystem rules and are properly using the media kernel and
3786ee6729SMauro Carvalho Chehabuserspace APIs.
3886ee6729SMauro Carvalho Chehab
3986ee6729SMauro Carvalho ChehabPatches for the media subsystem must be sent to the media mailing list
4086ee6729SMauro Carvalho Chehabat linux-media@vger.kernel.org as plain text only e-mail. Emails with
4186ee6729SMauro Carvalho ChehabHTML will be automatically rejected by the mail server. It could be wise
4286ee6729SMauro Carvalho Chehabto also copy the sub-maintainer(s).
4386ee6729SMauro Carvalho Chehab
4486ee6729SMauro Carvalho ChehabMedia's workflow is heavily based on Patchwork, meaning that, once a patch
4586ee6729SMauro Carvalho Chehabis submitted, the e-mail will first be accepted by the mailing list
4686ee6729SMauro Carvalho Chehabserver, and, after a while, it should appear at:
4786ee6729SMauro Carvalho Chehab
4886ee6729SMauro Carvalho Chehab   - https://patchwork.linuxtv.org/project/linux-media/list/
4986ee6729SMauro Carvalho Chehab
5086ee6729SMauro Carvalho ChehabIf it doesn't automatically appear there after a few minutes, then
5186ee6729SMauro Carvalho Chehabprobably something went wrong on your submission. Please check if the
5286ee6729SMauro Carvalho Chehabemail is in plain text\ [2]_ only and if your emailer is not mangling
5386ee6729SMauro Carvalho Chehabwhitespaces before complaining or submitting them again.
5486ee6729SMauro Carvalho Chehab
5586ee6729SMauro Carvalho ChehabYou can check if the mailing list server accepted your patch, by looking at:
5686ee6729SMauro Carvalho Chehab
5786ee6729SMauro Carvalho Chehab   - https://lore.kernel.org/linux-media/
5886ee6729SMauro Carvalho Chehab
5986ee6729SMauro Carvalho Chehab.. [2] If your email contains HTML, the mailing list server will simply
6086ee6729SMauro Carvalho Chehab       drop it, without any further notice.
6186ee6729SMauro Carvalho Chehab
6286ee6729SMauro Carvalho Chehab
6386ee6729SMauro Carvalho ChehabMedia maintainers
6486ee6729SMauro Carvalho Chehab+++++++++++++++++
6586ee6729SMauro Carvalho Chehab
6686ee6729SMauro Carvalho ChehabAt the media subsystem, we have a group of senior developers that
6786ee6729SMauro Carvalho Chehabare responsible for doing the code reviews at the drivers (also known as
6886ee6729SMauro Carvalho Chehabsub-maintainers), and another senior developer responsible for the
6986ee6729SMauro Carvalho Chehabsubsystem as a whole. For core changes, whenever possible, multiple
7086ee6729SMauro Carvalho Chehabmedia maintainers do the review.
7186ee6729SMauro Carvalho Chehab
7286ee6729SMauro Carvalho ChehabThe media maintainers that work on specific areas of the subsystem are:
7386ee6729SMauro Carvalho Chehab
74*fd2eda71SSean Young- Remote Controllers (infrared):
7586ee6729SMauro Carvalho Chehab    Sean Young <sean@mess.org>
7686ee6729SMauro Carvalho Chehab
7786ee6729SMauro Carvalho Chehab- HDMI CEC:
7886ee6729SMauro Carvalho Chehab    Hans Verkuil <hverkuil@xs4all.nl>
7986ee6729SMauro Carvalho Chehab
8086ee6729SMauro Carvalho Chehab- Media controller drivers:
8186ee6729SMauro Carvalho Chehab    Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8286ee6729SMauro Carvalho Chehab
8386ee6729SMauro Carvalho Chehab- ISP, v4l2-async, v4l2-fwnode, v4l2-flash-led-class and Sensor drivers:
8486ee6729SMauro Carvalho Chehab    Sakari Ailus <sakari.ailus@linux.intel.com>
8586ee6729SMauro Carvalho Chehab
8686ee6729SMauro Carvalho Chehab- V4L2 drivers and core V4L2 frameworks:
8786ee6729SMauro Carvalho Chehab    Hans Verkuil <hverkuil@xs4all.nl>
8886ee6729SMauro Carvalho Chehab
8986ee6729SMauro Carvalho ChehabThe subsystem maintainer is:
9086ee6729SMauro Carvalho Chehab  Mauro Carvalho Chehab <mchehab@kernel.org>
9186ee6729SMauro Carvalho Chehab
9286ee6729SMauro Carvalho ChehabMedia maintainers may delegate a patch to other media maintainers as needed.
9386ee6729SMauro Carvalho ChehabOn such case, checkpatch's ``delegate`` field indicates who's currently
9486ee6729SMauro Carvalho Chehabresponsible for reviewing a patch.
9586ee6729SMauro Carvalho Chehab
9686ee6729SMauro Carvalho ChehabSubmit Checklist Addendum
9786ee6729SMauro Carvalho Chehab-------------------------
9886ee6729SMauro Carvalho Chehab
9986ee6729SMauro Carvalho ChehabPatches that change the Open Firmware/Device Tree bindings must be
10086ee6729SMauro Carvalho Chehabreviewed by the Device Tree maintainers. So, DT maintainers should be
10186ee6729SMauro Carvalho ChehabCc:ed when those are submitted via devicetree@vger.kernel.org mailing
10286ee6729SMauro Carvalho Chehablist.
10386ee6729SMauro Carvalho Chehab
10486ee6729SMauro Carvalho ChehabThere is a set of compliance tools at https://git.linuxtv.org/v4l-utils.git/
10586ee6729SMauro Carvalho Chehabthat should be used in order to check if the drivers are properly
10686ee6729SMauro Carvalho Chehabimplementing the media APIs:
10786ee6729SMauro Carvalho Chehab
10886ee6729SMauro Carvalho Chehab====================	=======================================================
10986ee6729SMauro Carvalho ChehabType			Tool
11086ee6729SMauro Carvalho Chehab====================	=======================================================
11186ee6729SMauro Carvalho ChehabV4L2 drivers\ [3]_	``v4l2-compliance``
11286ee6729SMauro Carvalho ChehabV4L2 virtual drivers	``contrib/test/test-media``
11386ee6729SMauro Carvalho ChehabCEC drivers		``cec-compliance``
11486ee6729SMauro Carvalho Chehab====================	=======================================================
11586ee6729SMauro Carvalho Chehab
11686ee6729SMauro Carvalho Chehab.. [3] The ``v4l2-compliance`` also covers the media controller usage inside
11786ee6729SMauro Carvalho Chehab       V4L2 drivers.
11886ee6729SMauro Carvalho Chehab
11986ee6729SMauro Carvalho ChehabOther compilance tools are under development to check other parts of the
12086ee6729SMauro Carvalho Chehabsubsystem.
12186ee6729SMauro Carvalho Chehab
12286ee6729SMauro Carvalho ChehabThose tests need to pass before the patches go upstream.
12386ee6729SMauro Carvalho Chehab
12486ee6729SMauro Carvalho ChehabAlso, please notice that we build the Kernel with::
12586ee6729SMauro Carvalho Chehab
12686ee6729SMauro Carvalho Chehab	make CF=-D__CHECK_ENDIAN__ CONFIG_DEBUG_SECTION_MISMATCH=y C=1 W=1 CHECK=check_script
12786ee6729SMauro Carvalho Chehab
12886ee6729SMauro Carvalho ChehabWhere the check script is::
12986ee6729SMauro Carvalho Chehab
13086ee6729SMauro Carvalho Chehab	#!/bin/bash
13186ee6729SMauro Carvalho Chehab	/devel/smatch/smatch -p=kernel $@ >&2
13286ee6729SMauro Carvalho Chehab	/devel/sparse/sparse $@ >&2
13386ee6729SMauro Carvalho Chehab
13486ee6729SMauro Carvalho ChehabBe sure to not introduce new warnings on your patches without a
13586ee6729SMauro Carvalho Chehabvery good reason.
13686ee6729SMauro Carvalho Chehab
13786ee6729SMauro Carvalho ChehabStyle Cleanup Patches
13886ee6729SMauro Carvalho Chehab+++++++++++++++++++++
13986ee6729SMauro Carvalho Chehab
14086ee6729SMauro Carvalho ChehabStyle cleanups are welcome when they come together with other changes
14186ee6729SMauro Carvalho Chehabat the files where the style changes will affect.
14286ee6729SMauro Carvalho Chehab
14386ee6729SMauro Carvalho ChehabWe may accept pure standalone style cleanups, but they should ideally
14486ee6729SMauro Carvalho Chehabbe one patch for the whole subsystem (if the cleanup is low volume),
14586ee6729SMauro Carvalho Chehabor at least be grouped per directory. So, for example, if you're doing a
14686ee6729SMauro Carvalho Chehabbig cleanup change set at drivers under drivers/media, please send a single
14786ee6729SMauro Carvalho Chehabpatch for all drivers under drivers/media/pci, another one for
14886ee6729SMauro Carvalho Chehabdrivers/media/usb and so on.
14986ee6729SMauro Carvalho Chehab
15086ee6729SMauro Carvalho ChehabCoding Style Addendum
15186ee6729SMauro Carvalho Chehab+++++++++++++++++++++
15286ee6729SMauro Carvalho Chehab
15386ee6729SMauro Carvalho ChehabMedia development uses ``checkpatch.pl`` on strict mode to verify the code
15486ee6729SMauro Carvalho Chehabstyle, e.g.::
15586ee6729SMauro Carvalho Chehab
15686ee6729SMauro Carvalho Chehab	$ ./scripts/checkpatch.pl --strict --max-line-length=80
15786ee6729SMauro Carvalho Chehab
15886ee6729SMauro Carvalho ChehabIn principle, patches should follow the coding style rules, but exceptions
15986ee6729SMauro Carvalho Chehabare allowed if there are good reasons. On such case, maintainers and reviewers
16086ee6729SMauro Carvalho Chehabmay question about the rationale for not addressing the ``checkpatch.pl``.
16186ee6729SMauro Carvalho Chehab
16286ee6729SMauro Carvalho ChehabPlease notice that the goal here is to improve code readability. On
16386ee6729SMauro Carvalho Chehaba few cases, ``checkpatch.pl`` may actually point to something that would
16486ee6729SMauro Carvalho Chehablook worse. So, you should use good sense.
16586ee6729SMauro Carvalho Chehab
16686ee6729SMauro Carvalho ChehabNote that addressing one ``checkpatch.pl`` issue (of any kind) alone may lead
16786ee6729SMauro Carvalho Chehabto having longer lines than 80 characters per line. While this is not
16886ee6729SMauro Carvalho Chehabstrictly prohibited, efforts should be made towards staying within 80
16986ee6729SMauro Carvalho Chehabcharacters per line. This could include using re-factoring code that leads
17086ee6729SMauro Carvalho Chehabto less indentation, shorter variable or function names and last but not
17186ee6729SMauro Carvalho Chehableast, simply wrapping the lines.
17286ee6729SMauro Carvalho Chehab
17386ee6729SMauro Carvalho ChehabIn particular, we accept lines with more than 80 columns:
17486ee6729SMauro Carvalho Chehab
17586ee6729SMauro Carvalho Chehab    - on strings, as they shouldn't be broken due to line length limits;
17686ee6729SMauro Carvalho Chehab    - when a function or variable name need to have a big identifier name,
17786ee6729SMauro Carvalho Chehab      which keeps hard to honor the 80 columns limit;
17886ee6729SMauro Carvalho Chehab    - on arithmetic expressions, when breaking lines makes them harder to
17986ee6729SMauro Carvalho Chehab      read;
18086ee6729SMauro Carvalho Chehab    - when they avoid a line to end with an open parenthesis or an open
18186ee6729SMauro Carvalho Chehab      bracket.
18286ee6729SMauro Carvalho Chehab
18386ee6729SMauro Carvalho ChehabKey Cycle Dates
18486ee6729SMauro Carvalho Chehab---------------
18586ee6729SMauro Carvalho Chehab
18686ee6729SMauro Carvalho ChehabNew submissions can be sent at any time, but if they intend to hit the
18786ee6729SMauro Carvalho Chehabnext merge window they should be sent before -rc5, and ideally stabilized
18886ee6729SMauro Carvalho Chehabin the linux-media branch by -rc6.
18986ee6729SMauro Carvalho Chehab
19086ee6729SMauro Carvalho ChehabReview Cadence
19186ee6729SMauro Carvalho Chehab--------------
19286ee6729SMauro Carvalho Chehab
19386ee6729SMauro Carvalho ChehabProvided that your patch is at https://patchwork.linuxtv.org, it should
19486ee6729SMauro Carvalho Chehabbe sooner or later handled, so you don't need to re-submit a patch.
19586ee6729SMauro Carvalho Chehab
19686ee6729SMauro Carvalho ChehabExcept for bug fixes, we don't usually add new patches to the development
19786ee6729SMauro Carvalho Chehabtree between -rc6 and the next -rc1.
19886ee6729SMauro Carvalho Chehab
19986ee6729SMauro Carvalho ChehabPlease notice that the media subsystem is a high traffic one, so it
20086ee6729SMauro Carvalho Chehabcould take a while for us to be able to review your patches. Feel free
20186ee6729SMauro Carvalho Chehabto ping if you don't get a feedback in a couple of weeks or to ask
20286ee6729SMauro Carvalho Chehabother developers to publicly add Reviewed-by and, more importantly,
20386ee6729SMauro Carvalho Chehab``Tested-by:`` tags.
20486ee6729SMauro Carvalho Chehab
20586ee6729SMauro Carvalho ChehabPlease note that we expect a detailed description for ``Tested-by:``,
20686ee6729SMauro Carvalho Chehabidentifying what boards were used at the test and what it was tested.
207