diff mbox

[hwc,v1] drm_hwcomposer: Add CONTRIBUTING file

Message ID 20170922003718.20258-1-robert.foss@collabora.com (mailing list archive)
State New, archived
Headers show

Commit Message

Robert Foss Sept. 22, 2017, 12:37 a.m. UTC
Some basic guidelines for contributions could come in handy.

These are copied from IGT and modified to be suitable.

Signed-off-by: Robert Foss <robert.foss@collabora.com>
---
 CONTRIBUTING | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 CONTRIBUTING

Comments

Zach Reizner Sept. 22, 2017, 4:22 p.m. UTC | #1
On Thu, Sep 21, 2017 at 5:37 PM, Robert Foss <robert.foss@collabora.com> wrote:
> Some basic guidelines for contributions could come in handy.
>
> These are copied from IGT and modified to be suitable.
>
> Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Zach Reizner <zachr@chromium.org>
> ---
>  CONTRIBUTING | 31 +++++++++++++++++++++++++++++++
>  1 file changed, 31 insertions(+)
>  create mode 100644 CONTRIBUTING
>
> diff --git a/CONTRIBUTING b/CONTRIBUTING
> new file mode 100644
> index 0000000..f1b4775
> --- /dev/null
> +++ b/CONTRIBUTING
> @@ -0,0 +1,31 @@
> +Patches to drm_hwcomposer are very much welcome, we really want this to be the
> +universal HW composer implementation for Android and similar platforms
> +So please bring on porting patches, bugfixes, improvements for documentation
> +and new features.
> +
> +A short list of contribution guidelines:
> +
> +- Please submit patches formatted with git send-email/git format-patch or
> +  equivalent to
> +
> +    dri-devel <dri-devel@lists.freedesktop.org>
> +
> +  Please use --subject-prefix="PATCH hwc" so that drm_hwcomposer patches are easily
> +  identified in the massive amount mails on dri-devel. To ensure this is always
> +  done, run:
> +
> +    git config format.subjectprefix "PATCH hwc"
> +
> +- drm_hwcomposer is Apache 2.0 Licensed and we require contributions to follow the
> +  developer's certificate of origin: http://developercertificate.org/
> +
> +- When submitting new code please follow the naming conventions documented
> +  in the generated documentation. Also please make full use of all the helpers and
> +  convenience macros provided by drm_hwcomposer. The below command can help you
> +  with formatting of your patches:
> +  git diff | clang-format-diff-3.5 -p 1 -style=file
> +
> +- Harware specific changes should get tested on relevant platforms
> +  before committing.
> +
> +Happy hacking!
> --
> 2.11.0
>
Sean Paul Sept. 22, 2017, 4:23 p.m. UTC | #2
On Fri, Sep 22, 2017 at 02:37:18AM +0200, Robert Foss wrote:
> Some basic guidelines for contributions could come in handy.
> 
> These are copied from IGT and modified to be suitable.
> 
> Signed-off-by: Robert Foss <robert.foss@collabora.com>
> ---
>  CONTRIBUTING | 31 +++++++++++++++++++++++++++++++
>  1 file changed, 31 insertions(+)
>  create mode 100644 CONTRIBUTING
> 
> diff --git a/CONTRIBUTING b/CONTRIBUTING
> new file mode 100644
> index 0000000..f1b4775
> --- /dev/null
> +++ b/CONTRIBUTING
> @@ -0,0 +1,31 @@
> +Patches to drm_hwcomposer are very much welcome, we really want this to be the
> +universal HW composer implementation for Android and similar platforms
> +So please bring on porting patches, bugfixes, improvements for documentation
> +and new features.
> +
> +A short list of contribution guidelines:
> +
> +- Please submit patches formatted with git send-email/git format-patch or
> +  equivalent to
> +
> +    dri-devel <dri-devel@lists.freedesktop.org>
> +
> +  Please use --subject-prefix="PATCH hwc" so that drm_hwcomposer patches are easily
> +  identified in the massive amount mails on dri-devel. To ensure this is always
> +  done, run:
> +
> +    git config format.subjectprefix "PATCH hwc"
> +
> +- drm_hwcomposer is Apache 2.0 Licensed and we require contributions to follow the
> +  developer's certificate of origin: http://developercertificate.org/
> +
> +- When submitting new code please follow the naming conventions documented
> +  in the generated documentation. Also please make full use of all the helpers and
> +  convenience macros provided by drm_hwcomposer. The below command can help you
> +  with formatting of your patches:
> +  git diff | clang-format-diff-3.5 -p 1 -style=file
> +
> +- Harware specific changes should get tested on relevant platforms

