Re: [ibm-acpi-devel] [PATCH] thinkpad_acpi: demote brightness unsupported message

2015-04-02 Thread Yves-Alexis Perez
On lun., 2015-03-30 at 14:12 +0200, Yves-Alexis Perez wrote:
 ThinkPad don't use an EC-based brightness interface anymore, they use
 ACPI video interface or (since Windows 8 generation laptops) GPU
 interface. Don't output a scary warning by default and demote it to
 debug.

Heym

any news on this? Does it look ok?

Regards,
-- 
Yves-Alexis


signature.asc
Description: This is a digitally signed message part
--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/___
ibm-acpi-devel mailing list
ibm-acpi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel


Re: [ibm-acpi-devel] [PATCH] thinkpad_acpi: demote brightness unsupported message

2015-04-02 Thread Henrique de Moraes Holschuh
On Thu, Apr 2, 2015, at 17:16, Yves-Alexis Perez wrote:
 On lun., 2015-03-30 at 14:12 +0200, Yves-Alexis Perez wrote:
  ThinkPad don't use an EC-based brightness interface anymore, they use
  ACPI video interface or (since Windows 8 generation laptops) GPU
  interface. Don't output a scary warning by default and demote it to
  debug.
 
 Heym
 
 any news on this? Does it look ok?

It would work, but it is not exactly what I wanted.  I will reply with more 
details in the next couple days.  Otherwise, we can take this version.

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

--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
___
ibm-acpi-devel mailing list
ibm-acpi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel


Re: [ibm-acpi-devel] [PATCH] thinkpad_acpi: demote brightness unsupported message

2015-04-02 Thread Yves-Alexis Perez
On jeu., 2015-04-02 at 17:23 -0300, Henrique de Moraes Holschuh wrote:
 It would work, but it is not exactly what I wanted.  I will reply with
 more details in the next couple days.

Oh sure, no problem :)
   Otherwise, we can take this version.
There's no rush, I'd say.
-- 
Yves-Alexis


signature.asc
Description: This is a digitally signed message part
--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/___
ibm-acpi-devel mailing list
ibm-acpi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel


[ibm-acpi-devel] [PATCH] thinkpad_acpi: demote brightness unsupported message

2015-03-30 Thread Yves-Alexis Perez
ThinkPad don't use an EC-based brightness interface anymore, they use
ACPI video interface or (since Windows 8 generation laptops) GPU
interface. Don't output a scary warning by default and demote it to
debug.

Signed-off-by: Yves-Alexis Perez cor...@debian.org
---
 drivers/platform/x86/thinkpad_acpi.c | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/platform/x86/thinkpad_acpi.c 
b/drivers/platform/x86/thinkpad_acpi.c
index 3b8ceee..dcea451 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -6324,19 +6324,16 @@ static void __init 
tpacpi_detect_brightness_capabilities(void)
 * going to publish a backlight interface
 */
b = tpacpi_check_std_acpi_brightness_support();
+   pr_debug(detected a %d-level brightness capable ThinkPad\n, b);
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;
}
@@ -6359,7 +6356,12 @@ 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 interface, 
+   please use ACPI video or GPU drivers\n);
return 1;
+   }
 
if (!brightness_enable) {
dbg_printk(TPACPI_DBG_INIT | TPACPI_DBG_BRGHT,
-- 
2.1.4


-- 
Yves-Alexis


signature.asc
Description: Digital signature
--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/___
ibm-acpi-devel mailing list
ibm-acpi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel


Re: [ibm-acpi-devel] [PATCH] thinkpad_acpi: demote brightness unsupported message

2015-03-30 Thread Yves-Alexis Perez
On Mon, Mar 30, 2015 at 02:26:42PM +0200, Yves-Alexis Perez wrote:
 On Mon, Mar 30, 2015 at 02:12:44PM +0200, Yves-Alexis Perez wrote:
  ThinkPad don't use an EC-based brightness interface anymore, they use
  ACPI video interface or (since Windows 8 generation laptops) GPU
  interface. Don't output a scary warning by default and demote it to
  debug.
  
 Here's a quick attempt.
  @@ -6359,7 +6356,12 @@ 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 interface, 
  +   please use ACPI video or GPU drivers\n);
  return 1;
  +   }
   
 But I'm really not sure about the “please use ACPI video…” phrase. Even
 only for debugging, I'm not sure it's really helpful. If an user sees
 that phrase, I'm not sure he'll really know what to do. Any thought?

And then, later in brightness_init(), we have a call to
acpi_video_backlight_support() (which is outside of our control), and if
it returns true, then we output that log:

[16994.459693] thinkpad_acpi: This ThinkPad has standard ACPI backlight
brightness control, supported by the ACPI video driver

Maybe that call shouldn't return true for this ThinkPad (since the ACPI
video interface is actually disabled, afair), but it might be worth
handling that too, what do you think?

Regards,
-- 
Yves-Alexis


signature.asc
Description: Digital signature
--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/___
ibm-acpi-devel mailing list
ibm-acpi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel