From: Konrad Dybcio <konrad.dybcio@linaro.org>
To: neil.armstrong@linaro.org,
Thierry Reding <thierry.reding@gmail.com>,
Sam Ravnborg <sam@ravnborg.org>, David Airlie <airlied@gmail.com>,
Daniel Vetter <daniel@ffwll.ch>, Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] gpu/drm/panel: Add Lenovo NT36523W BOE panel
Date: Tue, 7 Mar 2023 12:13:25 +0100 [thread overview]
Message-ID: <e9ec543a-0da6-9314-9e9e-62f7ede9efaf@linaro.org> (raw)
In-Reply-To: <6c58497d-47c4-002f-4f39-977706f9df87@linaro.org>
On 7.03.2023 10:19, Neil Armstrong wrote:
> Hi,
>
> On 17/02/2023 12:29, Konrad Dybcio wrote:
>> Introduce support for the BOE panel with a NT36523W touch/driver IC
>> found on some Lenovo Tab P11 devices. It's a 2000x1200, 24bit RGB
>> MIPI DSI panel with integrated DCS-controlled backlight (that expects
>> big-endian communication).
>>
>> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
>> ---
>> drivers/gpu/drm/panel/Kconfig | 12 +
>> drivers/gpu/drm/panel/Makefile | 1 +
>> drivers/gpu/drm/panel/panel-lenovo-nt36523w-boe.c | 751 ++++++++++++++++++++++
>> 3 files changed, 764 insertions(+)
>>
>
> <snip>
>
>> diff --git a/drivers/gpu/drm/panel/panel-lenovo-nt36523w-boe.c b/drivers/gpu/drm/panel/panel-lenovo-nt36523w-boe.c
>> new file mode 100644
>> index 000000000000..83478e471493
>> --- /dev/null
>> +++ b/drivers/gpu/drm/panel/panel-lenovo-nt36523w-boe.c
>> @@ -0,0 +1,751 @@
>> +// SPDX-License-Identifier: GPL-2.0-only
>> +/*
>> + * Copyright (c) 2023 Linaro Limited
>> + *
>> + * Generated with linux-mdss-dsi-panel-driver-generator with
>> + * some manual adjustments.
>> + */
>
> <snip>
>
>> +static int nt36523w_boe_bl_update_status(struct backlight_device *bl)
>> +{
>> + struct mipi_dsi_device *dsi = bl_get_data(bl);
>> + u16 brightness = backlight_get_brightness(bl);
>> + int ret;
>> +
>> + brightness = cpu_to_be16(brightness);
>> +
>> + dsi->mode_flags &= ~MIPI_DSI_MODE_LPM;
>> +
>> + ret = mipi_dsi_dcs_set_display_brightness(dsi, brightness);
>> + if (ret < 0)
>> + return ret;
>
> It's not wrong as is, but could you switch to mipi_dsi_dcs_set_display_brightness_large() ?
Sure!
Recent-ish panels only talk BE brightness data, very cool that
somebody made a wrapper for this!
Konrad
>
>> +
>> + dsi->mode_flags |= MIPI_DSI_MODE_LPM;
>> +
>> + return 0;
>> +}
>> +
>> +static int nt36523w_boe_bl_get_brightness(struct backlight_device *bl)
>> +{
>> + struct mipi_dsi_device *dsi = bl_get_data(bl);
>> + u16 brightness;
>> + int ret;
>> +
>> + dsi->mode_flags &= ~MIPI_DSI_MODE_LPM;
>> +
>> + ret = mipi_dsi_dcs_get_display_brightness(dsi, &brightness);
>
> And here to mipi_dsi_dcs_get_display_brightness_large() ?
>> + if (ret < 0)
>> + return ret;
>> +
>> + dsi->mode_flags |= MIPI_DSI_MODE_LPM;
>> +
>> + brightness = be16_to_cpu(brightness);
>> +
>> + return brightness;
>> +}
>> +
> Please send a v2 with those changes and keep my reviewed-by
>
> Thanks!
> Neil
prev parent reply other threads:[~2023-03-07 11:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-17 11:29 [PATCH 0/2] Add support for " Konrad Dybcio
2023-02-17 11:29 ` [PATCH 1/2] dt-bindings: display/panel: Add " Konrad Dybcio
2023-02-21 2:08 ` Rob Herring
2023-02-21 2:13 ` Konrad Dybcio
2023-02-26 17:41 ` Rob Herring
2023-02-17 11:29 ` [PATCH 2/2] gpu/drm/panel: " Konrad Dybcio
2023-03-07 9:16 ` Neil Armstrong
2023-03-07 9:19 ` Neil Armstrong
2023-03-07 11:13 ` Konrad Dybcio [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=e9ec543a-0da6-9314-9e9e-62f7ede9efaf@linaro.org \
--to=konrad.dybcio@linaro.org \
--cc=airlied@gmail.com \
--cc=daniel@ffwll.ch \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=robh+dt@kernel.org \
--cc=sam@ravnborg.org \
--cc=thierry.reding@gmail.com \
/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®