xref: /aosp_15_r20/external/libdrm/CONTRIBUTING.rst (revision 7688df22e49036ff52a766b7101da3a49edadb8c)
1*7688df22SAndroid Build Coastguard WorkerContributing to libdrm
2*7688df22SAndroid Build Coastguard Worker======================
3*7688df22SAndroid Build Coastguard Worker
4*7688df22SAndroid Build Coastguard WorkerSubmitting Patches
5*7688df22SAndroid Build Coastguard Worker------------------
6*7688df22SAndroid Build Coastguard Worker
7*7688df22SAndroid Build Coastguard WorkerPatches should be sent to [email protected], using git
8*7688df22SAndroid Build Coastguard Workersend-email. For patches only touching driver specific code one of the driver
9*7688df22SAndroid Build Coastguard Workermailing lists (like [email protected]) is also appropriate. See git
10*7688df22SAndroid Build Coastguard Workerdocumentation for help:
11*7688df22SAndroid Build Coastguard Worker
12*7688df22SAndroid Build Coastguard Workerhttp://git-scm.com/documentation
13*7688df22SAndroid Build Coastguard Worker
14*7688df22SAndroid Build Coastguard WorkerSince dri-devel is a very busy mailing list please use --subject-prefix="PATCH
15*7688df22SAndroid Build Coastguard Workerlibdrm" to make it easier to find libdrm patches. This is best done by running
16*7688df22SAndroid Build Coastguard Worker
17*7688df22SAndroid Build Coastguard Worker    git config --local format.subjectprefix "PATCH libdrm"
18*7688df22SAndroid Build Coastguard Worker
19*7688df22SAndroid Build Coastguard WorkerThe first line of a commit message should contain a prefix indicating what part
20*7688df22SAndroid Build Coastguard Workeris affected by the patch followed by one sentence that describes the change. For
21*7688df22SAndroid Build Coastguard Workerexamples:
22*7688df22SAndroid Build Coastguard Worker
23*7688df22SAndroid Build Coastguard Worker    amdgpu: Use uint32_t i in amdgpu_find_bo_by_cpu_mapping
24*7688df22SAndroid Build Coastguard Worker
25*7688df22SAndroid Build Coastguard WorkerThe body of the commit message should describe what the patch changes and why,
26*7688df22SAndroid Build Coastguard Workerand also note any particular side effects. For a recommended reading on
27*7688df22SAndroid Build Coastguard Workerwriting commit messages, see:
28*7688df22SAndroid Build Coastguard Worker
29*7688df22SAndroid Build Coastguard Workerhttp://who-t.blogspot.de/2009/12/on-commit-messages.html
30*7688df22SAndroid Build Coastguard Worker
31*7688df22SAndroid Build Coastguard WorkerYour patches should also include a Signed-off-by line with your name and email
32*7688df22SAndroid Build Coastguard Workeraddress. If you're not the patch's original author, you should also gather
33*7688df22SAndroid Build Coastguard WorkerS-o-b's by them (and/or whomever gave the patch to you.) The significance of
34*7688df22SAndroid Build Coastguard Workerthis is that it certifies that you created the patch, that it was created under
35*7688df22SAndroid Build Coastguard Workeran appropriate open source license, or provided to you under those terms.  This
36*7688df22SAndroid Build Coastguard Workerlets us indicate a chain of responsibility for the copyright status of the code.
37*7688df22SAndroid Build Coastguard WorkerFor more details:
38*7688df22SAndroid Build Coastguard Worker
39*7688df22SAndroid Build Coastguard Workerhttps://developercertificate.org/
40*7688df22SAndroid Build Coastguard Worker
41*7688df22SAndroid Build Coastguard WorkerWe won't reject patches that lack S-o-b, but it is strongly recommended.
42*7688df22SAndroid Build Coastguard Worker
43*7688df22SAndroid Build Coastguard WorkerReview and Merging
44*7688df22SAndroid Build Coastguard Worker------------------
45*7688df22SAndroid Build Coastguard Worker
46*7688df22SAndroid Build Coastguard WorkerPatches should have at least one positive review (Reviewed-by: tag) or
47*7688df22SAndroid Build Coastguard Workerindication of approval (Acked-by: tag) before merging. For any code shared
48*7688df22SAndroid Build Coastguard Workerbetween drivers this is mandatory.
49*7688df22SAndroid Build Coastguard Worker
50*7688df22SAndroid Build Coastguard WorkerPlease note that kernel/userspace API header files have special rules, see
51*7688df22SAndroid Build Coastguard Workerinclude/drm/README.
52*7688df22SAndroid Build Coastguard Worker
53*7688df22SAndroid Build Coastguard WorkerCoding style in the project loosely follows the CodingStyle of the linux kernel:
54*7688df22SAndroid Build Coastguard Worker
55*7688df22SAndroid Build Coastguard Workerhttps://www.kernel.org/doc/html/latest/process/coding-style.html?highlight=coding%20style
56*7688df22SAndroid Build Coastguard Worker
57*7688df22SAndroid Build Coastguard WorkerCommit Rights
58*7688df22SAndroid Build Coastguard Worker-------------
59*7688df22SAndroid Build Coastguard Worker
60*7688df22SAndroid Build Coastguard WorkerCommit rights will be granted to anyone who requests them and fulfills the
61*7688df22SAndroid Build Coastguard Workerbelow criteria:
62*7688df22SAndroid Build Coastguard Worker
63*7688df22SAndroid Build Coastguard Worker- Submitted a few (5-10 as a rule of thumb) non-trivial (not just simple
64*7688df22SAndroid Build Coastguard Worker  spelling fixes and whitespace adjustment) patches that have been merged
65*7688df22SAndroid Build Coastguard Worker  already. Since libdrm is just a glue library between the kernel and userspace
66*7688df22SAndroid Build Coastguard Worker  drivers, merged patches to those components also count towards the commit
67*7688df22SAndroid Build Coastguard Worker  criteria.
68*7688df22SAndroid Build Coastguard Worker
69*7688df22SAndroid Build Coastguard Worker- Are actively participating on discussions about their work (on the mailing
70*7688df22SAndroid Build Coastguard Worker  list or IRC). This should not be interpreted as a requirement to review other
71*7688df22SAndroid Build Coastguard Worker  peoples patches but just make sure that patch submission isn't one-way
72*7688df22SAndroid Build Coastguard Worker  communication. Cross-review is still highly encouraged.
73*7688df22SAndroid Build Coastguard Worker
74*7688df22SAndroid Build Coastguard Worker- Will be regularly contributing further patches. This includes regular
75*7688df22SAndroid Build Coastguard Worker  contributors to other parts of the open source graphics stack who only
76*7688df22SAndroid Build Coastguard Worker  do the oddball rare patch within libdrm itself.
77*7688df22SAndroid Build Coastguard Worker
78*7688df22SAndroid Build Coastguard Worker- Agrees to use their commit rights in accordance with the documented merge
79*7688df22SAndroid Build Coastguard Worker  criteria, tools, and processes.
80*7688df22SAndroid Build Coastguard Worker
81*7688df22SAndroid Build Coastguard WorkerTo apply for commit rights ("Developer" role in gitlab) send a mail to
82*7688df22SAndroid Build Coastguard Worker[email protected] and please ping the maintainers if your request
83*7688df22SAndroid Build Coastguard Workeris stuck.
84*7688df22SAndroid Build Coastguard Worker
85*7688df22SAndroid Build Coastguard WorkerCommitters are encouraged to request their commit rights get removed when they
86*7688df22SAndroid Build Coastguard Workerno longer contribute to the project. Commit rights will be reinstated when they
87*7688df22SAndroid Build Coastguard Workercome back to the project.
88*7688df22SAndroid Build Coastguard Worker
89*7688df22SAndroid Build Coastguard WorkerMaintainers and committers should encourage contributors to request commit
90*7688df22SAndroid Build Coastguard Workerrights, as especially junior contributors tend to underestimate their skills.
91*7688df22SAndroid Build Coastguard Worker
92*7688df22SAndroid Build Coastguard WorkerCode of Conduct
93*7688df22SAndroid Build Coastguard Worker---------------
94*7688df22SAndroid Build Coastguard Worker
95*7688df22SAndroid Build Coastguard WorkerPlease be aware the fd.o Code of Conduct also applies to libdrm:
96*7688df22SAndroid Build Coastguard Worker
97*7688df22SAndroid Build Coastguard Workerhttps://www.freedesktop.org/wiki/CodeOfConduct/
98*7688df22SAndroid Build Coastguard Worker
99*7688df22SAndroid Build Coastguard WorkerSee the gitlab project owners for contact details of the libdrm maintainers.
100*7688df22SAndroid Build Coastguard Worker
101*7688df22SAndroid Build Coastguard WorkerAbuse of commit rights, like engaging in commit fights or willfully pushing
102*7688df22SAndroid Build Coastguard Workerpatches that violate the documented merge criteria, will also be handled through
103*7688df22SAndroid Build Coastguard Workerthe Code of Conduct enforcement process.
104*7688df22SAndroid Build Coastguard Worker
105*7688df22SAndroid Build Coastguard WorkerHappy hacking!
106