[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e9ec543a-0da6-9314-9e9e-62f7ede9efaf@linaro.org>
Date: Tue, 7 Mar 2023 12:13:25 +0100
From: Konrad Dybcio <konrad.dybcio@...aro.org>
To: neil.armstrong@...aro.org,
Thierry Reding <thierry.reding@...il.com>,
Sam Ravnborg <sam@...nborg.org>,
David Airlie <airlied@...il.com>,
Daniel Vetter <daniel@...ll.ch>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>
Cc: dri-devel@...ts.freedesktop.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] gpu/drm/panel: Add Lenovo NT36523W BOE panel
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@...aro.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
Powered by blists - more mailing lists