Enhancement to intel_dp_aux_backlight driver
Subsystems (3)
v8 cover Enhancement to intel_dp_aux_backlight driver
This patch set contain 5 patches. Another 4 patches in previous version was already merged.
- First two patches allow choosing which way to adjust brightness if both PWM pin and AUX are supported
- Next patch adds support for dynamic brightness.
- Last two patches set the PWM freqency to match data in panel vbt.
Change log:
v8:
- Drop 4 patches that was already merged
- Move DP_EDP_BACKLIGHT_AUX_ENABLE_CAP check to patch #2 to avoid behavior change if only apply patch #1
- Add TODO to warn about enable backlight twice in patch #2
- Use DIV_ROUND_CLOSEST instead of just "/" in patch #5
- Fix bug calculate pn in patch #5
- Clarify commit message / code comment in patch #5
v7:
- Add check in intel_dp_pwm_pin_display_control_capable in patch #4
- Add option in patch #6 to enable DPCD or not
- Change definition in patch #8 and implementation in #9 to use Khz
- Fix compiler warning from build bot in patch #9
v6:
- Address review from Dhinakaran
- Make PWM frequency to have highest value of Pn that make the frequency still within 25% of desired frequency.
v5:
- Split first patch in v4 to 3 patches
- Bump priority for "Correctly enable backlight brightness adjustment via DPCD"
- Make logic clearer for the case that both PWM pin and AUX are supported
- Add more log when write to register fail
- Add log when enable DBC
v4:
- Rebase / minor typo fix.
v3:
- Add new implementation of PWM frequency patch
v2:
- Drop PWM frequency patch
- Address suggestion from Jani Nikula
Puthikorn Voravootivat (5):
drm/i915: Drop AUX backlight enable check for backlight control drm/i915: Allow choosing how to adjust brightness if both supported drm/i915: Add option to support dynamic backlight via DPCD
drm: Add definition for eDP backlight frequency drm/i915: Set PWM divider to match desired frequency in vbt
drivers/gpu/drm/i915/i915_params.c | 13 ++- drivers/gpu/drm/i915/i915_params.h | 5 +- drivers/gpu/drm/i915/intel_dp_aux_backlight.c | 154 ++++++++++++++++++++++++-- include/drm/drm_dp_helper.h | 2 + 4 files changed, 157 insertions(+), 17 deletions(-)
Signature · 6 lines
2.13.0.303.g4ebf302169-goog _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v8 1/5 drm/i915: Drop AUX backlight enable check for backlight control
There are some panel that
(1) does not support display backlight enable via AUX
(2) support display backlight adjustment via AUX
(3) support display backlight enable via eDP BL_ENABLE pin
The current driver required that (1) must be support to enable (2). This patch drops that requirement.
--- drivers/gpu/drm/i915/intel_dp_aux_backlight.c | 1 - 1 file changed, 1 deletion(-)
drivers/gpu/drm/i915/intel_dp_aux_backlight.c +0 -1
@@ -165,7 +165,6 @@ intel_dp_aux_display_control_capable(struct intel_connector *connector)* the panel can support backlight control over the aux channel */ if (intel_dp->edp_dpcd[1 ] &DP_EDP_TCON_BACKLIGHT_ADJUSTMENT_CAP && - (intel_dp->edp_dpcd[1 ] &DP_EDP_BACKLIGHT_AUX_ENABLE_CAP ) && (intel_dp->edp_dpcd[2 ] &DP_EDP_BACKLIGHT_BRIGHTNESS_AUX_SET_CAP ) && !((intel_dp->edp_dpcd[1 ] &DP_EDP_BACKLIGHT_PIN_ENABLE_CAP ) || (intel_dp->edp_dpcd[2 ] &DP_EDP_BACKLIGHT_BRIGHTNESS_PWM_PIN_CAP ))) {
Signature · 6 lines
2.13.0.303.g4ebf302169-goog _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH v8 1/5] drm/i915: Drop AUX backlight enable check for backlight control
________________________________________
From: Puthikorn Voravootivat [[email protected]] on behalf of Puthikorn Voravootivat [[email protected]]
Sent: Tuesday, May 16, 2017 5:33 PM
To: [email protected]; Pandiyan, Dhinakaran
Cc: [email protected]; Jani Nikula; Navare, Manasi D; Stephane Marchesin; Puthikorn Voravootivat
Subject: [PATCH v8 1/5] drm/i915: Drop AUX backlight enable check for backlight control
There are some panel that
(1) does not support display backlight enable via AUX
(2) support display backlight adjustment via AUX
(3) support display backlight enable via eDP BL_ENABLE pin
The current driver required that (1) must be support to enable (2). This patch drops that requirement.
---drivers/gpu/drm/i915/intel_dp_aux_backlight.c | 1 -
1 file changed, 1 deletion(-)
drivers/gpu/drm/i915/intel_dp_aux_backlight.c +0 -0
@@ -165,7 +165,6 @@ intel_dp_aux_display_control_capable(struct intel_connector *connector)
* the panel can support backlight control over the aux channel */
if (intel_dp->edp_dpcd[1] & DP_EDP_TCON_BACKLIGHT_ADJUSTMENT_CAP &&
- (intel_dp->edp_dpcd[1] & DP_EDP_BACKLIGHT_AUX_ENABLE_CAP) && (intel_dp->edp_dpcd[2] & DP_EDP_BACKLIGHT_BRIGHTNESS_AUX_SET_CAP) && !((intel_dp->edp_dpcd[1] & DP_EDP_BACKLIGHT_PIN_ENABLE_CAP) || (intel_dp->edp_dpcd[2] & DP_EDP_BACKLIGHT_BRIGHTNESS_PWM_PIN_CAP))) { --
2.13.0.303.g4ebf302169-goog
^ still has the problem I mentioned last time. How about this?
drivers/gpu/drm/i915/intel_dp_aux_backlight.c +5 -3
@@ -28,6 +28,10 @@ static void set_aux_backlight_enable(struct intel_dp *intel_dp, bool enable) {uint8_t reg_val =0 ; +/* Early return when display use other mechanism to enable backlight. */ +if (!(intel_dp->edp_dpcd[1 ] &DP_EDP_BACKLIGHT_AUX_ENABLE_CAP )) +return ; +if (drm_dp_dpcd_readb (&intel_dp->aux,DP_EDP_DISPLAY_CONTROL_REGISTER , ®_val) <0 ) { DRM_DEBUG_KMS("Failed to read DPCD register 0x%x\n",
@@ -165,10 +169,8 @@ intel_dp_aux_display_control_capable(struct intel_connector *connector)* the panel can support backlight control over the aux channel */ if (intel_dp->edp_dpcd[1 ] &DP_EDP_TCON_BACKLIGHT_ADJUSTMENT_CAP && - (intel_dp->edp_dpcd[1 ] &DP_EDP_BACKLIGHT_AUX_ENABLE_CAP ) && (intel_dp->edp_dpcd[2 ] &DP_EDP_BACKLIGHT_BRIGHTNESS_AUX_SET_CAP ) && - !((intel_dp->edp_dpcd[1 ] &DP_EDP_BACKLIGHT_PIN_ENABLE_CAP ) || - (intel_dp->edp_dpcd[2 ] &DP_EDP_BACKLIGHT_BRIGHTNESS_PWM_PIN_CAP ))) { + !(intel_dp->edp_dpcd[2 ] &DP_EDP_BACKLIGHT_BRIGHTNESS_PWM_PIN_CAP )) {DRM_DEBUG_KMS ("AUX Backlight Control Supported!\n" );return true; }
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH v8 1/5] drm/i915: Drop AUX backlight enable check for backlight control
Quoted 78 lines · Dhinakaran
________________________________________
From: Puthikorn Voravootivat [[email protected]] on behalf of Puthikorn Voravootivat [[email protected]]
Sent: Tuesday, May 16, 2017 5:33 PM
To: [email protected]; Pandiyan, Dhinakaran
Cc: [email protected]; Jani Nikula; Navare, Manasi D; Stephane Marchesin; Puthikorn Voravootivat
Subject: [PATCH v8 1/5] drm/i915: Drop AUX backlight enable check for backlight controlThere are some panel that
(1) does not support display backlight enable via AUX
(2) support display backlight adjustment via AUX
(3) support display backlight enable via eDPBL_ENABLEpinThe current driver required that (1) must be support to enable (2). This patch drops that requirement.
Signed-off-by Puthikorn Voravootivat <[email protected]>---
drivers/gpu/drm/i915/intel_dp_aux_backlight.c| 1 -1 file changed, 1 deletion(-)drivers/gpu/drm/i915/intel_dp_aux_backlight.c +0
-0@@ -165,7 +165,6 @@ intel_dp_aux_display_control_capable(structintel_connector *connector) * the panel can support backlight control over the aux channel */ if (intel_dp->edp_dpcd[1] &
DP_EDP_TCON_BACKLIGHT_ADJUSTMENT_CAP&&
- (intel_dp->edp_dpcd[1] &DP_EDP_BACKLIGHT_AUX_ENABLE_CAP) && (intel_dp->edp_dpcd[2] &DP_EDP_BACKLIGHT_BRIGHTNESS_AUX_SET_CAP) && !((intel_dp->edp_dpcd[1] &DP_EDP_BACKLIGHT_PIN_ENABLE_CAP) || (intel_dp->edp_dpcd[2] &DP_EDP_BACKLIGHT_BRIGHTNESS_PWM_PIN_CAP))) { --
2.13.0.303.g4ebf302169-goog^ still has the problem I mentioned last time. How about this?
drivers/gpu/drm/i915/intel_dp_aux_backlight.c +1
-0@@ -28,6 +28,10 @@ static void set_aux_backlight_enable(struct intel_dp *intel_dp, bool enable) {uint8_t reg_val =0 ; +/* Early return when display use other mechanism to enable backlight. */
drivers/gpu/drm/i915/intel_dp_aux_backlight.c +3
-0+if (!(intel_dp->edp_dpcd[1 ] &DP_EDP_BACKLIGHT_AUX_ENABLE_CAP )) +return ; + if (drm_dp_dpcd_readb(&intel_dp->aux, DP_EDP_DISPLAY_CONTROL_REGISTER,
®_val) < 0) { DRM_DEBUG_KMS("Failed to read DPCD register 0x%x\n",drivers/gpu/drm/i915/intel_dp_aux_backlight.c +0
-0@@ -165,10 +169,8 @@ intel_dp_aux_display_control_capable(structintel_connector *connector) * the panel can support backlight control over the aux channel */ if (intel_dp->edp_dpcd[1] & DP_EDP_TCON_BACKLIGHT_ADJUSTMENT_CAP&&
- (intel_dp->edp_dpcd[1] &DP_EDP_BACKLIGHT_AUX_ENABLE_CAP) &&(intel_dp->edp_dpcd[2] & DP_EDP_BACKLIGHT_BRIGHTNESS_AUX_SET_CAP)&&
drivers/gpu/drm/i915/intel_dp_aux_backlight.c +0
-2- !((intel_dp->edp_dpcd[1 ] &DP_EDP_BACKLIGHT_PIN_ENABLE_CAP ) || - (intel_dp->edp_dpcd[2] & DP_EDP_BACKLIGHT_BRIGHTNESS_PWM_PIN_CAP))){
+ !(intel_dp->edp_dpcd[2] &DP_EDP_BACKLIGHT_BRIGHTNESS_PWM_PIN_CAP))
Quoted 7 lines
{ DRM_DEBUG_KMS("AUX Backlight Control Supported!\n"); return true; }This works too. I probably misunderstood your comment as I move the code
to next patch in the set.
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH v8 1/5] drm/i915: Drop AUX backlight enable check for backlight control
Quoted 102 lines · Puthikorn Voravootivat
On Wed, May 17, 2017 at 1:09 PM, Pandiyan, Dhinakaran <[email protected]> wrote:
________________________________________ From: Puthikorn Voravootivat [[email protected]] on behalf of Puthikorn Voravootivat [[email protected]] Sent: Tuesday, May 16, 2017 5:33 PM To: [email protected]; Pandiyan, Dhinakaran Cc: [email protected]; Jani Nikula; Navare, Manasi D; Stephane Marchesin; Puthikorn Voravootivat Subject: [PATCH v8 1/5] drm/i915: Drop AUX backlight enable check for backlight control There are some panel that (1) does not support display backlight enable via AUX (2) support display backlight adjustment via AUX (3) support display backlight enable via eDP BL_ENABLE pin The current driver required that (1) must be support to enable (2). This patch drops that requirement. Signed-off-by: Puthikorn Voravootivat <[email protected]> --- drivers/gpu/drm/i915/intel_dp_aux_backlight.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_dp_aux_backlight.c b/drivers/gpu/drm/i915/intel_dp_aux_backlight.c index b87c5a381d6a..d32c06583e0b 100644 --- a/drivers/gpu/drm/i915/intel_dp_aux_backlight.c +++ b/drivers/gpu/drm/i915/intel_dp_aux_backlight.c @@ -165,7 +165,6 @@ intel_dp_aux_display_control_capable(struct intel_connector *connector) * the panel can support backlight control over the aux channel */ if (intel_dp->edp_dpcd[1] & DP_EDP_TCON_BACKLIGHT_ADJUSTMENT_CAP && - (intel_dp->edp_dpcd[1] & DP_EDP_BACKLIGHT_AUX_ENABLE_CAP) && (intel_dp->edp_dpcd[2] & DP_EDP_BACKLIGHT_BRIGHTNESS_AUX_SET_CAP) && !((intel_dp->edp_dpcd[1] & DP_EDP_BACKLIGHT_PIN_ENABLE_CAP) || (intel_dp->edp_dpcd[2] & DP_EDP_BACKLIGHT_BRIGHTNESS_PWM_PIN_CAP))) { -- 2.13.0.303.g4ebf302169-goog ^ still has the problem I mentioned last time. How about this? diff --git a/drivers/gpu/drm/i915/intel_dp_aux_backlight.c b/drivers/gpu/drm/i915/intel_dp_aux_backlight.c index b87c5a3..7072bcf 100644 --- a/drivers/gpu/drm/i915/intel_dp_aux_backlight.c +++ b/drivers/gpu/drm/i915/intel_dp_aux_backlight.c @@ -28,6 +28,10 @@ static void set_aux_backlight_enable(struct intel_dp *intel_dp, bool enable) { uint8_t reg_val = 0; + /* Early return when display use other mechanism to enable backlight. */ + if (!(intel_dp->edp_dpcd[1] & DP_EDP_BACKLIGHT_AUX_ENABLE_CAP)) + return; + if (drm_dp_dpcd_readb(&intel_dp->aux, DP_EDP_DISPLAY_CONTROL_REGISTER, ®_val) < 0) { DRM_DEBUG_KMS("Failed to read DPCD register 0x %x\n", @@ -165,10 +169,8 @@ intel_dp_aux_display_control_capable(struct intel_connector *connector) * the panel can support backlight control over the aux channel */ if (intel_dp->edp_dpcd[1] & DP_EDP_TCON_BACKLIGHT_ADJUSTMENT_CAP && - (intel_dp->edp_dpcd[1] & DP_EDP_BACKLIGHT_AUX_ENABLE_CAP) && (intel_dp->edp_dpcd[2] & DP_EDP_BACKLIGHT_BRIGHTNESS_AUX_SET_CAP) && - !((intel_dp->edp_dpcd[1] & DP_EDP_BACKLIGHT_PIN_ENABLE_CAP) || - (intel_dp->edp_dpcd[2] & DP_EDP_BACKLIGHT_BRIGHTNESS_PWM_PIN_CAP))) { + !(intel_dp->edp_dpcd[2] & DP_EDP_BACKLIGHT_BRIGHTNESS_PWM_PIN_CAP)) { DRM_DEBUG_KMS("AUX Backlight Control Supported!\n"); return true; }
Quoted 2 lines
This works too. I probably misunderstood your comment as I move the code to next patch in the set.
Please feel free to question any of the comments if you do not agree.
-DK
Quoted 4 lines
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v8 2/5 drm/i915: Allow choosing how to adjust brightness if both supported
In reply to Puthikorn VoravootivatAdd option to allow choosing how to adjust brightness if panel supports both PWM pin and AUX channel.
--- drivers/gpu/drm/i915/i915_params.c | 8 ++++--- drivers/gpu/drm/i915/i915_params.h | 2 +- drivers/gpu/drm/i915/intel_dp_aux_backlight.c | 31 ++++++++++++++++++++++----- 3 files changed, 32 insertions(+), 9 deletions(-)
drivers/gpu/drm/i915/i915_params.c +5 -3
@@ -63,7 +63,7 @@ struct i915_params i915 __read_mostly = { .huc_firmware_path = NULL, .enable_dp_mst = true, .inject_load_failure = 0, - .enable_dpcd_backlight = false, + .enable_dpcd_backlight = -1, .enable_gvt = false, };
@@ -246,9 +246,11 @@ MODULE_PARM_DESC(enable_dp_mst,module_param_named_unsafe (inject_load_failure, i915.inject_load_failure, uint,0400 );MODULE_PARM_DESC (inject_load_failure,"Force an error after a number of failure check points (0:disabled (default), N:force failure at the Nth failure check point)" ); -module_param_named (enable_dpcd_backlight, i915.enable_dpcd_backlight, bool,0600 ); +module_param_named (enable_dpcd_backlight, i915.enable_dpcd_backlight, int,0600 );MODULE_PARM_DESC (enable_dpcd_backlight, -"Enable support for DPCD backlight control (default:false)" ); +"Enable support for DPCD backlight control " +"(-1:disable (default), 0:Use PWM pin if both supported, " +"1:Use DPCD if both supported" );module_param_named (enable_gvt, i915.enable_gvt, bool,0400 ); MODULE_PARM_DESC(enable_gvt,
drivers/gpu/drm/i915/i915_params.h +1 -1
@@ -66,7 +66,7 @@func (bool, verbose_state_checks); \func (bool, nuclear_pageflip); \func (bool, enable_dp_mst); \ -func (bool, enable_dpcd_backlight); \ +func (int, enable_dpcd_backlight); \ func(bool, enable_gvt)#define MEMBER (T , member) T member
drivers/gpu/drm/i915/intel_dp_aux_backlight.c +26 -5
@@ -28,6 +28,10 @@ static void set_aux_backlight_enable(struct intel_dp *intel_dp, bool enable) {uint8_t reg_val =0 ; +/* Early return when display use other mechanism to enable backlight. */ +if (!(intel_dp->edp_dpcd[1 ] &DP_EDP_BACKLIGHT_AUX_ENABLE_CAP )) +return ; +if (drm_dp_dpcd_readb (&intel_dp->aux,DP_EDP_DISPLAY_CONTROL_REGISTER , ®_val) <0 ) { DRM_DEBUG_KMS("Failed to read DPCD register 0x%x\n",
@@ -39,6 +43,9 @@ static void set_aux_backlight_enable(struct intel_dp *intel_dp, bool enable)else reg_val &= ~(DP_EDP_BACKLIGHT_ENABLE ); +/* TODO: If the panel also support enabling backlight via BL_ENABLE pin, +* the backlight will be enabled again in _intel_edp_backlight_on() +*/ if (drm_dp_dpcd_writeb (&intel_dp->aux,DP_EDP_DISPLAY_CONTROL_REGISTER , reg_val) !=1 ) { DRM_DEBUG_KMS("Failed to %s aux backlight\n",
@@ -164,21 +171,35 @@ intel_dp_aux_display_control_capable(struct intel_connector *connector)/* Check the eDP Display control capabilities registers to determine if * the panel can support backlight control over the aux channel */ -if (intel_dp->edp_dpcd[1 ] &DP_EDP_TCON_BACKLIGHT_ADJUSTMENT_CAP && - (intel_dp->edp_dpcd[2 ] &DP_EDP_BACKLIGHT_BRIGHTNESS_AUX_SET_CAP ) && - !((intel_dp->edp_dpcd[1 ] &DP_EDP_BACKLIGHT_PIN_ENABLE_CAP ) || - (intel_dp->edp_dpcd[2 ] &DP_EDP_BACKLIGHT_BRIGHTNESS_PWM_PIN_CAP ))) { +if ((intel_dp->edp_dpcd[1 ] &DP_EDP_TCON_BACKLIGHT_ADJUSTMENT_CAP ) && + (intel_dp->edp_dpcd[2 ] &DP_EDP_BACKLIGHT_BRIGHTNESS_AUX_SET_CAP )) {DRM_DEBUG_KMS ("AUX Backlight Control Supported!\n" );return true; }return false; } +static bool +intel_dp_pwm_pin_display_control_capable (struct intel_connector *connector) +{ +struct intel_dp *intel_dp =enc_to_intel_dp (&connector->encoder->base); + +/* Check the eDP Display control capabilities registers to determine if +* the panel can support backlight control via BL_PWM_DIM eDP pin +*/ +return (intel_dp->edp_dpcd[1 ] &DP_EDP_TCON_BACKLIGHT_ADJUSTMENT_CAP ) && + (intel_dp->edp_dpcd[2 ] &DP_EDP_BACKLIGHT_BRIGHTNESS_PWM_PIN_CAP ); +} +int intel_dp_aux_init_backlight_funcs (struct intel_connector *intel_connector) {struct intel_panel *panel = &intel_connector->panel; -if (!i915.enable_dpcd_backlight) +if (i915.enable_dpcd_backlight ==-1 ) +return -ENODEV ; + +if (i915.enable_dpcd_backlight ==0 && +intel_dp_pwm_pin_display_control_capable (intel_connector))return -ENODEV ;if (!intel_dp_aux_display_control_capable (intel_connector))
Signature · 6 lines
2.13.0.303.g4ebf302169-goog _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v8 3/5 drm/i915: Add option to support dynamic backlight via DPCD
In reply to Puthikorn VoravootivatThis patch adds option to enable dynamic backlight for eDP panel that supports this feature via DPCD register and set minimum / maximum brightness to 0% and 100% of the normal brightness.
--- drivers/gpu/drm/i915/i915_params.c | 5 ++++ drivers/gpu/drm/i915/i915_params.h | 3 +- drivers/gpu/drm/i915/intel_dp_aux_backlight.c | 40 +++++++++++++++++++++++---- 3 files changed, 41 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/i915_params.c +5 -0
@@ -65,6 +65,7 @@ struct i915_params i915 __read_mostly = { .inject_load_failure = 0, .enable_dpcd_backlight = -1, .enable_gvt = false, + .enable_dbc = false, };module_param_named (modeset, i915.modeset, int,0400 );
@@ -255,3 +256,7 @@ MODULE_PARM_DESC(enable_dpcd_backlight,module_param_named (enable_gvt, i915.enable_gvt, bool,0400 );MODULE_PARM_DESC (enable_gvt,"Enable support for Intel GVT-g graphics virtualization host support(default:false)" ); + +module_param_named (enable_dbc, i915.enable_dbc, bool,0600 ); +MODULE_PARM_DESC (enable_dbc, +"Enable support for dynamic backlight control (default:false)" );
drivers/gpu/drm/i915/i915_params.h +2 -1
@@ -67,7 +67,8 @@func (bool, nuclear_pageflip); \func (bool, enable_dp_mst); \func (int, enable_dpcd_backlight); \ - func(bool, enable_gvt) +func (bool, enable_gvt); \ + func(bool, enable_dbc)#define MEMBER (T , member) T memberstruct i915_params {
drivers/gpu/drm/i915/intel_dp_aux_backlight.c +34 -6
@@ -100,10 +100,27 @@ intel_dp_aux_set_backlight(struct intel_connector *connector, u32 level) } } +/* +* Set minimum / maximum dynamic brightness percentage. This value is expressed +* as the percentage of normal brightness in 5% increments. +*/ +static void +intel_dp_aux_set_dynamic_backlight_percent (struct intel_dp *intel_dp, +u32 min,u32 max) +{ +u8 dbc[] = {DIV_ROUND_CLOSEST (min,5 ),DIV_ROUND_CLOSEST (max,5 ) }; + +if (drm_dp_dpcd_write (&intel_dp->aux,DP_EDP_DBC_MINIMUM_BRIGHTNESS_SET , + dbc,sizeof (dbc) <0 )) { +DRM_DEBUG_KMS ("Failed to write aux DBC brightness level\n" ); + } +} +static void intel_dp_aux_enable_backlight (struct intel_connector *connector) {struct intel_dp *intel_dp =enc_to_intel_dp (&connector->encoder->base);uint8_t dpcd_buf =0 ; +uint8_t new_dpcd_buf =0 ;uint8_t edp_backlight_mode =0 ; if (drm_dp_dpcd_readb(&intel_dp->aux,
@@ -113,18 +130,15 @@ static void intel_dp_aux_enable_backlight(struct intel_connector *connector)return ; } + new_dpcd_buf = dpcd_buf; edp_backlight_mode = dpcd_buf &DP_EDP_BACKLIGHT_CONTROL_MODE_MASK ;switch (edp_backlight_mode) {case DP_EDP_BACKLIGHT_CONTROL_MODE_PWM :case DP_EDP_BACKLIGHT_CONTROL_MODE_PRESET :case DP_EDP_BACKLIGHT_CONTROL_MODE_PRODUCT : - dpcd_buf &= ~DP_EDP_BACKLIGHT_CONTROL_MODE_MASK ; - dpcd_buf |=DP_EDP_BACKLIGHT_CONTROL_MODE_DPCD ; -if (drm_dp_dpcd_writeb (&intel_dp->aux, -DP_EDP_BACKLIGHT_MODE_SET_REGISTER , dpcd_buf) <0 ) { -DRM_DEBUG_KMS ("Failed to write aux backlight mode\n" ); - } + new_dpcd_buf &= ~DP_EDP_BACKLIGHT_CONTROL_MODE_MASK ; + new_dpcd_buf |=DP_EDP_BACKLIGHT_CONTROL_MODE_DPCD ;break ;/* Do nothing when it is already DPCD mode */
@@ -133,6 +147,20 @@ static void intel_dp_aux_enable_backlight(struct intel_connector *connector)break ; } +if (i915.enable_dbc && + (intel_dp->edp_dpcd[2 ] &DP_EDP_DYNAMIC_BACKLIGHT_CAP )) { + new_dpcd_buf |=DP_EDP_DYNAMIC_BACKLIGHT_ENABLE ; +intel_dp_aux_set_dynamic_backlight_percent (intel_dp,0 ,100 ); +DRM_DEBUG_KMS ("Enable dynamic brightness.\n" ); + } + +if (new_dpcd_buf != dpcd_buf) { +if (drm_dp_dpcd_writeb (&intel_dp->aux, +DP_EDP_BACKLIGHT_MODE_SET_REGISTER , new_dpcd_buf) <0 ) { +DRM_DEBUG_KMS ("Failed to write aux backlight mode\n" ); + } + } +set_aux_backlight_enable (intel_dp, true);intel_dp_aux_set_backlight (connector, connector->panel.backlight.level); }
Signature · 6 lines
2.13.0.303.g4ebf302169-goog _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH v8 3/5] drm/i915: Add option to support dynamic backlight via DPCD
Quoted 56 lines · Puthikorn Voravootivat
This patch adds option to enable dynamic backlight for eDP panel that supports this feature via DPCD register and set minimum / maximum brightness to 0% and 100% of the normal brightness.
Signed-off-by Puthikorn Voravootivat <[email protected]>--- drivers/gpu/drm/i915/i915_params.c | 5 ++++ drivers/gpu/drm/i915/i915_params.h | 3 +- drivers/gpu/drm/i915/intel_dp_aux_backlight.c | 40 +++++++++++++++++++++++---- 3 files changed, 41 insertions(+), 7 deletions(-)drivers/gpu/drm/i915/i915_params.c +5
-0@@ -65,6 +65,7 @@ struct i915_params i915 __read_mostly = { .inject_load_failure = 0, .enable_dpcd_backlight = -1, .enable_gvt = false, + .enable_dbc = false, };module_param_named (modeset, i915.modeset, int,0400 );@@ -255,3 +256,7 @@ MODULE_PARM_DESC(enable_dpcd_backlight,module_param_named (enable_gvt, i915.enable_gvt, bool,0400 );MODULE_PARM_DESC (enable_gvt,"Enable support for Intel GVT-g graphics virtualization host support(default:false)" ); + +module_param_named (enable_dbc, i915.enable_dbc, bool,0600 ); +MODULE_PARM_DESC (enable_dbc, +"Enable support for dynamic backlight control (default:false)" );drivers/gpu/drm/i915/i915_params.h +2
-1@@ -67,7 +67,8 @@func (bool, nuclear_pageflip); \func (bool, enable_dp_mst); \func (int, enable_dpcd_backlight); \ - func(bool, enable_gvt) +func (bool, enable_gvt); \ + func(bool, enable_dbc)#define MEMBER (T , member) T memberstruct i915_params {drivers/gpu/drm/i915/intel_dp_aux_backlight.c +2
-0@@ -100,10 +100,27 @@ intel_dp_aux_set_backlight(struct intel_connector *connector, u32 level) } } +/* +* Set minimum / maximum dynamic brightness percentage. This value is expressed
drivers/gpu/drm/i915/intel_dp_aux_backlight.c intel_dp_aux_set_backlight(struct intel_connector *connector, u32 level) · line 114
Quoted 10 lines
drivers/gpu/drm/i915/intel_dp_aux_backlight.c +10
-0+* as the percentage of normal brightness in 5% increments. +*/ +static void +intel_dp_aux_set_dynamic_backlight_percent (struct intel_dp *intel_dp, +u32 min,u32 max) +{ +u8 dbc[] = {DIV_ROUND_CLOSEST (min,5 ),DIV_ROUND_CLOSEST (max,5 ) }; + +if (drm_dp_dpcd_write (&intel_dp->aux,DP_EDP_DBC_MINIMUM_BRIGHTNESS_SET , + dbc,sizeof (dbc) <0 )) {
Incorrect parentheses placement and return value check.
drivers/gpu/drm/i915/intel_dp_aux_backlight.c intel_dp_aux_set_backlight(struct intel_connector *connector, u32 level) · line 123
Quoted 9 lines
drivers/gpu/drm/i915/intel_dp_aux_backlight.c +5
-0+DRM_DEBUG_KMS ("Failed to write aux DBC brightness level\n" ); + } +} +static void intel_dp_aux_enable_backlight (struct intel_connector *connector) {struct intel_dp *intel_dp =enc_to_intel_dp (&connector->encoder->base);uint8_t dpcd_buf =0 ; +uint8_t new_dpcd_buf =0 ;
nit: unnecessary initialization.
Quoted 36 lines
drivers/gpu/drm/i915/intel_dp_aux_backlight.c +10
-6uint8_t edp_backlight_mode =0 ; if (drm_dp_dpcd_readb(&intel_dp->aux,@@ -113,18 +130,15 @@ static void intel_dp_aux_enable_backlight(struct intel_connector *connector)return ; } + new_dpcd_buf = dpcd_buf; edp_backlight_mode = dpcd_buf &DP_EDP_BACKLIGHT_CONTROL_MODE_MASK ;switch (edp_backlight_mode) {case DP_EDP_BACKLIGHT_CONTROL_MODE_PWM :case DP_EDP_BACKLIGHT_CONTROL_MODE_PRESET :case DP_EDP_BACKLIGHT_CONTROL_MODE_PRODUCT : - dpcd_buf &= ~DP_EDP_BACKLIGHT_CONTROL_MODE_MASK ; - dpcd_buf |=DP_EDP_BACKLIGHT_CONTROL_MODE_DPCD ; -if (drm_dp_dpcd_writeb (&intel_dp->aux, -DP_EDP_BACKLIGHT_MODE_SET_REGISTER , dpcd_buf) <0 ) { -DRM_DEBUG_KMS ("Failed to write aux backlight mode\n" ); - } + new_dpcd_buf &= ~DP_EDP_BACKLIGHT_CONTROL_MODE_MASK ; + new_dpcd_buf |=DP_EDP_BACKLIGHT_CONTROL_MODE_DPCD ;break ;/* Do nothing when it is already DPCD mode */ @@ -133,6 +147,20 @@ static void intel_dp_aux_enable_backlight(struct intel_connector *connector)break ; } +if (i915.enable_dbc && + (intel_dp->edp_dpcd[2 ] &DP_EDP_DYNAMIC_BACKLIGHT_CAP )) { + new_dpcd_buf |=DP_EDP_DYNAMIC_BACKLIGHT_ENABLE ; +intel_dp_aux_set_dynamic_backlight_percent (intel_dp,0 ,100 ); +DRM_DEBUG_KMS ("Enable dynamic brightness.\n" ); + } +
drivers/gpu/drm/i915/intel_dp_aux_backlight.c static void intel_dp_aux_enable_backlight(struct intel_connector *connector) · line 166
Quoted 10 lines
drivers/gpu/drm/i915/intel_dp_aux_backlight.c +7
-0+if (new_dpcd_buf != dpcd_buf) { +if (drm_dp_dpcd_writeb (&intel_dp->aux, +DP_EDP_BACKLIGHT_MODE_SET_REGISTER , new_dpcd_buf) <0 ) { +DRM_DEBUG_KMS ("Failed to write aux backlight mode\n" ); + } + } +set_aux_backlight_enable (intel_dp, true);intel_dp_aux_set_backlight (connector, connector->panel.backlight.level); }
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH v8 3/5] drm/i915: Add option to support dynamic backlight via DPCD
Hi Dhinakaran,
Quick question
So what is the update about adding new option in i915_params? Is this patch good to go after fixing the 2 points you mentioned?
Thanks
Quoted 140 lines · Dhinakaran
Quoted 10 lines · Puthikorn Voravootivat
This patch adds option to enable dynamic backlight for eDP panel that supports this feature via DPCD register and set minimum / maximum brightness to 0% and 100% of the normal brightness.
Signed-off-by Puthikorn Voravootivat <[email protected]>--- drivers/gpu/drm/i915/i915_params.c | 5 ++++ drivers/gpu/drm/i915/i915_params.h | 3 +- drivers/gpu/drm/i915/intel_dp_aux_backlight.c | 40+++++++++++++++++++++++----
Review
Quoted 3 lines
3 files changed, 41 insertions(+), 7 deletions(-)(quoted diff) +0
-0
b/drivers/gpu/drm/i915/i915_params.cQuoted 12 lines
index
13cf3f1572ab..6eaf660e74da100644drivers/gpu/drm/i915/i915_params.c +1
-0@@ -65,6 +65,7 @@ struct i915_params i915 __read_mostly = { .inject_load_failure = 0, .enable_dpcd_backlight = -1, .enable_gvt = false, + .enable_dbc = false, };module_param_named (modeset, i915.modeset, int,0400 );drivers/gpu/drm/i915/i915_params.c MODULE_PARM_DESC(enable_dpcd_backlight, · line 258
Quoted 3 lines
drivers/gpu/drm/i915/i915_params.c +0
-0@@ -255,3 +256,7 @@ MODULE_PARM_DESC(enable_dpcd_backlight,module_param_named (enable_gvt, i915.enable_gvt, bool,0400 ); MODULE_PARM_DESC(enable_gvt, "Enable support for Intel GVT-g graphics virtualization hostsupport(default:false)");
Review
Quoted 5 lines
drivers/gpu/drm/i915/i915_params.c +4
-0+ +module_param_named (enable_dbc, i915.enable_dbc, bool,0600 ); +MODULE_PARM_DESC (enable_dbc, +"Enable support for dynamic backlight control (default:false)" );(quoted diff) +0
-0
b/drivers/gpu/drm/i915/i915_params.hReview
Quoted 14 lines
index
ac02efce6e22..2de3e2850b54100644drivers/gpu/drm/i915/i915_params.h +2
-1@@ -67,7 +67,8 @@func (bool, nuclear_pageflip); \func (bool, enable_dp_mst); \func (int, enable_dpcd_backlight); \ - func(bool, enable_gvt) +func (bool, enable_gvt); \ + func(bool, enable_dbc)#define MEMBER (T , member) T memberstruct i915_params {(quoted diff) +0
-0
b/drivers/gpu/drm/i915/intel_dp_aux_backlight.cdrivers/gpu/drm/i915/intel_dp_aux_backlight.c intel_dp_aux_set_backlight(struct intel_connector
Quoted 4 lines
index
16ba1924308d..c0eeb8fc2013100644drivers/gpu/drm/i915/intel_dp_aux_backlight.c +0
-0@@ -100,10 +100,27 @@ intel_dp_aux_set_backlight(struct intel_connector*connector, u32 level)
drivers/gpu/drm/i915/intel_dp_aux_backlight.c intel_dp_aux_set_backlight(struct intel_connector *connector, u32 level)
Quoted 5 lines
drivers/gpu/drm/i915/intel_dp_aux_backlight.c +2
-0} } +/* +* Set minimum / maximum dynamic brightness percentage. This value is expressed
drivers/gpu/drm/i915/intel_dp_aux_backlight.c intel_dp_aux_set_backlight(struct intel_connector *connector, u32 level)
Quoted 7 lines
drivers/gpu/drm/i915/intel_dp_aux_backlight.c +7
-0+* as the percentage of normal brightness in 5% increments. +*/ +static void +intel_dp_aux_set_dynamic_backlight_percent (struct intel_dp *intel_dp, +u32 min,u32 max) +{ +u8 dbc[] = {DIV_ROUND_CLOSEST (min,5 ),DIV_ROUND_CLOSEST (max,5 )};
drivers/gpu/drm/i915/intel_dp_aux_backlight.c intel_dp_aux_set_backlight(struct intel_connector · line 113
Quoted 2 lines
drivers/gpu/drm/i915/intel_dp_aux_backlight.c +2
-0+ + if (drm_dp_dpcd_write(&intel_dp->aux,
DP_EDP_DBC_MINIMUM_BRIGHTNESS_SET,drivers/gpu/drm/i915/intel_dp_aux_backlight.c intel_dp_aux_set_backlight(struct intel_connector *connector, u32 level) · line 114
Quoted 1 line
drivers/gpu/drm/i915/intel_dp_aux_backlight.c +1
-0+ dbc, sizeof(dbc) < 0)) {Incorrect parentheses placement and return value check.
drivers/gpu/drm/i915/intel_dp_aux_backlight.c intel_dp_aux_set_backlight(struct intel_connector · line 115
Quoted 1 line
drivers/gpu/drm/i915/intel_dp_aux_backlight.c +1
-0+ DRM_DEBUG_KMS("Failed to write aux DBC brightnesslevel\n");
drivers/gpu/drm/i915/intel_dp_aux_backlight.c intel_dp_aux_set_backlight(struct intel_connector *connector, u32 level)
Quoted 4 lines
drivers/gpu/drm/i915/intel_dp_aux_backlight.c +3
-0+ } +} + static void intel_dp_aux_enable_backlight(struct intel_connector*connector)
drivers/gpu/drm/i915/intel_dp_aux_backlight.c intel_dp_aux_set_backlight(struct intel_connector · line 121
Quoted 2 lines
drivers/gpu/drm/i915/intel_dp_aux_backlight.c +0
-0{ struct intel_dp *intel_dp = enc_to_intel_dp(&connector->
encoder->base);drivers/gpu/drm/i915/intel_dp_aux_backlight.c intel_dp_aux_set_backlight(struct intel_connector *connector, u32 level) · line 123
Quoted 2 lines
drivers/gpu/drm/i915/intel_dp_aux_backlight.c +1
-0uint8_t dpcd_buf =0 ; +uint8_t new_dpcd_buf =0 ;nit: unnecessary initialization.
drivers/gpu/drm/i915/intel_dp_aux_backlight.c static void intel_dp_aux_enable_backlight(struct
Quoted 4 lines
drivers/gpu/drm/i915/intel_dp_aux_backlight.c +0
-0uint8_t edp_backlight_mode =0 ; if (drm_dp_dpcd_readb(&intel_dp->aux,@@ -113,18 +130,15 @@ static void intel_dp_aux_enable_backlight(struct
intel_connector*connector)drivers/gpu/drm/i915/intel_dp_aux_backlight.c static void intel_dp_aux_enable_backlight(struct intel_connector *connector)
Quoted 5 lines
drivers/gpu/drm/i915/intel_dp_aux_backlight.c +1
-0return ; } + new_dpcd_buf = dpcd_buf; edp_backlight_mode = dpcd_buf &DP_EDP_BACKLIGHT_CONTROL_MODE_ MASK;
drivers/gpu/drm/i915/intel_dp_aux_backlight.c static void intel_dp_aux_enable_backlight(struct intel_connector *connector)
Quoted 9 lines
drivers/gpu/drm/i915/intel_dp_aux_backlight.c +0
-4switch (edp_backlight_mode) {case DP_EDP_BACKLIGHT_CONTROL_MODE_PWM :case DP_EDP_BACKLIGHT_CONTROL_MODE_PRESET :case DP_EDP_BACKLIGHT_CONTROL_MODE_PRODUCT : - dpcd_buf &= ~DP_EDP_BACKLIGHT_CONTROL_MODE_MASK ; - dpcd_buf |=DP_EDP_BACKLIGHT_CONTROL_MODE_DPCD ; - if (drm_dp_dpcd_writeb(&intel_dp->aux, - DP_EDP_BACKLIGHT_MODE_SET_REGISTER, dpcd_buf) <0) {
drivers/gpu/drm/i915/intel_dp_aux_backlight.c static void intel_dp_aux_enable_backlight(struct · line 125
Quoted 1 line
drivers/gpu/drm/i915/intel_dp_aux_backlight.c +0
-1- DRM_DEBUG_KMS("Failed to write aux backlightmode\n");
drivers/gpu/drm/i915/intel_dp_aux_backlight.c static void intel_dp_aux_enable_backlight(struct
Quoted 7 lines
drivers/gpu/drm/i915/intel_dp_aux_backlight.c +2
-1- } + new_dpcd_buf &= ~DP_EDP_BACKLIGHT_CONTROL_MODE_MASK ; + new_dpcd_buf |=DP_EDP_BACKLIGHT_CONTROL_MODE_DPCD ;break ;/* Do nothing when it is already DPCD mode */ @@ -133,6 +147,20 @@ static void intel_dp_aux_enable_backlight(struct
intel_connector*connector)drivers/gpu/drm/i915/intel_dp_aux_backlight.c static void intel_dp_aux_enable_backlight(struct intel_connector *connector)
Quoted 7 lines
drivers/gpu/drm/i915/intel_dp_aux_backlight.c +4
-0break ; } +if (i915.enable_dbc && + (intel_dp->edp_dpcd[2 ] &DP_EDP_DYNAMIC_BACKLIGHT_CAP )) { + new_dpcd_buf |=DP_EDP_DYNAMIC_BACKLIGHT_ENABLE ; + intel_dp_aux_set_dynamic_backlight_percent(intel_dp, 0,100);
drivers/gpu/drm/i915/intel_dp_aux_backlight.c static void intel_dp_aux_enable_backlight(struct intel_connector *connector)
Quoted 6 lines
drivers/gpu/drm/i915/intel_dp_aux_backlight.c +6
-0+DRM_DEBUG_KMS ("Enable dynamic brightness.\n" ); + } + +if (new_dpcd_buf != dpcd_buf) { +if (drm_dp_dpcd_writeb (&intel_dp->aux, + DP_EDP_BACKLIGHT_MODE_SET_REGISTER, new_dpcd_buf)< 0) {
Quoted 11 lines
drivers/gpu/drm/i915/intel_dp_aux_backlight.c static void intel_dp_aux_enable_backlight(struct · line 160
Quoted 1 line
drivers/gpu/drm/i915/intel_dp_aux_backlight.c +1
-0+ DRM_DEBUG_KMS("Failed to write aux backlightmode\n");
drivers/gpu/drm/i915/intel_dp_aux_backlight.c static void intel_dp_aux_enable_backlight(struct intel_connector *connector)
Quoted 5 lines
drivers/gpu/drm/i915/intel_dp_aux_backlight.c +3
-0+ } + } +set_aux_backlight_enable (intel_dp, true); intel_dp_aux_set_backlight(connector, connector->panel.backlight.level);
Quoted 1 line
drivers/gpu/drm/i915/intel_dp_aux_backlight.c +0
-0}
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH v8 3/5] drm/i915: Add option to support dynamic backlight via DPCD
Yeah, looks fine to me.
-DK
From: [email protected] [mailto:[email protected]] On Behalf Of Puthikorn Voravootivat
Sent: Friday, May 19, 2017 2:00 PM
To: Pandiyan, Dhinakaran <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [Intel-gfx] [PATCH v8 3/5] drm/i915: Add option to support dynamic backlight via DPCD
Hi Dhinakaran,
Quick question
So what is the update about adding new option in i915_params? Is this patch good to go after fixing the 2 points you mentioned?
Thanks
On Wed, May 17, 2017 at 1:33 PM, Pandiyan, Dhinakaran <[email protected]<mailto:[email protected]>> wrote:
Quoted 56 lines · Puthikorn Voravootivat
This patch adds option to enable dynamic backlight for eDP panel that supports this feature via DPCD register and set minimum / maximum brightness to 0% and 100% of the normal brightness.
--- drivers/gpu/drm/i915/i915_params.c | 5 ++++ drivers/gpu/drm/i915/i915_params.h | 3 +- drivers/gpu/drm/i915/intel_dp_aux_backlight.c | 40 +++++++++++++++++++++++---- 3 files changed, 41 insertions(+), 7 deletions(-)drivers/gpu/drm/i915/i915_params.c +5
-0@@ -65,6 +65,7 @@ struct i915_params i915 __read_mostly = { .inject_load_failure = 0, .enable_dpcd_backlight = -1, .enable_gvt = false, + .enable_dbc = false, };module_param_named (modeset, i915.modeset, int,0400 );@@ -255,3 +256,7 @@ MODULE_PARM_DESC(enable_dpcd_backlight,module_param_named (enable_gvt, i915.enable_gvt, bool,0400 );MODULE_PARM_DESC (enable_gvt,"Enable support for Intel GVT-g graphics virtualization host support(default:false)" ); + +module_param_named (enable_dbc, i915.enable_dbc, bool,0600 ); +MODULE_PARM_DESC (enable_dbc, +"Enable support for dynamic backlight control (default:false)" );drivers/gpu/drm/i915/i915_params.h +2
-1@@ -67,7 +67,8 @@func (bool, nuclear_pageflip); \func (bool, enable_dp_mst); \func (int, enable_dpcd_backlight); \ - func(bool, enable_gvt) +func (bool, enable_gvt); \ + func(bool, enable_dbc)#define MEMBER (T , member) T memberstruct i915_params {drivers/gpu/drm/i915/intel_dp_aux_backlight.c +2
-0@@ -100,10 +100,27 @@ intel_dp_aux_set_backlight(struct intel_connector *connector, u32 level) } } +/* +* Set minimum / maximum dynamic brightness percentage. This value is expressed
drivers/gpu/drm/i915/intel_dp_aux_backlight.c intel_dp_aux_set_backlight(struct intel_connector *connector, u32 level) · line 114
Quoted 10 lines
drivers/gpu/drm/i915/intel_dp_aux_backlight.c +10
-0+* as the percentage of normal brightness in 5% increments. +*/ +static void +intel_dp_aux_set_dynamic_backlight_percent (struct intel_dp *intel_dp, +u32 min,u32 max) +{ +u8 dbc[] = {DIV_ROUND_CLOSEST (min,5 ),DIV_ROUND_CLOSEST (max,5 ) }; + +if (drm_dp_dpcd_write (&intel_dp->aux,DP_EDP_DBC_MINIMUM_BRIGHTNESS_SET , + dbc,sizeof (dbc) <0 )) {
Incorrect parentheses placement and return value check.
drivers/gpu/drm/i915/intel_dp_aux_backlight.c intel_dp_aux_set_backlight(struct intel_connector *connector, u32 level) · line 123
Quoted 9 lines
drivers/gpu/drm/i915/intel_dp_aux_backlight.c +5
-0+DRM_DEBUG_KMS ("Failed to write aux DBC brightness level\n" ); + } +} +static void intel_dp_aux_enable_backlight (struct intel_connector *connector) {struct intel_dp *intel_dp =enc_to_intel_dp (&connector->encoder->base);uint8_t dpcd_buf =0 ; +uint8_t new_dpcd_buf =0 ;
nit: unnecessary initialization.
Quoted 36 lines
drivers/gpu/drm/i915/intel_dp_aux_backlight.c +10
-6uint8_t edp_backlight_mode =0 ; if (drm_dp_dpcd_readb(&intel_dp->aux,@@ -113,18 +130,15 @@ static void intel_dp_aux_enable_backlight(struct intel_connector *connector)return ; } + new_dpcd_buf = dpcd_buf; edp_backlight_mode = dpcd_buf &DP_EDP_BACKLIGHT_CONTROL_MODE_MASK ;switch (edp_backlight_mode) {case DP_EDP_BACKLIGHT_CONTROL_MODE_PWM :case DP_EDP_BACKLIGHT_CONTROL_MODE_PRESET :case DP_EDP_BACKLIGHT_CONTROL_MODE_PRODUCT : - dpcd_buf &= ~DP_EDP_BACKLIGHT_CONTROL_MODE_MASK ; - dpcd_buf |=DP_EDP_BACKLIGHT_CONTROL_MODE_DPCD ; -if (drm_dp_dpcd_writeb (&intel_dp->aux, -DP_EDP_BACKLIGHT_MODE_SET_REGISTER , dpcd_buf) <0 ) { -DRM_DEBUG_KMS ("Failed to write aux backlight mode\n" ); - } + new_dpcd_buf &= ~DP_EDP_BACKLIGHT_CONTROL_MODE_MASK ; + new_dpcd_buf |=DP_EDP_BACKLIGHT_CONTROL_MODE_DPCD ;break ;/* Do nothing when it is already DPCD mode */ @@ -133,6 +147,20 @@ static void intel_dp_aux_enable_backlight(struct intel_connector *connector)break ; } +if (i915.enable_dbc && + (intel_dp->edp_dpcd[2 ] &DP_EDP_DYNAMIC_BACKLIGHT_CAP )) { + new_dpcd_buf |=DP_EDP_DYNAMIC_BACKLIGHT_ENABLE ; +intel_dp_aux_set_dynamic_backlight_percent (intel_dp,0 ,100 ); +DRM_DEBUG_KMS ("Enable dynamic brightness.\n" ); + } +
drivers/gpu/drm/i915/intel_dp_aux_backlight.c static void intel_dp_aux_enable_backlight(struct intel_connector *connector) · line 166
Quoted 10 lines
drivers/gpu/drm/i915/intel_dp_aux_backlight.c +7
-0+if (new_dpcd_buf != dpcd_buf) { +if (drm_dp_dpcd_writeb (&intel_dp->aux, +DP_EDP_BACKLIGHT_MODE_SET_REGISTER , new_dpcd_buf) <0 ) { +DRM_DEBUG_KMS ("Failed to write aux backlight mode\n" ); + } + } +set_aux_backlight_enable (intel_dp, true);intel_dp_aux_set_backlight (connector, connector->panel.backlight.level); }
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v8 4/5 drm: Add definition for eDP backlight frequency
In reply to Puthikorn VoravootivatThis 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.
--- include/drm/drm_dp_helper.h | 2 ++ 1 file changed, 2 insertions(+)
include/drm/drm_dp_helper.h +2 -0
@@ -572,10 +572,12 @@#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
Signature · 6 lines
2.13.0.303.g4ebf302169-goog _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v8 5/5 drm/i915: Set PWM divider to match desired frequency in vbt
In reply to Puthikorn VoravootivatRead desired PWM frequency from panel vbt and calculate the value for divider in DPCD address 0x724 and 0x728 to have as many bits as possible for PWM duty cyle for granularity of brightness adjustment while the frequency divisor is still within 25% of the desired value.
--- drivers/gpu/drm/i915/intel_dp_aux_backlight.c | 82 +++++++++++++++++++++++++++ 1 file changed, 82 insertions(+)
drivers/gpu/drm/i915/intel_dp_aux_backlight.c +82 -0
@@ -116,12 +116,87 @@ intel_dp_aux_set_dynamic_backlight_percent(struct intel_dp *intel_dp, } } +/* +* Set PWM Frequency divider to match desired frequency in vbt. +* The PWM Frequency is calculated as 27Mhz / (F x P). +* - Where F = PWM Frequency Pre-Divider value programmed by field 7:0 of the +* EDP_BACKLIGHT_FREQ_SET register (DPCD Address 00728h) +* - Where P = 2^Pn, where Pn is the value programmed by field 4:0 of the +* EDP_PWMGEN_BIT_COUNT register (DPCD Address 00724h) +*/ +static void intel_dp_aux_set_pwm_freq (struct intel_connector *connector) +{ +struct drm_i915_private *dev_priv =to_i915 (connector->base.dev); +struct intel_dp *intel_dp =enc_to_intel_dp (&connector->encoder->base); +int freq, fxp, fxp_min, fxp_max, fxp_actual, f =1 ; +u8 pn, pn_min, pn_max; + +/* Find desired value of (F x P) +* Note that, if F x P is out of supported range, the maximum value or +* minimum value will applied automatically. So no need to check that. +*/ + freq = dev_priv->vbt.backlight.pwm_freq_hz; +DRM_DEBUG_KMS ("VBT defined backlight frequency %u Hz\n" , freq); +if (!freq) { +DRM_DEBUG_KMS ("Use panel default backlight frequency\n" ); +return ; + } + + fxp =DIV_ROUND_CLOSEST (KHz (DP_EDP_BACKLIGHT_FREQ_BASE_KHZ ), freq); + +/* Use highest possible value of Pn for more granularity of brightness +* adjustment while satifying the conditions below. +* - Pn is in the range of Pn_min and Pn_max +* - F is in the range of 1 and 255 +* - FxP is within 25% of desired value. +* Note: 25% is arbitrary value and may need some tweak. +*/ +if (drm_dp_dpcd_readb (&intel_dp->aux, +DP_EDP_PWMGEN_BIT_COUNT_CAP_MIN , &pn_min) !=1 ) { +DRM_DEBUG_KMS ("Failed to read pwmgen bit count cap min\n" ); +return ; + } +if (drm_dp_dpcd_readb (&intel_dp->aux, +DP_EDP_PWMGEN_BIT_COUNT_CAP_MAX , &pn_max) !=1 ) { +DRM_DEBUG_KMS ("Failed to read pwmgen bit count cap max\n" ); +return ; + } + pn_min &=DP_EDP_PWMGEN_BIT_COUNT_MASK ; + pn_max &=DP_EDP_PWMGEN_BIT_COUNT_MASK ; + + fxp_min =DIV_ROUND_CLOSEST (fxp *3 ,4 ); + fxp_max =DIV_ROUND_CLOSEST (fxp *5 ,4 ); +if (fxp_min < (1 << pn_min) || (255 << pn_max) < fxp_max) { +DRM_DEBUG_KMS ("VBT defined backlight frequency out of range\n" ); +return ; + } + +for (pn = pn_max; pn >= pn_min; pn--) { + f =clamp (DIV_ROUND_CLOSEST (fxp ,1 << pn),1 ,255 ); + fxp_actual = f << pn; +if (fxp_min <= fxp_actual && fxp_actual <= fxp_max) +break ; + } + +if (drm_dp_dpcd_writeb (&intel_dp->aux, +DP_EDP_PWMGEN_BIT_COUNT , pn) <0 ) { +DRM_DEBUG_KMS ("Failed to write aux pwmgen bit count\n" ); +return ; + } +if (drm_dp_dpcd_writeb (&intel_dp->aux, +DP_EDP_BACKLIGHT_FREQ_SET , (u8 ) f) <0 ) { +DRM_DEBUG_KMS ("Failed to write aux backlight freq\n" ); +return ; + } +} +static void intel_dp_aux_enable_backlight (struct intel_connector *connector) {struct intel_dp *intel_dp =enc_to_intel_dp (&connector->encoder->base);uint8_t dpcd_buf =0 ;uint8_t new_dpcd_buf =0 ;uint8_t edp_backlight_mode =0 ; +bool freq_cap;if (drm_dp_dpcd_readb (&intel_dp->aux,DP_EDP_BACKLIGHT_MODE_SET_REGISTER , &dpcd_buf) !=1 ) {
@@ -154,6 +229,10 @@ static void intel_dp_aux_enable_backlight(struct intel_connector *connector)DRM_DEBUG_KMS ("Enable dynamic brightness.\n" ); } + freq_cap = intel_dp->edp_dpcd[2 ] &DP_EDP_BACKLIGHT_FREQ_AUX_SET_CAP ; +if (freq_cap) + new_dpcd_buf |=DP_EDP_BACKLIGHT_FREQ_AUX_SET_ENABLE ; +if (new_dpcd_buf != dpcd_buf) {if (drm_dp_dpcd_writeb (&intel_dp->aux,DP_EDP_BACKLIGHT_MODE_SET_REGISTER , new_dpcd_buf) <0 ) {
@@ -161,6 +240,9 @@ static void intel_dp_aux_enable_backlight(struct intel_connector *connector) } } +if (freq_cap) +intel_dp_aux_set_pwm_freq (connector); +set_aux_backlight_enable (intel_dp, true);intel_dp_aux_set_backlight (connector, connector->panel.backlight.level); }
Signature · 6 lines
2.13.0.303.g4ebf302169-goog _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH v8 5/5] drm/i915: Set PWM divider to match desired frequency in vbt
Quoted 115 lines · Puthikorn Voravootivat
Read desired PWM frequency from panel vbt and calculate the value for divider in DPCD address
0x724and0x728to have as many bits as possible for PWM duty cyle for granularity of brightness adjustment while the frequency divisor is still within 25% of the desired value.Signed-off-by Puthikorn Voravootivat <[email protected]>--- drivers/gpu/drm/i915/intel_dp_aux_backlight.c | 82 +++++++++++++++++++++++++++ 1 file changed, 82 insertions(+)drivers/gpu/drm/i915/intel_dp_aux_backlight.c +79
-0@@ -116,12 +116,87 @@ intel_dp_aux_set_dynamic_backlight_percent(struct intel_dp *intel_dp, } } +/* +* Set PWM Frequency divider to match desired frequency in vbt. +* The PWM Frequency is calculated as 27Mhz / (F x P). +* - Where F = PWM Frequency Pre-Divider value programmed by field 7:0 of the +* EDP_BACKLIGHT_FREQ_SET register (DPCD Address 00728h) +* - Where P = 2^Pn, where Pn is the value programmed by field 4:0 of the +* EDP_PWMGEN_BIT_COUNT register (DPCD Address 00724h) +*/ +static void intel_dp_aux_set_pwm_freq (struct intel_connector *connector) +{ +struct drm_i915_private *dev_priv =to_i915 (connector->base.dev); +struct intel_dp *intel_dp =enc_to_intel_dp (&connector->encoder->base); +int freq, fxp, fxp_min, fxp_max, fxp_actual, f =1 ; +u8 pn, pn_min, pn_max; + +/* Find desired value of (F x P) +* Note that, if F x P is out of supported range, the maximum value or +* minimum value will applied automatically. So no need to check that. +*/ + freq = dev_priv->vbt.backlight.pwm_freq_hz; +DRM_DEBUG_KMS ("VBT defined backlight frequency %u Hz\n" , freq); +if (!freq) { +DRM_DEBUG_KMS ("Use panel default backlight frequency\n" ); +return ; + } + + fxp =DIV_ROUND_CLOSEST (KHz (DP_EDP_BACKLIGHT_FREQ_BASE_KHZ ), freq); + +/* Use highest possible value of Pn for more granularity of brightness +* adjustment while satifying the conditions below. +* - Pn is in the range of Pn_min and Pn_max +* - F is in the range of 1 and 255 +* - FxP is within 25% of desired value. +* Note: 25% is arbitrary value and may need some tweak. +*/ +if (drm_dp_dpcd_readb (&intel_dp->aux, +DP_EDP_PWMGEN_BIT_COUNT_CAP_MIN , &pn_min) !=1 ) { +DRM_DEBUG_KMS ("Failed to read pwmgen bit count cap min\n" ); +return ; + } +if (drm_dp_dpcd_readb (&intel_dp->aux, +DP_EDP_PWMGEN_BIT_COUNT_CAP_MAX , &pn_max) !=1 ) { +DRM_DEBUG_KMS ("Failed to read pwmgen bit count cap max\n" ); +return ; + } + pn_min &=DP_EDP_PWMGEN_BIT_COUNT_MASK ; + pn_max &=DP_EDP_PWMGEN_BIT_COUNT_MASK ; + + fxp_min =DIV_ROUND_CLOSEST (fxp *3 ,4 ); + fxp_max =DIV_ROUND_CLOSEST (fxp *5 ,4 ); +if (fxp_min < (1 << pn_min) || (255 << pn_max) < fxp_max) { +DRM_DEBUG_KMS ("VBT defined backlight frequency out of range\n" ); +return ; + } + +for (pn = pn_max; pn >= pn_min; pn--) { + f =clamp (DIV_ROUND_CLOSEST (fxp ,1 << pn),1 ,255 ); + fxp_actual = f << pn; +if (fxp_min <= fxp_actual && fxp_actual <= fxp_max) +break ; + } + +if (drm_dp_dpcd_writeb (&intel_dp->aux, +DP_EDP_PWMGEN_BIT_COUNT , pn) <0 ) { +DRM_DEBUG_KMS ("Failed to write aux pwmgen bit count\n" ); +return ; + } +if (drm_dp_dpcd_writeb (&intel_dp->aux, +DP_EDP_BACKLIGHT_FREQ_SET , (u8 ) f) <0 ) { +DRM_DEBUG_KMS ("Failed to write aux backlight freq\n" ); +return ; + } +} +static void intel_dp_aux_enable_backlight (struct intel_connector *connector) {struct intel_dp *intel_dp =enc_to_intel_dp (&connector->encoder->base);uint8_t dpcd_buf =0 ;uint8_t new_dpcd_buf =0 ;uint8_t edp_backlight_mode =0 ; +bool freq_cap;if (drm_dp_dpcd_readb (&intel_dp->aux,DP_EDP_BACKLIGHT_MODE_SET_REGISTER , &dpcd_buf) !=1 ) {@@ -154,6 +229,10 @@ static void intel_dp_aux_enable_backlight(struct intel_connector *connector)DRM_DEBUG_KMS ("Enable dynamic brightness.\n" ); } + freq_cap = intel_dp->edp_dpcd[2 ] &DP_EDP_BACKLIGHT_FREQ_AUX_SET_CAP ; +if (freq_cap) + new_dpcd_buf |=DP_EDP_BACKLIGHT_FREQ_AUX_SET_ENABLE ; +if (new_dpcd_buf != dpcd_buf) {if (drm_dp_dpcd_writeb (&intel_dp->aux,DP_EDP_BACKLIGHT_MODE_SET_REGISTER , new_dpcd_buf) <0 ) {
drivers/gpu/drm/i915/intel_dp_aux_backlight.c static void intel_dp_aux_enable_backlight(struct intel_connector *connector) · line 248
Quoted 9 lines
drivers/gpu/drm/i915/intel_dp_aux_backlight.c +3
-0@@ -161,6 +240,9 @@ static void intel_dp_aux_enable_backlight(struct intel_connector *connector) } } +if (freq_cap) +intel_dp_aux_set_pwm_freq (connector); +set_aux_backlight_enable (intel_dp, true);intel_dp_aux_set_backlight (connector, connector->panel.backlight.level); }
I guess, we could find a way to do away with the +-25% allowance in computing the freq. divider, reduce DPCD reads and avoid repeating freq. divider computations. But, I think this is good for now.
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for Enhancement to intel_dp_aux_backlight driver (rev7)
In reply to Puthikorn Voravootivat== Series Details ==
== Series Details ==
Series: Enhancement to intel_dp_aux_backlight driver (rev7)
URL : https://patchwork.freedesktop.org/series/21086/
State : success
== Summary ==
Series 21086v7 Enhancement to intel_dp_aux_backlight driver
https://patchwork.freedesktop.org/api/1.0/series/21086/revisions/7/mbox/
fi-bdw-gvtdvm total:278 pass:256 dwarn:8 dfail:0 fail:0 skip:14 time:441s fi-byt-j1900 total:278 pass:254 dwarn:0 dfail:0 fail:0 skip:24 time:499s fi-byt-n2820 total:278 pass:250 dwarn:0 dfail:0 fail:0 skip:28 time:487s fi-hsw-4770 total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 time:414s fi-ilk-650 total:278 pass:228 dwarn:0 dfail:0 fail:0 skip:50 time:419s fi-skl-gvtdvm total:278 pass:265 dwarn:0 dfail:0 fail:0 skip:13 time:443s fi-snb-2520m total:278 pass:250 dwarn:0 dfail:0 fail:0 skip:28 time:533s fi-snb-2600 total:278 pass:249 dwarn:0 dfail:0 fail:0 skip:29 time:398s
fi-skl-6700k failed to connect after reboot
713f8ec675d5a793326b94d9a0cc484608eff75e drm-tip: 2017y-05m-16d-15h-22m-08s UTC integration manifest 22b9473 drm/i915: Set PWM divider to match desired frequency in vbt
703055d drm: Add definition for eDP backlight frequency
140048b drm/i915: Add option to support dynamic backlight via DPCD
d712cd7 drm/i915: Allow choosing how to adjust brightness if both supported
aba9f34 drm/i915: Drop AUX backlight enable check for backlight control
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4713/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for Enhancement to intel_dp_aux_backlight driver (rev7)
In reply to Puthikorn Voravootivat== Series Details ==
== Series Details ==
Series: Enhancement to intel_dp_aux_backlight driver (rev7)
URL : https://patchwork.freedesktop.org/series/21086/
State : success
== Summary ==
Series 21086v7 Enhancement to intel_dp_aux_backlight driver
https://patchwork.freedesktop.org/api/1.0/series/21086/revisions/7/mbox/
Test gem_exec_flush:
Subgroup basic-batch-kernel-default-uc:
pass -> FAIL (fi-snb-2600) fdo#100007fdo#100007 https://bugs.freedesktop.org/show_bug.cgi?id=100007
fi-bdw-gvtdvm total:278 pass:256 dwarn:8 dfail:0 fail:0 skip:14 time:432s fi-byt-j1900 total:278 pass:254 dwarn:0 dfail:0 fail:0 skip:24 time:492s fi-byt-n2820 total:278 pass:250 dwarn:0 dfail:0 fail:0 skip:28 time:490s fi-hsw-4770 total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 time:415s fi-ilk-650 total:278 pass:228 dwarn:0 dfail:0 fail:0 skip:50 time:420s fi-skl-gvtdvm total:278 pass:265 dwarn:0 dfail:0 fail:0 skip:13 time:437s fi-snb-2520m total:278 pass:250 dwarn:0 dfail:0 fail:0 skip:28 time:535s fi-snb-2600 total:278 pass:248 dwarn:0 dfail:0 fail:1 skip:29 time:404s
fi-bxt-j4205 failed to connect after reboot
fi-kbl-7560u failed to connect after reboot
fi-skl-6700k failed to connect after reboot
713f8ec675d5a793326b94d9a0cc484608eff75e drm-tip: 2017y-05m-16d-15h-22m-08s UTC integration manifest d43d284 drm/i915: Set PWM divider to match desired frequency in vbt
b1c58bc drm: Add definition for eDP backlight frequency
d79f3e2 drm/i915: Add option to support dynamic backlight via DPCD
76d9737 drm/i915: Allow choosing how to adjust brightness if both supported
d6e0566 drm/i915: Drop AUX backlight enable check for backlight control
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4716/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for Enhancement to intel_dp_aux_backlight driver (rev7)
In reply to Puthikorn Voravootivat== Series Details ==
== Series Details ==
Series: Enhancement to intel_dp_aux_backlight driver (rev7)
URL : https://patchwork.freedesktop.org/series/21086/
State : success
== Summary ==
Series 21086v7 Enhancement to intel_dp_aux_backlight driver
https://patchwork.freedesktop.org/api/1.0/series/21086/revisions/7/mbox/
Test kms_cursor_legacy:
Subgroup basic-busy-flip-before-cursor-legacy:
pass -> FAIL (fi-snb-2600) fdo#100215fdo#100215 https://bugs.freedesktop.org/show_bug.cgi?id=100215
fi-bdw-5557u total:278 pass:267 dwarn:0 dfail:0 fail:0 skip:11 time:447s fi-bsw-n3050 total:278 pass:242 dwarn:0 dfail:0 fail:0 skip:36 time:580s fi-bxt-j4205 total:278 pass:259 dwarn:0 dfail:0 fail:0 skip:19 time:516s fi-byt-j1900 total:278 pass:254 dwarn:0 dfail:0 fail:0 skip:24 time:488s fi-byt-n2820 total:278 pass:250 dwarn:0 dfail:0 fail:0 skip:28 time:490s fi-hsw-4770 total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 time:423s fi-hsw-4770r total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 time:415s fi-ilk-650 total:278 pass:228 dwarn:0 dfail:0 fail:0 skip:50 time:418s fi-ivb-3520m total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time:488s fi-ivb-3770 total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time:458s fi-kbl-7500u total:278 pass:255 dwarn:5 dfail:0 fail:0 skip:18 time:466s fi-kbl-7560u total:278 pass:263 dwarn:5 dfail:0 fail:0 skip:10 time:575s fi-skl-6260u total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time:459s fi-skl-6700hq total:278 pass:261 dwarn:0 dfail:0 fail:0 skip:17 time:575s fi-skl-6700k total:278 pass:256 dwarn:4 dfail:0 fail:0 skip:18 time:478s fi-skl-6770hq total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time:510s fi-snb-2520m total:278 pass:250 dwarn:0 dfail:0 fail:0 skip:28 time:539s fi-snb-2600 total:278 pass:248 dwarn:0 dfail:0 fail:1 skip:29 time:410s
713f8ec675d5a793326b94d9a0cc484608eff75e drm-tip: 2017y-05m-16d-15h-22m-08s UTC integration manifest 6c06613 drm/i915: Set PWM divider to match desired frequency in vbt
d1d9671 drm: Add definition for eDP backlight frequency
9f1b542 drm/i915: Add option to support dynamic backlight via DPCD
427d4aa drm/i915: Allow choosing how to adjust brightness if both supported
bac5d76 drm/i915: Drop AUX backlight enable check for backlight control
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4719/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx