Revert "drm/i915: Add option to support dynamic backlight via DPCD"
Subsystems (2)
PATCH 1/1 Revert "drm/i915: Add option to support dynamic backlight via DPCD"
This reverts commit ae25eceab616d16a07bcaa434b84463d58a3bdc3.
The introduction of dynamic backlight control causes Lenovo ThinkPad X1 Carbon 4th Gen to boot to a black screen; presumably the backlight is off.
--- 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 | 26 -------------------------- 3 files changed, 1 insertion(+), 33 deletions(-)
drivers/gpu/drm/i915/i915_params.c +0 -5
@@ -65,7 +65,6 @@ struct i915_params i915 __read_mostly = { .inject_load_failure = 0, .enable_dpcd_backlight = -1, .enable_gvt = false, - .enable_dbc = true, };module_param_named (modeset, i915.modeset, int,0400 );
@@ -255,7 +254,3 @@ 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_unsafe (enable_dbc, i915.enable_dbc, bool,0600 ); -MODULE_PARM_DESC (enable_dbc, -"Enable support for dynamic backlight control (default:true)" );
drivers/gpu/drm/i915/i915_params.h +1 -2
@@ -67,8 +67,7 @@func (bool, verbose_state_checks); \func (bool, nuclear_pageflip); \func (bool, enable_dp_mst); \ -func (bool, enable_gvt); \ - func(bool, enable_dbc) + func(bool, enable_gvt)#define MEMBER (T , member) T memberstruct i915_params {
drivers/gpu/drm/i915/intel_dp_aux_backlight.c +0 -26
@@ -173,24 +173,6 @@ static bool intel_dp_aux_set_pwm_freq(struct intel_connector *connector)return true; } -/* -* Set minimum / maximum dynamic brightness percentage. This value is expressed -* as the percentage of normal brightness in 5% increments. -*/ -static bool -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" ); -return false; - } -return true; -} -static void intel_dp_aux_enable_backlight (const struct intel_crtc_state *crtc_state,const struct drm_connector_state *conn_state) {
@@ -226,14 +208,6 @@ static void intel_dp_aux_enable_backlight(const struct intel_crtc_state *crtc_stif (intel_dp_aux_set_pwm_freq (connector)) new_dpcd_buf |=DP_EDP_BACKLIGHT_FREQ_AUX_SET_ENABLE ; -if (i915.enable_dbc && - (intel_dp->edp_dpcd[2 ] &DP_EDP_DYNAMIC_BACKLIGHT_CAP )) { -if (intel_dp_aux_set_dynamic_backlight_percent (intel_dp,0 ,100 )) { - new_dpcd_buf |=DP_EDP_DYNAMIC_BACKLIGHT_ENABLE ; -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 ) {
Signature · 6 lines
2.13.2 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for Revert "drm/i915: Add option to support dynamic backlight via DPCD"
== Series Details ==
== Series Details ==
Series: Revert "drm/i915: Add option to support dynamic backlight via DPCD"
URL : https://patchwork.freedesktop.org/series/26818/
State : success
== Summary ==
Series 26818v1 Revert "drm/i915: Add option to support dynamic backlight via DPCD"
https://patchwork.freedesktop.org/api/1.0/series/26818/revisions/1/mbox/
Test gem_exec_suspend:
Subgroup basic-s4-devices:
dmesg-warn -> PASS (fi-kbl-r) fdo#100125
Test kms_busy:
Subgroup basic-flip-default-b:
dmesg-warn -> PASS (fi-skl-6700hq) fdo#101144
Test kms_pipe_crc_basic:
Subgroup hang-read-crc-pipe-a:
dmesg-warn -> PASS (fi-pnv-d510) fdo#101597
Subgroup suspend-read-crc-pipe-b:
dmesg-warn -> PASS (fi-byt-j1900) fdo#101516fdo#100125 https://bugs.freedesktop.org/show_bug.cgi?id=100125
fdo#101144 https://bugs.freedesktop.org/show_bug.cgi?id=101144
fdo#101597 https://bugs.freedesktop.org/show_bug.cgi?id=101597
fdo#101516 https://bugs.freedesktop.org/show_bug.cgi?id=101516
fi-bdw-5557u total:279 pass:268 dwarn:0 dfail:0 fail:0 skip:11 time:441s fi-bdw-gvtdvm total:279 pass:257 dwarn:8 dfail:0 fail:0 skip:14 time:429s fi-blb-e6850 total:279 pass:224 dwarn:1 dfail:0 fail:0 skip:54 time:352s fi-bsw-n3050 total:279 pass:243 dwarn:0 dfail:0 fail:0 skip:36 time:530s fi-bxt-j4205 total:279 pass:260 dwarn:0 dfail:0 fail:0 skip:19 time:511s fi-byt-j1900 total:279 pass:255 dwarn:0 dfail:0 fail:0 skip:24 time:486s fi-byt-n2820 total:279 pass:250 dwarn:1 dfail:0 fail:0 skip:28 time:483s fi-glk-2a total:279 pass:260 dwarn:0 dfail:0 fail:0 skip:19 time:594s fi-hsw-4770 total:279 pass:263 dwarn:0 dfail:0 fail:0 skip:16 time:438s fi-hsw-4770r total:279 pass:263 dwarn:0 dfail:0 fail:0 skip:16 time:414s fi-ilk-650 total:279 pass:229 dwarn:0 dfail:0 fail:0 skip:50 time:427s fi-ivb-3520m total:279 pass:261 dwarn:0 dfail:0 fail:0 skip:18 time:495s fi-ivb-3770 total:279 pass:261 dwarn:0 dfail:0 fail:0 skip:18 time:478s fi-kbl-7500u total:279 pass:261 dwarn:0 dfail:0 fail:0 skip:18 time:471s fi-kbl-7560u total:279 pass:268 dwarn:1 dfail:0 fail:0 skip:10 time:572s fi-kbl-r total:279 pass:261 dwarn:0 dfail:0 fail:0 skip:18 time:583s fi-pnv-d510 total:279 pass:222 dwarn:2 dfail:0 fail:0 skip:55 time:556s fi-skl-6260u total:279 pass:269 dwarn:0 dfail:0 fail:0 skip:10 time:455s fi-skl-6700hq total:279 pass:262 dwarn:0 dfail:0 fail:0 skip:17 time:587s fi-skl-6700k total:279 pass:257 dwarn:4 dfail:0 fail:0 skip:18 time:477s fi-skl-6770hq total:279 pass:269 dwarn:0 dfail:0 fail:0 skip:10 time:476s fi-skl-gvtdvm total:279 pass:266 dwarn:0 dfail:0 fail:0 skip:13 time:439s fi-snb-2520m total:279 pass:251 dwarn:0 dfail:0 fail:0 skip:28 time:550s fi-snb-2600 total:279 pass:250 dwarn:0 dfail:0 fail:0 skip:29 time:406s
24346e831017070c18f3c33b74a7b098682e20f7 drm-tip: 2017y-07m-04d-15h-39m-34s UTC integration manifest 08aa0a5c Revert "drm/i915: Add option to support dynamic backlight via DPCD"
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_5107/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 5 lines · David Weinehall
This reverts commit
ae25eceab616d16a07bcaa434b84463d58a3bdc3.The introduction of dynamic backlight control causes Lenovo ThinkPad X1 Carbon 4th Gen to boot to a black screen; presumably the backlight is off.
Oh, I thought reverting just this commit was not enough for you, based on the previous discussion in the patch thread. If this is enough, and the DPCD backlight by default works for you, I might be inclined to go with just defaulting to false here.
BR,
Jani.
Quoted 86 lines
Signed-off-by David Weinehall <[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 | 26 -------------------------- 3 files changed, 1 insertion(+), 33 deletions(-)drivers/gpu/drm/i915/i915_params.c +0
-5@@ -65,7 +65,6 @@ struct i915_params i915 __read_mostly = { .inject_load_failure = 0, .enable_dpcd_backlight = -1, .enable_gvt = false, - .enable_dbc = true, };module_param_named (modeset, i915.modeset, int,0400 );@@ -255,7 +254,3 @@ 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_unsafe (enable_dbc, i915.enable_dbc, bool,0600 ); -MODULE_PARM_DESC (enable_dbc, -"Enable support for dynamic backlight control (default:true)" );drivers/gpu/drm/i915/i915_params.h +1
-2@@ -67,8 +67,7 @@func (bool, verbose_state_checks); \func (bool, nuclear_pageflip); \func (bool, enable_dp_mst); \ -func (bool, enable_gvt); \ - func(bool, enable_dbc) + func(bool, enable_gvt)#define MEMBER (T , member) T memberstruct i915_params {drivers/gpu/drm/i915/intel_dp_aux_backlight.c +0
-26@@ -173,24 +173,6 @@ static bool intel_dp_aux_set_pwm_freq(struct intel_connector *connector)return true; } -/* -* Set minimum / maximum dynamic brightness percentage. This value is expressed -* as the percentage of normal brightness in 5% increments. -*/ -static bool -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" ); -return false; - } -return true; -} -static void intel_dp_aux_enable_backlight (const struct intel_crtc_state *crtc_state,const struct drm_connector_state *conn_state) {@@ -226,14 +208,6 @@ static void intel_dp_aux_enable_backlight(const struct intel_crtc_state *crtc_stif (intel_dp_aux_set_pwm_freq (connector)) new_dpcd_buf |=DP_EDP_BACKLIGHT_FREQ_AUX_SET_ENABLE ; -if (i915.enable_dbc && - (intel_dp->edp_dpcd[2 ] &DP_EDP_DYNAMIC_BACKLIGHT_CAP )) { -if (intel_dp_aux_set_dynamic_backlight_percent (intel_dp,0 ,100 )) { - new_dpcd_buf |=DP_EDP_DYNAMIC_BACKLIGHT_ENABLE ; -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 ) {
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 11 lines · Jani Nikula
Quoted 5 lines · David Weinehall
This reverts commit
ae25eceab616d16a07bcaa434b84463d58a3bdc3.The introduction of dynamic backlight control causes Lenovo ThinkPad X1 Carbon 4th Gen to boot to a black screen; presumably the backlight is off.
Oh, I thought reverting just this commit was not enough for you, based on the previous discussion in the patch thread. If this is enough, and the DPCD backlight by default works for you, I might be inclined to go with just defaulting to false here.
Yeah, that was indeed my experience, but I cannot reproduce that behaviour now; disabling DBC seems to be enough to make things work. It might be that I made some mistake in my earlier testing.
I retested now, with the following results:
Both DPCD & DBC enabled: black screen
DBC enabled, DPCD disabled: works
DBC disabled, DPCD enabled: works
DBC disabled, DPCD disabled: works
Based on my understanding of the code, DPCD backlight is required for DBC to work, so it makes sense that disabling either of the two makes things work (hence I don't understand how I got my earlier result where just disabling DBC wasn't enough).
Anyhow, I'm fine with just changing the default to false.
Kind regards, David
Quoted 79 lines
BR,
Jani.Quoted 75 lines
Signed-off-by David Weinehall <[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 | 26 -------------------------- 3 files changed, 1 insertion(+), 33 deletions(-)drivers/gpu/drm/i915/i915_params.c +0
-5@@ -65,7 +65,6 @@ struct i915_params i915 __read_mostly = { .inject_load_failure = 0, .enable_dpcd_backlight = -1, .enable_gvt = false, - .enable_dbc = true, };module_param_named (modeset, i915.modeset, int,0400 );@@ -255,7 +254,3 @@ 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_unsafe (enable_dbc, i915.enable_dbc, bool,0600 ); -MODULE_PARM_DESC (enable_dbc, -"Enable support for dynamic backlight control (default:true)" );drivers/gpu/drm/i915/i915_params.h +1
-2@@ -67,8 +67,7 @@func (bool, verbose_state_checks); \func (bool, nuclear_pageflip); \func (bool, enable_dp_mst); \ -func (bool, enable_gvt); \ - func(bool, enable_dbc) + func(bool, enable_gvt)#define MEMBER (T , member) T memberstruct i915_params {drivers/gpu/drm/i915/intel_dp_aux_backlight.c +0
-18@@ -173,24 +173,6 @@ static bool intel_dp_aux_set_pwm_freq(struct intel_connector *connector)return true; } -/* -* Set minimum / maximum dynamic brightness percentage. This value is expressed -* as the percentage of normal brightness in 5% increments. -*/ -static bool -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" ); -return false; - } -return true; -} -static void intel_dp_aux_enable_backlight (const struct intel_crtc_state *crtc_state,const struct drm_connector_state *conn_state) {@@ -226,14 +208,6 @@ static void intel_dp_aux_enable_backlight(const struct intel_crtc_state *crtc_stif (intel_dp_aux_set_pwm_freq (connector)) new_dpcd_buf |=DP_EDP_BACKLIGHT_FREQ_AUX_SET_ENABLE ;
Quoted 14 lines
Quoted 11 lines
drivers/gpu/drm/i915/intel_dp_aux_backlight.c +0
-8-if (i915.enable_dbc && - (intel_dp->edp_dpcd[2 ] &DP_EDP_DYNAMIC_BACKLIGHT_CAP )) { -if (intel_dp_aux_set_dynamic_backlight_percent (intel_dp,0 ,100 )) { - new_dpcd_buf |=DP_EDP_DYNAMIC_BACKLIGHT_ENABLE ; -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 ) {Signature · 1 line
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 24 lines · David Weinehall
Quoted 11 lines · Jani Nikula
Quoted 5 lines · David Weinehall
This reverts commit
ae25eceab616d16a07bcaa434b84463d58a3bdc3.The introduction of dynamic backlight control causes Lenovo ThinkPad X1 Carbon 4th Gen to boot to a black screen; presumably the backlight is off.
Oh, I thought reverting just this commit was not enough for you, based on the previous discussion in the patch thread. If this is enough, and the DPCD backlight by default works for you, I might be inclined to go with just defaulting to false here.
Yeah, that was indeed my experience, but I cannot reproduce that behaviour now; disabling DBC seems to be enough to make things work. It might be that I made some mistake in my earlier testing.
I retested now, with the following results:
Both DPCD & DBC enabled: black screen
DBC enabled, DPCD disabled: works
DBC disabled, DPCD enabled: works
DBC disabled, DPCD disabled: works
Quoted 6 lines
Based on my understanding of the code, DPCD backlight is required for DBC to work, so it makes sense that disabling either of the two makes things work (hence I don't understand how I got my earlier result where just disabling DBC wasn't enough).
Anyhow, I'm fine with just changing the default to false.
I need to NAK my own revert. It turns out that while booting with only i915.enable_dbc=0 gives backlight, the backlight will only work until a suspend/resume cycle has taken place; after that the display will come up blank, unless i915.enable_dpcd_backlight=0 is also passed.
So I'll submit a new revert.
Kind regards, David
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx