thinkpad-acpi: Reduce screen brightness user visible noise.
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 thinkpad-acpi: Reduce screen brightness user visible noise.
Implement change in logging during screen brightness capabilities detection as suggested in
https://www.mail-archive.com/ibm-acpi-devel%40lists.sourceforge.net/msg03484.html
--- drivers/platform/x86/thinkpad_acpi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/platform/x86/thinkpad_acpi.c +4 -4
@@ -6450,19 +6450,16 @@ static void __init tpacpi_detect_brightness_capabilities(void)switch (b) {case 16 : bright_maxlvl =15 ; -pr_info ("detected a 16-level brightness capable ThinkPad\n" );break ;case 8 :case 0 : bright_maxlvl =7 ; -pr_info ("detected a 8-level brightness capable ThinkPad\n" );break ;default : -pr_err ("Unsupported brightness interface, " -"please contact %s\n" ,TPACPI_MAIL ); tp_features.bright_unkfw =1 ; bright_maxlvl = b -1 ; } +pr_debug ("firmware reports %d brightness levels\n" , bright_maxlvl); }static int __init brightness_init (struct ibm_init_struct *iibm)
@@ -6482,6 +6479,9 @@ static int __init brightness_init(struct ibm_init_struct *iibm)/* if it is unknown, we don't handle it: it wouldn't be safe */ if (tp_features.bright_unkfw) +dbg_printk (TPACPI_DBG_INIT |TPACPI_DBG_BRGHT , +"Unsupported brightness mode, use acpi video " +"or gpu drivers" );return 1 ;if (!brightness_enable) {
Signature · 1 line
1.9.1
Quoted 5 lines · Ramiro Morales
Implement change in logging during screen brightness capabilities detection as suggested in
https://www.mail-archive.com/ibm-acpi-devel%40lists.sourceforge.net/msg03484.htmlSigned-off-by Ramiro Morales <[email protected]>
Quoted 48 lines
--- drivers/platform/x86/thinkpad_acpi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/platform/x86/thinkpad_acpi.c +1
-4@@ -6450,19 +6450,16 @@ static void __inittpacpi_detect_brightness_capabilities (void ) switch (b) {case 16 : bright_maxlvl =15 ; -pr_info ("detected a 16-level brightness capable ThinkPad\n"); break;case 8 :case 0 : bright_maxlvl =7 ; -pr_info ("detected a 8-level brightness capable ThinkPad\n"); break;default : -pr_err ("Unsupported brightness interface, " -"please contact %s\n" ,TPACPI_MAIL ); tp_features.bright_unkfw =1 ; bright_maxlvl = b -1 ; } + pr_debug("firmware reports %d brightness levels\n",
bright_maxlvl);
}static int
__initbrightness_init(struct ibm_init_struct *iibm)drivers/platform/x86/thinkpad_acpi.c +3
-0@@ -6482,6 +6479,9 @@ static int __init brightness_init(struct ibm_init_struct *iibm)/* if it is unknown, we don't handle it: it wouldn't be safe */ if (tp_features.bright_unkfw) +dbg_printk (TPACPI_DBG_INIT |TPACPI_DBG_BRGHT , +"Unsupported brightness mode, use acpi video " +"or gpu drivers" );return 1 ;if (!brightness_enable) {
Signature · 1 line
1.9.1
Signature · 4 lines
"One disk to rule them all, One disk to find them. One disk to bring them all and in the darkness grind them. In the Land of Redmond where the shadows lie." -- The Silicon Valley Tarot Henrique Holschuh
Quoted 4 lines · Ramiro Morales
Implement change in logging during screen brightness capabilities detection as suggested in
https://www.mail-archive.com/ibm-acpi-devel%40lists.sourceforge.net/msg03484.html
Summarize the rationale here, the change log needs to stand alone. You can reference a link, but the justification cannot depend on it.
Quoted 31 lines
Signed-off-by Ramiro Morales <[email protected]>--- drivers/platform/x86/thinkpad_acpi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/platform/x86/thinkpad_acpi.c +1
-4@@ -6450,19 +6450,16 @@ static void __init tpacpi_detect_brightness_capabilities(void)switch (b) {case 16 : bright_maxlvl =15 ; -pr_info ("detected a 16-level brightness capable ThinkPad\n" );break ;case 8 :case 0 : bright_maxlvl =7 ; -pr_info ("detected a 8-level brightness capable ThinkPad\n" );break ;default : -pr_err ("Unsupported brightness interface, " -"please contact %s\n" ,TPACPI_MAIL ); tp_features.bright_unkfw =1 ; bright_maxlvl = b -1 ; } +pr_debug ("firmware reports %d brightness levels\n" , bright_maxlvl); }static int __init brightness_init (struct ibm_init_struct *iibm)
drivers/platform/x86/thinkpad_acpi.c static int __init brightness_init(struct ibm_init_struct *iibm) · line 6484
Quoted 6 lines
drivers/platform/x86/thinkpad_acpi.c +3
-0@@ -6482,6 +6479,9 @@ static int __init brightness_init(struct ibm_init_struct *iibm)/* if it is unknown, we don't handle it: it wouldn't be safe */ if (tp_features.bright_unkfw) +dbg_printk (TPACPI_DBG_INIT |TPACPI_DBG_BRGHT , +"Unsupported brightness mode, use acpi video " +"or gpu drivers" );
Please run checkpatch on your patch (don't break quoted strings - it makes it hard to find them with grep).
Quoted 7 lines
drivers/platform/x86/thinkpad_acpi.c +0
-0return 1 ;if (!brightness_enable) {Signature · 1 line
1.9.1
Signature · 2 lines
Darren Hart Intel Open Source Technology Center