Re: [PATCH v1 1/1] dt-bindings: display: fix panel warnings

2020-03-14 Thread Sam Ravnborg
On Sun, Mar 08, 2020 at 12:50:17PM +0100, Sam Ravnborg wrote:
> Fix following type af warnings in the panel bindings:
> 
> Warning (unit_address_vs_reg): /example-0/dsi/panel: node has a reg or ranges 
> property, but no unit name
> Warning (unit_address_vs_reg): /example-0/dsi@ff45: node has a unit name, 
> but no reg property
> 
> Removing the "@xxx" from the node name fixed first warning.
> Adding a missing reg property fixed the second warning
> 
> Signed-off-by: Sam Ravnborg 
> Cc: Thierry Reding 
> Cc: Linus Walleij 
> Cc: Rob Herring 
> Cc: Heiko Stuebner 
> Cc: Maxime Ripard 
> Cc: Benjamin Gaignard 
> Cc: Laurent Pinchart 

Applied and pushed to drm-misc-next with Rob's fix.
Thanks for the reviews!

Sam
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH] drm/tiny: fix sparse warning: incorrect type in assignment (different base types)

2020-03-14 Thread Sam Ravnborg
Hi Kamlesh

On Sun, Mar 08, 2020 at 09:44:44PM +0530, Kamlesh Gurudasani wrote:
> This fixes the following sparse warning:
> 
> drivers/gpu/drm/tiny/ili9486.c:61:16: sparse: sparse: incorrect type in 
> assignment (different base types)
> drivers/gpu/drm/tiny/ili9486.c:61:16: sparse:expected unsigned short 
> [usertype]
> drivers/gpu/drm/tiny/ili9486.c:61:16: sparse:got restricted __be16 
> [usertype]
> drivers/gpu/drm/tiny/ili9486.c:71:32: sparse: sparse: incorrect type in 
> assignment (different base types)
> drivers/gpu/drm/tiny/ili9486.c:71:32: sparse:expected unsigned short 
> [usertype]
> drivers/gpu/drm/tiny/ili9486.c:71:32: sparse:got restricted __be16 
> [usertype]
> 
> Reported-by: kbuild test robot 
> Signed-off-by: Kamlesh Gurudasani 

Thanks. Applied and pushed to drm-misc-next.

Sam

> ---
>  drivers/gpu/drm/tiny/ili9486.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/tiny/ili9486.c b/drivers/gpu/drm/tiny/ili9486.c
> index 5084b38..532560ae 100644
> --- a/drivers/gpu/drm/tiny/ili9486.c
> +++ b/drivers/gpu/drm/tiny/ili9486.c
> @@ -45,7 +45,7 @@ static int waveshare_command(struct mipi_dbi *mipi, u8 
> *cmd, u8 *par,
>   void *data = par;
>   u32 speed_hz;
>   int i, ret;
> - u16 *buf;
> + __be16 *buf;
>  
>   buf = kmalloc(32 * sizeof(u16), GFP_KERNEL);
>   if (!buf)
> -- 
> 2.7.4
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH v4 1/2] dt-bindings: display: Add idk-1110wr binding

2020-03-14 Thread Sam Ravnborg
Hi Prabhakar

On Wed, Mar 11, 2020 at 08:03:39PM +, Lad Prabhakar wrote:
> From: Fabrizio Castro 
> 
> Add binding for the idk-1110wr LVDS panel from Advantech.
> 
> Some panel-specific documentation can be found here:
> https://buy.advantech.eu/Displays/Embedded-LCD-Kits-LCD-Kit-Modules/model-IDK-1110WR-55WSA1E.htm
> 
> Signed-off-by: Fabrizio Castro 
> Reviewed-by: Rob Herring 
> Reviewed-by: Laurent Pinchart 
> Signed-off-by: Lad Prabhakar 

Applied, and pushed to drm-misc-next.

Sam

