From: Sam Ravnborg <sam@ravnborg.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Fabian Vogt <fabian@ritter-vogt.de>,
Daniel Tang <dt.tangr@gmail.com>,
linux-arm-kernel@lists.infradead.org,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 2/3] RTF: drm/panel: simple: Add TI nspire panels
Date: Tue, 23 Jul 2019 19:54:45 +0200 [thread overview]
Message-ID: <20190723175445.GA23588@ravnborg.org> (raw)
In-Reply-To: <20190723133755.22677-3-linus.walleij@linaro.org>
Hi Linus
Good to see more panels and work on moving from fb to drm.
Also good to use media_bus_format to signal this is a greyscale display.
On Tue, Jul 23, 2019 at 03:37:54PM +0200, Linus Walleij wrote:
> This adds support for the TI nspire panels to the simple panel
> roster. This code is based on arch/arm/mach-nspire/clcd.c.
> This includes likely the first grayscale panel supported.
>
> These panels will be used with the PL11x DRM driver.
>
> Cc: Daniel Tang <dt.tangr@gmail.com>
> Cc: Fabian Vogt <fabian@ritter-vogt.de>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> drivers/gpu/drm/panel/panel-simple.c | 63 ++++++++++++++++++++++++++++
> 1 file changed, 63 insertions(+)
>
> diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
> index 5a93c4edf1e4..e5cfe1398a3b 100644
> --- a/drivers/gpu/drm/panel/panel-simple.c
> +++ b/drivers/gpu/drm/panel/panel-simple.c
> @@ -2761,6 +2761,63 @@ static const struct panel_desc arm_rtsm = {
> .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
> };
>
> +static const struct drm_display_mode nspire_cx_lcd_mode[] = {
Please name the variables like the compatible.
So something like ti_nspire_xxxx
Relevant for all variables.
When names are adjusted make sure the entries are sorted properly.
> + {
> + .clock = 1000,
> + .hdisplay = 320,
> + .hsync_start = 320 + 50,
> + .hsync_end = 320 + 50 + 6,
> + .htotal = 320 + 50 + 6 + 38,
> + .vdisplay = 240,
> + .vsync_start = 240 + 3,
> + .vsync_end = 240 + 3 + 1,
> + .vtotal = 240 + 3 + 1 + 17,
> + .vrefresh = 60,
Can we achieve this refresh rate with a slow clock like this?
> + .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
+1 for specifying .flags.
> + },
> +};
> +
> +static const struct panel_desc nspire_cx_lcd_panel = {
> + .modes = nspire_cx_lcd_mode,
> + .num_modes = 1,
> + .bpc = 8,
> + .size = {
> + .width = 65,
> + .height = 49,
> + },
> + .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
> + .bus_flags = DRM_BUS_FLAG_PIXDATA_NEGEDGE,
> +};
> +
> +static const struct drm_display_mode nspire_classic_lcd_mode[] = {
> + {
> + .clock = 1000,
> + .hdisplay = 320,
> + .hsync_start = 320 + 6,
> + .hsync_end = 320 + 6 + 6,
> + .htotal = 320 + 6 + 6 + 6,
> + .vdisplay = 240,
> + .vsync_start = 240 + 0,
> + .vsync_end = 240 + 0 + 1,
> + .vtotal = 240 + 0 + 1 + 0,
> + .vrefresh = 60,
Ditto
> + .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
> + },
> +};
> +
> +static const struct panel_desc nspire_classic_lcd_panel = {
> + .modes = nspire_classic_lcd_mode,
> + .num_modes = 1,
> + /* The grayscale panel has 8 bit for the color .. Y (black) */
> + .bpc = 8,
> + .size = {
> + .width = 71,
> + .height = 53,
> + },
> + /* This is the grayscale bus format */
> + .bus_format = MEDIA_BUS_FMT_Y8_1X8,
No DRM_BUS_FLAG_PIXDATA here?
> +};
> +
> static const struct of_device_id platform_of_match[] = {
> {
> .compatible = "ampire,am-480272h3tmqw-t01h",
> @@ -2966,6 +3023,12 @@ static const struct of_device_id platform_of_match[] = {
> }, {
> .compatible = "nlt,nl192108ac18-02d",
> .data = &nlt_nl192108ac18_02d,
> + }, {
> + .compatible = "ti,nspire-cx-lcd-panel",
> + .data = &nspire_cx_lcd_panel,
> + }, {
> + .compatible = "ti,nspire-classic-lcd-panel",
> + .data = &nspire_classic_lcd_panel,
> }, {
Should be sorted after compatible.
And with fixed naming this is the same as if name is used for sorting.
> .compatible = "nvd,9128",
> .data = &nvd_9128,
Furthermore I did not see any bindings for the panels.
If they indeed are missing, then please provide bindings in the yaml
format.
Thanks,
Sam
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-07-23 17:55 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-23 13:37 [PATCH 0/3] RFT: PL111 DRM conversion of nspire Linus Walleij
2019-07-23 13:37 ` [PATCH 1/3] RFT: drm/pl111: Support grayscale Linus Walleij
2019-07-23 15:19 ` Fabian Vogt
2019-07-24 12:33 ` Linus Walleij
2019-07-25 19:26 ` Fabian Vogt
2019-08-03 9:51 ` Linus Walleij
2019-08-04 20:13 ` Fabian Vogt
2019-07-23 16:22 ` [1/3] " David Lechner
2019-07-23 17:25 ` [PATCH 1/3] " Adam Jackson
2019-07-23 21:06 ` Daniel Vetter
2019-07-24 12:52 ` Linus Walleij
2019-07-24 14:06 ` Daniel Vetter
2019-07-23 13:37 ` [PATCH 2/3] RTF: drm/panel: simple: Add TI nspire panels Linus Walleij
2019-07-23 17:54 ` Sam Ravnborg [this message]
2019-07-24 13:58 ` Linus Walleij
2019-07-24 18:53 ` Sam Ravnborg
2019-07-23 13:37 ` [PATCH 3/3] RFT: ARM: nspire: Move CLCD set-up to device tree Linus Walleij
2019-07-23 18:10 ` [PATCH 0/3] RFT: PL111 DRM conversion of nspire Sam Ravnborg
2019-07-24 12:28 ` Linus Walleij
2019-07-24 12:47 ` Pawel Moll
2019-07-24 12:53 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190723175445.GA23588@ravnborg.org \
--to=sam@ravnborg.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=dt.tangr@gmail.com \
--cc=fabian@ritter-vogt.de \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).