Re: [Intel-gfx] [PATCH] drm/i915: Refine the has_audio assignment

2018-04-19 Thread Shi, Yang A
>-Original Message-
>From: Chris Wilson [mailto:ch...@chris-wilson.co.uk]
>Sent: Thursday, April 19, 2018 2:13 PM
>To: Shi, Yang A <yang.a@intel.com>; Jani Nikula 
><jani.nik...@linux.intel.com>;
>intel-gfx@lists.freedesktop.org
>Subject: RE: [Intel-gfx] [PATCH] drm/i915: Refine the has_audio assignment
>
>Quoting Shi, Yang A (2018-04-19 02:22:33)
>> >-Original Message-
>> >From: Jani Nikula [mailto:jani.nik...@linux.intel.com]
>> >Sent: Wednesday, April 18, 2018 8:44 PM
>> >To: Chris Wilson <ch...@chris-wilson.co.uk>; Shi, Yang A
>> ><yang.a@intel.com>; intel-gfx@lists.freedesktop.org
>> >Cc: Shi, Yang A <yang.a@intel.com>
>> >Subject: Re: [Intel-gfx] [PATCH] drm/i915: Refine the has_audio
>> >assignment
>> >
>> >On Fri, 13 Apr 2018, Chris Wilson <ch...@chris-wilson.co.uk> wrote:
>> >> Quoting Yang (2018-04-13 05:06:45)
>> >>> From: Yang Shi <yang.a@intel.com>
>> >>>
>> >>> Refine the has_audio assignment for dp and hdmi.
>> >>
>> >> s/Refine/Ignore the user override for/
>> >>
>> >> Why?
>> >
>> >Yang, we'll need the explanation before we continue with review or
>> >even consider merging. We routinely ignore patches where questions go 
>> >unanswered.
>> >
>> >BR,
>> >Jani.
>>
>> This code change is just to make driver code more readable.
>> If(condition) value = a  else value = condition looks redundancy.
>
>Read the patch again, AUTO != ON.
>-Chris

Yes, I make a mistake and misunderstand such code.

BR.
Yang.

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH] drm/i915: Refine the has_audio assignment

2018-04-19 Thread Chris Wilson
Quoting Shi, Yang A (2018-04-19 02:22:33)
> >-Original Message-
> >From: Jani Nikula [mailto:jani.nik...@linux.intel.com]
> >Sent: Wednesday, April 18, 2018 8:44 PM
> >To: Chris Wilson <ch...@chris-wilson.co.uk>; Shi, Yang A 
> ><yang.a@intel.com>;
> >intel-gfx@lists.freedesktop.org
> >Cc: Shi, Yang A <yang.a....@intel.com>
> >Subject: Re: [Intel-gfx] [PATCH] drm/i915: Refine the has_audio assignment
> >
> >On Fri, 13 Apr 2018, Chris Wilson <ch...@chris-wilson.co.uk> wrote:
> >> Quoting Yang (2018-04-13 05:06:45)
> >>> From: Yang Shi <yang.a@intel.com>
> >>>
> >>> Refine the has_audio assignment for dp and hdmi.
> >>
> >> s/Refine/Ignore the user override for/
> >>
> >> Why?
> >
> >Yang, we'll need the explanation before we continue with review or even 
> >consider
> >merging. We routinely ignore patches where questions go unanswered.
> >
> >BR,
> >Jani.
> 
> This code change is just to make driver code more readable.
> If(condition) value = a  else value = condition looks redundancy.

Read the patch again, AUTO != ON.
-Chris
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH] drm/i915: Refine the has_audio assignment

2018-04-18 Thread Shi, Yang A
>-Original Message-
>From: Jani Nikula [mailto:jani.nik...@linux.intel.com]
>Sent: Wednesday, April 18, 2018 8:44 PM
>To: Chris Wilson <ch...@chris-wilson.co.uk>; Shi, Yang A 
><yang.a@intel.com>;
>intel-gfx@lists.freedesktop.org
>Cc: Shi, Yang A <yang.a....@intel.com>
>Subject: Re: [Intel-gfx] [PATCH] drm/i915: Refine the has_audio assignment
>
>On Fri, 13 Apr 2018, Chris Wilson <ch...@chris-wilson.co.uk> wrote:
>> Quoting Yang (2018-04-13 05:06:45)
>>> From: Yang Shi <yang.a@intel.com>
>>>
>>> Refine the has_audio assignment for dp and hdmi.
>>
>> s/Refine/Ignore the user override for/
>>
>> Why?
>
>Yang, we'll need the explanation before we continue with review or even 
>consider
>merging. We routinely ignore patches where questions go unanswered.
>
>BR,
>Jani.

This code change is just to make driver code more readable.
If(condition) value = a  else value = condition looks redundancy.

BR.
Yang.

>
>
>--
>Jani Nikula, Intel Open Source Technology Center
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH] drm/i915: Refine the has_audio assignment

2018-04-18 Thread Jani Nikula
On Fri, 13 Apr 2018, Chris Wilson  wrote:
> Quoting Yang (2018-04-13 05:06:45)
>> From: Yang Shi 
>> 
>> Refine the has_audio assignment for dp and hdmi.
>
> s/Refine/Ignore the user override for/
>
> Why?

Yang, we'll need the explanation before we continue with review or even
consider merging. We routinely ignore patches where questions go
unanswered.

BR,
Jani.


-- 
Jani Nikula, Intel Open Source Technology Center
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH] drm/i915: Refine the has_audio assignment

2018-04-13 Thread Chris Wilson
Quoting Yang (2018-04-13 05:06:45)
> From: Yang Shi 
> 
> Refine the has_audio assignment for dp and hdmi.

s/Refine/Ignore the user override for/

Why?
-Chris
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH] drm/i915: Refine the has_audio assignment

2018-04-12 Thread Yang
From: Yang Shi 

Refine the has_audio assignment for dp and hdmi.

Signed-off-by: Yang Shi 
---
 drivers/gpu/drm/i915/intel_dp.c   | 2 +-
 drivers/gpu/drm/i915/intel_hdmi.c | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index a29868c..47aa2ea 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1644,7 +1644,7 @@ intel_dp_compute_config(struct intel_encoder *encoder,
else if (intel_conn_state->force_audio == HDMI_AUDIO_AUTO)
pipe_config->has_audio = intel_dp->has_audio;
else
-   pipe_config->has_audio = intel_conn_state->force_audio == 
HDMI_AUDIO_ON;
+   pipe_config->has_audio = false;
 
if (intel_dp_is_edp(intel_dp) && intel_connector->panel.fixed_mode) {
struct drm_display_mode *panel_mode =
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c 
b/drivers/gpu/drm/i915/intel_hdmi.c
index 179d0ad..3c4b92e 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -1474,8 +1474,7 @@ bool intel_hdmi_compute_config(struct intel_encoder 
*encoder,
if (intel_conn_state->force_audio == HDMI_AUDIO_AUTO)
pipe_config->has_audio = intel_hdmi->has_audio;
else
-   pipe_config->has_audio =
-   intel_conn_state->force_audio == HDMI_AUDIO_ON;
+   pipe_config->has_audio = false;
}
 
/*
-- 
2.7.4

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx