mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Neil Armstrong <neil.armstrong@linaro.org>
To: Luca Ceresoli <luca.ceresoli@bootlin.com>,
	Jessica Zhang <quic_jesszhan@quicinc.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	Sam Ravnborg <sam@ravnborg.org>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] drm/panel: simple: Add Tianma TM070JDHG34-00 panel support
Date: Fri, 13 Dec 2024 10:28:25 +0100	[thread overview]
Message-ID: <26c44a01-383a-4b1b-aba1-12d3e98ede1c@linaro.org> (raw)
In-Reply-To: <20241210-tianma_tm070jdhg34-v1-2-9fb7fe6b6cf0@bootlin.com>

On 10/12/2024 18:28, Luca Ceresoli wrote:
> Add Tianma TM070JDHG34-00 7.0" 1280x800 LVDS RGB TFT LCD panel.
> 
> Panel info and datasheet: https://fortec.us/products/tm070jdhg34-00/
> 
> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
> ---
>   drivers/gpu/drm/panel/panel-simple.c | 42 ++++++++++++++++++++++++++++++++++++
>   1 file changed, 42 insertions(+)
> 
> diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
> index 1562f122724137dec37eb11443eafc896ef2f2e8..b3c931a4e46a2568b3678d664f11b189873fa1e2 100644
> --- a/drivers/gpu/drm/panel/panel-simple.c
> +++ b/drivers/gpu/drm/panel/panel-simple.c
> @@ -4286,6 +4286,45 @@ static const struct panel_desc tianma_tm070jvhg33 = {
>   	.bus_flags = DRM_BUS_FLAG_DE_HIGH,
>   };
>   
> +/*
> + * The datasheet computes total blanking as back porch + front porch, not
> + * including sync pulse width. This is for both H and V. To make the total
> + * blanking and period correct, subtract the pulse width from the front
> + * porch.
> + *
> + * This works well for the Min and Typ values, but for Max values the sync
> + * pulse width is higher than back porch + front porch, so work around that
> + * by reducing the Max sync length value to 1 and then treating the Max
> + * porches as in the Min and Typ cases.
> + *
> + * Exact datasheet values are added as a comment where they differ from the
> + * ones implemented for the above reason.
> + */
> +static const struct display_timing tianma_tm070jdhg34_00_timing = {
> +	.pixelclock = { 68400000, 71900000, 78100000 },
> +	.hactive = { 1280, 1280, 1280 },
> +	.hfront_porch = { 130, 138, 158 }, /* 131, 139, 159 */
> +	.hback_porch = { 5, 5, 5 },
> +	.hsync_len = { 1, 1, 1 }, /* 1, 1, 256 */
> +	.vactive = { 800, 800, 800 },
> +	.vfront_porch = { 2, 39, 98 }, /* 3, 40, 99 */
> +	.vback_porch = { 2, 2, 2 },
> +	.vsync_len = { 1, 1, 1 }, /* 1, 1, 128 */
> +	.flags = DISPLAY_FLAGS_DE_HIGH,
> +};
> +
> +static const struct panel_desc tianma_tm070jdhg34_00 = {
> +	.timings = &tianma_tm070jdhg34_00_timing,
> +	.num_timings = 1,
> +	.bpc = 8,
> +	.size = {
> +		.width = 150, /* 149.76 */
> +		.height = 94, /* 93.60 */
> +	},
> +	.bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
> +	.connector_type = DRM_MODE_CONNECTOR_LVDS,
> +};
> +
>   static const struct display_timing tianma_tm070rvhg71_timing = {
>   	.pixelclock = { 27700000, 29200000, 39600000 },
>   	.hactive = { 800, 800, 800 },
> @@ -5028,6 +5067,9 @@ static const struct of_device_id platform_of_match[] = {
>   	}, {
>   		.compatible = "tianma,tm070jdhg30",
>   		.data = &tianma_tm070jdhg30,
> +	}, {
> +		.compatible = "tianma,tm070jdhg34-00",
> +		.data = &tianma_tm070jdhg34_00,
>   	}, {
>   		.compatible = "tianma,tm070jvhg33",
>   		.data = &tianma_tm070jvhg33,
> 

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

      reply	other threads:[~2024-12-13  9:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-10 17:28 [PATCH 0/2] drm/panel: simple: Add Tianma TM070JDHG34-00 DT bindings and driver support Luca Ceresoli
2024-12-10 17:28 ` [PATCH 1/2] dt-bindings: display: simple: Add Tianma TM070JDHG34-00 panel Luca Ceresoli
2024-12-16 10:09   ` Krzysztof Kozlowski
2024-12-16 15:53     ` Luca Ceresoli
2024-12-10 17:28 ` [PATCH 2/2] drm/panel: simple: Add Tianma TM070JDHG34-00 panel support Luca Ceresoli
2024-12-13  9:28   ` Neil Armstrong [this message]

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=26c44a01-383a-4b1b-aba1-12d3e98ede1c@linaro.org \
    --to=neil.armstrong@linaro.org \
    --cc=airlied@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luca.ceresoli@bootlin.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=quic_jesszhan@quicinc.com \
    --cc=robh@kernel.org \
    --cc=sam@ravnborg.org \
    --cc=simona@ffwll.ch \
    --cc=thierry.reding@gmail.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=tzimmermann@suse.de \
    /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

all inboxes | Powered by JetHome®