> ---
>  .../display/panel/advantech,idk-1110wr.yaml| 69 
> ++
>  1 file changed, 69 insertions(+)
>  create mode 100644 
> Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml
> 
> diff --git 
> a/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml 
> b/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml
> new file mode 100644
> index 000..93878c2
> --- /dev/null
> +++ 
> b/Documentation/devicetree/bindings/display/panel/advantech,idk-1110wr.yaml
> @@ -0,0 +1,69 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/panel/advantech,idk-1110wr.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Advantech IDK-1110WR 10.1" WSVGA LVDS Display Panel
> +
> +maintainers:
> +  - Lad Prabhakar 
> +  - Thierry Reding 
> +
> +allOf:
> +  - $ref: lvds.yaml#
> +
> +properties:
> +  compatible:
> +items:
> +  - const: advantech,idk-1110wr
> +  - {} # panel-lvds, but not listed here to avoid false select
> +
> +  data-mapping:
> +const: jeida-24
> +
> +  width-mm:
> +const: 223
> +
> +  height-mm:
> +const: 125
> +
> +  panel-timing: true
> +  port: true
> +
> +additionalProperties: false
> +
> +required:
> +  - compatible
> +
> +examples:
> +  - |+
> +panel {
> +  compatible = "advantech,idk-1110wr", "panel-lvds";
> +
> +  width-mm = <223>;
> +  height-mm = <125>;
> +
> +  data-mapping = "jeida-24";
> +
> +  panel-timing {
> +/* 1024x600 @60Hz */
> +clock-frequency = <5120>;
> +hactive = <1024>;
> +vactive = <600>;
> +hsync-len = <240>;
> +hfront-porch = <40>;
> +hback-porch = <40>;
> +vsync-len = <10>;
> +vfront-porch = <15>;
> +vback-porch = <10>;
> +  };
> +
> +  port {
> +panel_in: endpoint {
> +  remote-endpoint = <&lvds_encoder>;
> +};
> +  };
> +};
> +
> +...
> -- 
> 2.7.4
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH 2/5] dt-bindings: panel: add binding for Xingbangda XBD599 panel

2020-03-14 Thread Sam Ravnborg
Hi Icenowy

A few comment below.

Sam

On Thu, Mar 12, 2020 at 12:33:26AM +0800, Icenowy Zheng wrote:
> Xingbangda XBD599 is a 5.99" 720x1440 MIPI-DSI LCD panel.
> 
> Add its device tree binding.
> 
> Signed-off-by: Icenowy Zheng 
> ---
>  .../display/panel/xingbangda,xbd599.yaml  | 50 +++
>  1 file changed, 50 insertions(+)
>  create mode 100644 
> Documentation/devicetree/bindings/display/panel/xingbangda,xbd599.yaml
> 
> diff --git 
> a/Documentation/devicetree/bindings/display/panel/xingbangda,xbd599.yaml 
> b/Documentation/devicetree/bindings/display/panel/xingbangda,xbd599.yaml
> new file mode 100644
> index ..62816b34de31
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/panel/xingbangda,xbd599.yaml
> @@ -0,0 +1,50 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/panel/xingbangda,xbd599.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Xingbangda XBD599 5.99in MIPI-DSI LCD panel
> +
> +maintainers:
> +  - Icenowy Zheng 
> +
> +allOf:
> +  - $ref: panel-common.yaml#
> +
> +properties:
> +  compatible:
> +const: xingbangda,xbd599
> +  reg: true
> +  backlight: true
> +  reset-gpios: true
> +  vcc-supply:
> + description: regulator that supplies the VCC voltage
Fix indent - two chars, not three

> +  iovcc-supply:
> + description: regulator that supplies the IOVCC voltage
Same here

> +
> +required:
> +  - compatible
> +  - reg
> +  - backlight
> +  - vcc-supply
> +  - iovcc-supply
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +&dsi {
Remove '&' - dt_binding_check will fail otherwise

> +#address-cells = <1>;
> +#size-cells = <0>;
> +
> +panel@0 {
> +compatible = "xingbangda,xbd599";
> +reg = <0>;
> +backlight = <&backlight>;
> +iovcc-supply = <®_dldo2>;
> +vcc-supply = <®_ldo_io0>;
> +};
> +};
> +
> +...
> -- 
> 2.24.1
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH 3/5] drm: panel: add Xingbangda XBD599 panel

2020-03-14 Thread Sam Ravnborg
Hi Icenowy

A few details in the following.

Sam

On Thu, Mar 12, 2020 at 12:33:27AM +0800, Icenowy Zheng wrote:
> Xingbangda XBD599 is a 5.99" 720x1440 MIPI-DSI IPS LCD panel made by
> Xingbangda, which is used on PinePhone final assembled phones.
> 
> Add support for it.
> 
> Signed-off-by: Icenowy Zheng 
> ---
>  drivers/gpu/drm/panel/Kconfig |   9 +
>  drivers/gpu/drm/panel/Makefile|   1 +
>  .../gpu/drm/panel/panel-xingbangda-xbd599.c   | 367 ++
>  3 files changed, 377 insertions(+)
>  create mode 100644 drivers/gpu/drm/panel/panel-xingbangda-xbd599.c
> 
> +++ b/drivers/gpu/drm/panel/panel-xingbangda-xbd599.c
> @@ -0,0 +1,367 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Xingbangda XBD599 MIPI-DSI panel driver
> + *
> + * Copyright (C) 2019 Icenowy Zheng 
2020?

> + *
> + * Based on panel-rocktech-jh057n00900.c, which is:
> + *   Copyright (C) Purism SPC 2019
> + */
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
Sort alphabetically.

