linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Aaron Lu <aaron.lu@intel.com>
To: Zhang Rui <rui.zhang@intel.com>, Olof Johansson <olof@lixom.net>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	linux-next <linux-next@vger.kernel.org>,
	Linux-pm mailing list <linux-pm@vger.kernel.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v5] Thermal: introduce INT3406 thermal driver
Date: Thu, 11 Dec 2014 14:08:16 +0800	[thread overview]
Message-ID: <548934D0.8000502@intel.com> (raw)
In-Reply-To: <1418265472.12435.68.camel@rzhang1-toshiba>

On 12/11/2014 10:37 AM, Zhang Rui wrote:
> On Wed, 2014-12-10 at 18:15 -0800, Olof Johansson wrote:
>> On Wed, Dec 10, 2014 at 5:02 PM, Aaron Lu <aaron.lu@intel.com> wrote:
>>> On Wed, Dec 10, 2014 at 11:53:25AM -0800, Olof Johansson wrote:
>>>> Hi,
>>>>
>>>> [+daniel vetter]
>>>>
>>>> On Mon, Dec 8, 2014 at 9:47 PM, Aaron Lu <aaron.lu@intel.com> wrote:
>>>>> INT3406 ACPI device object resembles an ACPI video output device, but its
>>>>> _BCM is said to be deprecated and should not be used. So we will make
>>>>> use of the raw interface to do the actual cooling. Due to this, the
>>>>> backlight core has some modifications. Also, to re-use some of the ACPI
>>>>> video module's code, one function has been exported.
>>>>>
>>>>> Signed-off-by: Aaron Lu <aaron.lu@intel.com>
>>>>> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
>>>>> ---
>>>>> v5:
>>>>> Add the missing file drivers/thermal/int340x_thermal/Kconfig
>>>>> Remove the assignment of .owner field from the device_driver structure
>>>>
>>>>
>>>> Did this patch show up in -next for the first time last night, or did
>>>> some other change break this?
>>>>
>>>> It causes a panic in i915 when booting Minnowboard Max for me.
>>>
>>> Sorry for the trouble, I'm looking at this now.
>>> Is there anything special about the Minnowboard Max? I'll try to
>>> reproduce the issue here locally with a typical Intel desktop.
>>
>> Another good question is why the code showed up in -next today. Code
>> going in for 3.19 is supposed to have been baking there already, and
>> it's too early to stage anything for 3.20.
>>
>> Zhang?
> 
> well, my Linux machine happened to be broken when I was in travel in Oct
> and Nov, so that I got the 3.19 material prepared a little late.
> Thus I just took some fixes and driver specific patches and plan to push
> my pull request next week.
> For this one, it had been pushed to linux-next for 3.18, but was dropped
> because of some Kconfig problem. So I thought it was safe to include
> this one for 3.19.
> sorry for bring the trouble here.

It's my bad. In the meantime, I think I have found the problem:
If the system has a video output device that does not provide a correct
_BCL, the error path from the newly added code doesn't properly set the
error return value and that caused problem. The fix is simple:


diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index 5a41f89c4ce4..32880e6c8da4 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -721,7 +721,7 @@ int acpi_video_get_levels(struct acpi_device *device,
 	int i, max_level = 0, count = 0, level_ac_battery = 0;
 	union acpi_object *o;
 	struct acpi_video_device_brightness *br = NULL;
-	int result = 0;
+	int result = -EINVAL;
 	u32 value;
 
 	if (!ACPI_SUCCESS(acpi_video_device_lcd_query_levels(device->handle,
@@ -799,6 +799,7 @@ int acpi_video_get_levels(struct acpi_device *device,
 
 	br->count = count;
 	*dev_br = br;
+	result = 0;
 
 out:
 	kfree(obj);

Please let me know if you want to take this one incremental patch or an
update to the original one.

Thanks,
Aaron

  reply	other threads:[~2014-12-11  6:08 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-09  5:47 [PATCH v5] Thermal: introduce INT3406 thermal driver Aaron Lu
2014-12-10 19:53 ` Olof Johansson
2014-12-11  1:02   ` Aaron Lu
2014-12-11  2:15     ` Olof Johansson
2014-12-11  2:17       ` Aaron Lu
2014-12-11  2:22         ` Olof Johansson
2014-12-11  2:37       ` Zhang Rui
2014-12-11  6:08         ` Aaron Lu [this message]
2014-12-11  6:10           ` Aaron Lu
2014-12-11  8:33           ` Zhang Rui
2014-12-11  8:38             ` [PATCH v6] " Aaron Lu
2014-12-12 18:18               ` Olof Johansson
2014-12-16  1:59                 ` Aaron Lu
2014-12-22  3:09               ` Zhang Rui
2014-12-22  9:53                 ` Lee Jones
2014-12-23  1:26                   ` Aaron Lu
2014-12-29  6:03                     ` Aaron Lu

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=548934D0.8000502@intel.com \
    --to=aaron.lu@intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=olof@lixom.net \
    --cc=rui.zhang@intel.com \
    --cc=sfr@canb.auug.org.au \
    /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;
as well as URLs for NNTP newsgroup(s).