summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c
diff options
context:
space:
mode:
authorRichard Acayan <mailingradian@gmail.com>2023-01-16 23:49:09 +0100
committerNeil Armstrong <neil.armstrong@linaro.org>2023-01-19 08:21:57 +0100
commit9402cde9347eca050e14ea9e47270e84a6899162 (patch)
treec98af55ad63290cee2bf8d3c9eeaaf90ebb8aab2 /drivers/gpu/drm/panel/panel-visionox-vtdr6130.c
parentdrm/panel: sofef00: Use 16-bit brightness function (diff)
downloadlinux-9402cde9347eca050e14ea9e47270e84a6899162.tar.xz
linux-9402cde9347eca050e14ea9e47270e84a6899162.zip
drm/panel: vtdr6130: Use 16-bit brightness function
This panel communicates brightness in big endian. This is not a quirk of the panels themselves, but rather, a part of the MIPI standard. Use the new mipi_dsi_dcs_set_display_brightness_large() function that properly handles 16-bit brightness instead of bypassing the brightness functions entirely. Signed-off-by: Richard Acayan <mailingradian@gmail.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-MTP Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20230116224909.23884-4-mailingradian@gmail.com
Diffstat (limited to '')
-rw-r--r--drivers/gpu/drm/panel/panel-visionox-vtdr6130.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c b/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c
index f9a6abc1e121..1092075b31a5 100644
--- a/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c
+++ b/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c
@@ -243,12 +243,9 @@ static int visionox_vtdr6130_bl_update_status(struct backlight_device *bl)
{
struct mipi_dsi_device *dsi = bl_get_data(bl);
u16 brightness = backlight_get_brightness(bl);
- /* Panel needs big-endian order of brightness value */
- u8 payload[2] = { brightness >> 8, brightness & 0xff };
int ret;
- ret = mipi_dsi_dcs_write(dsi, MIPI_DCS_SET_DISPLAY_BRIGHTNESS,
- payload, sizeof(payload));
+ mipi_dsi_dcs_set_display_brightness_large(dsi, brightness);
if (ret < 0)
return ret;