> +
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#define DRV_NAME "panel-xingbangda-xbd599"
No reason for this indirection, it is only used once

> +
> +/* Manufacturer specific Commands send via DSI */
> +#define ST7703_CMD_ALL_PIXEL_OFF 0x22
> +#define ST7703_CMD_ALL_PIXEL_ON   0x23
> +#define ST7703_CMD_SETDISP0xB2
> +#define ST7703_CMD_SETRGBIF   0xB3
> +#define ST7703_CMD_SETCYC 0xB4
> +#define ST7703_CMD_SETBGP 0xB5
> +#define ST7703_CMD_SETVCOM0xB6
> +#define ST7703_CMD_SETOTP 0xB7
> +#define ST7703_CMD_SETPOWER_EXT   0xB8
> +#define ST7703_CMD_SETEXTC0xB9
> +#define ST7703_CMD_SETMIPI0xBA
> +#define ST7703_CMD_SETVDC 0xBC
> +#define ST7703_CMD_SETSCR 0xC0
> +#define ST7703_CMD_SETPOWER   0xC1
> +#define ST7703_CMD_UNK_C6 0xC6
> +#define ST7703_CMD_SETPANEL   0xCC
> +#define ST7703_CMD_SETGAMMA   0xE0
> +#define ST7703_CMD_SETEQ  0xE3
> +#define ST7703_CMD_SETGIP10xE9
> +#define ST7703_CMD_SETGIP20xEA
> +
> +static const char * const regulator_names[] = {
> + "iovcc",
> + "vcc",
> +};
> +
> +struct xbd599 {
> + struct device *dev;
> + struct drm_panel panel;
> + struct gpio_desc *reset_gpio;
> + struct regulator_bulk_data supplies[ARRAY_SIZE(regulator_names)];
> + bool prepared;
> +};
> +
> +static inline struct xbd599 *panel_to_xbd599(struct drm_panel *panel)
> +{
> + return container_of(panel, struct xbd599, panel);
> +}
> +
> +#define dsi_dcs_write_seq(dsi, cmd, seq...) do { \
> + static const u8 d[] = { seq };  \
> + int ret;\
> + ret = mipi_dsi_dcs_write(dsi, cmd, d, ARRAY_SIZE(d));   \
> + if (ret < 0)\
> + return ret; \
> + } while (0)
> +
> +static int xbd599_init_sequence(struct xbd599 *ctx)
> +{
> + struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
> + struct device *dev = ctx->dev;
> + int ret;
> +
> + /*
> +  * Init sequence was supplied by the panel vendor.
> +  */
> + dsi_dcs_write_seq(dsi, ST7703_CMD_SETEXTC,
> +   0xF1, 0x12, 0x83);
> + dsi_dcs_write_seq(dsi, ST7703_CMD_SETMIPI,
> +   0x33, 0x81, 0x05, 0xF9, 0x0E, 0x0E, 0x20, 0x00,
> +   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x25,
> +   0x00, 0x91, 0x0a, 0x00, 0x00, 0x02, 0x4F, 0x11,
> +   0x00, 0x00, 0x37);
> + dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER_EXT,
> +   0x25, 0x22, 0x20, 0x03);
> + dsi_dcs_write_seq(dsi, ST7703_CMD_SETRGBIF,
> +   0x10, 0x10, 0x05, 0x05, 0x03, 0xFF, 0x00, 0x00,
> +   0x00, 0x00);
> + dsi_dcs_write_seq(dsi, ST7703_CMD_SETSCR,
> +   0x73, 0x73, 0x50, 0x50, 0x00, 0xC0, 0x08, 0x70,
> +   0x00);
> + dsi_dcs_write_seq(dsi, ST7703_CMD_SETVDC, 0x4E);
> + dsi_dcs_write_seq(dsi, ST7703_CMD_SETPANEL, 0x0B);
> + dsi_dcs_write_seq(dsi, ST7703_CMD_SETCYC, 0x80);
> + dsi_dcs_write_seq(dsi, ST7703_CMD_SETDISP, 0xF0, 0x12, 0xF0);
> + dsi_dcs_write_seq(dsi, ST7703_CMD_SETEQ,
> +   0x00, 0x00, 0x0B, 0x0B, 0x10, 0x10, 0x00, 0x00,
> +   0x00, 0x00, 0xFF, 0x00, 0xC0, 0x10);
> + dsi_dcs_write_seq(dsi, 0xC6, 0x01, 0x00, 0xFF, 0xFF, 0x00);
> + dsi_dcs_write_seq(dsi, ST7703_CMD_SETPOWER,
> +   0x74, 0x00, 0x32, 0x32, 0x77, 0xF1, 0xFF, 0xFF,
> +   0xCC, 0xCC, 0x77, 0x77);
> + dsi_dcs_write_seq(dsi, ST7703_CMD_SETBGP, 0x07, 0x07);
> + dsi_dcs_write_seq(dsi, ST7703_CMD_SETVCOM, 0x2C, 0x2C);
> + dsi_dcs_write_seq(dsi, 0xBF, 0x02, 0x11, 0x00);
> +
> + dsi_dcs_write_seq(dsi, ST7703_CMD_S

Re: [PATCH 3/5] drm: panel: add Xingbangda XBD599 panel

2020-03-14 Thread Sam Ravnborg
Hi Icenowy

> >> +++ b/drivers/gpu/drm/panel/panel-xingbangda-xbd599.c
> >> @@ -0,0 +1,367 @@
> >> +// SPDX-License-Identifier: GPL-2.0
> >> +/*
> >> + * Xingbangda XBD599 MIPI-DSI panel driver
> >> + *
> >> + * Copyright (C) 2019 Icenowy Zheng 
> >2020?
> 
> The work started at Mid 2019.
> 
> Is 2019-2020 okay?

We see this in other places so I guess it is. The point
here is that the driver contains work from 2020 so you should at least
specify 2020.

Sam
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [RESEND PATCH v2 6/9] drm/mgag200: Constify ioreadX() iomem argument (as in generic implementation)

2020-03-14 Thread Krzysztof Kozlowski
On Thu, Mar 12, 2020 at 11:49:05AM +0100, Thomas Zimmermann wrote:
> Hi Krzysztof,
> 
> I just received a resend email from 3 weeks ago :/
> 
> Do you want me to merge the mgag200 patch into drm-misc-next?

Thanks but it depends on the first patch in the series so either it
could go with your ack through other tree or I will send it later (once
1st patch gets to mainline).


Best regards,
Krzysztof

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [RESEND PATCH v2 1/9] iomap: Constify ioreadX() iomem argument (as in generic implementation)

2020-03-14 Thread Krzysztof Kozlowski
On Wed, Feb 19, 2020 at 06:49:59PM +0100, Krzysztof Kozlowski wrote:
> The ioreadX() and ioreadX_rep() helpers have inconsistent interface.  On
> some architectures void *__iomem address argument is a pointer to const,
> on some not.
> 
> Implementations of ioreadX() do not modify the memory under the address
> so they can be converted to a "const" version for const-safety and
> consistency among architectures.
> 
> Suggested-by: Geert Uytterhoeven 
> Signed-off-by: Krzysztof Kozlowski 
> Reviewed-by: Geert Uytterhoeven 
> Reviewed-by: Arnd Bergmann 

Hi Arnd,

This patch touches multipel file systems so no one is brave enough to
pick it up. However you are mentioned as maintainer of generic asm
headers so maybe you could apply it to arm-soc?

Best regards,
Krzysztof


> 
> ---
> 
> Changes since v1:
> 1. Constify also ioreadX_rep() and mmio_insX(),
> 2. Squash lib+alpha+powerpc+parisc+sh into one patch for bisectability,
> 3. Add Geert's review.
> 4. Add Arnd's review.
> ---
>  arch/alpha/include/asm/core_apecs.h   |  6 +--
>  arch/alpha/include/asm/core_cia.h |  6 +--
>  arch/alpha/include/asm/core_lca.h |  6 +--
>  arch/alpha/include/asm/core_marvel.h  |  4 +-
>  arch/alpha/include/asm/core_mcpcia.h  |  6 +--
>  arch/alpha/include/asm/core_t2.h  |  2 +-
>  arch/alpha/include/asm/io.h   | 12 ++---
>  arch/alpha/include/asm/io_trivial.h   | 16 +++---
>  arch/alpha/include/asm/jensen.h   |  2 +-
>  arch/alpha/include/asm/machvec.h  |  6 +--
>  arch/alpha/kernel/core_marvel.c   |  2 +-
>  arch/alpha/kernel/io.c| 12 ++---
>  arch/parisc/include/asm/io.h  |  4 +-
>  arch/parisc/lib/iomap.c   | 72 +--
>  arch/powerpc/kernel/iomap.c   | 28 +--
>  arch/sh/kernel/iomap.c| 22 
>  include/asm-generic/iomap.h   | 28 +--
>  include/linux/io-64-nonatomic-hi-lo.h |  4 +-
>  include/linux/io-64-nonatomic-lo-hi.h |  4 +-
>  lib/iomap.c   | 30 +--
>  20 files changed, 136 insertions(+), 136 deletions(-)
> 
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH v1 0/3] drm: drop data-mapping property from panel-dpi

2020-03-14 Thread Sam Ravnborg
With the review of Laurent Pinchart we realised that the
data-mapping property introduced in panel-dpi binding
is not the right solution.

Remove it now, while we are working on finding a better way
to specify the interface between panels and display interfaces.

Include a patch to fix some grammar issues spotted in the same review.

Sam

Sam Ravnborg (3):
  dt-bindings: display: drop data-mapping from panel-dpi
  drm/panel-simple: drop use of data-mapping property
  dt-bindings: display: grammar fixes in panel/

 .../devicetree/bindings/display/panel/display-timings.yaml|  8 
 .../devicetree/bindings/display/panel/panel-common.yaml   |  4 ++--
 .../devicetree/bindings/display/panel/panel-dpi.yaml  | 10 --
 drivers/gpu/drm/panel/panel-simple.c  | 11 ---
 4 files changed, 6 insertions(+), 27 deletions(-)


___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH v1 1/3] dt-bindings: display: drop data-mapping from panel-dpi

2020-03-14 Thread Sam Ravnborg
data-mapping may not be the best way to describe the
data format used between panels and display interface.

Drop it from the panel-dpi binding so we do not start to rely on it.
We can then work out how to best describe this mapping and when
we know it, we can add it to this binding.

Signed-off-by: Sam Ravnborg 
Cc: Laurent Pinchart 
Cc: Maxime Ripard 
Cc: Rob Herring 
---
 .../devicetree/bindings/display/panel/panel-dpi.yaml   | 10 --
 1 file changed, 10 deletions(-)

diff --git a/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml 
b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
index f63870384c00..0cd74c8dab42 100644
--- a/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
+++ b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
@@ -21,15 +21,6 @@ properties:
   - {}
   - const: panel-dpi
 
-  data-mapping:
-enum:
-  - rgb24
-  - rgb565
-  - bgr666
-description: |
-  Describes the media format, how the display panel is connected
-  to the display interface.
-
   backlight: true
   enable-gpios: true
   height-mm: true
@@ -52,7 +43,6 @@ examples:
 compatible = "osddisplays,osd057T0559-34ts", "panel-dpi";
 label = "osddisplay";
 power-supply = <&vcc_supply>;
-data-mapping = "rgb565";
 backlight = <&backlight>;
 
 port {
-- 
2.20.1

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH v1 2/3] drm/panel-simple: drop use of data-mapping property

2020-03-14 Thread Sam Ravnborg
The "data-mapping" property may not be the best way to describe the
interface between panels and display interfaces.
Drop use of in the panel-simple driver, so we have time to find
the right way to describe this interface.

Signed-off-by: Sam Ravnborg 
Cc: Thierry Reding 
Cc: Rob Herring 
Cc: Maxime Ripard 
Cc: Laurent Pinchart 
---
 drivers/gpu/drm/panel/panel-simple.c | 11 ---
 1 file changed, 11 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-simple.c 
b/drivers/gpu/drm/panel/panel-simple.c
index 0ce81b1f36af..3ad828eaefe1 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -361,7 +361,6 @@ static int panel_dpi_probe(struct device *dev,
struct panel_desc *desc;
unsigned int bus_flags;
struct videomode vm;
-   const char *mapping;
int ret;
 
np = dev->of_node;
@@ -386,16 +385,6 @@ static int panel_dpi_probe(struct device *dev,
of_property_read_u32(np, "width-mm", &desc->size.width);
of_property_read_u32(np, "height-mm", &desc->size.height);
 
-   of_property_read_string(np, "data-mapping", &mapping);
-   if (!strcmp(mapping, "rgb24"))
-   desc->bus_format = MEDIA_BUS_FMT_RGB888_1X24;
-   else if (!strcmp(mapping, "rgb565"))
-   desc->bus_format = MEDIA_BUS_FMT_RGB565_1X16;
-   else if (!strcmp(mapping, "bgr666"))
-   desc->bus_format = MEDIA_BUS_FMT_RGB666_1X18;
-   else if (!strcmp(mapping, "lvds666"))
-   desc->bus_format = MEDIA_BUS_FMT_RGB666_1X24_CPADHI;
-
/* Extract bus_flags from display_timing */
bus_flags = 0;
vm.flags = timing->flags;
-- 
2.20.1

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH v1 3/3] dt-bindings: display: grammar fixes in panel/

