Linux ACPI
 help / color / mirror / Atom feed
From: Zhang Rui <rui.zhang@intel.com>
To: nokos@gmx.net
Cc: Thomas Renninger <trenn@suse.de>,
	ak@linux.intel.com, mjg59@srcf.ucam.org,
	jwoithe@physics.adelaide.edu.au, hmh@hmh.eng.br,
	corentincj@iksaif.net, linux-acpi@vger.kernel.org,
	dannybaumann@web.de, marcus@better.se, mzxreary@0pointer.de,
	carlos@strangeworlds.co.uk, malattia@linux.it,
	Jesse Barnes <jbarnes@virtuousgeek.org>
Subject: Re: Check for ACPI backlight support otherwise use vendor ACPIdrivers - version 2
Date: Fri, 01 Aug 2008 09:28:18 +0800	[thread overview]
Message-ID: <1217554098.2969.152.camel@rzhang-dt> (raw)
In-Reply-To: <1217518335.12217.24.camel@earth.gruber.myown>

On Thu, 2008-07-31 at 23:32 +0800, nokos@gmx.net wrote:
> 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;
>  }
> 
Yes, that's the problem. 

In the original patch,
acpi_walk_namespace(ACPI_TYPE_DEVICE, device->handle, ACPI_UINT32_MAX,
                     acpi_backlight_cap_match, &video_caps, NULL)
in acpi_is_video_device() returns if the first video device doesn't
support backlight control.

> 
> 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;
>  }
No.
For a video bus device, video_caps can never be 0 here.

> 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.
You can get them here.
http://cgit.freedesktop.org/mesa/drm/diff/?id=dfd441cf964f20e4a761cb8490d7cd82cf32e7b9

don't know if this is the latest version, cc Matthew and Jessie.

thanks,
rui


--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2008-08-01  1:30 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-16 10:52 Check for ACPI backlight support otherwise use vendor ACPI drivers - version 2 Thomas Renninger
2008-07-16 10:52 ` [PATCH 01/11] ACPI: video: Ignore devices that aren't present in hardware Thomas Renninger
2008-07-16 10:52 ` [PATCH 02/11] Check for ACPI backlight support otherwise use vendor ACPI drivers Thomas Renninger
2008-07-16 11:16   ` Matthew Garrett
2008-07-16 13:01     ` Sergio Monteiro Basto
2008-07-17 13:52       ` Thomas Renninger
2008-07-18  3:18         ` Sergio Monteiro Basto
2008-07-18  2:54           ` Thomas Renninger
2008-07-18  3:52             ` Sergio Monteiro Basto
2008-07-17  6:33   ` Zhao Yakui
2008-08-01  1:27   ` Zhang Rui
2008-07-16 10:52 ` [PATCH 03/11] Acer-WMI: fingers off backlight if video.ko is serving this functionality Thomas Renninger
2008-07-16 17:42   ` Carlos Corbacho
2008-07-16 10:52 ` [PATCH 04/11] asus-acpi: " Thomas Renninger
2008-07-16 10:52 ` [PATCH 05/11] eeepc-laptop: " Thomas Renninger
2008-07-16 10:52 ` [PATCH 06/11] fujitsu-laptop: " Thomas Renninger
2008-07-16 23:11   ` Jonathan Woithe
2008-07-18  0:04   ` Jonathan Woithe
2008-07-16 10:52 ` [PATCH 07/11] fujitsu-laptop: Fix section mismatch Thomas Renninger
2008-07-16 10:52 ` [PATCH 08/11] msi-laptop: fingers off backlight if video.ko is serving this functionality Thomas Renninger
2008-07-16 10:52 ` [PATCH 09/11] sony-laptop: " Thomas Renninger
2008-07-16 10:52 ` [PATCH 10/11] thinkpad_acpi: " Thomas Renninger
2008-07-16 11:20   ` Matthew Garrett
2008-07-16 11:36     ` Thomas Renninger
2008-07-16 12:40   ` Henrique de Moraes Holschuh
2008-07-16 12:47     ` Matthew Garrett
2008-07-16 13:38       ` Henrique de Moraes Holschuh
2008-07-16 15:27         ` Thomas Renninger
2008-07-16 15:29           ` Matthew Garrett
2008-07-16 15:49             ` Yves-Alexis Perez
2008-07-17  9:10             ` Andi Kleen
2008-07-17 10:46               ` Matthew Garrett
2008-07-17 11:18                 ` Yves-Alexis Perez
2008-07-17 11:25                   ` Matthew Garrett
2008-07-16 10:52 ` [PATCH 11/11] compal: " Thomas Renninger
     [not found] ` <20080716105931.GC1701@corsac.net>
2008-07-16 11:16   ` Check for ACPI backlight support otherwise use vendor ACPI drivers - version 2 Thomas Renninger
2008-07-19  6:01 ` Yves-Alexis Perez
2008-07-30  6:29 ` Yves-Alexis Perez
2008-07-30  9:06   ` Thomas Renninger
2008-07-31  0:35     ` Jonathan Woithe
2008-07-31  2:28       ` Zhang Rui
2008-07-31  2:51         ` Check for ACPI backlight support otherwise use vendor ACPI Jonathan Woithe
2008-07-31  5:22           ` Zhang Rui
2008-07-31 15:32     ` Check for ACPI backlight support otherwise use vendor ACPI drivers - version 2 nokos
2008-07-31 23:00       ` Check for ACPI backlight support otherwise use vendor ACPI Jonathan Woithe
2008-08-01  1:28       ` Zhang Rui [this message]
2008-08-01  8:25         ` Check for ACPI backlight support otherwise use vendor ACPIdrivers - version 2 nokos
2008-08-01  9:29         ` nokos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1217554098.2969.152.camel@rzhang-dt \
    --to=rui.zhang@intel.com \
    --cc=ak@linux.intel.com \
    --cc=carlos@strangeworlds.co.uk \
    --cc=corentincj@iksaif.net \
    --cc=dannybaumann@web.de \
    --cc=hmh@hmh.eng.br \
    --cc=jbarnes@virtuousgeek.org \
    --cc=jwoithe@physics.adelaide.edu.au \
    --cc=linux-acpi@vger.kernel.org \
    --cc=malattia@linux.it \
    --cc=marcus@better.se \
    --cc=mjg59@srcf.ucam.org \
    --cc=mzxreary@0pointer.de \
    --cc=nokos@gmx.net \
    --cc=trenn@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox