linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Max Krummenacher <max.oss.09@gmail.com>
To: Rob Herring <robh@kernel.org>
Cc: Max Krummenacher <max.krummenacher@toradex.com>,
	Marek Vasut <marex@denx.de>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Francesco Dolcini <francesco.dolcini@toradex.com>,
	Maxime Ripard <mripard@kernel.org>,
	Christoph Niedermaier <cniedermaier@dh-electronics.com>,
	Dave Stevenson <dave.stevenson@raspberrypi.com>,
	Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@linux.ie>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Sam Ravnborg <sam@ravnborg.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
	<devicetree@vger.kernel.org>,
	DRI Development <dri-devel@lists.freedesktop.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 1/3] dt-bindings: display: add new bus-format property for panel-dpi
Date: Tue, 28 Jun 2022 19:54:06 +0200	[thread overview]
Message-ID: <CAEHkU3UFSUq3sFTX8wC4+PYCN9gG4Lbgkao3E3VkQGxQzRZy0g@mail.gmail.com> (raw)
In-Reply-To: <20220601201658.GA342879-robh@kernel.org>

Hi Rob

Thanks for the feedback.

On Wed, Jun 1, 2022 at 10:17 PM Rob Herring <robh@kernel.org> wrote:
>
> On Wed, May 18, 2022 at 01:55:38PM +0200, Max Krummenacher wrote:
> > From: Max Krummenacher <max.krummenacher@toradex.com>
> >
> > The property is used to set the enum bus_format and infer the bpc
> > for a panel defined by 'panel-dpi'.
> > This specifies how the panel is connected to the display interface.
> >
> > Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
> >
> > ---
> >
> > Changes in v2:
> >     - Fix errors found by dt_binding_check
> >
> >  .../bindings/display/panel/panel-dpi.yaml     | 11 +++++++++
> >  .../dt-bindings/display/dt-media-bus-format.h | 23 +++++++++++++++++++
> >  2 files changed, 34 insertions(+)
> >  create mode 100644 include/dt-bindings/display/dt-media-bus-format.h
> >
> > diff --git a/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
> > index dae0676b5c6e..a20b5898941e 100644
> > --- a/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
> > +++ b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
> > @@ -21,6 +21,14 @@ properties:
> >        - {}
> >        - const: panel-dpi
> >
> > +  bus-format:
> > +    $ref: /schemas/types.yaml#/definitions/uint32
>
> Constraints?

Will limit the range to the one used for RGB formats in v3.
>
> > +    description: |
> > +      Describes how the display panel is connected to the display interface.
> > +      Valid values are defined in <dt-bindings/display/dt-media-bus-format.h>.
> > +      The mapping between the color/significance of the panel lines to the
> > +      parallel data lines are defined in [1].
>
> Just drop the [1] and use a colon.

Done in v3.

>
> > +      [1] https://www.kernel.org/doc/html/v5.17/userspace-api/media/v4l/subdev-formats.html#packed-rgb-formats
>
> Why not just use the V4L number space rather than invent yet another
> number space?

That was a proposal from here:
https://lore.kernel.org/all/20220323155817.xcsqxothziot7ba3@houat/
But probably it makes more sense to use the number space as is, changed in v3.

>
> Need a blank line here too.
>
> >    backlight: true
> >    enable-gpios: true
> >    height-mm: true
> > @@ -39,11 +47,14 @@ additionalProperties: false
> >
> >  examples:
> >    - |
> > +    #include <dt-bindings/display/dt-media-bus-format.h>
> > +
> >      panel {
> >          compatible = "startek,startek-kd050c", "panel-dpi";
> >          label = "osddisplay";
> >          power-supply = <&vcc_supply>;
> >          backlight = <&backlight>;
> > +        bus-format = <DT_MEDIA_BUS_FMT_RGB888_1X24>;
>
> Other properties describing the interface have been put in the endpoint
> node. This should too I think.

That makes a lot of sense. Changed to be part of the endpoint node in v3.

Cheers
Max

>
> >
> >          port {
> >              lcd_in: endpoint {
> > diff --git a/include/dt-bindings/display/dt-media-bus-format.h b/include/dt-bindings/display/dt-media-bus-format.h
> > new file mode 100644
> > index 000000000000..c0f2a7b59aa1
> > --- /dev/null
> > +++ b/include/dt-bindings/display/dt-media-bus-format.h
> > @@ -0,0 +1,23 @@
> > +/* SPDX-License-Identifier: GPL-2.0-only OR MIT */
> > +/*
> > + * Copyright 2022 Max Krummenacher <max.krummenacher@toradex.com>
> > + */
> > +
> > +#ifndef __DT_BINDINGS_DT_MEDIA_BUS_FORMAT_H
> > +#define __DT_BINDINGS_DT_MEDIA_BUS_FORMAT_H
> > +
> > +/*
> > + * Attention: Keep these macro names in sync with
> > + * include/uapi/linux/media-bus-format.h
> > + */
> > +
> > +#define DT_MEDIA_BUS_FMT_RGB565_1X16         1
> > +#define DT_MEDIA_BUS_FMT_RGB666_1X18         2
> > +#define DT_MEDIA_BUS_FMT_RBG888_1X24         3
> > +#define DT_MEDIA_BUS_FMT_RGB666_1X24_CPADHI  4
> > +#define DT_MEDIA_BUS_FMT_BGR888_1X24         5
> > +#define DT_MEDIA_BUS_FMT_GBR888_1X24         6
> > +#define DT_MEDIA_BUS_FMT_RGB888_1X24         7
> > +#define DT_MEDIA_BUS_FMT_RGB888_1X32_PADHI   8
> > +
> > +#endif /* __DT_BINDINGS_DT_MEDIA_BUS_FORMAT_H */
> > --
> > 2.20.1
> >
> >

  reply	other threads:[~2022-06-28 17:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-18 11:55 [PATCH v2 0/3] drm/panel: simple: add bus-format support for panel-dpi Max Krummenacher
2022-05-18 11:55 ` [PATCH v2 1/3] dt-bindings: display: add new bus-format property " Max Krummenacher
2022-06-01 20:16   ` Rob Herring
2022-06-28 17:54     ` Max Krummenacher [this message]
2022-05-18 11:55 ` [PATCH v2 2/3] dt-bindings: display: startek,startek-kd050c: allow bus-format property Max Krummenacher
2022-05-18 11:55 ` [PATCH v2 3/3] drm/panel: simple: add bus-format support for panel-dpi Max Krummenacher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAEHkU3UFSUq3sFTX8wC4+PYCN9gG4Lbgkao3E3VkQGxQzRZy0g@mail.gmail.com \
    --to=max.oss.09@gmail.com \
    --cc=airlied@linux.ie \
    --cc=cniedermaier@dh-electronics.com \
    --cc=daniel@ffwll.ch \
    --cc=dave.stevenson@raspberrypi.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=francesco.dolcini@toradex.com \
    --cc=krzk+dt@kernel.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marex@denx.de \
    --cc=max.krummenacher@toradex.com \
    --cc=mripard@kernel.org \
    --cc=robh@kernel.org \
    --cc=sam@ravnborg.org \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).