public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ACPI:video: skip evaluating _DOD when it does not exist
@ 2016-05-27  7:47 Alex Hung
  2016-06-03  6:04 ` Aaron Lu
  0 siblings, 1 reply; 5+ messages in thread
From: Alex Hung @ 2016-05-27  7:47 UTC (permalink / raw)
  To: rui.zhang, rjw, lenb, linux-acpi, alex.hung

Some system supports hybrid graphics and its discrete VGA
does not have any connectors and therefore has no _DOD method.

Signed-off-by: Alex Hung <alex.hung@canonical.com>
---
 drivers/acpi/acpi_video.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/acpi/acpi_video.c b/drivers/acpi/acpi_video.c
index 5fdac39..549cdbe 100644
--- a/drivers/acpi/acpi_video.c
+++ b/drivers/acpi/acpi_video.c
@@ -1211,6 +1211,9 @@ static int acpi_video_device_enumerate(struct acpi_video_bus *video)
 	union acpi_object *dod = NULL;
 	union acpi_object *obj;
 
+	if (!video->cap._DOD)
+		return AE_NOT_EXIST;
+
 	status = acpi_evaluate_object(video->device->handle, "_DOD", NULL, &buffer);
 	if (!ACPI_SUCCESS(status)) {
 		ACPI_EXCEPTION((AE_INFO, status, "Evaluating _DOD"));
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] ACPI:video: skip evaluating _DOD when it does not exist
  2016-05-27  7:47 [PATCH] ACPI:video: skip evaluating _DOD when it does not exist Alex Hung
@ 2016-06-03  6:04 ` Aaron Lu
  2016-06-06  1:36   ` Alex Hung
  0 siblings, 1 reply; 5+ messages in thread
From: Aaron Lu @ 2016-06-03  6:04 UTC (permalink / raw)
  To: Alex Hung; +Cc: rui.zhang, rjw, lenb, linux-acpi

On Fri, May 27, 2016 at 03:47:06PM +0800, Alex Hung wrote:
> Some system supports hybrid graphics and its discrete VGA
> does not have any connectors and therefore has no _DOD method.
> 
> Signed-off-by: Alex Hung <alex.hung@canonical.com>
> ---
>  drivers/acpi/acpi_video.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/acpi/acpi_video.c b/drivers/acpi/acpi_video.c
> index 5fdac39..549cdbe 100644
> --- a/drivers/acpi/acpi_video.c
> +++ b/drivers/acpi/acpi_video.c
> @@ -1211,6 +1211,9 @@ static int acpi_video_device_enumerate(struct acpi_video_bus *video)
>  	union acpi_object *dod = NULL;
>  	union acpi_object *obj;
>  
> +	if (!video->cap._DOD)
> +		return AE_NOT_EXIST;
> +
>  	status = acpi_evaluate_object(video->device->handle, "_DOD", NULL, &buffer);
>  	if (!ACPI_SUCCESS(status)) {
>  		ACPI_EXCEPTION((AE_INFO, status, "Evaluating _DOD"));

Is the patch supposed to avoid the above error message?
I'm OK with the patch though, it's just not clear to me the point since
the acpi_evaluate_object should probably also return AE_NOT_EXIST.

Thanks,
Aaron

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ACPI:video: skip evaluating _DOD when it does not exist
  2016-06-03  6:04 ` Aaron Lu
@ 2016-06-06  1:36   ` Alex Hung
  2016-06-06  1:52     ` Aaron Lu
  0 siblings, 1 reply; 5+ messages in thread
From: Alex Hung @ 2016-06-06  1:36 UTC (permalink / raw)
  To: Aaron Lu; +Cc: Zhang Rui, Rafael J. Wysocki, Len Brown, Linux ACPI Mailing List

On Fri, Jun 3, 2016 at 2:04 PM, Aaron Lu <aaron.lu@intel.com> wrote:
> On Fri, May 27, 2016 at 03:47:06PM +0800, Alex Hung wrote:
>> Some system supports hybrid graphics and its discrete VGA
>> does not have any connectors and therefore has no _DOD method.
>>
>> Signed-off-by: Alex Hung <alex.hung@canonical.com>
>> ---
>>  drivers/acpi/acpi_video.c |    3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/acpi/acpi_video.c b/drivers/acpi/acpi_video.c
>> index 5fdac39..549cdbe 100644
>> --- a/drivers/acpi/acpi_video.c
>> +++ b/drivers/acpi/acpi_video.c
>> @@ -1211,6 +1211,9 @@ static int acpi_video_device_enumerate(struct acpi_video_bus *video)
>>       union acpi_object *dod = NULL;
>>       union acpi_object *obj;
>>
>> +     if (!video->cap._DOD)
>> +             return AE_NOT_EXIST;
>> +
>>       status = acpi_evaluate_object(video->device->handle, "_DOD", NULL, &buffer);
>>       if (!ACPI_SUCCESS(status)) {
>>               ACPI_EXCEPTION((AE_INFO, status, "Evaluating _DOD"));
>
> Is the patch supposed to avoid the above error message?
> I'm OK with the patch though, it's just not clear to me the point since
> the acpi_evaluate_object should probably also return AE_NOT_EXIST.

Yes it is to avoid the error message.  As _DOD is checked and it is
known a specific video device does not have it, the error message can
be confusing.


>
> Thanks,
> Aaron

-- 
Cheers,
Alex Hung

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ACPI:video: skip evaluating _DOD when it does not exist
  2016-06-06  1:36   ` Alex Hung
@ 2016-06-06  1:52     ` Aaron Lu
  2016-06-23  0:32       ` Rafael J. Wysocki
  0 siblings, 1 reply; 5+ messages in thread
From: Aaron Lu @ 2016-06-06  1:52 UTC (permalink / raw)
  To: Alex Hung
  Cc: Zhang Rui, Rafael J. Wysocki, Len Brown, Linux ACPI Mailing List

On 06/06/2016 09:36 AM, Alex Hung wrote:
> On Fri, Jun 3, 2016 at 2:04 PM, Aaron Lu <aaron.lu@intel.com> wrote:
>> On Fri, May 27, 2016 at 03:47:06PM +0800, Alex Hung wrote:
>>> Some system supports hybrid graphics and its discrete VGA
>>> does not have any connectors and therefore has no _DOD method.
>>>
>>> Signed-off-by: Alex Hung <alex.hung@canonical.com>
>>> ---
>>>  drivers/acpi/acpi_video.c |    3 +++
>>>  1 file changed, 3 insertions(+)
>>>
>>> diff --git a/drivers/acpi/acpi_video.c b/drivers/acpi/acpi_video.c
>>> index 5fdac39..549cdbe 100644
>>> --- a/drivers/acpi/acpi_video.c
>>> +++ b/drivers/acpi/acpi_video.c
>>> @@ -1211,6 +1211,9 @@ static int acpi_video_device_enumerate(struct acpi_video_bus *video)
>>>       union acpi_object *dod = NULL;
>>>       union acpi_object *obj;
>>>
>>> +     if (!video->cap._DOD)
>>> +             return AE_NOT_EXIST;
>>> +
>>>       status = acpi_evaluate_object(video->device->handle, "_DOD", NULL, &buffer);
>>>       if (!ACPI_SUCCESS(status)) {
>>>               ACPI_EXCEPTION((AE_INFO, status, "Evaluating _DOD"));
>>
>> Is the patch supposed to avoid the above error message?
>> I'm OK with the patch though, it's just not clear to me the point since
>> the acpi_evaluate_object should probably also return AE_NOT_EXIST.
> 
> Yes it is to avoid the error message.  As _DOD is checked and it is
> known a specific video device does not have it, the error message can
> be confusing.

I see, thanks.

Reviewed-by: Aaron Lu <aaron.lu@intel.com>

Thanks,
Aaron

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ACPI:video: skip evaluating _DOD when it does not exist
  2016-06-06  1:52     ` Aaron Lu
@ 2016-06-23  0:32       ` Rafael J. Wysocki
  0 siblings, 0 replies; 5+ messages in thread
From: Rafael J. Wysocki @ 2016-06-23  0:32 UTC (permalink / raw)
  To: Aaron Lu, Alex Hung; +Cc: Zhang Rui, Len Brown, Linux ACPI Mailing List

On Monday, June 06, 2016 09:52:29 AM Aaron Lu wrote:
> On 06/06/2016 09:36 AM, Alex Hung wrote:
> > On Fri, Jun 3, 2016 at 2:04 PM, Aaron Lu <aaron.lu@intel.com> wrote:
> >> On Fri, May 27, 2016 at 03:47:06PM +0800, Alex Hung wrote:
> >>> Some system supports hybrid graphics and its discrete VGA
> >>> does not have any connectors and therefore has no _DOD method.
> >>>
> >>> Signed-off-by: Alex Hung <alex.hung@canonical.com>
> >>> ---
> >>>  drivers/acpi/acpi_video.c |    3 +++
> >>>  1 file changed, 3 insertions(+)
> >>>
> >>> diff --git a/drivers/acpi/acpi_video.c b/drivers/acpi/acpi_video.c
> >>> index 5fdac39..549cdbe 100644
> >>> --- a/drivers/acpi/acpi_video.c
> >>> +++ b/drivers/acpi/acpi_video.c
> >>> @@ -1211,6 +1211,9 @@ static int acpi_video_device_enumerate(struct acpi_video_bus *video)
> >>>       union acpi_object *dod = NULL;
> >>>       union acpi_object *obj;
> >>>
> >>> +     if (!video->cap._DOD)
> >>> +             return AE_NOT_EXIST;
> >>> +
> >>>       status = acpi_evaluate_object(video->device->handle, "_DOD", NULL, &buffer);
> >>>       if (!ACPI_SUCCESS(status)) {
> >>>               ACPI_EXCEPTION((AE_INFO, status, "Evaluating _DOD"));
> >>
> >> Is the patch supposed to avoid the above error message?
> >> I'm OK with the patch though, it's just not clear to me the point since
> >> the acpi_evaluate_object should probably also return AE_NOT_EXIST.
> > 
> > Yes it is to avoid the error message.  As _DOD is checked and it is
> > known a specific video device does not have it, the error message can
> > be confusing.
> 
> I see, thanks.
> 
> Reviewed-by: Aaron Lu <aaron.lu@intel.com>

Patch applied, thanks!


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-06-23  0:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-27  7:47 [PATCH] ACPI:video: skip evaluating _DOD when it does not exist Alex Hung
2016-06-03  6:04 ` Aaron Lu
2016-06-06  1:36   ` Alex Hung
2016-06-06  1:52     ` Aaron Lu
2016-06-23  0:32       ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox