From: Aaron Lu Date: Mon, 22 Apr 2013 12:08:32 +0000 (+0200) Subject: acpi: video: enhance the quirk detect logic of _BQC X-Git-Tag: omap-for-v3.10/dt-fixes-for-merge-window~92^2~6^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a50188dae3089dcd15a6ae793528c157680891f1;p=pandora-kernel.git acpi: video: enhance the quirk detect logic of _BQC Currently we decide if the _BQC is using index by first setting the level to maximum, and then check if _BQC returned maximum; if not, we say it is using index. This is not true for some buggy systems, where the _BQC method will always return a constant value(e.g. 0 or 100 for the two broken system) and thus break the current logic. So this patch tries to enhance the quirk detect logic for _BQC: we do this by picking a test_level, it can be the maximum level or the mininum one based on some condition. And we don't make the assumption that if _BQC returned a value that is not what we just set, it must be using an index. Instead, we will compare the value returned from _BQC and if it doesn't match, see if the returned value is an index. And if still no, clear the capability of _BQC. References: https://bugzilla.kernel.org/show_bug.cgi?id=42861 References: https://bugzilla.kernel.org/show_bug.cgi?id=56011 Reported-and-tested-by: Artem Savkov Reported-by: Luis Medinas Reported-by: Cheppes Signed-off-by: Aaron Lu Acked-by: Zhang Rui Signed-off-by: Rafael J. Wysocki --- Reading git-diff-tree failed