drm: Add definition for eDP backlight frequency
authorPuthikorn Voravootivat <[email protected]>
Tue, 23 May 2017 22:38:04 +0000 (15:38 -0700)
committerJani Nikula <[email protected]>
Fri, 26 May 2017 12:20:51 +0000 (15:20 +0300)
This patch adds the following definition
- Bit mask for EDP_PWMGEN_BIT_COUNT and min/max cap
  register which only use bit 0:4
- Base frequency (27 MHz) for backlight PWM frequency
  generator.

Signed-off-by: Puthikorn Voravootivat <[email protected]>
Reviewed-by: Dhinakaran Pandiyan <[email protected]>
Acked-by: Dave Airlie <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
include/drm/drm_dp_helper.h

index c0bd0d7651a947bf06407d7c680dde5c377b9b26..23837f5dc5e1b858cf0f717897cab2b533282fe2 100644 (file)
 #define DP_EDP_PWMGEN_BIT_COUNT             0x724
 #define DP_EDP_PWMGEN_BIT_COUNT_CAP_MIN     0x725
 #define DP_EDP_PWMGEN_BIT_COUNT_CAP_MAX     0x726
+# define DP_EDP_PWMGEN_BIT_COUNT_MASK       (0x1f << 0)
 
 #define DP_EDP_BACKLIGHT_CONTROL_STATUS     0x727
 
 #define DP_EDP_BACKLIGHT_FREQ_SET           0x728
+# define DP_EDP_BACKLIGHT_FREQ_BASE_KHZ     27000
 
 #define DP_EDP_BACKLIGHT_FREQ_CAP_MIN_MSB   0x72a
 #define DP_EDP_BACKLIGHT_FREQ_CAP_MIN_MID   0x72b