*Hardware

With that,

Reviewed-by: Sean Paul <seanpaul@chromium.org>

> +  before committing.
> +
> +Happy hacking!
> -- 
> 2.11.0
>
Robert Foss Sept. 22, 2017, 6:22 p.m. UTC | #3
Pushed!

On Fri, 2017-09-22 at 09:23 -0700, Sean Paul wrote:
> On Fri, Sep 22, 2017 at 02:37:18AM +0200, Robert Foss wrote:
> > Some basic guidelines for contributions could come in handy.
> > 
> > These are copied from IGT and modified to be suitable.
> > 
> > Signed-off-by: Robert Foss <robert.foss@collabora.com>
> > ---
> >  CONTRIBUTING | 31 +++++++++++++++++++++++++++++++
> >  1 file changed, 31 insertions(+)
> >  create mode 100644 CONTRIBUTING
> > 
> > diff --git a/CONTRIBUTING b/CONTRIBUTING
> > new file mode 100644
> > index 0000000..f1b4775
> > --- /dev/null
> > +++ b/CONTRIBUTING
> > @@ -0,0 +1,31 @@
> > +Patches to drm_hwcomposer are very much welcome, we really want
> > this to be the
> > +universal HW composer implementation for Android and similar
> > platforms
> > +So please bring on porting patches, bugfixes, improvements for
> > documentation
> > +and new features.
> > +
> > +A short list of contribution guidelines:
> > +
> > +- Please submit patches formatted with git send-email/git format-
> > patch or
> > +  equivalent to
> > +
> > +    dri-devel <dri-devel@lists.freedesktop.org>
> > +
> > +  Please use --subject-prefix="PATCH hwc" so that drm_hwcomposer
> > patches are easily
> > +  identified in the massive amount mails on dri-devel. To ensure
> > this is always
> > +  done, run:
> > +
> > +    git config format.subjectprefix "PATCH hwc"
> > +
> > +- drm_hwcomposer is Apache 2.0 Licensed and we require
> > contributions to follow the
> > +  developer's certificate of origin: http://developercertificate.o
> > rg/
> > +
> > +- When submitting new code please follow the naming conventions
> > documented
> > +  in the generated documentation. Also please make full use of all
> > the helpers and
> > +  convenience macros provided by drm_hwcomposer. The below command
> > can help you
> > +  with formatting of your patches:
> > +  git diff | clang-format-diff-3.5 -p 1 -style=file
> > +
> > +- Harware specific changes should get tested on relevant platforms
> 
> *Hardware
> 
> With that,
> 
> Reviewed-by: Sean Paul <seanpaul@chromium.org>
> 
> > +  before committing.
> > +
> > +Happy hacking!
> > -- 
> > 2.11.0
> > 
> 
>
Emil Velikov Sept. 27, 2017, 2:42 p.m. UTC | #4
Hi Rob,

Glad to see this. There's a couple of suggestions that I hope you'll
find worth while.

On 22 September 2017 at 01:37, Robert Foss <robert.foss@collabora.com> wrote:
> Some basic guidelines for contributions could come in handy.
>
> These are copied from IGT and modified to be suitable.
>
> Signed-off-by: Robert Foss <robert.foss@collabora.com>
> ---
>  CONTRIBUTING | 31 +++++++++++++++++++++++++++++++
>  1 file changed, 31 insertions(+)
>  create mode 100644 CONTRIBUTING
>
> diff --git a/CONTRIBUTING b/CONTRIBUTING
> new file mode 100644
> index 0000000..f1b4775
> --- /dev/null
> +++ b/CONTRIBUTING
> @@ -0,0 +1,31 @@
> +Patches to drm_hwcomposer are very much welcome, we really want this to be the
> +universal HW composer implementation for Android and similar platforms
> +So please bring on porting patches, bugfixes, improvements for documentation
> +and new features.
> +
> +A short list of contribution guidelines:
> +
> +- Please submit patches formatted with git send-email/git format-patch or
> +  equivalent to
> +
> +    dri-devel <dri-devel@lists.freedesktop.org>
> +
> +  Please use --subject-prefix="PATCH hwc" so that drm_hwcomposer patches are easily
> +  identified in the massive amount mails on dri-devel. To ensure this is always
> +  done, run:
> +
> +    git config format.subjectprefix "PATCH hwc"
> +
One can add this into the autogen.sh or whatever bootstrap file the
project uses.
For example see https://cgit.freedesktop.org/mesa/drm/tree/autogen.sh


