diff mbox

[v4,2/2] drm/panel: simple: add support for Sharp LQ150X1LG11 panels

Message ID 1475594961-5713-3-git-send-email-peda@axentia.se (mailing list archive)
State New, archived
Headers show

Commit Message

Peter Rosin Oct. 4, 2016, 3:29 p.m. UTC
From: Gustaf Lindström <gl@axentia.se>

The Sharp 15" LQ150X1LG11 panel is an XGA TFT LCD panel.

The simple-panel driver is used to get support for essential
functionality of the panel.

Signed-off-by: Gustaf Lindström <gl@axentia.se>
Signed-off-by: Peter Rosin <peda@axentia.se>
---
 drivers/gpu/drm/panel/panel-simple.c | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

Comments

Thierry Reding Oct. 19, 2016, 12:27 p.m. UTC | #1
On Tue, Oct 04, 2016 at 05:29:21PM +0200, Peter Rosin wrote:
> From: Gustaf Lindström <gl@axentia.se>
> 
> The Sharp 15" LQ150X1LG11 panel is an XGA TFT LCD panel.
> 
> The simple-panel driver is used to get support for essential
> functionality of the panel.
> 
> Signed-off-by: Gustaf Lindström <gl@axentia.se>
> Signed-off-by: Peter Rosin <peda@axentia.se>
> ---
>  drivers/gpu/drm/panel/panel-simple.c | 27 +++++++++++++++++++++++++++
>  1 file changed, 27 insertions(+)
> 
> diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
> index 85143d1b9b31..58cfe0a7a9d6 100644
> --- a/drivers/gpu/drm/panel/panel-simple.c
> +++ b/drivers/gpu/drm/panel/panel-simple.c
> @@ -1386,6 +1386,30 @@ static const struct panel_desc sharp_lq123p1jx31 = {
>  	},
>  };
>  
> +static const struct drm_display_mode sharp_lq150x1lg11_mode = {
> +	.clock = 71100,
> +	.hdisplay = 1024,
> +	.hsync_start = 1024 + 168,
> +	.hsync_end = 1024 + 168 + 64,
> +	.htotal = 1024 + 168 + 64 + 88,
> +	.vdisplay = 768,
> +	.vsync_start = 768 + 37,
> +	.vsync_end = 768 + 37 + 2,
> +	.vtotal = 768 + 37 + 2 + 8,
> +	.vrefresh = 60,
> +};
> +
> +static const struct panel_desc sharp_lq150x1lg11 = {
> +	.modes = &sharp_lq150x1lg11_mode,
> +	.num_modes = 1,
> +	.bpc = 8,
> +	.size = {
> +		.width = 304,
> +		.height = 228,
> +	},
> +	.bus_format = MEDIA_BUS_FMT_RGB565_1X16,

This doesn't match the .bpc = 8 above. You'd usually use a .bpc = 6 for
RGB565 panels.

Thierry
Thierry Reding Oct. 19, 2016, 12:31 p.m. UTC | #2
On Wed, Oct 19, 2016 at 02:27:50PM +0200, Thierry Reding wrote:
> On Tue, Oct 04, 2016 at 05:29:21PM +0200, Peter Rosin wrote:
> > From: Gustaf Lindström <gl@axentia.se>
> > 
> > The Sharp 15" LQ150X1LG11 panel is an XGA TFT LCD panel.
> > 
> > The simple-panel driver is used to get support for essential
> > functionality of the panel.
> > 
> > Signed-off-by: Gustaf Lindström <gl@axentia.se>
> > Signed-off-by: Peter Rosin <peda@axentia.se>
> > ---
> >  drivers/gpu/drm/panel/panel-simple.c | 27 +++++++++++++++++++++++++++
> >  1 file changed, 27 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
> > index 85143d1b9b31..58cfe0a7a9d6 100644
> > --- a/drivers/gpu/drm/panel/panel-simple.c
> > +++ b/drivers/gpu/drm/panel/panel-simple.c
> > @@ -1386,6 +1386,30 @@ static const struct panel_desc sharp_lq123p1jx31 = {
> >  	},
> >  };
> >  
> > +static const struct drm_display_mode sharp_lq150x1lg11_mode = {
> > +	.clock = 71100,
> > +	.hdisplay = 1024,
> > +	.hsync_start = 1024 + 168,
> > +	.hsync_end = 1024 + 168 + 64,
> > +	.htotal = 1024 + 168 + 64 + 88,
> > +	.vdisplay = 768,
> > +	.vsync_start = 768 + 37,
> > +	.vsync_end = 768 + 37 + 2,
> > +	.vtotal = 768 + 37 + 2 + 8,
> > +	.vrefresh = 60,
> > +};
> > +
> > +static const struct panel_desc sharp_lq150x1lg11 = {
> > +	.modes = &sharp_lq150x1lg11_mode,
> > +	.num_modes = 1,
> > +	.bpc = 8,
> > +	.size = {
> > +		.width = 304,
> > +		.height = 228,
> > +	},
> > +	.bus_format = MEDIA_BUS_FMT_RGB565_1X16,
> 
> This doesn't match the .bpc = 8 above. You'd usually use a .bpc = 6 for
> RGB565 panels.

Are you actually using the .bpc field in your driver? If yes, can you
please test if things work correctly if you set it to 6? If it's unused
I'm leaning towards just applying this with .bpc set to 6 and hope for
the best (and fix it if somebody finds that it's broken).

So no need to resend, just let me know what you think.

Thierry
Peter Rosin Oct. 28, 2016, 12:18 p.m. UTC | #3
On 2016-10-19 14:31, Thierry Reding wrote:
> On Wed, Oct 19, 2016 at 02:27:50PM +0200, Thierry Reding wrote:
>> On Tue, Oct 04, 2016 at 05:29:21PM +0200, Peter Rosin wrote:
>>> From: Gustaf Lindström <gl@axentia.se>
>>>
>>> The Sharp 15" LQ150X1LG11 panel is an XGA TFT LCD panel.
>>>
>>> The simple-panel driver is used to get support for essential
>>> functionality of the panel.
>>>
>>> Signed-off-by: Gustaf Lindström <gl@axentia.se>
>>> Signed-off-by: Peter Rosin <peda@axentia.se>
>>> ---
>>>  drivers/gpu/drm/panel/panel-simple.c | 27 +++++++++++++++++++++++++++
>>>  1 file changed, 27 insertions(+)
>>>
>>> diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
>>> index 85143d1b9b31..58cfe0a7a9d6 100644
>>> --- a/drivers/gpu/drm/panel/panel-simple.c
>>> +++ b/drivers/gpu/drm/panel/panel-simple.c
>>> @@ -1386,6 +1386,30 @@ static const struct panel_desc sharp_lq123p1jx31 = {
>>>  	},
>>>  };
>>>  
>>> +static const struct drm_display_mode sharp_lq150x1lg11_mode = {
>>> +	.clock = 71100,
>>> +	.hdisplay = 1024,
>>> +	.hsync_start = 1024 + 168,
>>> +	.hsync_end = 1024 + 168 + 64,
>>> +	.htotal = 1024 + 168 + 64 + 88,
>>> +	.vdisplay = 768,
>>> +	.vsync_start = 768 + 37,
>>> +	.vsync_end = 768 + 37 + 2,
>>> +	.vtotal = 768 + 37 + 2 + 8,
>>> +	.vrefresh = 60,
>>> +};
>>> +
>>> +static const struct panel_desc sharp_lq150x1lg11 = {
>>> +	.modes = &sharp_lq150x1lg11_mode,
>>> +	.num_modes = 1,
>>> +	.bpc = 8,
>>> +	.size = {
>>> +		.width = 304,
>>> +		.height = 228,
>>> +	},
>>> +	.bus_format = MEDIA_BUS_FMT_RGB565_1X16,
>>
>> This doesn't match the .bpc = 8 above. You'd usually use a .bpc = 6 for
>> RGB565 panels.
> 
> Are you actually using the .bpc field in your driver? If yes, can you
> please test if things work correctly if you set it to 6? If it's unused
> I'm leaning towards just applying this with .bpc set to 6 and hope for
> the best (and fix it if somebody finds that it's broken).
> 
> So no need to resend, just let me know what you think.

Sorry for the delay, but I just tested .bpc = 6 and it was ok too. It
doesn't seem to matter for us, so do as you like.

Cheers,
Peter
diff mbox

Patch

diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index 85143d1b9b31..58cfe0a7a9d6 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -1386,6 +1386,30 @@  static const struct panel_desc sharp_lq123p1jx31 = {
 	},
 };
 
+static const struct drm_display_mode sharp_lq150x1lg11_mode = {
+	.clock = 71100,
+	.hdisplay = 1024,
+	.hsync_start = 1024 + 168,
+	.hsync_end = 1024 + 168 + 64,
+	.htotal = 1024 + 168 + 64 + 88,
+	.vdisplay = 768,
+	.vsync_start = 768 + 37,
+	.vsync_end = 768 + 37 + 2,
+	.vtotal = 768 + 37 + 2 + 8,
+	.vrefresh = 60,
+};
+
+static const struct panel_desc sharp_lq150x1lg11 = {
+	.modes = &sharp_lq150x1lg11_mode,
+	.num_modes = 1,
+	.bpc = 8,
+	.size = {
+		.width = 304,
+		.height = 228,
+	},
+	.bus_format = MEDIA_BUS_FMT_RGB565_1X16,
+};
+
 static const struct drm_display_mode shelly_sca07010_bfn_lnn_mode = {
 	.clock = 33300,
 	.hdisplay = 800,
@@ -1641,6 +1665,9 @@  static const struct of_device_id platform_of_match[] = {
 		.compatible = "sharp,lq123p1jx31",
 		.data = &sharp_lq123p1jx31,
 	}, {
+		.compatible = "sharp,lq150x1lg11",
+		.data = &sharp_lq150x1lg11,
+	}, {
 		.compatible = "shelly,sca07010-bfn-lnn",
 		.data = &shelly_sca07010_bfn_lnn,
 	}, {