diff mbox

drm/i915: Refine the has_audio assignment

Message ID 1523592405-25919-1-git-send-email-yang.a.shi@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Shi, Yang A April 13, 2018, 4:06 a.m. UTC
From: Yang Shi <yang.a.shi@intel.com>

Refine the has_audio assignment for dp and hdmi.

Signed-off-by: Yang Shi <yang.a.shi@intel.com>
---
 drivers/gpu/drm/i915/intel_dp.c   | 2 +-
 drivers/gpu/drm/i915/intel_hdmi.c | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

Comments

Chris Wilson April 13, 2018, 9:50 a.m. UTC | #1
Quoting Yang (2018-04-13 05:06:45)
> From: Yang Shi <yang.a.shi@intel.com>
> 
> Refine the has_audio assignment for dp and hdmi.

s/Refine/Ignore the user override for/

Why?
-Chris
Jani Nikula April 18, 2018, 12:44 p.m. UTC | #2
On Fri, 13 Apr 2018, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> Quoting Yang (2018-04-13 05:06:45)
>> From: Yang Shi <yang.a.shi@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.
Shi, Yang A April 19, 2018, 1:22 a.m. UTC | #3
>-----Original Message-----
>From: Jani Nikula [mailto:jani.nikula@linux.intel.com]
>Sent: Wednesday, April 18, 2018 8:44 PM
>To: Chris Wilson <chris@chris-wilson.co.uk>; Shi, Yang A <yang.a.shi@intel.com>;
>intel-gfx@lists.freedesktop.org
>Cc: Shi, Yang A <yang.a.shi@intel.com>
>Subject: Re: [Intel-gfx] [PATCH] drm/i915: Refine the has_audio assignment
>
>On Fri, 13 Apr 2018, Chris Wilson <chris@chris-wilson.co.uk> wrote:
>> Quoting Yang (2018-04-13 05:06:45)
>>> From: Yang Shi <yang.a.shi@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
Chris Wilson April 19, 2018, 6:12 a.m. UTC | #4
Quoting Shi, Yang A (2018-04-19 02:22:33)
> >-----Original Message-----
> >From: Jani Nikula [mailto:jani.nikula@linux.intel.com]
> >Sent: Wednesday, April 18, 2018 8:44 PM
> >To: Chris Wilson <chris@chris-wilson.co.uk>; Shi, Yang A <yang.a.shi@intel.com>;
> >intel-gfx@lists.freedesktop.org
> >Cc: Shi, Yang A <yang.a.shi@intel.com>
> >Subject: Re: [Intel-gfx] [PATCH] drm/i915: Refine the has_audio assignment
> >
> >On Fri, 13 Apr 2018, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> >> Quoting Yang (2018-04-13 05:06:45)
> >>> From: Yang Shi <yang.a.shi@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
Shi, Yang A April 19, 2018, 6:27 a.m. UTC | #5
>-----Original Message-----

>From: Chris Wilson [mailto:chris@chris-wilson.co.uk]

>Sent: Thursday, April 19, 2018 2:13 PM

>To: Shi, Yang A <yang.a.shi@intel.com>; Jani Nikula <jani.nikula@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.nikula@linux.intel.com]

>> >Sent: Wednesday, April 18, 2018 8:44 PM

>> >To: Chris Wilson <chris@chris-wilson.co.uk>; Shi, Yang A

>> ><yang.a.shi@intel.com>; intel-gfx@lists.freedesktop.org

>> >Cc: Shi, Yang A <yang.a.shi@intel.com>

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

>> >assignment

>> >

>> >On Fri, 13 Apr 2018, Chris Wilson <chris@chris-wilson.co.uk> wrote:

>> >> Quoting Yang (2018-04-13 05:06:45)

>> >>> From: Yang Shi <yang.a.shi@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.
diff mbox

Patch

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;
 	}
 
 	/*