* [PATCH v2 1/7] media: uapi: add MEDIA_BUS_FMT_RGB565_1X24_CPADHI
2022-10-20 8:30 [PATCH v2 0/7] drm/vc4: dpi: Various improvements Maxime Ripard
@ 2022-10-20 8:30 ` Maxime Ripard
2022-11-29 12:22 ` Laurent Pinchart
2022-10-20 8:30 ` [PATCH v2 2/7] media: uapi: add MEDIA_BUS_FMT_BGR666_1X18 Maxime Ripard
` (5 subsequent siblings)
6 siblings, 1 reply; 13+ messages in thread
From: Maxime Ripard @ 2022-10-20 8:30 UTC (permalink / raw)
To: Emma Anholt, Maxime Ripard, Rob Herring, Daniel Vetter,
Eric Anholt, David Airlie
Cc: dri-devel, linux-kernel, Joerg Quinten, Chris Morgan,
Dave Stevenson, Laurent Pinchart, Maxime Ripard
From: Chris Morgan <macromorgan@hotmail.com>
Add the MEDIA_BUS_FMT_RGB565_1X24_CPADHI format used by the Geekworm
MZP280 panel for the Raspberry Pi.
Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
.../userspace-api/media/v4l/subdev-formats.rst | 37 ++++++++++++++++++++++
include/uapi/linux/media-bus-format.h | 3 +-
2 files changed, 39 insertions(+), 1 deletion(-)
diff --git a/Documentation/userspace-api/media/v4l/subdev-formats.rst b/Documentation/userspace-api/media/v4l/subdev-formats.rst
index d21d532eee15..1e61c02aa788 100644
--- a/Documentation/userspace-api/media/v4l/subdev-formats.rst
+++ b/Documentation/userspace-api/media/v4l/subdev-formats.rst
@@ -986,6 +986,43 @@ The following tables list existing packed RGB formats.
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
+ * .. _MEDIA-BUS-FMT-RGB565-1X24_CPADHI:
+
+ - MEDIA_BUS_FMT_RGB565_1X24_CPADHI
+ - 0x1022
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ - 0
+ - 0
+ - 0
+ - r\ :sub:`4`
+ - r\ :sub:`3`
+ - r\ :sub:`2`
+ - r\ :sub:`1`
+ - r\ :sub:`0`
+ - 0
+ - 0
+ - g\ :sub:`5`
+ - g\ :sub:`4`
+ - g\ :sub:`3`
+ - g\ :sub:`2`
+ - g\ :sub:`1`
+ - g\ :sub:`0`
+ - 0
+ - 0
+ - 0
+ - b\ :sub:`4`
+ - b\ :sub:`3`
+ - b\ :sub:`2`
+ - b\ :sub:`1`
+ - b\ :sub:`0`
* .. _MEDIA-BUS-FMT-RGB666-1X24_CPADHI:
- MEDIA_BUS_FMT_RGB666_1X24_CPADHI
diff --git a/include/uapi/linux/media-bus-format.h b/include/uapi/linux/media-bus-format.h
index ec3323dbb927..b0a945eb7040 100644
--- a/include/uapi/linux/media-bus-format.h
+++ b/include/uapi/linux/media-bus-format.h
@@ -34,13 +34,14 @@
#define MEDIA_BUS_FMT_FIXED 0x0001
-/* RGB - next is 0x1022 */
+/* RGB - next is 0x1023 */
#define MEDIA_BUS_FMT_RGB444_1X12 0x1016
#define MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE 0x1001
#define MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE 0x1002
#define MEDIA_BUS_FMT_RGB555_2X8_PADHI_BE 0x1003
#define MEDIA_BUS_FMT_RGB555_2X8_PADHI_LE 0x1004
#define MEDIA_BUS_FMT_RGB565_1X16 0x1017
+#define MEDIA_BUS_FMT_RGB565_1X24_CPADHI 0x1022
#define MEDIA_BUS_FMT_BGR565_2X8_BE 0x1005
#define MEDIA_BUS_FMT_BGR565_2X8_LE 0x1006
#define MEDIA_BUS_FMT_RGB565_2X8_BE 0x1007
--
b4 0.10.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: [PATCH v2 1/7] media: uapi: add MEDIA_BUS_FMT_RGB565_1X24_CPADHI
2022-10-20 8:30 ` [PATCH v2 1/7] media: uapi: add MEDIA_BUS_FMT_RGB565_1X24_CPADHI Maxime Ripard
@ 2022-11-29 12:22 ` Laurent Pinchart
2022-11-29 12:39 ` Laurent Pinchart
0 siblings, 1 reply; 13+ messages in thread
From: Laurent Pinchart @ 2022-11-29 12:22 UTC (permalink / raw)
To: Maxime Ripard
Cc: Emma Anholt, Maxime Ripard, Rob Herring, Daniel Vetter,
Eric Anholt, David Airlie, dri-devel, linux-kernel, Joerg Quinten,
Chris Morgan, Dave Stevenson
Hi Maxime and Chris,
Thank you for the patch.
On Thu, Oct 20, 2022 at 10:30:45AM +0200, Maxime Ripard wrote:
> From: Chris Morgan <macromorgan@hotmail.com>
>
> Add the MEDIA_BUS_FMT_RGB565_1X24_CPADHI format used by the Geekworm
> MZP280 panel for the Raspberry Pi.
>
> Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> .../userspace-api/media/v4l/subdev-formats.rst | 37 ++++++++++++++++++++++
> include/uapi/linux/media-bus-format.h | 3 +-
> 2 files changed, 39 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/userspace-api/media/v4l/subdev-formats.rst b/Documentation/userspace-api/media/v4l/subdev-formats.rst
> index d21d532eee15..1e61c02aa788 100644
> --- a/Documentation/userspace-api/media/v4l/subdev-formats.rst
> +++ b/Documentation/userspace-api/media/v4l/subdev-formats.rst
> @@ -986,6 +986,43 @@ The following tables list existing packed RGB formats.
> - g\ :sub:`2`
> - g\ :sub:`1`
> - g\ :sub:`0`
> + * .. _MEDIA-BUS-FMT-RGB565-1X24_CPADHI:
> +
> + - MEDIA_BUS_FMT_RGB565_1X24_CPADHI
> + - 0x1022
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + - 0
> + - 0
> + - 0
> + - r\ :sub:`4`
> + - r\ :sub:`3`
> + - r\ :sub:`2`
> + - r\ :sub:`1`
> + - r\ :sub:`0`
> + - 0
> + - 0
> + - g\ :sub:`5`
> + - g\ :sub:`4`
> + - g\ :sub:`3`
> + - g\ :sub:`2`
> + - g\ :sub:`1`
> + - g\ :sub:`0`
> + - 0
> + - 0
> + - 0
> + - b\ :sub:`4`
> + - b\ :sub:`3`
> + - b\ :sub:`2`
> + - b\ :sub:`1`
> + - b\ :sub:`0`
> * .. _MEDIA-BUS-FMT-RGB666-1X24_CPADHI:
>
> - MEDIA_BUS_FMT_RGB666_1X24_CPADHI
> diff --git a/include/uapi/linux/media-bus-format.h b/include/uapi/linux/media-bus-format.h
> index ec3323dbb927..b0a945eb7040 100644
> --- a/include/uapi/linux/media-bus-format.h
> +++ b/include/uapi/linux/media-bus-format.h
> @@ -34,13 +34,14 @@
>
> #define MEDIA_BUS_FMT_FIXED 0x0001
>
> -/* RGB - next is 0x1022 */
> +/* RGB - next is 0x1023 */
> #define MEDIA_BUS_FMT_RGB444_1X12 0x1016
> #define MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE 0x1001
> #define MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE 0x1002
> #define MEDIA_BUS_FMT_RGB555_2X8_PADHI_BE 0x1003
> #define MEDIA_BUS_FMT_RGB555_2X8_PADHI_LE 0x1004
> #define MEDIA_BUS_FMT_RGB565_1X16 0x1017
> +#define MEDIA_BUS_FMT_RGB565_1X24_CPADHI 0x1022
> #define MEDIA_BUS_FMT_BGR565_2X8_BE 0x1005
> #define MEDIA_BUS_FMT_BGR565_2X8_LE 0x1006
> #define MEDIA_BUS_FMT_RGB565_2X8_BE 0x1007
>
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2 1/7] media: uapi: add MEDIA_BUS_FMT_RGB565_1X24_CPADHI
2022-11-29 12:22 ` Laurent Pinchart
@ 2022-11-29 12:39 ` Laurent Pinchart
0 siblings, 0 replies; 13+ messages in thread
From: Laurent Pinchart @ 2022-11-29 12:39 UTC (permalink / raw)
To: Maxime Ripard
Cc: Emma Anholt, Maxime Ripard, Rob Herring, Daniel Vetter,
Eric Anholt, David Airlie, dri-devel, linux-kernel, Joerg Quinten,
Chris Morgan, Dave Stevenson
On Tue, Nov 29, 2022 at 02:23:04PM +0200, Laurent Pinchart wrote:
> Hi Maxime and Chris,
>
> Thank you for the patch.
>
> On Thu, Oct 20, 2022 at 10:30:45AM +0200, Maxime Ripard wrote:
> > From: Chris Morgan <macromorgan@hotmail.com>
> >
> > Add the MEDIA_BUS_FMT_RGB565_1X24_CPADHI format used by the Geekworm
> > MZP280 panel for the Raspberry Pi.
> >
> > Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
> > Signed-off-by: Maxime Ripard <maxime@cerno.tech>
>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>
> > ---
> > .../userspace-api/media/v4l/subdev-formats.rst | 37 ++++++++++++++++++++++
> > include/uapi/linux/media-bus-format.h | 3 +-
> > 2 files changed, 39 insertions(+), 1 deletion(-)
> >
> > diff --git a/Documentation/userspace-api/media/v4l/subdev-formats.rst b/Documentation/userspace-api/media/v4l/subdev-formats.rst
> > index d21d532eee15..1e61c02aa788 100644
> > --- a/Documentation/userspace-api/media/v4l/subdev-formats.rst
> > +++ b/Documentation/userspace-api/media/v4l/subdev-formats.rst
> > @@ -986,6 +986,43 @@ The following tables list existing packed RGB formats.
> > - g\ :sub:`2`
> > - g\ :sub:`1`
> > - g\ :sub:`0`
> > + * .. _MEDIA-BUS-FMT-RGB565-1X24_CPADHI:
> > +
> > + - MEDIA_BUS_FMT_RGB565_1X24_CPADHI
> > + - 0x1022
> > + -
> > + -
> > + -
> > + -
> > + -
> > + -
> > + -
> > + -
> > + -
> > + - 0
> > + - 0
> > + - 0
> > + - r\ :sub:`4`
> > + - r\ :sub:`3`
> > + - r\ :sub:`2`
> > + - r\ :sub:`1`
> > + - r\ :sub:`0`
> > + - 0
> > + - 0
> > + - g\ :sub:`5`
> > + - g\ :sub:`4`
> > + - g\ :sub:`3`
> > + - g\ :sub:`2`
> > + - g\ :sub:`1`
> > + - g\ :sub:`0`
> > + - 0
> > + - 0
> > + - 0
> > + - b\ :sub:`4`
> > + - b\ :sub:`3`
> > + - b\ :sub:`2`
> > + - b\ :sub:`1`
> > + - b\ :sub:`0`
> > * .. _MEDIA-BUS-FMT-RGB666-1X24_CPADHI:
> >
> > - MEDIA_BUS_FMT_RGB666_1X24_CPADHI
> > diff --git a/include/uapi/linux/media-bus-format.h b/include/uapi/linux/media-bus-format.h
> > index ec3323dbb927..b0a945eb7040 100644
> > --- a/include/uapi/linux/media-bus-format.h
> > +++ b/include/uapi/linux/media-bus-format.h
> > @@ -34,13 +34,14 @@
> >
> > #define MEDIA_BUS_FMT_FIXED 0x0001
> >
> > -/* RGB - next is 0x1022 */
> > +/* RGB - next is 0x1023 */
> > #define MEDIA_BUS_FMT_RGB444_1X12 0x1016
> > #define MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE 0x1001
> > #define MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE 0x1002
> > #define MEDIA_BUS_FMT_RGB555_2X8_PADHI_BE 0x1003
> > #define MEDIA_BUS_FMT_RGB555_2X8_PADHI_LE 0x1004
> > #define MEDIA_BUS_FMT_RGB565_1X16 0x1017
> > +#define MEDIA_BUS_FMT_RGB565_1X24_CPADHI 0x1022
I spoke a bit too fast, this should go down with the other 1X24 formats.
The Rb tag still holds with this fixed.
> > #define MEDIA_BUS_FMT_BGR565_2X8_BE 0x1005
> > #define MEDIA_BUS_FMT_BGR565_2X8_LE 0x1006
> > #define MEDIA_BUS_FMT_RGB565_2X8_BE 0x1007
> >
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2 2/7] media: uapi: add MEDIA_BUS_FMT_BGR666_1X18
2022-10-20 8:30 [PATCH v2 0/7] drm/vc4: dpi: Various improvements Maxime Ripard
2022-10-20 8:30 ` [PATCH v2 1/7] media: uapi: add MEDIA_BUS_FMT_RGB565_1X24_CPADHI Maxime Ripard
@ 2022-10-20 8:30 ` Maxime Ripard
2022-11-29 12:26 ` Laurent Pinchart
2022-10-20 8:30 ` [PATCH v2 3/7] media: uapi: add MEDIA_BUS_FMT_BGR666_1X24_CPADHI Maxime Ripard
` (4 subsequent siblings)
6 siblings, 1 reply; 13+ messages in thread
From: Maxime Ripard @ 2022-10-20 8:30 UTC (permalink / raw)
To: Emma Anholt, Maxime Ripard, Rob Herring, Daniel Vetter,
Eric Anholt, David Airlie
Cc: dri-devel, linux-kernel, Joerg Quinten, Chris Morgan,
Dave Stevenson, Laurent Pinchart, Maxime Ripard
From: Joerg Quinten <aBUGSworstnightmare@gmail.com>
Add the BGR666 format MEDIA_BUS_FMT_BGR666_1X18 supported by the
RaspberryPi.
Signed-off-by: Joerg Quinten <aBUGSworstnightmare@gmail.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
.../userspace-api/media/v4l/subdev-formats.rst | 37 ++++++++++++++++++++++
include/uapi/linux/media-bus-format.h | 3 +-
2 files changed, 39 insertions(+), 1 deletion(-)
diff --git a/Documentation/userspace-api/media/v4l/subdev-formats.rst b/Documentation/userspace-api/media/v4l/subdev-formats.rst
index 1e61c02aa788..68f8d7d37984 100644
--- a/Documentation/userspace-api/media/v4l/subdev-formats.rst
+++ b/Documentation/userspace-api/media/v4l/subdev-formats.rst
@@ -912,6 +912,43 @@ The following tables list existing packed RGB formats.
- g\ :sub:`5`
- g\ :sub:`4`
- g\ :sub:`3`
+ * .. _MEDIA-BUS-FMT-BGR666-1X18:
+
+ - MEDIA_BUS_FMT_BGR666_1X18
+ - 0x1023
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ - b\ :sub:`5`
+ - b\ :sub:`4`
+ - b\ :sub:`3`
+ - b\ :sub:`2`
+ - b\ :sub:`1`
+ - b\ :sub:`0`
+ - g\ :sub:`5`
+ - g\ :sub:`4`
+ - g\ :sub:`3`
+ - g\ :sub:`2`
+ - g\ :sub:`1`
+ - g\ :sub:`0`
+ - r\ :sub:`5`
+ - r\ :sub:`4`
+ - r\ :sub:`3`
+ - r\ :sub:`2`
+ - r\ :sub:`1`
+ - r\ :sub:`0`
* .. _MEDIA-BUS-FMT-RGB666-1X18:
- MEDIA_BUS_FMT_RGB666_1X18
diff --git a/include/uapi/linux/media-bus-format.h b/include/uapi/linux/media-bus-format.h
index b0a945eb7040..2ee0b38c0a71 100644
--- a/include/uapi/linux/media-bus-format.h
+++ b/include/uapi/linux/media-bus-format.h
@@ -34,7 +34,7 @@
#define MEDIA_BUS_FMT_FIXED 0x0001
-/* RGB - next is 0x1023 */
+/* RGB - next is 0x1024 */
#define MEDIA_BUS_FMT_RGB444_1X12 0x1016
#define MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE 0x1001
#define MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE 0x1002
@@ -46,6 +46,7 @@
#define MEDIA_BUS_FMT_BGR565_2X8_LE 0x1006
#define MEDIA_BUS_FMT_RGB565_2X8_BE 0x1007
#define MEDIA_BUS_FMT_RGB565_2X8_LE 0x1008
+#define MEDIA_BUS_FMT_BGR666_1X18 0x1023
#define MEDIA_BUS_FMT_RGB666_1X18 0x1009
#define MEDIA_BUS_FMT_RBG888_1X24 0x100e
#define MEDIA_BUS_FMT_RGB666_1X24_CPADHI 0x1015
--
b4 0.10.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: [PATCH v2 2/7] media: uapi: add MEDIA_BUS_FMT_BGR666_1X18
2022-10-20 8:30 ` [PATCH v2 2/7] media: uapi: add MEDIA_BUS_FMT_BGR666_1X18 Maxime Ripard
@ 2022-11-29 12:26 ` Laurent Pinchart
0 siblings, 0 replies; 13+ messages in thread
From: Laurent Pinchart @ 2022-11-29 12:26 UTC (permalink / raw)
To: Maxime Ripard
Cc: Emma Anholt, Maxime Ripard, Rob Herring, Daniel Vetter,
Eric Anholt, David Airlie, dri-devel, linux-kernel, Joerg Quinten,
Chris Morgan, Dave Stevenson
Hi Maxime and Joerg,
Thank you for the patch.
On Thu, Oct 20, 2022 at 10:30:46AM +0200, Maxime Ripard wrote:
> From: Joerg Quinten <aBUGSworstnightmare@gmail.com>
>
> Add the BGR666 format MEDIA_BUS_FMT_BGR666_1X18 supported by the
> RaspberryPi.
>
> Signed-off-by: Joerg Quinten <aBUGSworstnightmare@gmail.com>
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> ---
> .../userspace-api/media/v4l/subdev-formats.rst | 37 ++++++++++++++++++++++
> include/uapi/linux/media-bus-format.h | 3 +-
> 2 files changed, 39 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/userspace-api/media/v4l/subdev-formats.rst b/Documentation/userspace-api/media/v4l/subdev-formats.rst
> index 1e61c02aa788..68f8d7d37984 100644
> --- a/Documentation/userspace-api/media/v4l/subdev-formats.rst
> +++ b/Documentation/userspace-api/media/v4l/subdev-formats.rst
> @@ -912,6 +912,43 @@ The following tables list existing packed RGB formats.
> - g\ :sub:`5`
> - g\ :sub:`4`
> - g\ :sub:`3`
> + * .. _MEDIA-BUS-FMT-BGR666-1X18:
> +
> + - MEDIA_BUS_FMT_BGR666_1X18
> + - 0x1023
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + - b\ :sub:`5`
> + - b\ :sub:`4`
> + - b\ :sub:`3`
> + - b\ :sub:`2`
> + - b\ :sub:`1`
> + - b\ :sub:`0`
> + - g\ :sub:`5`
> + - g\ :sub:`4`
> + - g\ :sub:`3`
> + - g\ :sub:`2`
> + - g\ :sub:`1`
> + - g\ :sub:`0`
> + - r\ :sub:`5`
> + - r\ :sub:`4`
> + - r\ :sub:`3`
> + - r\ :sub:`2`
> + - r\ :sub:`1`
> + - r\ :sub:`0`
> * .. _MEDIA-BUS-FMT-RGB666-1X18:
>
> - MEDIA_BUS_FMT_RGB666_1X18
> diff --git a/include/uapi/linux/media-bus-format.h b/include/uapi/linux/media-bus-format.h
> index b0a945eb7040..2ee0b38c0a71 100644
> --- a/include/uapi/linux/media-bus-format.h
> +++ b/include/uapi/linux/media-bus-format.h
> @@ -34,7 +34,7 @@
>
> #define MEDIA_BUS_FMT_FIXED 0x0001
>
> -/* RGB - next is 0x1023 */
> +/* RGB - next is 0x1024 */
> #define MEDIA_BUS_FMT_RGB444_1X12 0x1016
> #define MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE 0x1001
> #define MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE 0x1002
> @@ -46,6 +46,7 @@
> #define MEDIA_BUS_FMT_BGR565_2X8_LE 0x1006
> #define MEDIA_BUS_FMT_RGB565_2X8_BE 0x1007
> #define MEDIA_BUS_FMT_RGB565_2X8_LE 0x1008
> +#define MEDIA_BUS_FMT_BGR666_1X18 0x1023
> #define MEDIA_BUS_FMT_RGB666_1X18 0x1009
> #define MEDIA_BUS_FMT_RBG888_1X24 0x100e
> #define MEDIA_BUS_FMT_RGB666_1X24_CPADHI 0x1015
>
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2 3/7] media: uapi: add MEDIA_BUS_FMT_BGR666_1X24_CPADHI
2022-10-20 8:30 [PATCH v2 0/7] drm/vc4: dpi: Various improvements Maxime Ripard
2022-10-20 8:30 ` [PATCH v2 1/7] media: uapi: add MEDIA_BUS_FMT_RGB565_1X24_CPADHI Maxime Ripard
2022-10-20 8:30 ` [PATCH v2 2/7] media: uapi: add MEDIA_BUS_FMT_BGR666_1X18 Maxime Ripard
@ 2022-10-20 8:30 ` Maxime Ripard
2022-11-29 12:38 ` Laurent Pinchart
2022-10-20 8:30 ` [PATCH v2 4/7] drm/vc4: dpi: Support RGB565 format Maxime Ripard
` (3 subsequent siblings)
6 siblings, 1 reply; 13+ messages in thread
From: Maxime Ripard @ 2022-10-20 8:30 UTC (permalink / raw)
To: Emma Anholt, Maxime Ripard, Rob Herring, Daniel Vetter,
Eric Anholt, David Airlie
Cc: dri-devel, linux-kernel, Joerg Quinten, Chris Morgan,
Dave Stevenson, Laurent Pinchart, Maxime Ripard
From: Joerg Quinten <aBUGSworstnightmare@gmail.com>
Add the BGR666 format MEDIA_BUS_FMT_BGR666_1X24_CPADHI supported by the
RaspberryPi.
Signed-off-by: Joerg Quinten <aBUGSworstnightmare@gmail.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
.../userspace-api/media/v4l/subdev-formats.rst | 37 ++++++++++++++++++++++
include/uapi/linux/media-bus-format.h | 3 +-
2 files changed, 39 insertions(+), 1 deletion(-)
diff --git a/Documentation/userspace-api/media/v4l/subdev-formats.rst b/Documentation/userspace-api/media/v4l/subdev-formats.rst
index 68f8d7d37984..604a30e2f890 100644
--- a/Documentation/userspace-api/media/v4l/subdev-formats.rst
+++ b/Documentation/userspace-api/media/v4l/subdev-formats.rst
@@ -1023,6 +1023,43 @@ The following tables list existing packed RGB formats.
- g\ :sub:`2`
- g\ :sub:`1`
- g\ :sub:`0`
+ * .. _MEDIA-BUS-FMT-BGR666-1X24_CPADHI:
+
+ - MEDIA_BUS_FMT_BGR666_1X24_CPADHI
+ - 0x1024
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ -
+ - 0
+ - 0
+ - b\ :sub:`5`
+ - b\ :sub:`4`
+ - b\ :sub:`3`
+ - b\ :sub:`2`
+ - b\ :sub:`1`
+ - b\ :sub:`0`
+ - 0
+ - 0
+ - g\ :sub:`5`
+ - g\ :sub:`4`
+ - g\ :sub:`3`
+ - g\ :sub:`2`
+ - g\ :sub:`1`
+ - g\ :sub:`0`
+ - 0
+ - 0
+ - r\ :sub:`5`
+ - r\ :sub:`4`
+ - r\ :sub:`3`
+ - r\ :sub:`2`
+ - r\ :sub:`1`
+ - r\ :sub:`0`
* .. _MEDIA-BUS-FMT-RGB565-1X24_CPADHI:
- MEDIA_BUS_FMT_RGB565_1X24_CPADHI
diff --git a/include/uapi/linux/media-bus-format.h b/include/uapi/linux/media-bus-format.h
index 2ee0b38c0a71..d4228d038b54 100644
--- a/include/uapi/linux/media-bus-format.h
+++ b/include/uapi/linux/media-bus-format.h
@@ -34,7 +34,7 @@
#define MEDIA_BUS_FMT_FIXED 0x0001
-/* RGB - next is 0x1024 */
+/* RGB - next is 0x1025 */
#define MEDIA_BUS_FMT_RGB444_1X12 0x1016
#define MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE 0x1001
#define MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE 0x1002
@@ -49,6 +49,7 @@
#define MEDIA_BUS_FMT_BGR666_1X18 0x1023
#define MEDIA_BUS_FMT_RGB666_1X18 0x1009
#define MEDIA_BUS_FMT_RBG888_1X24 0x100e
+#define MEDIA_BUS_FMT_BGR666_1X24_CPADHI 0x1024
#define MEDIA_BUS_FMT_RGB666_1X24_CPADHI 0x1015
#define MEDIA_BUS_FMT_RGB666_1X7X3_SPWG 0x1010
#define MEDIA_BUS_FMT_BGR888_1X24 0x1013
--
b4 0.10.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: [PATCH v2 3/7] media: uapi: add MEDIA_BUS_FMT_BGR666_1X24_CPADHI
2022-10-20 8:30 ` [PATCH v2 3/7] media: uapi: add MEDIA_BUS_FMT_BGR666_1X24_CPADHI Maxime Ripard
@ 2022-11-29 12:38 ` Laurent Pinchart
[not found] ` <CACfkkaMX8jVU1OJNCwYKWWHRuXpAXNauZ8OvZs6d1ty24K+8kA@mail.gmail.com>
0 siblings, 1 reply; 13+ messages in thread
From: Laurent Pinchart @ 2022-11-29 12:38 UTC (permalink / raw)
To: Maxime Ripard
Cc: Emma Anholt, Maxime Ripard, Rob Herring, Daniel Vetter,
Eric Anholt, David Airlie, dri-devel, linux-kernel, Joerg Quinten,
Chris Morgan, Dave Stevenson
Hi Maxime and Joerg,
Thank you for the patch.
On Thu, Oct 20, 2022 at 10:30:47AM +0200, Maxime Ripard wrote:
> From: Joerg Quinten <aBUGSworstnightmare@gmail.com>
>
> Add the BGR666 format MEDIA_BUS_FMT_BGR666_1X24_CPADHI supported by the
> RaspberryPi.
>
> Signed-off-by: Joerg Quinten <aBUGSworstnightmare@gmail.com>
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> ---
> .../userspace-api/media/v4l/subdev-formats.rst | 37 ++++++++++++++++++++++
> include/uapi/linux/media-bus-format.h | 3 +-
> 2 files changed, 39 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/userspace-api/media/v4l/subdev-formats.rst b/Documentation/userspace-api/media/v4l/subdev-formats.rst
> index 68f8d7d37984..604a30e2f890 100644
> --- a/Documentation/userspace-api/media/v4l/subdev-formats.rst
> +++ b/Documentation/userspace-api/media/v4l/subdev-formats.rst
> @@ -1023,6 +1023,43 @@ The following tables list existing packed RGB formats.
> - g\ :sub:`2`
> - g\ :sub:`1`
> - g\ :sub:`0`
> + * .. _MEDIA-BUS-FMT-BGR666-1X24_CPADHI:
I would move this just below MEDIA_BUS_FMT_RGB565_1X24_CPADHI. Actually,
could you check 1/7 and 2/7 to make sure the formats are sorted in the
documentation in the same order as in the header ?
> +
> + - MEDIA_BUS_FMT_BGR666_1X24_CPADHI
> + - 0x1024
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + - 0
> + - 0
> + - b\ :sub:`5`
> + - b\ :sub:`4`
> + - b\ :sub:`3`
> + - b\ :sub:`2`
> + - b\ :sub:`1`
> + - b\ :sub:`0`
> + - 0
> + - 0
> + - g\ :sub:`5`
> + - g\ :sub:`4`
> + - g\ :sub:`3`
> + - g\ :sub:`2`
> + - g\ :sub:`1`
> + - g\ :sub:`0`
> + - 0
> + - 0
> + - r\ :sub:`5`
> + - r\ :sub:`4`
> + - r\ :sub:`3`
> + - r\ :sub:`2`
> + - r\ :sub:`1`
> + - r\ :sub:`0`
> * .. _MEDIA-BUS-FMT-RGB565-1X24_CPADHI:
>
> - MEDIA_BUS_FMT_RGB565_1X24_CPADHI
> diff --git a/include/uapi/linux/media-bus-format.h b/include/uapi/linux/media-bus-format.h
> index 2ee0b38c0a71..d4228d038b54 100644
> --- a/include/uapi/linux/media-bus-format.h
> +++ b/include/uapi/linux/media-bus-format.h
> @@ -34,7 +34,7 @@
>
> #define MEDIA_BUS_FMT_FIXED 0x0001
>
> -/* RGB - next is 0x1024 */
> +/* RGB - next is 0x1025 */
> #define MEDIA_BUS_FMT_RGB444_1X12 0x1016
> #define MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE 0x1001
> #define MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE 0x1002
> @@ -49,6 +49,7 @@
> #define MEDIA_BUS_FMT_BGR666_1X18 0x1023
> #define MEDIA_BUS_FMT_RGB666_1X18 0x1009
> #define MEDIA_BUS_FMT_RBG888_1X24 0x100e
> +#define MEDIA_BUS_FMT_BGR666_1X24_CPADHI 0x1024
> #define MEDIA_BUS_FMT_RGB666_1X24_CPADHI 0x1015
> #define MEDIA_BUS_FMT_RGB666_1X7X3_SPWG 0x1010
> #define MEDIA_BUS_FMT_BGR888_1X24 0x1013
>
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2 4/7] drm/vc4: dpi: Support RGB565 format
2022-10-20 8:30 [PATCH v2 0/7] drm/vc4: dpi: Various improvements Maxime Ripard
` (2 preceding siblings ...)
2022-10-20 8:30 ` [PATCH v2 3/7] media: uapi: add MEDIA_BUS_FMT_BGR666_1X24_CPADHI Maxime Ripard
@ 2022-10-20 8:30 ` Maxime Ripard
2022-10-20 8:30 ` [PATCH v2 5/7] drm/vc4: dpi: Support BGR666 formats Maxime Ripard
` (2 subsequent siblings)
6 siblings, 0 replies; 13+ messages in thread
From: Maxime Ripard @ 2022-10-20 8:30 UTC (permalink / raw)
To: Emma Anholt, Maxime Ripard, Rob Herring, Daniel Vetter,
Eric Anholt, David Airlie
Cc: dri-devel, linux-kernel, Joerg Quinten, Chris Morgan,
Dave Stevenson, Laurent Pinchart, Maxime Ripard
From: Chris Morgan <macromorgan@hotmail.com>
The RGB565 format with padding over 24 bits
(MEDIA_BUS_FMT_RGB565_1X24_CPADHI) is supported by the vc4 DPI
controller. This is what the Geekworm MZP280 DPI display uses, so let's
add support for it in the DPI controller driver.
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
drivers/gpu/drm/vc4/vc4_dpi.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/vc4/vc4_dpi.c b/drivers/gpu/drm/vc4/vc4_dpi.c
index 1f8f44b7b5a5..7da3dd1db50e 100644
--- a/drivers/gpu/drm/vc4/vc4_dpi.c
+++ b/drivers/gpu/drm/vc4/vc4_dpi.c
@@ -182,6 +182,10 @@ static void vc4_dpi_encoder_enable(struct drm_encoder *encoder)
dpi_c |= VC4_SET_FIELD(DPI_FORMAT_16BIT_565_RGB_3,
DPI_FORMAT);
break;
+ case MEDIA_BUS_FMT_RGB565_1X24_CPADHI:
+ dpi_c |= VC4_SET_FIELD(DPI_FORMAT_16BIT_565_RGB_2,
+ DPI_FORMAT);
+ break;
default:
DRM_ERROR("Unknown media bus format %d\n",
bus_format);
--
b4 0.10.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH v2 5/7] drm/vc4: dpi: Support BGR666 formats
2022-10-20 8:30 [PATCH v2 0/7] drm/vc4: dpi: Various improvements Maxime Ripard
` (3 preceding siblings ...)
2022-10-20 8:30 ` [PATCH v2 4/7] drm/vc4: dpi: Support RGB565 format Maxime Ripard
@ 2022-10-20 8:30 ` Maxime Ripard
2022-10-20 8:30 ` [PATCH v2 6/7] drm/vc4: dpi: Change the default DPI format to being 18bpp, not 24 Maxime Ripard
2022-10-20 8:30 ` [PATCH v2 7/7] drm/vc4: dpi: Fix format mapping for RGB565 Maxime Ripard
6 siblings, 0 replies; 13+ messages in thread
From: Maxime Ripard @ 2022-10-20 8:30 UTC (permalink / raw)
To: Emma Anholt, Maxime Ripard, Rob Herring, Daniel Vetter,
Eric Anholt, David Airlie
Cc: dri-devel, linux-kernel, Joerg Quinten, Chris Morgan,
Dave Stevenson, Laurent Pinchart, Maxime Ripard
From: Joerg Quinten <aBUGSworstnightmare@gmail.com>
The VC4 DPI output can support multiple BGR666 variants, but they were
never added to the driver. Let's add the the support for those formats.
Signed-off-by: Joerg Quinten <aBUGSworstnightmare@gmail.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
drivers/gpu/drm/vc4/vc4_dpi.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/gpu/drm/vc4/vc4_dpi.c b/drivers/gpu/drm/vc4/vc4_dpi.c
index 7da3dd1db50e..ecbe4cd87036 100644
--- a/drivers/gpu/drm/vc4/vc4_dpi.c
+++ b/drivers/gpu/drm/vc4/vc4_dpi.c
@@ -170,10 +170,16 @@ static void vc4_dpi_encoder_enable(struct drm_encoder *encoder)
dpi_c |= VC4_SET_FIELD(DPI_ORDER_BGR,
DPI_ORDER);
break;
+ case MEDIA_BUS_FMT_BGR666_1X24_CPADHI:
+ dpi_c |= VC4_SET_FIELD(DPI_ORDER_BGR, DPI_ORDER);
+ fallthrough;
case MEDIA_BUS_FMT_RGB666_1X24_CPADHI:
dpi_c |= VC4_SET_FIELD(DPI_FORMAT_18BIT_666_RGB_2,
DPI_FORMAT);
break;
+ case MEDIA_BUS_FMT_BGR666_1X18:
+ dpi_c |= VC4_SET_FIELD(DPI_ORDER_BGR, DPI_ORDER);
+ fallthrough;
case MEDIA_BUS_FMT_RGB666_1X18:
dpi_c |= VC4_SET_FIELD(DPI_FORMAT_18BIT_666_RGB_1,
DPI_FORMAT);
--
b4 0.10.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH v2 6/7] drm/vc4: dpi: Change the default DPI format to being 18bpp, not 24.
2022-10-20 8:30 [PATCH v2 0/7] drm/vc4: dpi: Various improvements Maxime Ripard
` (4 preceding siblings ...)
2022-10-20 8:30 ` [PATCH v2 5/7] drm/vc4: dpi: Support BGR666 formats Maxime Ripard
@ 2022-10-20 8:30 ` Maxime Ripard
2022-10-20 8:30 ` [PATCH v2 7/7] drm/vc4: dpi: Fix format mapping for RGB565 Maxime Ripard
6 siblings, 0 replies; 13+ messages in thread
From: Maxime Ripard @ 2022-10-20 8:30 UTC (permalink / raw)
To: Emma Anholt, Maxime Ripard, Rob Herring, Daniel Vetter,
Eric Anholt, David Airlie
Cc: dri-devel, linux-kernel, Joerg Quinten, Chris Morgan,
Dave Stevenson, Laurent Pinchart, Maxime Ripard
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
DPI hasn't really been used up until now, so the default has
been meaningless.
In theory we should be able to pass the desired format for the
adjacent bridge chip through, but framework seems to be missing
for that.
As the main device to use DPI is the VGA666 or Adafruit Kippah,
both of which use RGB666, change the default to being RGB666 instead
of RGB888.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
drivers/gpu/drm/vc4/vc4_dpi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/vc4/vc4_dpi.c b/drivers/gpu/drm/vc4/vc4_dpi.c
index ecbe4cd87036..fdae02760b6d 100644
--- a/drivers/gpu/drm/vc4/vc4_dpi.c
+++ b/drivers/gpu/drm/vc4/vc4_dpi.c
@@ -150,8 +150,8 @@ static void vc4_dpi_encoder_enable(struct drm_encoder *encoder)
}
drm_connector_list_iter_end(&conn_iter);
- /* Default to 24bit if no connector or format found. */
- dpi_c |= VC4_SET_FIELD(DPI_FORMAT_24BIT_888_RGB, DPI_FORMAT);
+ /* Default to 18bit if no connector or format found. */
+ dpi_c |= VC4_SET_FIELD(DPI_FORMAT_18BIT_666_RGB_1, DPI_FORMAT);
if (connector) {
if (connector->display_info.num_bus_formats) {
--
b4 0.10.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH v2 7/7] drm/vc4: dpi: Fix format mapping for RGB565
2022-10-20 8:30 [PATCH v2 0/7] drm/vc4: dpi: Various improvements Maxime Ripard
` (5 preceding siblings ...)
2022-10-20 8:30 ` [PATCH v2 6/7] drm/vc4: dpi: Change the default DPI format to being 18bpp, not 24 Maxime Ripard
@ 2022-10-20 8:30 ` Maxime Ripard
6 siblings, 0 replies; 13+ messages in thread
From: Maxime Ripard @ 2022-10-20 8:30 UTC (permalink / raw)
To: Emma Anholt, Maxime Ripard, Rob Herring, Daniel Vetter,
Eric Anholt, David Airlie
Cc: dri-devel, linux-kernel, Joerg Quinten, Chris Morgan,
Dave Stevenson, Laurent Pinchart, Maxime Ripard
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
The mapping is incorrect for RGB565_1X16 as it should be
DPI_FORMAT_18BIT_666_RGB_1 instead of DPI_FORMAT_18BIT_666_RGB_3.
Fixes: 08302c35b59d ("drm/vc4: Add DPI driver")
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
drivers/gpu/drm/vc4/vc4_dpi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/vc4/vc4_dpi.c b/drivers/gpu/drm/vc4/vc4_dpi.c
index fdae02760b6d..a7bebfa5d5b0 100644
--- a/drivers/gpu/drm/vc4/vc4_dpi.c
+++ b/drivers/gpu/drm/vc4/vc4_dpi.c
@@ -185,7 +185,7 @@ static void vc4_dpi_encoder_enable(struct drm_encoder *encoder)
DPI_FORMAT);
break;
case MEDIA_BUS_FMT_RGB565_1X16:
- dpi_c |= VC4_SET_FIELD(DPI_FORMAT_16BIT_565_RGB_3,
+ dpi_c |= VC4_SET_FIELD(DPI_FORMAT_16BIT_565_RGB_1,
DPI_FORMAT);
break;
case MEDIA_BUS_FMT_RGB565_1X24_CPADHI:
--
b4 0.10.1
^ permalink raw reply related [flat|nested] 13+ messages in thread