> +- When submitting new code please follow the naming conventions documented
> +  in the generated documentation. Also please make full use of all the helpers and
> +  convenience macros provided by drm_hwcomposer. The below command can help you
> +  with formatting of your patches:
> +  git diff | clang-format-diff-3.5 -p 1 -style=file
> +
One could wire that in the pre-merge hook on the server side.
It should be quite lightweight, although I'm not sure about the
integration with FDO's Debian(?) setup ;-)

-Emil
Robert Foss Sept. 27, 2017, 6:55 p.m. UTC | #5
Hey Emil,

On Wed, 2017-09-27 at 15:42 +0100, Emil Velikov wrote:
> Hi Rob,
> 
> Glad to see this. There's a couple of suggestions that I hope you'll
> find worth while.
> 
> On 22 September 2017 at 01:37, Robert Foss <robert.foss@collabora.com
> > wrote:
> > Some basic guidelines for contributions could come in handy.
> > 
> > These are copied from IGT and modified to be suitable.
> > 
> > Signed-off-by: Robert Foss <robert.foss@collabora.com>
> > ---
> >  CONTRIBUTING | 31 +++++++++++++++++++++++++++++++
> >  1 file changed, 31 insertions(+)
> >  create mode 100644 CONTRIBUTING
> > 
> > diff --git a/CONTRIBUTING b/CONTRIBUTING
> > new file mode 100644
> > index 0000000..f1b4775
> > --- /dev/null
> > +++ b/CONTRIBUTING
> > @@ -0,0 +1,31 @@
> > +Patches to drm_hwcomposer are very much welcome, we really want
> > this to be the
> > +universal HW composer implementation for Android and similar
> > platforms
> > +So please bring on porting patches, bugfixes, improvements for
> > documentation
> > +and new features.
> > +
> > +A short list of contribution guidelines:
> > +
> > +- Please submit patches formatted with git send-email/git format-
> > patch or
> > +  equivalent to
> > +
> > +    dri-devel <dri-devel@lists.freedesktop.org>
> > +
> > +  Please use --subject-prefix="PATCH hwc" so that drm_hwcomposer
> > patches are easily
> > +  identified in the massive amount mails on dri-devel. To ensure
> > this is always
> > +  done, run:
> > +
> > +    git config format.subjectprefix "PATCH hwc"
> > +
> 
> One can add this into the autogen.sh or whatever bootstrap file the
> project uses.
> For example see https://cgit.freedesktop.org/mesa/drm/tree/autogen.sh

Adding an autogen.sh sounds like a good idea to me.

> 
> 
> > +- When submitting new code please follow the naming conventions
> > documented
> > +  in the generated documentation. Also please make full use of all
> > the helpers and
> > +  convenience macros provided by drm_hwcomposer. The below command
> > can help you
> > +  with formatting of your patches:
> > +  git diff | clang-format-diff-3.5 -p 1 -style=file
> > +
> 
> One could wire that in the pre-merge hook on the server side.
> It should be quite lightweight, although I'm not sure about the
> integration with FDO's Debian(?) setup ;-)

Yeah, me neither. Maybe asking Daniel Stone about how this should be
done is the next step.
Rob Herring Sept. 27, 2017, 9:16 p.m. UTC | #6
On Wed, Sep 27, 2017 at 1:55 PM, Robert Foss <robert.foss@collabora.com> wrote:
> Hey Emil,
>
> On Wed, 2017-09-27 at 15:42 +0100, Emil Velikov wrote:
>> Hi Rob,
>>
>> Glad to see this. There's a couple of suggestions that I hope you'll
>> find worth while.
>>
>> On 22 September 2017 at 01:37, Robert Foss <robert.foss@collabora.com
>> > wrote:
>> > Some basic guidelines for contributions could come in handy.
>> >
>> > These are copied from IGT and modified to be suitable.
>> >
>> > Signed-off-by: Robert Foss <robert.foss@collabora.com>
>> > ---
>> >  CONTRIBUTING | 31 +++++++++++++++++++++++++++++++
>> >  1 file changed, 31 insertions(+)
>> >  create mode 100644 CONTRIBUTING
>> >
>> > diff --git a/CONTRIBUTING b/CONTRIBUTING
>> > new file mode 100644
>> > index 0000000..f1b4775
>> > --- /dev/null
>> > +++ b/CONTRIBUTING
>> > @@ -0,0 +1,31 @@
>> > +Patches to drm_hwcomposer are very much welcome, we really want
>> > this to be the
>> > +universal HW composer implementation for Android and similar
>> > platforms
>> > +So please bring on porting patches, bugfixes, improvements for
>> > documentation
>> > +and new features.
>> > +
>> > +A short list of contribution guidelines:
>> > +
>> > +- Please submit patches formatted with git send-email/git format-
>> > patch or
>> > +  equivalent to
>> > +
>> > +    dri-devel <dri-devel@lists.freedesktop.org>
>> > +
>> > +  Please use --subject-prefix="PATCH hwc" so that drm_hwcomposer
>> > patches are easily
>> > +  identified in the massive amount mails on dri-devel. To ensure
>> > this is always
>> > +  done, run:
>> > +
>> > +    git config format.subjectprefix "PATCH hwc"
>> > +
>>
>> One can add this into the autogen.sh or whatever bootstrap file the
>> project uses.
>> For example see https://cgit.freedesktop.org/mesa/drm/tree/autogen.sh
>
> Adding an autogen.sh sounds like a good idea to me.

Except autogen.sh is a standard step as part of an autotools workflow
and would not be obvious to run in an Android env.

Rob
Eric Engestrom Sept. 28, 2017, 10:43 a.m. UTC | #7
On Wednesday, 2017-09-27 18:55:49 +0000, Robert Foss wrote:
> > > +- When submitting new code please follow the naming conventions
> > > documented
> > > +  in the generated documentation. Also please make full use of all
> > > the helpers and
> > > +  convenience macros provided by drm_hwcomposer. The below command
> > > can help you
> > > +  with formatting of your patches:
> > > +  git diff | clang-format-diff-3.5 -p 1 -style=file
> > > +
> > 
> > One could wire that in the pre-merge hook on the server side.
> > It should be quite lightweight, although I'm not sure about the
> > integration with FDO's Debian(?) setup ;-)
> 
> Yeah, me neither. Maybe asking Daniel Stone about how this should be
> done is the next step.
> 

The package `clang-format-3.5` would need to be installed, but other than
that the integration would be rather trivial; just add this to the
`update` hook:

  format_diff=$(git diff -U0 $oldrev..$newrev | clang-format-diff-3.5 -p1)
  if [ -n "$format_diff" ]; then
    echo 'Code is not formatted properly; please apply this change and try again:'
    printf -- '----8<----\n%s\n---->8----\n' "$format_diff"
    exit 1
  fi

Note that if malformatted commits are to be rejected, it might be best
to have a pre-commit hook on each client (will need manual setup on each
clone) to re-format the code before being committed and therefore before
being sent to ML, to avoid patchwork losing track of reformatted patches.

Alternatively, such patches could be accepted with just a warning being
printed when pushing, but there's a good chance such warnings would just
end up being ignored.
diff mbox

Patch

diff --git a/CONTRIBUTING b/CONTRIBUTING
new file mode 100644
index 0000000..f1b4775
--- /dev/null
+++ b/CONTRIBUTING
@@ -0,0 +1,31 @@ 
+Patches to drm_hwcomposer are very much welcome, we really want this to be the
+universal HW composer implementation for Android and similar platforms
+So please bring on porting patches, bugfixes, improvements for documentation
+and new features.
+
+A short list of contribution guidelines:
+
+- Please submit patches formatted with git send-email/git format-patch or
+  equivalent to
+
+    dri-devel <dri-devel@lists.freedesktop.org>
+
+  Please use --subject-prefix="PATCH hwc" so that drm_hwcomposer patches are easily
+  identified in the massive amount mails on dri-devel. To ensure this is always
+  done, run:
+
+    git config format.subjectprefix "PATCH hwc"
+
+- drm_hwcomposer is Apache 2.0 Licensed and we require contributions to follow the
+  developer's certificate of origin: http://developercertificate.org/
+
+- When submitting new code please follow the naming conventions documented
+  in the generated documentation. Also please make full use of all the helpers and
+  convenience macros provided by drm_hwcomposer. The below command can help you
+  with formatting of your patches:
+  git diff | clang-format-diff-3.5 -p 1 -style=file
+
+- Harware specific changes should get tested on relevant platforms
+  before committing.
+
+Happy hacking!