2020-03-14 Thread Sam Ravnborg
Fix a few grammar/editorial issues spotted by Laurent Pinchart.

Signed-off-by: Sam Ravnborg 
Cc: Laurent Pinchart 
Cc: Rob Herring 
---
 .../bindings/display/panel/display-timings.yaml   | 8 
 .../devicetree/bindings/display/panel/panel-common.yaml   | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git 
a/Documentation/devicetree/bindings/display/panel/display-timings.yaml 
b/Documentation/devicetree/bindings/display/panel/display-timings.yaml
index c8c0c9cb0492..56903ded005e 100644
--- a/Documentation/devicetree/bindings/display/panel/display-timings.yaml
+++ b/Documentation/devicetree/bindings/display/panel/display-timings.yaml
@@ -4,7 +4,7 @@
 $id: http://devicetree.org/schemas/display/panel/display-timings.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
-title: display timing bindings
+title: display timings bindings
 
 maintainers:
   - Thierry Reding 
@@ -14,7 +14,7 @@ maintainers:
 description: |
   A display panel may be able to handle several display timings,
   with different resolutions.
-  The display-timings node makes it possible to specify the timing
+  The display-timings node makes it possible to specify the timings
   and to specify the timing that is native for the display.
 
 properties:
@@ -25,8 +25,8 @@ properties:
 $ref: /schemas/types.yaml#/definitions/phandle
 description: |
   The default display timing is the one specified as native-mode.
