Skip to content

Commit 9402cde

Browse files
flamingradiansuperna9999
authored andcommitted
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
1 parent fd40749 commit 9402cde

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

drivers/gpu/drm/panel/panel-visionox-vtdr6130.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,12 +243,9 @@ static int visionox_vtdr6130_bl_update_status(struct backlight_device *bl)
243243
{
244244
struct mipi_dsi_device *dsi = bl_get_data(bl);
245245
u16 brightness = backlight_get_brightness(bl);
246-
/* Panel needs big-endian order of brightness value */
247-
u8 payload[2] = { brightness >> 8, brightness & 0xff };
248246
int ret;
249247

250-
ret = mipi_dsi_dcs_write(dsi, MIPI_DCS_SET_DISPLAY_BRIGHTNESS,
251-
payload, sizeof(payload));
248+
mipi_dsi_dcs_set_display_brightness_large(dsi, brightness);
252249
if (ret < 0)
253250
return ret;
254251

0 commit comments

Comments
 (0)