All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] thinkpad-acpi: Reduce screen brightness user visible noise.
       [not found] <20150614022755.GB26753@khazad-dum.debian.net>
@ 2015-06-15 15:29 ` Ramiro Morales
  2015-06-15 17:06   ` Henrique de Moraes Holschuh
  2015-06-15 20:43   ` Darren Hart
  0 siblings, 2 replies; 3+ messages in thread
From: Ramiro Morales @ 2015-06-15 15:29 UTC (permalink / raw
  To: hmh, dvhart; +Cc: ibm-acpi-devel, platform-driver-x86, 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

Signed-off-by: Ramiro Morales <cramm0@gmail.com>
---
 drivers/platform/x86/thinkpad_acpi.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 28f3281..b48efc9 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -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) {
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] thinkpad-acpi: Reduce screen brightness user visible noise.
  2015-06-15 15:29 ` [PATCH 1/1] thinkpad-acpi: Reduce screen brightness user visible noise Ramiro Morales
@ 2015-06-15 17:06   ` Henrique de Moraes Holschuh
  2015-06-15 20:43   ` Darren Hart
  1 sibling, 0 replies; 3+ messages in thread
From: Henrique de Moraes Holschuh @ 2015-06-15 17:06 UTC (permalink / raw
  To: Ramiro Morales, dvhart; +Cc: platform-driver-x86

On Mon, Jun 15, 2015, at 12:29, Ramiro Morales wrote:
> 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
> 
> Signed-off-by: Ramiro Morales <cramm0@gmail.com>

Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>

> ---
>  drivers/platform/x86/thinkpad_acpi.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/platform/x86/thinkpad_acpi.c
> b/drivers/platform/x86/thinkpad_acpi.c
> index 28f3281..b48efc9 100644
> --- a/drivers/platform/x86/thinkpad_acpi.c
> +++ b/drivers/platform/x86/thinkpad_acpi.c
> @@ -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) {
> -- 
> 1.9.1
> 


-- 
  "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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] thinkpad-acpi: Reduce screen brightness user visible noise.
  2015-06-15 15:29 ` [PATCH 1/1] thinkpad-acpi: Reduce screen brightness user visible noise Ramiro Morales
  2015-06-15 17:06   ` Henrique de Moraes Holschuh
@ 2015-06-15 20:43   ` Darren Hart
  1 sibling, 0 replies; 3+ messages in thread
From: Darren Hart @ 2015-06-15 20:43 UTC (permalink / raw
  To: Ramiro Morales; +Cc: hmh, ibm-acpi-devel, platform-driver-x86

On Mon, Jun 15, 2015 at 12:29:14PM -0300, Ramiro Morales wrote:
> 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.

> Signed-off-by: Ramiro Morales <cramm0@gmail.com>
> ---
>  drivers/platform/x86/thinkpad_acpi.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
> index 28f3281..b48efc9 100644
> --- a/drivers/platform/x86/thinkpad_acpi.c
> +++ b/drivers/platform/x86/thinkpad_acpi.c
> @@ -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");

Please run checkpatch on your patch (don't break quoted strings - it makes it
hard to find them with grep).

>  		return 1;
>  
>  	if (!brightness_enable) {
> -- 
> 1.9.1
> 
> 

-- 
Darren Hart
Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-06-15 20:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20150614022755.GB26753@khazad-dum.debian.net>
2015-06-15 15:29 ` [PATCH 1/1] thinkpad-acpi: Reduce screen brightness user visible noise Ramiro Morales
2015-06-15 17:06   ` Henrique de Moraes Holschuh
2015-06-15 20:43   ` Darren Hart

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.