From owner-freebsd-mobile@FreeBSD.ORG Sun Oct 14 11:40:17 2012 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 57321955 for ; Sun, 14 Oct 2012 11:40:17 +0000 (UTC) (envelope-from cfs4host@server.cfs4host.com) Received: from server.cfs4host.com (static.109.11.63.178.clients.your-server.de [178.63.11.109]) by mx1.freebsd.org (Postfix) with ESMTP id 10D9D8FC14 for ; Sun, 14 Oct 2012 11:40:16 +0000 (UTC) Received: from cfs4host by server.cfs4host.com with local (Exim 4.80) (envelope-from ) id 1TNLO7-0008KS-0L for freebsd-mobile@freebsd.org; Sun, 14 Oct 2012 14:25:43 +0400 To: freebsd-mobile@freebsd.org Subject: Security Service From: Web mail MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 8bit Message-Id: Date: Sun, 14 Oct 2012 14:25:39 +0400 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server.cfs4host.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [504 502] / [47 12] X-AntiAbuse: Sender Address Domain - server.cfs4host.com X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: alertit@info.lt List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Oct 2012 11:40:17 -0000 Dear Webmail Member. This message is from our webmaster Security Service . Dear Member, this mail is to notify you that we are currently under going maintenance in our webmaster service to upgrade to a more secured and faster internet service . We having to find out that most account have not be active for some time due to one or another reason, we are currently deleting account from our main server to reduce the load since it has been rendered useless. We suggest you help us to protect your account. If you are receiving this message it means that your Email has been queued for deactivation: this was as a result of a continuous error script (code:505) received from your Email resolve this problem and we are about deleting your account . To verify that your Email isTo verify that your Email is active, you must reply to this e-mail by providing us the following Information for confirmation. Current Email User Name :{ } Current Email Password : { } Re-confirm Password: { } Date Of Birth : { } Note: Providing a wrong information or ignoring this message will resolve to the deactivation of your Email Address from our control panel. © 1995-2012 © From owner-freebsd-mobile@FreeBSD.ORG Mon Oct 15 15:17:28 2012 Return-Path: Delivered-To: mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AECEC81E; Mon, 15 Oct 2012 15:17:28 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 7F8328FC16; Mon, 15 Oct 2012 15:17:28 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id D51ACB958; Mon, 15 Oct 2012 11:17:27 -0400 (EDT) From: John Baldwin To: Alberto Villa Subject: Re: Dell acpi_video patch Date: Mon, 15 Oct 2012 11:12:03 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p20; KDE/4.5.5; amd64; ; ) References: <20121005215316.GA38707@triton8.kn-bremen.de> <201210121006.17276.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201210151112.03393.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 15 Oct 2012 11:17:27 -0400 (EDT) Cc: acpi@freebsd.org, freebsd-acpi@freebsd.org, Juergen Lock , mobile@freebsd.org X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Oct 2012 15:17:28 -0000 On Friday, October 12, 2012 7:57:43 pm Alberto Villa wrote: > On Fri, Oct 12, 2012 at 4:06 PM, John Baldwin wrote: > > I think this is correct, but in we need to do more to properly handle that > > flag (DOD_DEVID_SCHEME_STD). Specifically, we shouldn't trust any bits in the > > device ID unless that bit is set (except for the special case of > > DOD_DEVID_LCD) as per my reading of the _DOD description in the ACPI 3.0b > > spec. I think this larger patch will do that while also fixing your case: > > I tested your patch and the only effect is that my three reported > screens (I'm on a laptop) changed from "crt" to "out" (I understand > why, from the code): > > hw.acpi.video.out0.active: 1 > hw.acpi.video.out1.active: 1 > hw.acpi.video.out1.brightness: 100 > hw.acpi.video.out1.fullpower: 100 > hw.acpi.video.out1.economy: 50 > hw.acpi.video.out1.levels: 100 50 0 10 20 30 40 50 60 70 80 90 100 > hw.acpi.video.out2.active: 1 > > Is there something I can do to help you make them recognised > correctly, or is it fault of a buggy ACPI table? Interesting. Can you get an acpidump? -- John Baldwin From owner-freebsd-mobile@FreeBSD.ORG Tue Oct 16 23:49:13 2012 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3FB92862; Tue, 16 Oct 2012 23:49:13 +0000 (UTC) (envelope-from nm.knife@gmail.com) Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 89A438FC17; Tue, 16 Oct 2012 23:49:12 +0000 (UTC) Received: by mail-wg0-f50.google.com with SMTP id 16so5519016wgi.31 for ; Tue, 16 Oct 2012 16:49:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=xZay5UsxrZYnKii3ZRSs7lxCin9E65oN4S5JpoalTKM=; b=FKYSYB3C8JHl8AwT8S0WS6GcfW2UU/AsyEYBY6CZXMT5K5oUOt96e16rXShXp0Ma+t NEEU2KBFFFajKrobinoTd+EPyejXIj9LhpOt4GwPkxDrbxnehTPq1Mtcx2MdJ7hsQAE0 FBi+4ycXcOJjk8slDGDzFBSbQV8pBkPosLgEay316JVzpTel+92XbzjgDcKIAsWtab3u hAb3GhxkqXHtWgtk5T5Plysddr0r9TdJr7eX2OthBp8GQYa06srNFsMm0m8ecnrUpJMZ Sop5HINCoXJnUgEWHm/1FDfGu4lXwXxB1sk/fZ5CBUsd65ed+zN6qY0iI4w+xVf+srI0 C5bQ== MIME-Version: 1.0 Received: by 10.216.136.230 with SMTP id w80mr10632502wei.199.1350431351371; Tue, 16 Oct 2012 16:49:11 -0700 (PDT) Received: by 10.227.38.145 with HTTP; Tue, 16 Oct 2012 16:49:11 -0700 (PDT) In-Reply-To: <50778671.9020703@gmail.com> References: <4E836C06.9070405@gmail.com> <4F7A8A99.4040603@gmail.com> <20120403210619.Q2060@sola.nimnet.asn.au> <4F7DAAB0.2010206@gmail.com> <4F7E2D5C.3020506@gmail.com> <4F7F9504.1030405@gmail.com> <20120814102409.7dc335b8@X220.ovitrap.com> <20121011094459.12ee1653@X220.ovitrap.com> <50778671.9020703@gmail.com> Date: Tue, 16 Oct 2012 16:49:11 -0700 Message-ID: Subject: Re: x220 notes From: =?windows-1251?B?y/7h7uzo8CDD8Ojj7vDu4g==?= To: matt Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: Erich Dollansky , freebsd-acpi@freebsd.org, freebsd-mobile@freebsd.org X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Oct 2012 23:49:13 -0000 > You've swapped the X220 cpu for something? Or a different machine? > > I find X does horrible things to battery usage on my X220. Getting into > the lowest C state, and disabling ALL of the USB devices helps somewhat, as > does setting a lower backlight level at boot (you can make an rc script, or > catch the backlight buttons while the bios is still loading). > > Matt > I set a lower light (5-6) during BIOS boot, and if needed I modify manually in X. I monitored my CPU usage and did notice that the CPU takes its sweet time to lower the frequency (Windows keeps the frequency the same 99.67, but changes the multiplier from 8 to 32). I don't know if FreeBSD does that or it only manipulates the frequency. The multiplier makes more sense. Also, CPU cores in X stay at 50C. In Windows at no activicy they drop to 44C and if no strenuous activity for a while, to 40C. It would be great if FreeBSD could downgrade the frequency faster upon no load. I use this: powerd_flags="-a hiadaptive -b adaptive -i 85 -r 60 -p 100" I am always looking for the "perfect" FreeBSD laptop, but I guess it just doesn't exist. And I do need my 7-8 hours of battery with wireless on. If you guys have any suggestions on further optimizing the power usage and automating the regulation, please let me know (like turning off and on USB devices, spinning down the HDD, etc), also if you know about controlling the multiplier instead of the frequency. -- Lyubomir Grigorov (bgalakazam) From owner-freebsd-mobile@FreeBSD.ORG Wed Oct 17 01:04:31 2012 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F2323EAF; Wed, 17 Oct 2012 01:04:30 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id A34198FC08; Wed, 17 Oct 2012 01:04:30 +0000 (UTC) Received: by mail-pb0-f54.google.com with SMTP id rp8so7036888pbb.13 for ; Tue, 16 Oct 2012 18:04:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=ir5KO8ovGXuyLA3SXv2XjHYy2mZA5SZLYxTbB6iSn+c=; b=wJDqoKfpoJuFqvl9UzGM9bqiuY2pOnR7zb3nInpr1pKEdA009RhuWGxO95A83+EGc7 keoD+YBvPjbjNp7ppriPPlhyvTWU4ENlFoJ2gvoY2CDjxz+0lP4r+X4ht7+vZNm+uGap Peux+BPGs1Uv67HbnfjLjPqArcpJLhD2Pqz+fWCyDSjaJ8iqrh+6HT2XetrEFsTGeD/E NipRCiQMWvfdxFZVRYGoL/3IbExb312KhVFWnNEdjzomD5tJfaoPWKzEu5hVAGxa2wNe vuswTiIzK3TeHHbjD0CkhV9iJD80YKsTZjJrhckIBoq3S47S0NFuvVX9wvvusXaz6BES sa6g== MIME-Version: 1.0 Received: by 10.66.86.129 with SMTP id p1mr6513885paz.39.1350435870099; Tue, 16 Oct 2012 18:04:30 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.68.146.233 with HTTP; Tue, 16 Oct 2012 18:04:30 -0700 (PDT) In-Reply-To: References: <4E836C06.9070405@gmail.com> <4F7A8A99.4040603@gmail.com> <20120403210619.Q2060@sola.nimnet.asn.au> <4F7DAAB0.2010206@gmail.com> <4F7E2D5C.3020506@gmail.com> <4F7F9504.1030405@gmail.com> <20120814102409.7dc335b8@X220.ovitrap.com> <20121011094459.12ee1653@X220.ovitrap.com> <50778671.9020703@gmail.com> Date: Tue, 16 Oct 2012 18:04:30 -0700 X-Google-Sender-Auth: 4IZ5gFAYlRQpTGB20ss9yt9YfNI Message-ID: Subject: Re: x220 notes From: Adrian Chadd To: =?windows-1251?B?y/7h7uzo8CDD8Ojj7vDu4g==?= Content-Type: text/plain; charset=ISO-8859-1 Cc: matt , Erich Dollansky , freebsd-acpi@freebsd.org, freebsd-mobile@freebsd.org X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Oct 2012 01:04:31 -0000 Which wifi card does it use? Adrian From owner-freebsd-mobile@FreeBSD.ORG Wed Oct 17 01:27:59 2012 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 78865581; Wed, 17 Oct 2012 01:27:59 +0000 (UTC) (envelope-from nm.knife@gmail.com) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 997258FC12; Wed, 17 Oct 2012 01:27:58 +0000 (UTC) Received: by mail-we0-f182.google.com with SMTP id x43so5140611wey.13 for ; Tue, 16 Oct 2012 18:27:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=zdrAiOId7YWm+Yp+0rwUIWnggEeHqBtCmSoJW7K/WQU=; b=SYE7XaQ6oPipQ3oDu2341KEKfua/nUin9UIoXsei5LsqDNK0+AMRK6SV6vMo6M9WFl IQz1QX4XrDPcqr6Nltr+VR5Ybqj0Qw6EkXXgnzzrmOwptPS1NF6P909nT+iSsB2Ll2K7 xvcakN+M/GrsQtT7X2uboEFOr+XdI9gIj4pmeyQo2wTLjgkzQCwtUw8f1s4RcwQybQas 90a2/kJinSm2EMFQY3BeQF2/MwCKN4JxVA1ve0tHgCzCnR3a19H3PQjkyqd5VpAUMhc4 4+wCN3wYyuOn/gPu/nX9IKaUSb5p4rLL7u5R7Zk5vKMP3RaK9tgkrd/nh0y7DX7tAW6l tYVg== MIME-Version: 1.0 Received: by 10.216.136.230 with SMTP id w80mr10745461wei.199.1350437277530; Tue, 16 Oct 2012 18:27:57 -0700 (PDT) Received: by 10.227.38.145 with HTTP; Tue, 16 Oct 2012 18:27:57 -0700 (PDT) In-Reply-To: References: <4E836C06.9070405@gmail.com> <4F7A8A99.4040603@gmail.com> <20120403210619.Q2060@sola.nimnet.asn.au> <4F7DAAB0.2010206@gmail.com> <4F7E2D5C.3020506@gmail.com> <4F7F9504.1030405@gmail.com> <20120814102409.7dc335b8@X220.ovitrap.com> <20121011094459.12ee1653@X220.ovitrap.com> <50778671.9020703@gmail.com> Date: Tue, 16 Oct 2012 18:27:57 -0700 Message-ID: Subject: Re: x220 notes From: =?windows-1251?B?y/7h7uzo8CDD8Ojj7vDu4g==?= To: Adrian Chadd Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-acpi@freebsd.org, freebsd-mobile@freebsd.org X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Oct 2012 01:27:59 -0000 6300 N, 3x3 antennae, but that shouldn't be a problem since the other members reporting low battery time have other cards. 2012/10/16 Adrian Chadd > Which wifi card does it use? > > > > > Adrian > -- Lyubomir Grigorov (bgalakazam) From owner-freebsd-mobile@FreeBSD.ORG Wed Oct 17 09:11:10 2012 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A658FC8C; Wed, 17 Oct 2012 09:11:10 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from sola.nimnet.asn.au (paqi.nimnet.asn.au [115.70.110.159]) by mx1.freebsd.org (Postfix) with ESMTP id EAA778FC14; Wed, 17 Oct 2012 09:11:08 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by sola.nimnet.asn.au (8.14.2/8.14.2) with ESMTP id q9H9AR6c087933; Wed, 17 Oct 2012 20:10:27 +1100 (EST) (envelope-from smithi@nimnet.asn.au) Date: Wed, 17 Oct 2012 20:10:27 +1100 (EST) From: Ian Smith To: =?windows-1251?B?y/7h7uzo8CDD8Ojj7vDu4g==?= Subject: Re: x220 notes In-Reply-To: Message-ID: <20121017173848.U88114@sola.nimnet.asn.au> References: <4E836C06.9070405@gmail.com> <20120403210619.Q2060@sola.nimnet.asn.au> <4F7DAAB0.2010206@gmail.com> <4F7E2D5C.3020506@gmail.com> <4F7F9504.1030405@gmail.com> <20120814102409.7dc335b8@X220.ovitrap.com> <20121011094459.12ee1653@X220.ovitrap.com> <50778671.9020703@gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: matt , freebsd-acpi@freebsd.org, freebsd-mobile@freebsd.org X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Oct 2012 09:11:10 -0000 On Tue, 16 Oct 2012, ??????? ???????? wrote: > I set a lower light (5-6) during BIOS boot, and if needed I modify manually > in X. I monitored my CPU usage and did notice that the CPU takes its sweet > time to lower the frequency (Windows keeps the frequency the same 99.67, > but changes the multiplier from 8 to 32). I don't know if FreeBSD does that > or it only manipulates the frequency. The multiplier makes more sense. > Also, CPU cores in X stay at 50C. In Windows at no activicy they drop to > 44C and if no strenuous activity for a while, to 40C. > > It would be great if FreeBSD could downgrade the frequency faster upon no > load. I use this: > powerd_flags="-a hiadaptive -b adaptive -i 85 -r 60 -p 100" powerd(8) says: Adaptive mode attempts to strike a balance by degrading performance when the system appears idle and increasing it when the system is busy. It offers a good balance between a small performance loss for greatly increased power savings. Hiadaptive mode is like adaptive mode, but tuned for systems where performance and interactivity are more important than power consumption. It increases frequency faster, reduces the fre- quency less aggressively and will maintain full frequency for longer. So you want to use adaptive rather than hiadaptive, as power consumption is more important to you. Also, -i probably should be lower than -r, as when load is less than 85% it will decrease frequency, but if it's then still higher than 60% powerd might kick it up again. After experiments I wound up using "-a adp -b adp -i 50 -r 80 -p 200" which is nearer the defaults, but mine is only a two-speed P3 and not so indicative for you. Best way is likely to stop powerd (service powerd stop) then run 'powerd -v ..' in a root terminal - maybe using script(1) to record results - and watch it dance under various sorts of load, with different -i and -r parameters. You will clearly see the difference between adp and hadp. > I am always looking for the "perfect" FreeBSD laptop, but I guess it just > doesn't exist. And I do need my 7-8 hours of battery with wireless on. If > you guys have any suggestions on further optimizing the power usage and > automating the regulation, please let me know (like turning off and on USB > devices, spinning down the HDD, etc), also if you know about controlling > the multiplier instead of the frequency. Adrian, true to form, has pounced on your wireless :) I'm not a fan of spinning down HDs myself; if you do, you need to watch out for the dreaded Load Cycle Count issue (see ataidle(8)), and things like cron tasks that may spin it back up frequently. This and very much more information on power saving by Alexander Motin - who most recently updated powerd and added eventtimers(4) to 9.X - in his excellent guide: http://wiki.freebsd.org/TuningPowerConsumption As for the multiplier thing, it depends on which cpufreq(4) drivers your system is using. If it's a Core 2 Duo or i{5,7}, then both voltage and frequency are controlled, frequency by changing multiplier I assume; you should look at the code used by your processor. Also, don't miss advice there and elsewhere to disable throttling and just use est cpufreq(4) drivers, and for using C states to advantage. Before and after doing all that, compare differences for: % sysctl dev.cpu.0.freq_levels % sysctl dev.cpu |grep cx cheers, Ian From owner-freebsd-mobile@FreeBSD.ORG Thu Oct 18 01:08:56 2012 Return-Path: Delivered-To: mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C23F0DCF; Thu, 18 Oct 2012 01:08:56 +0000 (UTC) (envelope-from villa.alberto@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id C3C4C8FC0C; Thu, 18 Oct 2012 01:08:55 +0000 (UTC) Received: by mail-bk0-f54.google.com with SMTP id jf20so3731067bkc.13 for ; Wed, 17 Oct 2012 18:08:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=P0wLrQSN6kiCl+2ezc/oCnpebpNLDPFmLsvvvVCbnM0=; b=ezPG7+ctR2f6lL55Y2fdvtsQDvLwdPMs3GOY+5sxNu9KUij9mOfXB1xhDUP4QsdRu+ or+cxVeONrpYnWULYut7UnIJjbTH+fo6+jZkdWuBQOXVSiHarSKhI3LgNepQahS3waez 88CvvcNP/5kEIZJws2nQo/9aLTwGOOv8oVKyYh4e4IsQ1saSU7h/NQ7sUC8aPYeEBDsY cYmX8LlUlMXR2XEK1bn5WTgigkK1yd2YbgB/JAI82y3+/BF7fqdoTdL8VnIj2p9tc+XH 15/kuLuVWDOfi9XVOPz9qk6iIGkdtv4sAr8ig+vErS5SEDJ1NrGQxjiL3Uhp8gIbHAXT 9bYA== Received: by 10.204.129.16 with SMTP id m16mr5850743bks.136.1350522534700; Wed, 17 Oct 2012 18:08:54 -0700 (PDT) MIME-Version: 1.0 Sender: villa.alberto@gmail.com Received: by 10.205.81.1 with HTTP; Wed, 17 Oct 2012 18:08:34 -0700 (PDT) In-Reply-To: <201210151112.03393.jhb@freebsd.org> References: <20121005215316.GA38707@triton8.kn-bremen.de> <201210121006.17276.jhb@freebsd.org> <201210151112.03393.jhb@freebsd.org> From: Alberto Villa Date: Thu, 18 Oct 2012 03:08:34 +0200 X-Google-Sender-Auth: wfNxUXuWSWhmdMsAgebiHKu9CnE Message-ID: Subject: Re: Dell acpi_video patch To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Cc: acpi@freebsd.org, freebsd-acpi@freebsd.org, Juergen Lock , mobile@freebsd.org X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Oct 2012 01:08:57 -0000 On Mon, Oct 15, 2012 at 5:12 PM, John Baldwin wrote: > Interesting. Can you get an acpidump? Sure: http://people.FreeBSD.org/~avilla/files/avilla.asl.gz I'd be glad to solve my problems with ACPI! -- Alberto Villa, FreeBSD committer http://people.FreeBSD.org/~avilla From owner-freebsd-mobile@FreeBSD.ORG Thu Oct 18 13:47:35 2012 Return-Path: Delivered-To: mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3273E7B1; Thu, 18 Oct 2012 13:47:35 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 02FC68FC14; Thu, 18 Oct 2012 13:47:35 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 5FDDFB980; Thu, 18 Oct 2012 09:47:34 -0400 (EDT) From: John Baldwin To: Alberto Villa Subject: Re: Dell acpi_video patch Date: Thu, 18 Oct 2012 08:58:35 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p20; KDE/4.5.5; amd64; ; ) References: <20121005215316.GA38707@triton8.kn-bremen.de> <201210151112.03393.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201210180858.35282.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 18 Oct 2012 09:47:34 -0400 (EDT) Cc: freebsd-acpi@freebsd.org, Juergen Lock , mobile@freebsd.org X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Oct 2012 13:47:35 -0000 On Wednesday, October 17, 2012 9:08:34 pm Alberto Villa wrote: > On Mon, Oct 15, 2012 at 5:12 PM, John Baldwin wrote: > > Interesting. Can you get an acpidump? > > Sure: > http://people.FreeBSD.org/~avilla/files/avilla.asl.gz > > I'd be glad to solve my problems with ACPI! Ah, looks like your BIOS excludes DOD_DEVID_SCHEME_STD from it's _ADR methods (but does included it in on the list of displays returned by _DOD). Please test this updated version: Index: acpi_video.c =================================================================== --- acpi_video.c (revision 241683) +++ acpi_video.c (working copy) @@ -320,7 +320,8 @@ acpi_video_resume(device_t dev) ACPI_SERIAL_BEGIN(video_output); STAILQ_FOREACH_SAFE(vo, &sc->vid_outputs, vo_next, vn) { if ((vo->adr & DOD_DEVID_MASK_FULL) != DOD_DEVID_LCD && - (vo->adr & DOD_DEVID_MASK) != DOD_DEVID_INTDFP) + (vo->adr & (DOD_DEVID_SCHEME_STD | DOD_DEVID_MASK)) != + (DOD_DEVID_SCHEME_STD | DOD_DEVID_INTDFP)) continue; if ((vo_get_device_status(vo->handle) & DCS_ACTIVE) == 0) @@ -467,38 +468,40 @@ acpi_video_vo_init(UINT32 adr) ACPI_SERIAL_ASSERT(video); - switch (adr & DOD_DEVID_MASK) { + /* Assume an unknown unit by default. */ + desc = "unknown output"; + type = "out"; + voqh = &other_units; + + switch (adr & (DOD_DEVID_SCHEME_STD | DOD_DEVID_MASK)) { case DOD_DEVID_MONITOR: if ((adr & DOD_DEVID_MASK_FULL) == DOD_DEVID_LCD) { /* DOD_DEVID_LCD is a common, backward compatible ID */ desc = "Internal/Integrated Digital Flat Panel"; type = "lcd"; voqh = &lcd_units; - } else { - desc = "VGA CRT or VESA Compatible Analog Monitor"; - type = "crt"; - voqh = &crt_units; } break; - case DOD_DEVID_TV: + case DOD_DEVID_SCHEME_STD | DOD_DEVID_MONITOR: + desc = "VGA CRT or VESA Compatible Analog Monitor"; + type = "crt"; + voqh = &crt_units; + break; + case DOD_DEVID_SCHEME_STD | DOD_DEVID_TV: desc = "TV/HDTV or Analog-Video Monitor"; type = "tv"; voqh = &tv_units; break; - case DOD_DEVID_EXT: + case DOD_DEVID_SCHEME_STD | DOD_DEVID_EXT: desc = "External Digital Monitor"; type = "ext"; voqh = &ext_units; break; - case DOD_DEVID_INTDFP: + case DOD_DEVID_SCHEME_STD | DOD_DEVID_INTDFP: desc = "Internal/Integrated Digital Flat Panel"; type = "lcd"; voqh = &lcd_units; break; - default: - desc = "unknown output"; - type = "out"; - voqh = &other_units; } n = 0; @@ -633,21 +636,25 @@ acpi_video_vo_destroy(struct acpi_video_output *vo AcpiOsFree(vo->vo_levels); } - switch (vo->adr & DOD_DEVID_MASK) { + voqh = &other_units; + + switch (vo->adr & (DOD_DEVID_SCHEME_STD | DOD_DEVID_MASK)) { case DOD_DEVID_MONITOR: + if ((vo->adr & DOD_DEVID_MASK_FULL) == DOD_DEVID_LCD) + voqh = &lcd_units; + break; + case DOD_DEVID_SCHEME_STD | DOD_DEVID_MONITOR: voqh = &crt_units; break; - case DOD_DEVID_TV: + case DOD_DEVID_SCHEME_STD | DOD_DEVID_TV: voqh = &tv_units; break; - case DOD_DEVID_EXT: + case DOD_DEVID_SCHEME_STD | DOD_DEVID_EXT: voqh = &ext_units; break; - case DOD_DEVID_INTDFP: + case DOD_DEVID_SCHEME_STD | DOD_DEVID_INTDFP: voqh = &lcd_units; break; - default: - voqh = &other_units; } STAILQ_REMOVE(voqh, vo, acpi_video_output, vo_unit.next); free(vo, M_ACPIVIDEO); @@ -905,8 +912,14 @@ vid_enum_outputs_subr(ACPI_HANDLE handle, UINT32 l return (AE_OK); for (i = 0; i < argset->dod_pkg->Package.Count; i++) { + /* + * Some systems do not include DOD_DEVID_SCHEME_STD in + * the _ADR of output devices and some do, so just + * ignore DOD_DEVID_SCHEME_STD. + */ if (acpi_PkgInt32(argset->dod_pkg, i, &val) == 0 && - (val & DOD_DEVID_MASK_FULL) == adr) { + (val & DOD_DEVID_MASK_FULL) == + (adr & ~DOD_DEVID_SCHEME_STD)) { argset->callback(handle, val, argset->context); argset->count++; } -- John Baldwin From owner-freebsd-mobile@FreeBSD.ORG Thu Oct 18 13:47:35 2012 Return-Path: Delivered-To: mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D5B887B3; Thu, 18 Oct 2012 13:47:35 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 95DF68FC16; Thu, 18 Oct 2012 13:47:35 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id E0D38B98A; Thu, 18 Oct 2012 09:47:34 -0400 (EDT) From: John Baldwin To: Juergen Lock Subject: Re: Dell acpi_video patch Date: Thu, 18 Oct 2012 08:59:14 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p20; KDE/4.5.5; amd64; ; ) References: <20121005215316.GA38707@triton8.kn-bremen.de> <201210121006.17276.jhb@freebsd.org> <20121012163349.GA63588@triton8.kn-bremen.de> In-Reply-To: <20121012163349.GA63588@triton8.kn-bremen.de> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201210180859.14457.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 18 Oct 2012 09:47:35 -0400 (EDT) Cc: avilla@freebsd.org, freebsd-acpi@freebsd.org, mobile@freebsd.org X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Oct 2012 13:47:35 -0000 On Friday, October 12, 2012 12:33:49 pm Juergen Lock wrote: > On Fri, Oct 12, 2012 at 10:06:17AM -0400, John Baldwin wrote: > > On Friday, October 05, 2012 5:53:16 pm Juergen Lock wrote: > > > Hi! > > > > > > I finally took a closer look why acpi_video found nothing on my > > > Dell laptop (Precision M4500), and came up with this patch: > > > > > > --- sys/dev/acpica/acpi_video.c.orig > > > +++ sys/dev/acpica/acpi_video.c > > > @@ -906,7 +906,7 @@ vid_enum_outputs_subr(ACPI_HANDLE handle > > > > > > for (i = 0; i < argset->dod_pkg->Package.Count; i++) { > > > if (acpi_PkgInt32(argset->dod_pkg, i, &val) == 0 && > > > - (val & DOD_DEVID_MASK_FULL) == adr) { > > > + (val & (DOD_DEVID_MASK_FULL | 0x80000000)) == adr) { > > > argset->callback(handle, val, argset->context); > > > argset->count++; > > > } > > > > > > which gives me: > > > > I think this is correct, but in we need to do more to properly handle that > > flag (DOD_DEVID_SCHEME_STD). Specifically, we shouldn't trust any bits in the > > device ID unless that bit is set (except for the special case of > > DOD_DEVID_LCD) as per my reading of the _DOD description in the ACPI 3.0b > > spec. I think this larger patch will do that while also fixing your case: > > Thank you, yes that still works for me the same as my original patch: Can you please test this updated patch as well: Index: acpi_video.c =================================================================== --- acpi_video.c (revision 241683) +++ acpi_video.c (working copy) @@ -320,7 +320,8 @@ acpi_video_resume(device_t dev) ACPI_SERIAL_BEGIN(video_output); STAILQ_FOREACH_SAFE(vo, &sc->vid_outputs, vo_next, vn) { if ((vo->adr & DOD_DEVID_MASK_FULL) != DOD_DEVID_LCD && - (vo->adr & DOD_DEVID_MASK) != DOD_DEVID_INTDFP) + (vo->adr & (DOD_DEVID_SCHEME_STD | DOD_DEVID_MASK)) != + (DOD_DEVID_SCHEME_STD | DOD_DEVID_INTDFP)) continue; if ((vo_get_device_status(vo->handle) & DCS_ACTIVE) == 0) @@ -467,38 +468,40 @@ acpi_video_vo_init(UINT32 adr) ACPI_SERIAL_ASSERT(video); - switch (adr & DOD_DEVID_MASK) { + /* Assume an unknown unit by default. */ + desc = "unknown output"; + type = "out"; + voqh = &other_units; + + switch (adr & (DOD_DEVID_SCHEME_STD | DOD_DEVID_MASK)) { case DOD_DEVID_MONITOR: if ((adr & DOD_DEVID_MASK_FULL) == DOD_DEVID_LCD) { /* DOD_DEVID_LCD is a common, backward compatible ID */ desc = "Internal/Integrated Digital Flat Panel"; type = "lcd"; voqh = &lcd_units; - } else { - desc = "VGA CRT or VESA Compatible Analog Monitor"; - type = "crt"; - voqh = &crt_units; } break; - case DOD_DEVID_TV: + case DOD_DEVID_SCHEME_STD | DOD_DEVID_MONITOR: + desc = "VGA CRT or VESA Compatible Analog Monitor"; + type = "crt"; + voqh = &crt_units; + break; + case DOD_DEVID_SCHEME_STD | DOD_DEVID_TV: desc = "TV/HDTV or Analog-Video Monitor"; type = "tv"; voqh = &tv_units; break; - case DOD_DEVID_EXT: + case DOD_DEVID_SCHEME_STD | DOD_DEVID_EXT: desc = "External Digital Monitor"; type = "ext"; voqh = &ext_units; break; - case DOD_DEVID_INTDFP: + case DOD_DEVID_SCHEME_STD | DOD_DEVID_INTDFP: desc = "Internal/Integrated Digital Flat Panel"; type = "lcd"; voqh = &lcd_units; break; - default: - desc = "unknown output"; - type = "out"; - voqh = &other_units; } n = 0; @@ -633,21 +636,25 @@ acpi_video_vo_destroy(struct acpi_video_output *vo AcpiOsFree(vo->vo_levels); } - switch (vo->adr & DOD_DEVID_MASK) { + voqh = &other_units; + + switch (vo->adr & (DOD_DEVID_SCHEME_STD | DOD_DEVID_MASK)) { case DOD_DEVID_MONITOR: + if ((vo->adr & DOD_DEVID_MASK_FULL) == DOD_DEVID_LCD) + voqh = &lcd_units; + break; + case DOD_DEVID_SCHEME_STD | DOD_DEVID_MONITOR: voqh = &crt_units; break; - case DOD_DEVID_TV: + case DOD_DEVID_SCHEME_STD | DOD_DEVID_TV: voqh = &tv_units; break; - case DOD_DEVID_EXT: + case DOD_DEVID_SCHEME_STD | DOD_DEVID_EXT: voqh = &ext_units; break; - case DOD_DEVID_INTDFP: + case DOD_DEVID_SCHEME_STD | DOD_DEVID_INTDFP: voqh = &lcd_units; break; - default: - voqh = &other_units; } STAILQ_REMOVE(voqh, vo, acpi_video_output, vo_unit.next); free(vo, M_ACPIVIDEO); @@ -905,8 +912,14 @@ vid_enum_outputs_subr(ACPI_HANDLE handle, UINT32 l return (AE_OK); for (i = 0; i < argset->dod_pkg->Package.Count; i++) { + /* + * Some systems do not include DOD_DEVID_SCHEME_STD in + * the _ADR of output devices and some do, so just + * ignore DOD_DEVID_SCHEME_STD. + */ if (acpi_PkgInt32(argset->dod_pkg, i, &val) == 0 && - (val & DOD_DEVID_MASK_FULL) == adr) { + (val & DOD_DEVID_MASK_FULL) == + (adr & ~DOD_DEVID_SCHEME_STD)) { argset->callback(handle, val, argset->context); argset->count++; } -- John Baldwin From owner-freebsd-mobile@FreeBSD.ORG Thu Oct 18 19:59:57 2012 Return-Path: Delivered-To: mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 65601250; Thu, 18 Oct 2012 19:59:57 +0000 (UTC) (envelope-from nox@jelal.kn-bremen.de) Received: from smtp.kn-bremen.de (gelbbaer.kn-bremen.de [78.46.108.116]) by mx1.freebsd.org (Postfix) with ESMTP id 9013E8FC17; Thu, 18 Oct 2012 19:59:56 +0000 (UTC) Received: by smtp.kn-bremen.de (Postfix, from userid 10) id 7275C1E000E3; Thu, 18 Oct 2012 21:59:55 +0200 (CEST) Received: from triton8.kn-bremen.de (noident@localhost [127.0.0.1]) by triton8.kn-bremen.de (8.14.4/8.14.4) with ESMTP id q9IJvOA5010060; Thu, 18 Oct 2012 21:57:24 +0200 (CEST) (envelope-from nox@triton8.kn-bremen.de) Received: (from nox@localhost) by triton8.kn-bremen.de (8.14.4/8.14.3/Submit) id q9IJvNTF010059; Thu, 18 Oct 2012 21:57:23 +0200 (CEST) (envelope-from nox) From: Juergen Lock Date: Thu, 18 Oct 2012 21:57:23 +0200 To: John Baldwin Subject: Re: Dell acpi_video patch Message-ID: <20121018195723.GA10042@triton8.kn-bremen.de> References: <20121005215316.GA38707@triton8.kn-bremen.de> <201210121006.17276.jhb@freebsd.org> <20121012163349.GA63588@triton8.kn-bremen.de> <201210180859.14457.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201210180859.14457.jhb@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: avilla@freebsd.org, freebsd-acpi@freebsd.org, Juergen Lock , mobile@freebsd.org X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Oct 2012 19:59:57 -0000 On Thu, Oct 18, 2012 at 08:59:14AM -0400, John Baldwin wrote: > On Friday, October 12, 2012 12:33:49 pm Juergen Lock wrote: > > On Fri, Oct 12, 2012 at 10:06:17AM -0400, John Baldwin wrote: > > > On Friday, October 05, 2012 5:53:16 pm Juergen Lock wrote: > > > > Hi! > > > > > > > > I finally took a closer look why acpi_video found nothing on my > > > > Dell laptop (Precision M4500), and came up with this patch: > > > > > > > > --- sys/dev/acpica/acpi_video.c.orig > > > > +++ sys/dev/acpica/acpi_video.c > > > > @@ -906,7 +906,7 @@ vid_enum_outputs_subr(ACPI_HANDLE handle > > > > > > > > for (i = 0; i < argset->dod_pkg->Package.Count; i++) { > > > > if (acpi_PkgInt32(argset->dod_pkg, i, &val) == 0 && > > > > - (val & DOD_DEVID_MASK_FULL) == adr) { > > > > + (val & (DOD_DEVID_MASK_FULL | 0x80000000)) == adr) { > > > > argset->callback(handle, val, argset->context); > > > > argset->count++; > > > > } > > > > > > > > which gives me: > > > > > > I think this is correct, but in we need to do more to properly handle that > > > flag (DOD_DEVID_SCHEME_STD). Specifically, we shouldn't trust any bits in the > > > device ID unless that bit is set (except for the special case of > > > DOD_DEVID_LCD) as per my reading of the _DOD description in the ACPI 3.0b > > > spec. I think this larger patch will do that while also fixing your case: > > > > Thank you, yes that still works for me the same as my original patch: > > Can you please test this updated patch as well: > > Index: acpi_video.c > =================================================================== > --- acpi_video.c (revision 241683) > +++ acpi_video.c (working copy) > @@ -320,7 +320,8 @@ acpi_video_resume(device_t dev) > ACPI_SERIAL_BEGIN(video_output); > STAILQ_FOREACH_SAFE(vo, &sc->vid_outputs, vo_next, vn) { > if ((vo->adr & DOD_DEVID_MASK_FULL) != DOD_DEVID_LCD && > - (vo->adr & DOD_DEVID_MASK) != DOD_DEVID_INTDFP) > + (vo->adr & (DOD_DEVID_SCHEME_STD | DOD_DEVID_MASK)) != > + (DOD_DEVID_SCHEME_STD | DOD_DEVID_INTDFP)) > continue; > > if ((vo_get_device_status(vo->handle) & DCS_ACTIVE) == 0) > @@ -467,38 +468,40 @@ acpi_video_vo_init(UINT32 adr) > > ACPI_SERIAL_ASSERT(video); > > - switch (adr & DOD_DEVID_MASK) { > + /* Assume an unknown unit by default. */ > + desc = "unknown output"; > + type = "out"; > + voqh = &other_units; > + > + switch (adr & (DOD_DEVID_SCHEME_STD | DOD_DEVID_MASK)) { > case DOD_DEVID_MONITOR: > if ((adr & DOD_DEVID_MASK_FULL) == DOD_DEVID_LCD) { > /* DOD_DEVID_LCD is a common, backward compatible ID */ > desc = "Internal/Integrated Digital Flat Panel"; > type = "lcd"; > voqh = &lcd_units; > - } else { > - desc = "VGA CRT or VESA Compatible Analog Monitor"; > - type = "crt"; > - voqh = &crt_units; > } > break; > - case DOD_DEVID_TV: > + case DOD_DEVID_SCHEME_STD | DOD_DEVID_MONITOR: > + desc = "VGA CRT or VESA Compatible Analog Monitor"; > + type = "crt"; > + voqh = &crt_units; > + break; > + case DOD_DEVID_SCHEME_STD | DOD_DEVID_TV: > desc = "TV/HDTV or Analog-Video Monitor"; > type = "tv"; > voqh = &tv_units; > break; > - case DOD_DEVID_EXT: > + case DOD_DEVID_SCHEME_STD | DOD_DEVID_EXT: > desc = "External Digital Monitor"; > type = "ext"; > voqh = &ext_units; > break; > - case DOD_DEVID_INTDFP: > + case DOD_DEVID_SCHEME_STD | DOD_DEVID_INTDFP: > desc = "Internal/Integrated Digital Flat Panel"; > type = "lcd"; > voqh = &lcd_units; > break; > - default: > - desc = "unknown output"; > - type = "out"; > - voqh = &other_units; > } > > n = 0; > @@ -633,21 +636,25 @@ acpi_video_vo_destroy(struct acpi_video_output *vo > AcpiOsFree(vo->vo_levels); > } > > - switch (vo->adr & DOD_DEVID_MASK) { > + voqh = &other_units; > + > + switch (vo->adr & (DOD_DEVID_SCHEME_STD | DOD_DEVID_MASK)) { > case DOD_DEVID_MONITOR: > + if ((vo->adr & DOD_DEVID_MASK_FULL) == DOD_DEVID_LCD) > + voqh = &lcd_units; > + break; > + case DOD_DEVID_SCHEME_STD | DOD_DEVID_MONITOR: > voqh = &crt_units; > break; > - case DOD_DEVID_TV: > + case DOD_DEVID_SCHEME_STD | DOD_DEVID_TV: > voqh = &tv_units; > break; > - case DOD_DEVID_EXT: > + case DOD_DEVID_SCHEME_STD | DOD_DEVID_EXT: > voqh = &ext_units; > break; > - case DOD_DEVID_INTDFP: > + case DOD_DEVID_SCHEME_STD | DOD_DEVID_INTDFP: > voqh = &lcd_units; > break; > - default: > - voqh = &other_units; > } > STAILQ_REMOVE(voqh, vo, acpi_video_output, vo_unit.next); > free(vo, M_ACPIVIDEO); > @@ -905,8 +912,14 @@ vid_enum_outputs_subr(ACPI_HANDLE handle, UINT32 l > return (AE_OK); > > for (i = 0; i < argset->dod_pkg->Package.Count; i++) { > + /* > + * Some systems do not include DOD_DEVID_SCHEME_STD in > + * the _ADR of output devices and some do, so just > + * ignore DOD_DEVID_SCHEME_STD. > + */ > if (acpi_PkgInt32(argset->dod_pkg, i, &val) == 0 && > - (val & DOD_DEVID_MASK_FULL) == adr) { > + (val & DOD_DEVID_MASK_FULL) == > + (adr & ~DOD_DEVID_SCHEME_STD)) { > argset->callback(handle, val, argset->context); > argset->count++; > } > > -- > John Baldwin That still works the same: % sysctl hw.acpi.video. hw.acpi.video.crt0.active: 0 hw.acpi.video.lcd0.active: 0 hw.acpi.video.lcd0.brightness: 100 hw.acpi.video.lcd0.fullpower: 100 hw.acpi.video.lcd0.economy: 46 hw.acpi.video.lcd0.levels: 100 46 0 6 13 20 26 33 40 46 53 60 66 73 80 86 93 100 hw.acpi.video.ext0.active: 0 hw.acpi.video.ext1.active: 0 hw.acpi.video.ext2.active: 0 hw.acpi.video.ext3.active: 0 % Thanx, :) Juergen From owner-freebsd-mobile@FreeBSD.ORG Thu Oct 18 20:59:05 2012 Return-Path: Delivered-To: mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4082A26A; Thu, 18 Oct 2012 20:59:05 +0000 (UTC) (envelope-from villa.alberto@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 6C6DE8FC0C; Thu, 18 Oct 2012 20:59:04 +0000 (UTC) Received: by mail-bk0-f54.google.com with SMTP id jf20so4228897bkc.13 for ; Thu, 18 Oct 2012 13:59:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=yRCrsFAYVtDJQ6lg3erUrRRza9BJI6H75Ty9SzkAnIU=; b=RUCEs9eQdSx0Achlk67bt8hpcRW+uGJQquBA9JZ9CLtGFcs0CxkgoNKVy72Dqy8h70 JENRYs/BmOR1d1oD6iumVaieQuvsnoKdL+MC+UyBqTgGeXgbdNh5QMtOvwUkQC5tl8nD qlzfKWo8zKjNbg4uV7ct4Epxp1KvVdBuhW3iS2VOhQytEp60xgXeX3Tz+pL/zlRampQ3 yh0YE9Q4yzaKqGa4Tv9/9nG8QnICvLZTnkdL1On5URkzh8WjGBCAA3vtRIeaknvr7vP/ 317RIErBy/QjAqerFAKD+WSXVLAr599GDpfeqqM9jqaTL/DC8IThbI7ecT5fhJ28+a03 T/3Q== Received: by 10.204.146.83 with SMTP id g19mr6962919bkv.33.1350593943078; Thu, 18 Oct 2012 13:59:03 -0700 (PDT) MIME-Version: 1.0 Sender: villa.alberto@gmail.com Received: by 10.205.81.1 with HTTP; Thu, 18 Oct 2012 13:58:42 -0700 (PDT) In-Reply-To: <201210180858.35282.jhb@freebsd.org> References: <20121005215316.GA38707@triton8.kn-bremen.de> <201210151112.03393.jhb@freebsd.org> <201210180858.35282.jhb@freebsd.org> From: Alberto Villa Date: Thu, 18 Oct 2012 22:58:42 +0200 X-Google-Sender-Auth: bJzDYvtIDVxaUpwTDRAaTDssw7s Message-ID: Subject: Re: Dell acpi_video patch To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-acpi@freebsd.org, Juergen Lock , mobile@freebsd.org X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Oct 2012 20:59:05 -0000 On Thu, Oct 18, 2012 at 2:58 PM, John Baldwin wrote: > Ah, looks like your BIOS excludes DOD_DEVID_SCHEME_STD from it's _ADR > methods (but does included it in on the list of displays returned by > _DOD). > > Please test this updated version: Still the same: hw.acpi.video.out0.active: 1 hw.acpi.video.out1.active: 1 hw.acpi.video.out1.brightness: 100 hw.acpi.video.out1.fullpower: 100 hw.acpi.video.out1.economy: 50 hw.acpi.video.out1.levels: 100 50 0 10 20 30 40 50 60 70 80 90 100 hw.acpi.video.out2.active: 1 -- Alberto Villa, FreeBSD committer http://people.FreeBSD.org/~avilla From owner-freebsd-mobile@FreeBSD.ORG Thu Oct 18 21:18:07 2012 Return-Path: Delivered-To: mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 58E89B4B; Thu, 18 Oct 2012 21:18:07 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 24FEC8FC0C; Thu, 18 Oct 2012 21:18:07 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 8E6CCB972; Thu, 18 Oct 2012 17:18:06 -0400 (EDT) From: John Baldwin To: Alberto Villa Subject: Re: Dell acpi_video patch Date: Thu, 18 Oct 2012 17:16:31 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p20; KDE/4.5.5; amd64; ; ) References: <20121005215316.GA38707@triton8.kn-bremen.de> <201210180858.35282.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201210181716.31486.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 18 Oct 2012 17:18:06 -0400 (EDT) Cc: freebsd-acpi@freebsd.org, Juergen Lock , mobile@freebsd.org X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Oct 2012 21:18:07 -0000 On Thursday, October 18, 2012 4:58:42 pm Alberto Villa wrote: > On Thu, Oct 18, 2012 at 2:58 PM, John Baldwin wrote: > > Ah, looks like your BIOS excludes DOD_DEVID_SCHEME_STD from it's _ADR > > methods (but does included it in on the list of displays returned by > > _DOD). > > > > Please test this updated version: > > Still the same: > hw.acpi.video.out0.active: 1 > hw.acpi.video.out1.active: 1 > hw.acpi.video.out1.brightness: 100 > hw.acpi.video.out1.fullpower: 100 > hw.acpi.video.out1.economy: 50 > hw.acpi.video.out1.levels: 100 50 0 10 20 30 40 50 60 70 80 90 100 > hw.acpi.video.out2.active: 1 Ok, can you possibly hack acpi_video to output the values returned _DOD (in hex) and the _ADR values (in hex) of your outputs? -- John Baldwin From owner-freebsd-mobile@FreeBSD.ORG Fri Oct 19 14:34:30 2012 Return-Path: Delivered-To: mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5DAD9FCF; Fri, 19 Oct 2012 14:34:30 +0000 (UTC) (envelope-from villa.alberto@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 8D3718FC12; Fri, 19 Oct 2012 14:34:29 +0000 (UTC) Received: by mail-bk0-f54.google.com with SMTP id jf20so267706bkc.13 for ; Fri, 19 Oct 2012 07:34:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=/LGSILkt0ZWEHD/8TnZAMcdJqVeWxxPsKOjkUkXosF4=; b=xCFdm/K7fh2XT/pRiBIkR8ScIDvRJssekOg0COawxu/L/owI3yzN9HAXR4DdEFKeNX Jnxwo+vc1U0Z0BgMVnNEdP1FtN1ZYhhyn9LexPI0Qx01BIWfHTII14ondKhPWgozUirc xLGn2IGzPGw9EiXSci/TCl4WvPAhPR+OuaxSyuqvLYzGABIkmIXgwKklHzryO16pgJLQ PUdbvdbuXr7kdEAH1Tt2FJzirGdPDYEcCQFv4G9XquzHL6/97cGVdsGrCEO8D7gSXw7q yAx0Oj38leo2O/fTJ/tMWW/GkfID1K22/aGyKInsA4Fsm9tRrM69H+8PqSKf8Cl0dUBT KwSA== Received: by 10.204.150.209 with SMTP id z17mr538836bkv.8.1350657268311; Fri, 19 Oct 2012 07:34:28 -0700 (PDT) MIME-Version: 1.0 Sender: villa.alberto@gmail.com Received: by 10.205.81.1 with HTTP; Fri, 19 Oct 2012 07:34:08 -0700 (PDT) In-Reply-To: <201210181716.31486.jhb@freebsd.org> References: <20121005215316.GA38707@triton8.kn-bremen.de> <201210180858.35282.jhb@freebsd.org> <201210181716.31486.jhb@freebsd.org> From: Alberto Villa Date: Fri, 19 Oct 2012 16:34:08 +0200 X-Google-Sender-Auth: 91KYDWYjvR8EmTZqiqcQ5NUVHzo Message-ID: Subject: Re: Dell acpi_video patch To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-acpi@freebsd.org, Juergen Lock , mobile@freebsd.org X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Oct 2012 14:34:30 -0000 On Thu, Oct 18, 2012 at 11:16 PM, John Baldwin wrote: > Ok, can you possibly hack acpi_video to output the values returned _DOD (in > hex) and the _ADR values (in hex) of your outputs? I've read the ACPI spec and checked my dump, now I see what you mean. Nonetheless, I think you have confused the _STD bit with the _BIOS one: 0x00010100, 0x00010118, 0x00010121 So acpi_video.c behaves just as expected. By the way, the GFX device has a _DOD method too, which returns 0x0400 (an LCD device)... -- Alberto Villa, FreeBSD committer http://people.FreeBSD.org/~avilla From owner-freebsd-mobile@FreeBSD.ORG Fri Oct 19 15:24:20 2012 Return-Path: Delivered-To: mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 05A3AB18; Fri, 19 Oct 2012 15:24:20 +0000 (UTC) (envelope-from villa.alberto@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 005788FC12; Fri, 19 Oct 2012 15:24:18 +0000 (UTC) Received: by mail-bk0-f54.google.com with SMTP id jf20so293350bkc.13 for ; Fri, 19 Oct 2012 08:24:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=/uDFjawd0zwwGUoX1aNeebeBVsEjt6Ds2nFyALIubLc=; b=hGptjki8NP4ytDtYNQvvaygCZA8MPUMaBwtMVzatZPzyqLxxMc7robXt6Paso0bR3Q yC7a6WmC+0iUwrf7tigtIeGBlQ1abe5sWKyBLKWRDnvByPZO1VTaRMOkHrrHri9buKJN qq2uRP0igtk35T+MuX/ZEkfwdMlniRdTx+UnRuobOWFXzY7twbfBq+88ZNlmzVtpDDdM g0/LYhwk+EVMsKiQYDbvyJ4O1guAppwlTHOZ7TcfexuVuP2X1CNWHpeLTnnPTG5OVkgM pIOZIKh0mWvVD7hzAKe13IQdz8nJiNTye97Gdzydv52sflItNK5w7YIF3y6qPlI1oOJL kXjg== Received: by 10.205.118.136 with SMTP id fq8mr569814bkc.24.1350660257659; Fri, 19 Oct 2012 08:24:17 -0700 (PDT) MIME-Version: 1.0 Sender: villa.alberto@gmail.com Received: by 10.205.81.1 with HTTP; Fri, 19 Oct 2012 08:23:57 -0700 (PDT) In-Reply-To: <201210121006.17276.jhb@freebsd.org> References: <20121005215316.GA38707@triton8.kn-bremen.de> <201210121006.17276.jhb@freebsd.org> From: Alberto Villa Date: Fri, 19 Oct 2012 17:23:57 +0200 X-Google-Sender-Auth: -e10-WbPE1ONQz6s4UALnIwk8fQ Message-ID: Subject: Re: Dell acpi_video patch To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Cc: acpi@freebsd.org, freebsd-acpi@freebsd.org, Juergen Lock , mobile@freebsd.org X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Oct 2012 15:24:20 -0000 On Fri, Oct 12, 2012 at 4:06 PM, John Baldwin wrote: > I think this is correct, but in we need to do more to properly handle that > flag (DOD_DEVID_SCHEME_STD). Specifically, we shouldn't trust any bits in the > device ID unless that bit is set (except for the special case of > DOD_DEVID_LCD) as per my reading of the _DOD description in the ACPI 3.0b > spec. I think this larger patch will do that while also fixing your case: By the way, it looks like also 0x0100 and 0x0200 should be handled as legacy values: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=include/acpi/video.h;h=61109f2609fc3ee446ec43e242875b28ae719344;hb=HEAD http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=drivers/acpi/video.c;h=f94d4c818fc74dc9a076e8f67fe98d7bc6620a61;hb=HEAD -- Alberto Villa, FreeBSD committer http://people.FreeBSD.org/~avilla From owner-freebsd-mobile@FreeBSD.ORG Fri Oct 19 15:32:33 2012 Return-Path: Delivered-To: mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 20EC7D0; Fri, 19 Oct 2012 15:32:33 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id E59A78FC17; Fri, 19 Oct 2012 15:32:32 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 518E8B98E; Fri, 19 Oct 2012 11:32:32 -0400 (EDT) From: John Baldwin To: Alberto Villa Subject: Re: Dell acpi_video patch Date: Fri, 19 Oct 2012 10:53:19 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p20; KDE/4.5.5; amd64; ; ) References: <20121005215316.GA38707@triton8.kn-bremen.de> <201210181716.31486.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <201210191053.20041.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 19 Oct 2012 11:32:32 -0400 (EDT) Cc: freebsd-acpi@freebsd.org, Juergen Lock , mobile@freebsd.org X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Oct 2012 15:32:33 -0000 On Friday, October 19, 2012 10:34:08 am Alberto Villa wrote: > On Thu, Oct 18, 2012 at 11:16 PM, John Baldwin wrote: > > Ok, can you possibly hack acpi_video to output the values returned _DOD= (in > > hex) and the _ADR values (in hex) of your outputs? >=20 > I've read the ACPI spec and checked my dump, now I see what you mean. > Nonetheless, I think you have confused the _STD bit with the _BIOS > one: >=20 > 0x00010100, > 0x00010118, > 0x00010121 >=20 > So acpi_video.c behaves just as expected. By the way, the GFX device > has a _DOD method too, which returns 0x0400 (an LCD device)... I'm looking at section B.4.2 in the 3.0b spec, it has a sample _DOD of: Method (_DOD, 0) { Return ( Package() { 0x00000110, // Primary LCD panel, not detectable by BIOS 0x80000100, // CRT type display, not detectable by BIOS 0x80000220, // TV type display, not detectable by the BIOS 0x80000411, // Secondary LCD panel, not detectable by BIOS } ) } The description of bit 31 is quite clear: Device ID Scheme 31 1 =E2=80=93 Uses the bit-field definitions above (bits 15:0) 0 =E2=80=93 Other scheme, contact the Video Chip Vendor Then there is table B-3: Table B-3: Example Device Ids Bits Definition 0x000xyyyy Bit 31 =3D 0. Other proprietary scheme - 0x110 Device ID is an e= xception. (See Note 3) 0x00000110 Integrated LCD Panel #1 using a common, backwards compatible ID 0x80000100 Integrated VGA CRT or VESA compatible Monitor #1 on Port0 0x80000240 Integrated TV #1 on Port4 0x80000410 Integrated Internal LCD Panel #1 on Port1 0x80000421 LVDS Panel #2 Dual-Link using Port2 & 3. (See Note 4) 0x80000131 VGA CRT or VESA compatible Monitor #2 on Port3 0x80000121 Dual-Link VGA CRT or VESA compatible Monitor #2 using Port2 & 3.= (See Note 4.) 0x80000320 DVI Monitor #1 on Port2 (shares Port2 with a Dual-Function DVI/T= V Encoder). (See Note 5) 0x80000331 DVI Monitor #2 on Port3 0x80000330 Dual-Link DVI Monitor #1 using Port2 & 3 0x80000231 TV #2 on Port2 (shares Port2 with a Dual-Function DVI/TV Encoder= ). (See Note 5) Notes: 3. When Bit 31 is 0, no assumptions can be made on which ID will be used for any particular display type. Contact the Video Chip vendor for details of the ID scheme employed. Looking back at earlier ACPI specs (1.0b and 2.0c), they did not mention bit 31 at all (well, it was required to be zero). Their examples are different= as well, but they don't define any meaning to the low bits, so I think we are correct in calling all of them plain outputs. Specifically, the "Display Type" bitfield (Bits 8:11) are undefined in the earlier specs, and 3.0b only claims they are defined if bit 31 is set. =2D-=20 John Baldwin From owner-freebsd-mobile@FreeBSD.ORG Fri Oct 19 15:32:33 2012 Return-Path: Delivered-To: mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BF18AD2; Fri, 19 Oct 2012 15:32:33 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 8F8098FC18; Fri, 19 Oct 2012 15:32:33 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id E090EB91C; Fri, 19 Oct 2012 11:32:32 -0400 (EDT) From: John Baldwin To: Juergen Lock Subject: Re: Dell acpi_video patch Date: Fri, 19 Oct 2012 11:14:10 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p20; KDE/4.5.5; amd64; ; ) References: <20121005215316.GA38707@triton8.kn-bremen.de> <201210180859.14457.jhb@freebsd.org> <20121018195723.GA10042@triton8.kn-bremen.de> In-Reply-To: <20121018195723.GA10042@triton8.kn-bremen.de> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201210191114.10340.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 19 Oct 2012 11:32:33 -0400 (EDT) Cc: avilla@freebsd.org, freebsd-acpi@freebsd.org, mobile@freebsd.org X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Oct 2012 15:32:33 -0000 On Thursday, October 18, 2012 3:57:23 pm Juergen Lock wrote: > On Thu, Oct 18, 2012 at 08:59:14AM -0400, John Baldwin wrote: > > On Friday, October 12, 2012 12:33:49 pm Juergen Lock wrote: > > > On Fri, Oct 12, 2012 at 10:06:17AM -0400, John Baldwin wrote: > > > > On Friday, October 05, 2012 5:53:16 pm Juergen Lock wrote: > > > > > Hi! > > > > > > > > > > I finally took a closer look why acpi_video found nothing on my > > > > > Dell laptop (Precision M4500), and came up with this patch: > > > > > > > > > > --- sys/dev/acpica/acpi_video.c.orig > > > > > +++ sys/dev/acpica/acpi_video.c > > > > > @@ -906,7 +906,7 @@ vid_enum_outputs_subr(ACPI_HANDLE handle > > > > > > > > > > for (i = 0; i < argset->dod_pkg->Package.Count; i++) { > > > > > if (acpi_PkgInt32(argset->dod_pkg, i, &val) == 0 && > > > > > - (val & DOD_DEVID_MASK_FULL) == adr) { > > > > > + (val & (DOD_DEVID_MASK_FULL | 0x80000000)) == adr) { > > > > > argset->callback(handle, val, argset->context); > > > > > argset->count++; > > > > > } > > > > > > > > > > which gives me: > > > > > > > > I think this is correct, but in we need to do more to properly handle that > > > > flag (DOD_DEVID_SCHEME_STD). Specifically, we shouldn't trust any bits in the > > > > device ID unless that bit is set (except for the special case of > > > > DOD_DEVID_LCD) as per my reading of the _DOD description in the ACPI 3.0b > > > > spec. I think this larger patch will do that while also fixing your case: > > > > > > Thank you, yes that still works for me the same as my original patch: > > > > Can you please test this updated patch as well: Sorry, one more request. I think I want to commit just your fix separately, but I have a slightly different version of it. Can you just double check this version: Index: acpi_video.c =================================================================== --- acpi_video.c (revision 241688) +++ acpi_video.c (working copy) @@ -906,7 +906,8 @@ vid_enum_outputs_subr(ACPI_HANDLE handle, UINT32 l for (i = 0; i < argset->dod_pkg->Package.Count; i++) { if (acpi_PkgInt32(argset->dod_pkg, i, &val) == 0 && - (val & DOD_DEVID_MASK_FULL) == adr) { + (val & DOD_DEVID_MASK_FULL) == + (adr & DOD_DEVID_MASK_FULL)) { argset->callback(handle, val, argset->context); argset->count++; } -- John Baldwin From owner-freebsd-mobile@FreeBSD.ORG Fri Oct 19 15:42:19 2012 Return-Path: Delivered-To: mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 66C25B54; Fri, 19 Oct 2012 15:42:19 +0000 (UTC) (envelope-from villa.alberto@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 777388FC14; Fri, 19 Oct 2012 15:42:18 +0000 (UTC) Received: by mail-bk0-f54.google.com with SMTP id jf20so301813bkc.13 for ; Fri, 19 Oct 2012 08:42:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=9UpxAq9voTX19mhjcRVCBHd516HjYz0dIlFrHU87bqM=; b=gHisjkW6nHLADK/Gk5X+8GDpbZ9WJPWi7LzGJzOpbd2dh0nSozU9XyQQTrJ+H2MYyA iV9gV3P+2+0YmDupZcEeZzUN80M8gmmmK2hWkoV+jd93MAiu7QXROh3YtMztutzlu3uM KrIg8kn09jcwVmA2Rqe9CE0Uo5pBAQF7q/JJtOy84EPF91s7Sd75gTlTT9r/0iyEwLc3 oNdmNeEhk1xpdTW5AzF69GP+IpJpVADFjeL5jkdjD2Mh68MMVn5X0viS6WltzahTaJJM Rw6Ti5R/84q9zFIHkgJgyL6ekJJ/x2s0syyOkTcEO/UAcPN2Dt852Sjdjdr7/hptXMFc mNuw== Received: by 10.204.8.215 with SMTP id i23mr578916bki.44.1350661336973; Fri, 19 Oct 2012 08:42:16 -0700 (PDT) MIME-Version: 1.0 Sender: villa.alberto@gmail.com Received: by 10.205.81.1 with HTTP; Fri, 19 Oct 2012 08:41:56 -0700 (PDT) In-Reply-To: <201210191053.20041.jhb@freebsd.org> References: <20121005215316.GA38707@triton8.kn-bremen.de> <201210181716.31486.jhb@freebsd.org> <201210191053.20041.jhb@freebsd.org> From: Alberto Villa Date: Fri, 19 Oct 2012 17:41:56 +0200 X-Google-Sender-Auth: cmUE8NSMWzqhxfshs88JJFY75mM Message-ID: Subject: Re: Dell acpi_video patch To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-acpi@freebsd.org, Juergen Lock , mobile@freebsd.org X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Oct 2012 15:42:19 -0000 On Fri, Oct 19, 2012 at 4:53 PM, John Baldwin wrote: > I'm looking at section B.4.2 in the 3.0b spec, it has a sample _DOD of: I've read section B.3.2 of 5.0 spec, which looks the same as 3.0b, but my IDs don't have bit 31 set, they have bit 16 (which is the difference between _DOD and _ADR you were probably talking about). Or am I missing the point? -- Alberto Villa, FreeBSD committer http://people.FreeBSD.org/~avilla From owner-freebsd-mobile@FreeBSD.ORG Fri Oct 19 18:12:39 2012 Return-Path: Delivered-To: mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A3B5463D; Fri, 19 Oct 2012 18:12:39 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 74F9D8FC17; Fri, 19 Oct 2012 18:12:39 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id CCBEDB987; Fri, 19 Oct 2012 14:12:38 -0400 (EDT) From: John Baldwin To: Alberto Villa Subject: Re: Dell acpi_video patch Date: Fri, 19 Oct 2012 13:13:14 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p20; KDE/4.5.5; amd64; ; ) References: <20121005215316.GA38707@triton8.kn-bremen.de> <201210191053.20041.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201210191313.14246.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 19 Oct 2012 14:12:38 -0400 (EDT) Cc: freebsd-acpi@freebsd.org, Juergen Lock , mobile@freebsd.org X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Oct 2012 18:12:39 -0000 On Friday, October 19, 2012 11:41:56 am Alberto Villa wrote: > On Fri, Oct 19, 2012 at 4:53 PM, John Baldwin wrote: > > I'm looking at section B.4.2 in the 3.0b spec, it has a sample _DOD of: > > I've read section B.3.2 of 5.0 spec, which looks the same as 3.0b, but > my IDs don't have bit 31 set, they have bit 16 (which is the > difference between _DOD and _ADR you were probably talking about). Or > am I missing the point? Yes, unless bit 31 is set, we can't know anything about bits 0-15 except that they are "unique". Specifically, we can't look at the "Display Type" bits to determine if an output device is a CRT vs LCD vs TV, etc. You can only do that if bit 31 is set. -- John Baldwin From owner-freebsd-mobile@FreeBSD.ORG Fri Oct 19 18:12:40 2012 Return-Path: Delivered-To: mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C7A3D649; Fri, 19 Oct 2012 18:12:40 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 9783A8FC19; Fri, 19 Oct 2012 18:12:40 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 00282B98E; Fri, 19 Oct 2012 14:12:40 -0400 (EDT) From: John Baldwin To: Alberto Villa Subject: Re: Dell acpi_video patch Date: Fri, 19 Oct 2012 13:34:38 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p20; KDE/4.5.5; amd64; ; ) References: <20121005215316.GA38707@triton8.kn-bremen.de> <201210121006.17276.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201210191334.38712.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 19 Oct 2012 14:12:40 -0400 (EDT) Cc: acpi@freebsd.org, freebsd-acpi@freebsd.org, Juergen Lock , mobile@freebsd.org X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Oct 2012 18:12:40 -0000 On Friday, October 19, 2012 11:23:57 am Alberto Villa wrote: > On Fri, Oct 12, 2012 at 4:06 PM, John Baldwin wrote: > > I think this is correct, but in we need to do more to properly handle that > > flag (DOD_DEVID_SCHEME_STD). Specifically, we shouldn't trust any bits in the > > device ID unless that bit is set (except for the special case of > > DOD_DEVID_LCD) as per my reading of the _DOD description in the ACPI 3.0b > > spec. I think this larger patch will do that while also fixing your case: > > By the way, it looks like also 0x0100 and 0x0200 should be handled as > legacy values: > > http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=include/acpi/video.h;h=61109f2609fc3ee446ec43e242875b28ae719344;hb=HEAD > > http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=drivers/acpi/video.c;h=f94d4c818fc74dc9a076e8f67fe98d7bc6620a61;hb=HEAD I considered that, but 1) it wouldn't help your laptop, and 2) the ACPI 3.0b spec where bit 31 is added specifically states (in the Note 3 I included in my prior e-mail) that 0x110 is the only valid legacy ID. -- John Baldwin From owner-freebsd-mobile@FreeBSD.ORG Fri Oct 19 18:47:55 2012 Return-Path: Delivered-To: mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7B52C4B7; Fri, 19 Oct 2012 18:47:55 +0000 (UTC) (envelope-from nox@jelal.kn-bremen.de) Received: from smtp.kn-bremen.de (gelbbaer.kn-bremen.de [78.46.108.116]) by mx1.freebsd.org (Postfix) with ESMTP id 0F9128FC0A; Fri, 19 Oct 2012 18:47:54 +0000 (UTC) Received: by smtp.kn-bremen.de (Postfix, from userid 10) id D7A261E00107; Fri, 19 Oct 2012 20:47:46 +0200 (CEST) Received: from triton8.kn-bremen.de (noident@localhost [127.0.0.1]) by triton8.kn-bremen.de (8.14.4/8.14.4) with ESMTP id q9JIkHk8045126; Fri, 19 Oct 2012 20:46:17 +0200 (CEST) (envelope-from nox@triton8.kn-bremen.de) Received: (from nox@localhost) by triton8.kn-bremen.de (8.14.4/8.14.3/Submit) id q9JIkHJI045125; Fri, 19 Oct 2012 20:46:17 +0200 (CEST) (envelope-from nox) From: Juergen Lock Date: Fri, 19 Oct 2012 20:46:17 +0200 To: John Baldwin Subject: Re: Dell acpi_video patch Message-ID: <20121019184617.GA45092@triton8.kn-bremen.de> References: <20121005215316.GA38707@triton8.kn-bremen.de> <201210180859.14457.jhb@freebsd.org> <20121018195723.GA10042@triton8.kn-bremen.de> <201210191114.10340.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201210191114.10340.jhb@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: avilla@freebsd.org, freebsd-acpi@freebsd.org, Juergen Lock , mobile@freebsd.org X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Oct 2012 18:47:56 -0000 On Fri, Oct 19, 2012 at 11:14:10AM -0400, John Baldwin wrote: > On Thursday, October 18, 2012 3:57:23 pm Juergen Lock wrote: > > On Thu, Oct 18, 2012 at 08:59:14AM -0400, John Baldwin wrote: > > > On Friday, October 12, 2012 12:33:49 pm Juergen Lock wrote: > > > > On Fri, Oct 12, 2012 at 10:06:17AM -0400, John Baldwin wrote: > > > > > On Friday, October 05, 2012 5:53:16 pm Juergen Lock wrote: > > > > > > Hi! > > > > > > > > > > > > I finally took a closer look why acpi_video found nothing on my > > > > > > Dell laptop (Precision M4500), and came up with this patch: > > > > > > > > > > > > --- sys/dev/acpica/acpi_video.c.orig > > > > > > +++ sys/dev/acpica/acpi_video.c > > > > > > @@ -906,7 +906,7 @@ vid_enum_outputs_subr(ACPI_HANDLE handle > > > > > > > > > > > > for (i = 0; i < argset->dod_pkg->Package.Count; i++) { > > > > > > if (acpi_PkgInt32(argset->dod_pkg, i, &val) == 0 && > > > > > > - (val & DOD_DEVID_MASK_FULL) == adr) { > > > > > > + (val & (DOD_DEVID_MASK_FULL | 0x80000000)) == adr) { > > > > > > argset->callback(handle, val, argset->context); > > > > > > argset->count++; > > > > > > } > > > > > > > > > > > > which gives me: > > > > > > > > > > I think this is correct, but in we need to do more to properly handle that > > > > > flag (DOD_DEVID_SCHEME_STD). Specifically, we shouldn't trust any bits in the > > > > > device ID unless that bit is set (except for the special case of > > > > > DOD_DEVID_LCD) as per my reading of the _DOD description in the ACPI 3.0b > > > > > spec. I think this larger patch will do that while also fixing your case: > > > > > > > > Thank you, yes that still works for me the same as my original patch: > > > > > > Can you please test this updated patch as well: > > Sorry, one more request. I think I want to commit just your fix separately, > but I have a slightly different version of it. Can you just double check > this version: > > Index: acpi_video.c > =================================================================== > --- acpi_video.c (revision 241688) > +++ acpi_video.c (working copy) > @@ -906,7 +906,8 @@ vid_enum_outputs_subr(ACPI_HANDLE handle, UINT32 l > > for (i = 0; i < argset->dod_pkg->Package.Count; i++) { > if (acpi_PkgInt32(argset->dod_pkg, i, &val) == 0 && > - (val & DOD_DEVID_MASK_FULL) == adr) { > + (val & DOD_DEVID_MASK_FULL) == > + (adr & DOD_DEVID_MASK_FULL)) { > argset->callback(handle, val, argset->context); > argset->count++; > } > > -- > John Baldwin Yup that still works the same: % sysctl hw.acpi.video hw.acpi.video.crt0.active: 0 hw.acpi.video.lcd0.active: 0 hw.acpi.video.lcd0.brightness: 100 hw.acpi.video.lcd0.fullpower: 100 hw.acpi.video.lcd0.economy: 46 hw.acpi.video.lcd0.levels: 100 46 0 6 13 20 26 33 40 46 53 60 66 73 80 86 93 100 hw.acpi.video.ext0.active: 0 hw.acpi.video.ext1.active: 0 hw.acpi.video.ext2.active: 0 hw.acpi.video.ext3.active: 0 % Thanx, :) Juergen From owner-freebsd-mobile@FreeBSD.ORG Fri Oct 19 22:21:24 2012 Return-Path: Delivered-To: mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2DBE9BFB; Fri, 19 Oct 2012 22:21:24 +0000 (UTC) (envelope-from villa.alberto@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 4B4978FC17; Fri, 19 Oct 2012 22:21:22 +0000 (UTC) Received: by mail-bk0-f54.google.com with SMTP id jf20so414064bkc.13 for ; Fri, 19 Oct 2012 15:21:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=UcxbJ84Szc2sPDtfBiH96MdjshHCIZomEPWaRifUH4c=; b=GciRJDuK3szbD6TaIizN5q4MQeXm87yQurep0sU6QogtbkpXw7EE22V96GtlFzDjeb qPp9bcjjdCXBHsS6v1HSTCwLHsFzS03fmvZMu/rY4ZOB5R/8g6vrsQraJEqLkh8ZaSl1 3qp3fner1qWWK8h+CmzAz1Ugvcu/ijt8ok0iV4ko/A02ACzWV+AWmnGfhJ4iOWfAz1rS S+u+6jHfvY0GVRHujzkeU0BIExBTUFjjhkZZTMeVEUMPVBtnr8KaLHdsYBvd81hdHaon 6TfHpeG5ecqpQJh5EksRsYPl/1KxWv3z01+9TDqTOEQMNqBRdUlJskFBF0TReNGZoiZ9 K62w== Received: by 10.204.8.215 with SMTP id i23mr826432bki.44.1350685281670; Fri, 19 Oct 2012 15:21:21 -0700 (PDT) MIME-Version: 1.0 Sender: villa.alberto@gmail.com Received: by 10.205.81.1 with HTTP; Fri, 19 Oct 2012 15:21:00 -0700 (PDT) In-Reply-To: <201210191313.14246.jhb@freebsd.org> References: <20121005215316.GA38707@triton8.kn-bremen.de> <201210191053.20041.jhb@freebsd.org> <201210191313.14246.jhb@freebsd.org> From: Alberto Villa Date: Sat, 20 Oct 2012 00:21:00 +0200 X-Google-Sender-Auth: GI_-WgKHty-gIz7H-iq6DtBZJ0k Message-ID: Subject: Re: Dell acpi_video patch To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-acpi@freebsd.org, Juergen Lock , mobile@freebsd.org X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Oct 2012 22:21:24 -0000 On Fri, Oct 19, 2012 at 7:13 PM, John Baldwin wrote: > Yes, unless bit 31 is set, we can't know anything about bits 0-15 except > that they are "unique". Specifically, we can't look at the "Display Type" > bits to determine if an output device is a CRT vs LCD vs TV, etc. You > can only do that if bit 31 is set. I know, I was saying that you probably confused bit 31 with bit 16, so the patch you proposed (about bit 31 being set in _DOD but not in _ADR) was not correct. ;) -- Alberto Villa, FreeBSD committer http://people.FreeBSD.org/~avilla From owner-freebsd-mobile@FreeBSD.ORG Fri Oct 19 22:24:58 2012 Return-Path: Delivered-To: mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E0791CA2; Fri, 19 Oct 2012 22:24:58 +0000 (UTC) (envelope-from villa.alberto@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id D92268FC14; Fri, 19 Oct 2012 22:24:57 +0000 (UTC) Received: by mail-bk0-f54.google.com with SMTP id jf20so414761bkc.13 for ; Fri, 19 Oct 2012 15:24:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=0uIwboGC90JtcIURgExIqQ0EgQybddcJ40OOgyr6zGI=; b=PGr9vRB6wZHsuQUP40lqI0jHY5v7nNmDOo/pE98P+8MckZwijb0RbHj4FJRdWE3vNq uGjiKHUO7yK0FIDZ7UPvHWCybra0meIB1c6dVO5BYr9k8SuyVpyaPh2UCenbL4LomUEh opTdVFUeVHklCE+q6NIgdghEZHcGMaWKYlCwJ0k+nfHizmubu+U5HZsyWpHjzkjDiCaZ 1jUsw4P1QEdWLyZRJZIBAioXiTH9AO2JTMGM7v+aicBaZVTRKDM9eH93NccoHRWK/uc3 HUW5b9/Thmfyiej5NUQxSGg5KjTip/0881xs6bD2zW+t678wEy7YsudN5+o+O+DDaz4k rQFg== Received: by 10.204.129.16 with SMTP id m16mr848766bks.136.1350685496553; Fri, 19 Oct 2012 15:24:56 -0700 (PDT) MIME-Version: 1.0 Sender: villa.alberto@gmail.com Received: by 10.205.81.1 with HTTP; Fri, 19 Oct 2012 15:24:36 -0700 (PDT) In-Reply-To: <201210191334.38712.jhb@freebsd.org> References: <20121005215316.GA38707@triton8.kn-bremen.de> <201210121006.17276.jhb@freebsd.org> <201210191334.38712.jhb@freebsd.org> From: Alberto Villa Date: Sat, 20 Oct 2012 00:24:36 +0200 X-Google-Sender-Auth: 9KnMOMNW0KS2q0SctLucByfZl0g Message-ID: Subject: Re: Dell acpi_video patch To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Cc: acpi@freebsd.org, freebsd-acpi@freebsd.org, Juergen Lock , mobile@freebsd.org X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Oct 2012 22:24:59 -0000 On Fri, Oct 19, 2012 at 7:34 PM, John Baldwin wrote: > I considered that, but 1) it wouldn't help your laptop, and 2) the ACPI 3.0b > spec where bit 31 is added specifically states (in the Note 3 I included in > my prior e-mail) that 0x110 is the only valid legacy ID. Sure, it wasn't about my laptop, but a general consideration; also spec 5.0 lists only 0x0110, so it's better to stick to the spec as you say. By the way, I think the name of devices is not used anywhere (apart for an X.Org piece of code which I'm going to patch), so it's not important. -- Alberto Villa, FreeBSD committer http://people.FreeBSD.org/~avilla From owner-freebsd-mobile@FreeBSD.ORG Fri Oct 19 22:31:02 2012 Return-Path: Delivered-To: mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7C843D7A; Fri, 19 Oct 2012 22:31:02 +0000 (UTC) (envelope-from villa.alberto@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id AC0CF8FC0C; Fri, 19 Oct 2012 22:31:01 +0000 (UTC) Received: by mail-bk0-f54.google.com with SMTP id jf20so415986bkc.13 for ; Fri, 19 Oct 2012 15:31:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=lsSBQfmDJUT9GfFv++KhBFRO3JYAiD5ui4KK3VOvzvw=; b=Fnhg5VUj26I2KJEs0lSrPKHPJTc2Q/MU4OFhTD4v1OK4l/R8p6tLnrPN1s2q3NLmGM f2AyXSkDVGDA7PdXcL5gv2DSOCj/oa7ofLZkP0E2wnBlyw39wJayCZILLr8/AHyyVx+Y t22PWW4gmuqi/S7XJ8JjGYfgTdi16oON1WroumsQ+wS8AbqzL8A/qChzKAlUWslhiKwD DNysC7FTUsqgZeNCLsGR5SOUlofzqxr/ESI12+gFa08uEbrxi6aXDORih4Yj+AGssjyt 9hyUrEtG2p0Ini6Bog4Sl5cSifI+wCazKGOIJkj5As0LGr1bg8cKvpHI/7Sxt55sn/ND /OzQ== Received: by 10.205.118.136 with SMTP id fq8mr841304bkc.24.1350685860475; Fri, 19 Oct 2012 15:31:00 -0700 (PDT) MIME-Version: 1.0 Sender: villa.alberto@gmail.com Received: by 10.205.81.1 with HTTP; Fri, 19 Oct 2012 15:30:40 -0700 (PDT) In-Reply-To: References: <20121005215316.GA38707@triton8.kn-bremen.de> <201210191053.20041.jhb@freebsd.org> <201210191313.14246.jhb@freebsd.org> From: Alberto Villa Date: Sat, 20 Oct 2012 00:30:40 +0200 X-Google-Sender-Auth: QdSJZ0Ue4rasO4dtcHkRsijpcAk Message-ID: Subject: Re: Dell acpi_video patch To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-acpi@freebsd.org, Juergen Lock , mobile@freebsd.org X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Oct 2012 22:31:02 -0000 On Sat, Oct 20, 2012 at 12:21 AM, Alberto Villa wrote: > I know, I was saying that you probably confused bit 31 with bit 16, so > the patch you proposed (about bit 31 being set in _DOD but not in > _ADR) was not correct. ;) You assumption, actually. The patch you committed was fine. :) -- Alberto Villa, FreeBSD committer http://people.FreeBSD.org/~avilla From owner-freebsd-mobile@FreeBSD.ORG Sat Oct 20 12:53:05 2012 Return-Path: Delivered-To: mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 25524EB0; Sat, 20 Oct 2012 12:53:05 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id EB6538FC17; Sat, 20 Oct 2012 12:53:04 +0000 (UTC) Received: from ralph.baldwin.cx (c-68-39-198-164.hsd1.de.comcast.net [68.39.198.164]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 4845FB93B; Sat, 20 Oct 2012 08:53:04 -0400 (EDT) From: John Baldwin To: Alberto Villa Subject: Re: Dell acpi_video patch Date: Sat, 20 Oct 2012 08:40:48 -0400 User-Agent: KMail/1.13.7 (FreeBSD/9.0-STABLE; KDE/4.7.4; amd64; ; ) References: <20121005215316.GA38707@triton8.kn-bremen.de> <201210191313.14246.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201210200840.48613.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Sat, 20 Oct 2012 08:53:04 -0400 (EDT) Cc: freebsd-acpi@freebsd.org, Juergen Lock , mobile@freebsd.org X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Oct 2012 12:53:05 -0000 On Friday, October 19, 2012 06:21:00 PM Alberto Villa wrote: > On Fri, Oct 19, 2012 at 7:13 PM, John Baldwin wrote: > > Yes, unless bit 31 is set, we can't know anything about bits 0-15 except > > that they are "unique". Specifically, we can't look at the "Display > > Type" bits to determine if an output device is a CRT vs LCD vs TV, etc. > > You can only do that if bit 31 is set. > > I know, I was saying that you probably confused bit 31 with bit 16, so > the patch you proposed (about bit 31 being set in _DOD but not in > _ADR) was not correct. ;) Oh, no, I hadn't been able to tell from your ASL that bit 16 was set (it's not that easy to guess as it computes the ID's dynamically at runtime. I was merely guessing that since I had changed the matching logic to look at bit 31 that that was the cause, but it wasn't the matching logic that was different (comparing _ADR to _DOD), but the logic that parsed _DOD is what treated your laptop differently. -- John Baldwin From owner-freebsd-mobile@FreeBSD.ORG Sat Oct 20 13:38:07 2012 Return-Path: Delivered-To: mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6D587451; Sat, 20 Oct 2012 13:38:07 +0000 (UTC) (envelope-from villa.alberto@gmail.com) Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by mx1.freebsd.org (Postfix) with ESMTP id A00E38FC22; Sat, 20 Oct 2012 13:38:06 +0000 (UTC) Received: by mail-wi0-f178.google.com with SMTP id hr7so929057wib.13 for ; Sat, 20 Oct 2012 06:38:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=Zcv0bSGaQokDqfW0W7BcL64jr7+YDNt8EhOa7/X/S7s=; b=b9Ejciu3XtuJp7diGDfzR+je2H1XJluDRnVayhDZqwhDCKeTru60xzbfnmcbp728QN daDoYgDdlL+WJq2PRdQEoYeui9h/Hn6awxcxcr8kr5hNVS1yPFmrnEB6T9tMJbD9b26L YnNyWyTEbZKzGwJMdlfDmhtu+lCE6yHndwtNo0LMW6cEBDmJHTIklda2PXD801Ul8b2u teEJ152AYb2Kb+d6QyKCic3OWmCTmJ3oXVBb1XgW7D0PRQ2uONHmRzhy4cqu99vXuKTK samjsqZEx3TZiWo5GAGvAqh//kMGWqCiwmbcWkxBLuBSfqh4xW83tHGmZqe+O5iEMOdG aJjA== Received: by 10.180.8.40 with SMTP id o8mr25387174wia.9.1350740280454; Sat, 20 Oct 2012 06:38:00 -0700 (PDT) MIME-Version: 1.0 Sender: villa.alberto@gmail.com Received: by 10.216.200.17 with HTTP; Sat, 20 Oct 2012 06:37:40 -0700 (PDT) In-Reply-To: <201210200840.48613.jhb@freebsd.org> References: <20121005215316.GA38707@triton8.kn-bremen.de> <201210191313.14246.jhb@freebsd.org> <201210200840.48613.jhb@freebsd.org> From: Alberto Villa Date: Sat, 20 Oct 2012 15:37:40 +0200 X-Google-Sender-Auth: BWtantbM5o_-Eu1Rhp0Tzr2SZHo Message-ID: Subject: Re: Dell acpi_video patch To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-acpi@freebsd.org, Juergen Lock , mobile@freebsd.org X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Oct 2012 13:38:07 -0000 On Sat, Oct 20, 2012 at 2:40 PM, John Baldwin wrote: > Oh, no, I hadn't been able to tell from your ASL that bit 16 was set (it's > not that easy to guess as it computes the ID's dynamically at runtime. I see. > I was merely guessing that since I had changed the matching logic to look at > bit 31 that that was the cause, Oh, no, it wasn't working before too, it just changed from "crt" to "out" because of your change (which makes sense). > but it wasn't the matching logic that was > different (comparing _ADR to _DOD), but the logic that parsed _DOD is what > treated your laptop differently. So, just to be sure, you don't need any other information from me, right? I don't think, by the way, that a list of known non-standard configurations is worth being added to the code for this issue. -- Alberto Villa, FreeBSD committer http://people.FreeBSD.org/~avilla