drm/i915/dsi: Read/write proper brightness value via MIPI DCS command
authorLee Shawn C <shawn.c.lee@intel.com>
Wed, 8 Sep 2021 11:56:07 +0000 (19:56 +0800)
committerVandita Kulkarni <vandita.kulkarni@intel.com>
Wed, 8 Sep 2021 14:04:41 +0000 (19:34 +0530)
commitddb8cd4eee01049f34194affaf7d027bfa400e2c
tree5a6e618822209efaab157330a4dbc4ec2280abc2
parent84d3d71fe3630c757580dc0c4b7d1c141785fbcc
drm/i915/dsi: Read/write proper brightness value via MIPI DCS command

Driver has to swap the endian before send brightness level value
to tcon.

v2: Use __be16 instead of u16 to fix sparse warning.
v3: Send one or two bytes brightness value depend on the precision.
v4: get data length of brightness value more easily.

Reported-by: kernel test robot <lkp@intel.com>
Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Vandita Kulkarni <vandita.kulkarni@intel.com>
Cc: Cooper Chiou <cooper.chiou@intel.com>
Cc: William Tseng <william.tseng@intel.com>
Signed-off-by: Lee Shawn C <shawn.c.lee@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Vandita Kulkarni <vandita.kulkarni@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210908115607.9633-6-shawn.c.lee@intel.com
drivers/gpu/drm/i915/display/intel_dsi_dcs_backlight.c