-  If no native-mode is specified then the first node is assumed the
-  native mode.
+  If no native-mode is specified then the first node is assumed
+  to be the native mode.
 
 patternProperties:
   "^timing":
diff --git a/Documentation/devicetree/bindings/display/panel/panel-common.yaml 
b/Documentation/devicetree/bindings/display/panel/panel-common.yaml
index ed051ba12084..dee4faffd204 100644
--- a/Documentation/devicetree/bindings/display/panel/panel-common.yaml
+++ b/Documentation/devicetree/bindings/display/panel/panel-common.yaml
@@ -63,9 +63,9 @@ properties:
 
   display-timings:
 description:
-  Some display panels supports several resolutions with different timing.
+  Some display panels supports several resolutions with different timings.
   The display-timings bindings supports specifying several timings and
-  optional specify which is the native mode.
+  optionally specify which is the native mode.
 allOf:
   - $ref: display-timings.yaml#
 
-- 
2.20.1

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH v2] dt-bindings: display: ti: Fix dtc unit-address warnings in examples

2020-03-14 Thread Jyri Sarha
On 13/03/2020 20:07, Rob Herring wrote:
> Extra dtc warnings (roughly what W=1 enables) are now enabled by default
> when building the binding examples. These were fixed treewide in
> 5.6-rc5, but some new display bindings have been added with new
> warnings:
> 
> Documentation/devicetree/bindings/display/ti/ti,am65x-dss.example.dts:21.27-49.11:
>  Warning (unit_address_format): /example-0/dss@04a0: unit name should not 
> have leading 0s
> Documentation/devicetree/bindings/display/ti/ti,j721e-dss.example.dts:21.27-72.11:
>  Warning (unit_address_format): /example-0/dss@04a0: unit name should not 
> have leading 0s
> Documentation/devicetree/bindings/display/ti/ti,k2g-dss.example.dts:20.27-42.11:
>  Warning (unit_address_format): /example-0/dss@0254: unit name should not 
> have leading 0s
> 
> Cc: Jyri Sarha 
> Cc: Tomi Valkeinen 
> Signed-off-by: Rob Herring 

Acked-by: Jyri Sarha 

> ---
> v2:
>  - Drop panel fixes as there's another patch fixing the 3 panels plus
>others.
> ---
>  Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml | 2 +-
>  Documentation/devicetree/bindings/display/ti/ti,j721e-dss.yaml | 2 +-
>  Documentation/devicetree/bindings/display/ti/ti,k2g-dss.yaml   | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml 
> b/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml
> index cac61a998203..aa5543a64526 100644
> --- a/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml
> +++ b/Documentation/devicetree/bindings/display/ti/ti,am65x-dss.yaml
> @@ -121,7 +121,7 @@ examples:
>  #include 
>  #include 
>  
> -dss: dss@04a0 {
> +dss: dss@4a0 {
>  compatible = "ti,am65x-dss";
>  reg =   <0x0 0x04a0 0x0 0x1000>, /* common */
>  <0x0 0x04a02000 0x0 0x1000>, /* vidl1 */
> diff --git a/Documentation/devicetree/bindings/display/ti/ti,j721e-dss.yaml 
> b/Documentation/devicetree/bindings/display/ti/ti,j721e-dss.yaml
> index ade9b2f513f5..6d47cd7206c2 100644
> --- a/Documentation/devicetree/bindings/display/ti/ti,j721e-dss.yaml
> +++ b/Documentation/devicetree/bindings/display/ti/ti,j721e-dss.yaml
> @@ -154,7 +154,7 @@ examples:
>  #include 
>  #include 
>  
> -dss: dss@04a0 {
> +dss: dss@4a0 {
>  compatible = "ti,j721e-dss";
>  reg =   <0x00 0x04a0 0x00 0x1>, /* common_m */
>  <0x00 0x04a1 0x00 0x1>, /* common_s0*/
> diff --git a/Documentation/devicetree/bindings/display/ti/ti,k2g-dss.yaml 
> b/Documentation/devicetree/bindings/display/ti/ti,k2g-dss.yaml
> index 385bd060ccf9..7cb37053e95b 100644
> --- a/Documentation/devicetree/bindings/display/ti/ti,k2g-dss.yaml
> +++ b/Documentation/devicetree/bindings/display/ti/ti,k2g-dss.yaml
> @@ -81,7 +81,7 @@ examples:
>  #include 
>  #include 
>  
> -dss: dss@0254 {
> +dss: dss@254 {
>  compatible = "ti,k2g-dss";
>  reg =   <0x0254 0x400>,
>  <0x0255 0x1000>,
> 


-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH 0/5] drm/lima: add error debug functionality

2020-03-14 Thread Vasily Khoruzhick
On Fri, Feb 21, 2020 at 6:43 PM Qiang Yu  wrote:
>
> Save task error state when it fail and export to user by
> sysfs as a binary file which can be dumped and replayed
> by lima_dump tool at:
> https://gitlab.freedesktop.org/lima/lima_dump

With v2 of Patch 3, series is:

Reviewed-by: Vasily Khoruzhick 


> Qiang Yu (5):
>   drm/lima: save process info for debug usage
>   drm/lima: add max_error_tasks module parameter
>   drm/lima: save task info dump when task fail
>   drm/lima: add error sysfs to export error task dump
>   drm/lima: add LIMA_BO_FLAG_FORCE_VA
>
>  drivers/gpu/drm/lima/lima_ctx.c|   3 +
>  drivers/gpu/drm/lima/lima_ctx.h|   5 ++
>  drivers/gpu/drm/lima/lima_device.c |  13 +++
>  drivers/gpu/drm/lima/lima_device.h |   8 ++
>  drivers/gpu/drm/lima/lima_drv.c| 123 +--
>  drivers/gpu/drm/lima/lima_drv.h|   1 +
>  drivers/gpu/drm/lima/lima_dump.h   |  77 +
>  drivers/gpu/drm/lima/lima_gem.c|   7 +-
>  drivers/gpu/drm/lima/lima_gem.h|   4 +-
>  drivers/gpu/drm/lima/lima_sched.c  | 128 +
>  drivers/gpu/drm/lima/lima_sched.h  |   7 ++
>  drivers/gpu/drm/lima/lima_vm.c |  13 ++-
>  include/uapi/drm/lima_drm.h|   9 +-
>  13 files changed, 385 insertions(+), 13 deletions(-)
>  create mode 100644 drivers/gpu/drm/lima/lima_dump.h
>
> --
> 2.17.1
>
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH] drm/lima: add trace point for tasks

2020-03-14 Thread Vasily Khoruzhick
On Sat, Mar 7, 2020 at 5:55 AM Qiang Yu  wrote:
>
> track lima task start which can be combined with
> dma_fence_signal to identify task execution time.
>
> example command to record:
>
> trace-cmd record -i \
>   -e "lima:lima_task_submit" -e "lima:lima_task_run" \
>   -e "*fence:*fence_signaled" -e "drm:drm_vblank_event" \
>   -e "drm:drm_vblank_event_queued" sleep 4

LGTM. Out of curiosity, is there any reason for not adding one more
event for task completion?

> Signed-off-by: Qiang Yu 
> ---
>  drivers/gpu/drm/lima/Makefile |  3 +-
>  drivers/gpu/drm/lima/lima_sched.c |  5 +++-
>  drivers/gpu/drm/lima/lima_sched.h |  1 +
>  drivers/gpu/drm/lima/lima_trace.c |  7 +
>  drivers/gpu/drm/lima/lima_trace.h | 50 +++
>  5 files changed, 64 insertions(+), 2 deletions(-)
>  create mode 100644 drivers/gpu/drm/lima/lima_trace.c
>  create mode 100644 drivers/gpu/drm/lima/lima_trace.h
>
> diff --git a/drivers/gpu/drm/lima/Makefile b/drivers/gpu/drm/lima/Makefile
> index a85444b0a1d4..6e7b788408e8 100644
> --- a/drivers/gpu/drm/lima/Makefile
> +++ b/drivers/gpu/drm/lima/Makefile
> @@ -14,6 +14,7 @@ lima-y := \
> lima_sched.o \
> lima_ctx.o \
> lima_dlbu.o \
> -   lima_bcast.o
> +   lima_bcast.o \
> +   lima_trace.o
>
>  obj-$(CONFIG_DRM_LIMA) += lima.o
> diff --git a/drivers/gpu/drm/lima/lima_sched.c 
> b/drivers/gpu/drm/lima/lima_sched.c
> index f295479e3733..98d0d410b7d7 100644
> --- a/drivers/gpu/drm/lima/lima_sched.c
> +++ b/drivers/gpu/drm/lima/lima_sched.c
> @@ -3,7 +3,6 @@
>
>  #include 
>  #include 
> -#include 
>  #include 
>
>  #include "lima_drv.h"
> @@ -12,6 +11,7 @@
>  #include "lima_mmu.h"
>  #include "lima_l2_cache.h"
>  #include "lima_gem.h"
> +#include "lima_trace.h"
>
>  struct lima_fence {
> struct dma_fence base;
> @@ -177,6 +177,7 @@ struct dma_fence *lima_sched_context_queue_task(struct 
> lima_sched_context *conte
>  {
> struct dma_fence *fence = 
> dma_fence_get(&task->base.s_fence->finished);
>
> +   trace_lima_task_submit(task);
> drm_sched_entity_push_job(&task->base, &context->base);
> return fence;
>  }
> @@ -251,6 +252,8 @@ static struct dma_fence *lima_sched_run_job(struct 
> drm_sched_job *job)
> if (last_vm)
> lima_vm_put(last_vm);
>
> +   trace_lima_task_run(task);
> +
> pipe->error = false;
> pipe->task_run(pipe, task);
>
> diff --git a/drivers/gpu/drm/lima/lima_sched.h 
> b/drivers/gpu/drm/lima/lima_sched.h
> index e29f5e3b675b..e5db1919f446 100644
> --- a/drivers/gpu/drm/lima/lima_sched.h
> +++ b/drivers/gpu/drm/lima/lima_sched.h
> @@ -6,6 +6,7 @@
>
>  #include 
>  #include 
> +#include 
>
>  struct lima_vm;
>
> diff --git a/drivers/gpu/drm/lima/lima_trace.c 
> b/drivers/gpu/drm/lima/lima_trace.c
> new file mode 100644
> index ..ea1c7289bebc
> --- /dev/null
> +++ b/drivers/gpu/drm/lima/lima_trace.c
> @@ -0,0 +1,7 @@
> +// SPDX-License-Identifier: GPL-2.0 OR MIT
> +/* Copyright 2020 Qiang Yu  */
> +
> +#include "lima_sched.h"
> +
> +#define CREATE_TRACE_POINTS
> +#include "lima_trace.h"
> diff --git a/drivers/gpu/drm/lima/lima_trace.h 
> b/drivers/gpu/drm/lima/lima_trace.h
> new file mode 100644
> index ..9308b948b69d
> --- /dev/null
> +++ b/drivers/gpu/drm/lima/lima_trace.h
> @@ -0,0 +1,50 @@
> +// SPDX-License-Identifier: GPL-2.0 OR MIT
> +/* Copyright 2020 Qiang Yu  */
> +
> +#if !defined(_LIMA_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
> +#define _LIMA_TRACE_H_
> +
> +#include 
> +
> +#undef TRACE_SYSTEM
> +#define TRACE_SYSTEM lima
> +#define TRACE_INCLUDE_FILE lima_trace
> +
> +DECLARE_EVENT_CLASS(lima_task,
> +   TP_PROTO(struct lima_sched_task *task),
> +   TP_ARGS(task),
> +   TP_STRUCT__entry(
> +   __field(uint64_t, task_id)
> +   __field(unsigned int, context)
> +   __field(unsigned int, seqno)
> +   __string(pipe, task->base.sched->name)
> +   ),
> +
> +   TP_fast_assign(
> +   __entry->task_id = task->base.id;
> +   __entry->context = task->base.s_fence->finished.context;
> +   __entry->seqno = task->base.s_fence->finished.seqno;
> +   __assign_str(pipe, task->base.sched->name)
> +   ),
> +
> +   TP_printk("task=%llu, context=%u seqno=%u pipe=%s",
> + __entry->task_id, __entry->context, __entry->seqno,
> + __get_str(pipe))
> +);
> +
> +DEFINE_EVENT(lima_task, lima_task_submit,
> +TP_PROTO(struct lima_sched_task *task),
> +TP_ARGS(task)
> +);
> +
> +DEFINE_EVENT(lima_task, lima_task_run,
> +TP_PROTO(struct lima_sched_task *task),
> +TP_ARGS(task)
> +);
> +
> +#endif
> +
> +/* This part must be outside protection */
> +#undef TRACE_INCLUDE_PATH
> +#define TRACE_INCLUDE_PATH ../../drivers/gpu/drm/lima
> +#include 
> --
> 2.17.1
>
___
dr