]> Gentwo Git Trees - linux/.git/commit
drm/dp: drm_edp_backlight_set_level: do not always send 3-byte commands
authorVal Packett <val@packett.cool>
Sun, 6 Jul 2025 20:42:24 +0000 (17:42 -0300)
committerDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Thu, 21 Aug 2025 10:41:59 +0000 (13:41 +0300)
commit4aa8961b1b9c7498550b41168a91cf1558133dd3
tree60a57c5ce52e3a2141f4a690b390cf185fd26bb5
parent043d9c6928b010be7902a01b5cdfa7d754535b1a
drm/dp: drm_edp_backlight_set_level: do not always send 3-byte commands

At least some panels using the LSB register are not happy with the
unconditional increase of the command buffer to 3 bytes.

With the BOE NE14QDM in my Dell Latitude 7455, the recent patches for
luminance based brightness have introduced a regression: the brightness
range stopped being contiguous and became nonsensical (it probably was
interpreting the last 2 bytes of the buffer and not the first 2).

Change from using a fixed sizeof() to a length variable that's only
set to 3 when luminance is used. Let's leave the default as 2 even for
the single-byte version, since that's how it worked before.

Fixes: f2db78e37fe7 ("drm/dp: Modify drm_edp_backlight_set_level")
Signed-off-by: Val Packett <val@packett.cool>
Tested-by: Abel Vesa <abel.vesa@linaro.org>
Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com>
Link: https://lore.kernel.org/r/20250706204446.8918-1-val@packett.cool
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
drivers/gpu/drm/display/drm_dp_helper.c