Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1473169 > unrolled thread

[PATCH 3/6] drm/panel: simple: Add A10 EVB 5 inch panel support

Started byMaxime Ripard <maxime.ripard@free-electrons.com>
First post2016-08-31 10:20 +0200
Last post2016-09-05 16:10 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 3/6] drm/panel: simple: Add A10 EVB 5 inch panel support Maxime Ripard <maxime.ripard@free-electrons.com> - 2016-08-31 10:20 +0200
    Re: [PATCH 3/6] drm/panel: simple: Add A10 EVB 5 inch panel support Chen-Yu Tsai <wens@csie.org> - 2016-09-05 16:10 +0200

#1473169 — [PATCH 3/6] drm/panel: simple: Add A10 EVB 5 inch panel support

FromMaxime Ripard <maxime.ripard@free-electrons.com>
Date2016-08-31 10:20 +0200
Subject[PATCH 3/6] drm/panel: simple: Add A10 EVB 5 inch panel support
Message-ID<sc8Uy-8n3-27@gated-at.bofh.it>
The A10-EVB from Allwinner comes with an unidentified panel, with the only
mark on the PCB being A10-SUB-EVB-5LCD.

Add timings to simple panel to handle it.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 drivers/gpu/drm/panel/panel-simple.c | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index 85143d1b9b31..be371b053aab 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -386,6 +386,29 @@ static void panel_simple_shutdown(struct device *dev)
 	panel_simple_disable(&panel->base);
 }
 
+static const struct drm_display_mode allwinner_a10_sub_evb_5lcd_mode = {
+	.clock = 33000,
+	.hdisplay = 800,
+	.hsync_start = 800 + 209,
+	.hsync_end = 800 + 209 + 1,
+	.htotal = 800 + 209 + 1 + 45,
+	.vdisplay = 480,
+	.vsync_start = 480 + 22,
+	.vsync_end = 480 + 22 + 1,
+	.vtotal = 480 + 22 + 1 + 22,
+	.vrefresh = 60,
+};
+
+static const struct panel_desc allwinner_a10_sub_evb_5lcd = {
+	.modes = &allwinner_a10_sub_evb_5lcd_mode,
+	.num_modes = 1,
+	.size = {
+		.width = 110,
+		.height = 67,
+	},
+	.bus_format = MEDIA_BUS_FMT_RGB666_1X18,
+};
+
 static const struct drm_display_mode ampire_am800480r3tmqwa1h_mode = {
 	.clock = 33333,
 	.hdisplay = 800,
@@ -1515,6 +1538,9 @@ static const struct panel_desc urt_umsh_8596md_parallel = {
 
 static const struct of_device_id platform_of_match[] = {
 	{
+		.compatible = "allwinner,sun4i-a10-sub-evb-5-lcd",
+		.data = &allwinner_a10_sub_evb_5lcd,
+	}, {
 		.compatible = "ampire,am800480r3tmqwa1h",
 		.data = &ampire_am800480r3tmqwa1h,
 	}, {
-- 
2.9.2

[toc] | [next] | [standalone]


#1476476

FromChen-Yu Tsai <wens@csie.org>
Date2016-09-05 16:10 +0200
Message-ID<se2KZ-4LX-1@gated-at.bofh.it>
In reply to#1473169
On Wed, Aug 31, 2016 at 4:18 PM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> The A10-EVB from Allwinner comes with an unidentified panel, with the only
> mark on the PCB being A10-SUB-EVB-5LCD.
>
> Add timings to simple panel to handle it.
>
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> ---
>  drivers/gpu/drm/panel/panel-simple.c | 26 ++++++++++++++++++++++++++
>  1 file changed, 26 insertions(+)
>
> diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
> index 85143d1b9b31..be371b053aab 100644
> --- a/drivers/gpu/drm/panel/panel-simple.c
> +++ b/drivers/gpu/drm/panel/panel-simple.c
> @@ -386,6 +386,29 @@ static void panel_simple_shutdown(struct device *dev)
>         panel_simple_disable(&panel->base);
>  }
>
> +static const struct drm_display_mode allwinner_a10_sub_evb_5lcd_mode = {
> +       .clock = 33000,
> +       .hdisplay = 800,
> +       .hsync_start = 800 + 209,
> +       .hsync_end = 800 + 209 + 1,
> +       .htotal = 800 + 209 + 1 + 45,
> +       .vdisplay = 480,
> +       .vsync_start = 480 + 22,
> +       .vsync_end = 480 + 22 + 1,
> +       .vtotal = 480 + 22 + 1 + 22,
> +       .vrefresh = 60,

I assume the numbers came from the fex file? Allwinner LCD timing numbers
aren't very precise. This seems to yield a refresh rate of 58.x Hz.
The dot clock can go below MHz resolution, so it should be possible
to set it to a more proper clock rate here.

ChenYu

> +};
> +
> +static const struct panel_desc allwinner_a10_sub_evb_5lcd = {
> +       .modes = &allwinner_a10_sub_evb_5lcd_mode,
> +       .num_modes = 1,
> +       .size = {
> +               .width = 110,
> +               .height = 67,
> +       },
> +       .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
> +};
> +
>  static const struct drm_display_mode ampire_am800480r3tmqwa1h_mode = {
>         .clock = 33333,
>         .hdisplay = 800,
> @@ -1515,6 +1538,9 @@ static const struct panel_desc urt_umsh_8596md_parallel = {
>
>  static const struct of_device_id platform_of_match[] = {
>         {
> +               .compatible = "allwinner,sun4i-a10-sub-evb-5-lcd",
> +               .data = &allwinner_a10_sub_evb_5lcd,
> +       }, {
>                 .compatible = "ampire,am800480r3tmqwa1h",
>                 .data = &ampire_am800480r3tmqwa1h,
>         }, {
> --
> 2.9.2
>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web