Thread (40 messages) 40 messages, 10 authors, 2008-08-01

Re: Check for ACPI backlight support otherwise use vendor ACPI drivers - version 2

From: <hidden>
Date: 2008-07-31 15:35:15

Hi Thomas

I didi some testing and found whats wrong with the backlight detection
in video_detect.c you should change:
--- video_detect.c 2008-07-31 17:20:59.540059897 +0200
+++ video_detect.c 2008-07-31 17:22:15.752034851 +0200
@@ -45,9 +45,9 @@
 		ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found generic backlight "
 				  "support\n"));
 		*cap |= ACPI_VIDEO_BACKLIGHT;
-		return 0;
+		return -ENODEV;
 	}
-	return -ENODEV;
+	return 0;
 }
 
otherwise it stops walking the subtree at the first device which does
not contain backlight (in my case GFX0 has CRT_ as first child which
does not support backlight). Its ok to stop scanning at the first
positive match since cap then already has ACPI_VIDEO_BACKLIGHT. (ENODEV
is probably not the best error code here ...)

probably you might want to change in acpi_is_video_device:
--- video_detect.c 2008-07-31 17:20:59.540059897 +0200
+++ video_detect.c 2008-07-31 17:22:15.752034851 +0200
@@ -93,8 +93,10 @@
 		video_caps |= ACPI_VIDEO_IGD;
 	}
 
-	acpi_walk_namespace(ACPI_TYPE_DEVICE, device->handle, ACPI_UINT32_MAX,
+        if (video_caps) {
+	        acpi_walk_namespace(ACPI_TYPE_DEVICE, device->handle,
ACPI_UINT32_MAX,
 			    acpi_backlight_cap_match, &video_caps, NULL);
+        }
 
 	return video_caps;
 }

otherwise the whole ACPI namespace is scanned several times and this
restricts the scanning only on those subtrees where the head might be a
video device


BTW. the DRDY detection (for IGD) works ... now I have to find the IGD
patches ... couldn't find them on the list and the version of linux-next
I tried didn't contain anything which looked like it.

Peter

Am Mittwoch, den 30.07.2008, 11:06 +0200 schrieb Thomas Renninger:
On Wednesday 30 July 2008 08:29:37 Yves-Alexis Perez wrote:
quoted
On mer, 2008-07-16 at 12:52 +0200, Thomas Renninger wrote:
quoted
It is highly recommended that these patches are tried out together with
Matthew's/Hong's IGD driver changes.
I do not know whether they are already in the dri tree or in linux-next,
whether they will be accepted for .27 etc. I hope Matthew will answer on
this mail and tell us.
AFAIK on thinkpads they already need an additional patch to work?
Chances are high that other laptop families also need a bit of a special
treatment to get the very new IGD parts to work.
If people test both patches together we could get a matrix like this:
What is the status of those patches wrt. 2.6.27-rc1?
Matthew and Rui accepted or signed them off AFAIK.
On Peter's system (nokos@gmx.de, fujitsu with IGD support) it returns that
there is no video support which looks wrong.
I contacted him a bit late, after getting pointed to acpidump it still looks
odd/wrong, and I need acpi.debug_level=0x1f log_buf_len=16777216 output to 
hopefully see what it is.

A comment from Andi/Len would be great.
Maybe this could already be sent to linux-next to make testing easier.

      Thomas

PS: and this is version 2, I already sent version 3 which had some cleanups.
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help