diff mbox series

[v3] drm/panel: Set max rate for Innolux p079x panels

Message ID 20181119091528.10056-1-linus.walleij@linaro.org
State New
Headers show
Series [v3] drm/panel: Set max rate for Innolux p079x panels | expand

Commit Message

Linus Walleij Nov. 19, 2018, 9:15 a.m. UTC
After adding the hs_rate and lp_rate fields to the DSI device
we need to populate these accordingly so display drivers can
respect them.

Cc: Andrzej Hajda <a.hajda@samsung.com>
Cc: Chris Zhong <zyw@rock-chips.com>
Cc: Lin Huang <hl@rock-chips.com>
Cc: Heiko Stuebner <heiko@sntech.de>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
ChangeLog v2->v3:
- Add the 10MHz LP speed.
ChangeLog v1->v2:
- Collect Heiko's Test tag
---
 drivers/gpu/drm/panel/panel-innolux-p079zca.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Thierry Reding Nov. 20, 2018, 4:28 p.m. UTC | #1
On Mon, Nov 19, 2018 at 10:15:28AM +0100, Linus Walleij wrote:
> After adding the hs_rate and lp_rate fields to the DSI device

> we need to populate these accordingly so display drivers can

> respect them.

> 

> Cc: Andrzej Hajda <a.hajda@samsung.com>

> Cc: Chris Zhong <zyw@rock-chips.com>

> Cc: Lin Huang <hl@rock-chips.com>

> Cc: Heiko Stuebner <heiko@sntech.de>

> Tested-by: Heiko Stuebner <heiko@sntech.de>

> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

> ---

> ChangeLog v2->v3:

> - Add the 10MHz LP speed.

> ChangeLog v1->v2:

> - Collect Heiko's Test tag

> ---

>  drivers/gpu/drm/panel/panel-innolux-p079zca.c | 4 ++++

>  1 file changed, 4 insertions(+)


Acked-by: Thierry Reding <treding@nvidia.com>
Andrzej Hajda Nov. 21, 2018, 7:04 a.m. UTC | #2
On 19.11.2018 10:15, Linus Walleij wrote:
> After adding the hs_rate and lp_rate fields to the DSI device
> we need to populate these accordingly so display drivers can
> respect them.
>
> Cc: Andrzej Hajda <a.hajda@samsung.com>
> Cc: Chris Zhong <zyw@rock-chips.com>
> Cc: Lin Huang <hl@rock-chips.com>
> Cc: Heiko Stuebner <heiko@sntech.de>
> Tested-by: Heiko Stuebner <heiko@sntech.de>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> ChangeLog v2->v3:
> - Add the 10MHz LP speed.
> ChangeLog v1->v2:
> - Collect Heiko's Test tag
> ---
>  drivers/gpu/drm/panel/panel-innolux-p079zca.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/panel/panel-innolux-p079zca.c b/drivers/gpu/drm/panel/panel-innolux-p079zca.c
> index ca4ae45dd307..cca3f3b7710e 100644
> --- a/drivers/gpu/drm/panel/panel-innolux-p079zca.c
> +++ b/drivers/gpu/drm/panel/panel-innolux-p079zca.c
> @@ -518,6 +518,10 @@ static int innolux_panel_probe(struct mipi_dsi_device *dsi)
>  	dsi->mode_flags = desc->flags;
>  	dsi->format = desc->format;
>  	dsi->lanes = desc->lanes;
> +	/* This is presumably the HS rate */
> +	dsi->hs_rate = desc->mode->clock * 1000;


Again, not true.

hs_rate = pixel_clock * bits_per_pixel / lane / 2;

'/ 2' is due to Double Data Rate' - two bits are transmitted per one tick.


Regards

Andrzej


> +	/* 10MHz according to table 3.6.1.2, symbol FDSICLK_LP */
> +	dsi->lp_rate = 10000000;
>  
>  	err = innolux_panel_add(dsi, desc);
>  	if (err < 0)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/panel/panel-innolux-p079zca.c b/drivers/gpu/drm/panel/panel-innolux-p079zca.c
index ca4ae45dd307..cca3f3b7710e 100644
--- a/drivers/gpu/drm/panel/panel-innolux-p079zca.c
+++ b/drivers/gpu/drm/panel/panel-innolux-p079zca.c
@@ -518,6 +518,10 @@  static int innolux_panel_probe(struct mipi_dsi_device *dsi)
 	dsi->mode_flags = desc->flags;
 	dsi->format = desc->format;
 	dsi->lanes = desc->lanes;
+	/* This is presumably the HS rate */
+	dsi->hs_rate = desc->mode->clock * 1000;
+	/* 10MHz according to table 3.6.1.2, symbol FDSICLK_LP */
+	dsi->lp_rate = 10000000;
 
 	err = innolux_panel_add(dsi, desc);
 	if (err < 0)