From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752455AbbCWMEx (ORCPT ); Mon, 23 Mar 2015 08:04:53 -0400 Received: from mail-we0-f169.google.com ([74.125.82.169]:32930 "EHLO mail-we0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752113AbbCWMEu (ORCPT ); Mon, 23 Mar 2015 08:04:50 -0400 Date: Mon, 23 Mar 2015 12:04:47 +0000 From: Matt Fleming To: Jason Ekstrand Cc: LKML , Matthew Garrett , Bard Liao , Liam Girdwood , linux-acpi@vger.kernel.org, lenb@kernel.org, "Rafael J. Wysocki" Subject: Re: [PATCH] ACPI: Adjust the return value of _REV on x86 Message-ID: <20150323120331.GA3007@codeblueprint.co.uk> References: <1426150247-18309-1-git-send-email-matthew.garrett@nebula.com> <1426363131-14530-1-git-send-email-jason.ekstrand@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 16 Mar, at 04:21:51PM, Jason Ekstrand wrote: > > A quick update on the Dell XPS 13 for those of you who are following > this discussion but aren't aware of the XPS 13-specific discussions. > The "problem" triggered by _REV=5 is not a *real* problem. The reason > they special-cased it for the XPS 13 is that the sound card is > dual-mode and can run over either HDA and I2S. Since the I2S support > on Linux isn't great at the moment, they special-cased linux to run it > in HDA mode which has good support. The problem is that, in the A01 > bios update where they changed this, they made a mistake that left the > sound card in an invalid state. A one-line change to the DSDT table > in the bios puts it into HDA mode properly and fixes both the audio > and suspend/resume issues. They should be coming out with a bios > update shortly to fix this. > > I'm not knowledgeable enough to weigh in on the philosophical issues > here, but I thought it was worth explaining the reason for the linux > special-casing. In the case of the new XPS 13, Dell was doing > something useful with their special-casing, they just made a mistake. > If we did start advertising _REV=2 this would cause the laptop (with > the fixed bios) to load the sound card in I2S mode and it would be > less reliable. Sadly no, Dell are not doing something useful. Their use of _REV is entirely misguided for the same reasons using _OSI(Linux) is discouraged in drivers/acpi/osl.c; namely that working around kernel bugs in the BIOS is a terrible solution. Non-Windows BIOS code paths are not validated to the same degree as those traversed by running Windows, which is exactly why we try so hard to emulate Windows whenever we interact with the BIOS. The real way to fix this is to add the necessary support and bug fixes to the kernel, exactly as Bard (Cc'd) has been doing. P.S If Dell XPS13 owners try this patch and audio isn't magically detected, make sure you perform *two* cold boots. There appears to be some level of caching going where the last read _REV value is used. -- Matt Fleming, Intel Open Source Technology Center