public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] intel_audio_dump: fix CTS/M value index
@ 2014-03-13 20:38 mengdong.lin
  2014-03-14  1:44 ` Xiang, Haihao
  0 siblings, 1 reply; 3+ messages in thread
From: mengdong.lin @ 2014-03-13 20:38 UTC (permalink / raw)
  To: intel-gfx

From: Mengdong Lin <mengdong.lin@intel.com>

This patch fixes the reversed CTS/M value index when dumping the
'audio M/CTS programing enable' register.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>

diff --git a/tools/intel_audio_dump.c b/tools/intel_audio_dump.c
index 46eebdb..3ed2918 100644
--- a/tools/intel_audio_dump.c
+++ b/tools/intel_audio_dump.c
@@ -97,6 +97,11 @@ static int get_num_pipes(void)
 	return num_pipes;
 }
 
+static const char * const cts_m_value_index[] = {
+	[0] = "CTS",
+	[1] = "M",
+};
+
 static const char * const pixel_clock[] = {
 	[0] = "25.2 / 1.001 MHz",
 	[1] = "25.2 MHz",
@@ -1408,7 +1413,8 @@ static void dump_aud_m_cts_enable(int index)
 
 	printf("%s  CTS_programming\t\t\t%#lx\n",        prefix, BITS(dword, 19, 0));
 	printf("%s  Enable_CTS_or_M_programming\t%lu\n", prefix, BIT(dword, 20));
-	printf("%s  CTS_M value Index\t\t\t%s\n",        prefix, BIT(dword, 21) ? "CTS" : "M");
+	printf("%s  CTS_M value Index\t\t\t[0x%lx] %s\n",prefix, BIT(dword, 21),
+		OPNAME(cts_m_value_index, BIT(dword, 21)));
 }
 
 static void dump_aud_power_state(void)
-- 
1.8.1.2

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

* Re: [PATCH] intel_audio_dump: fix CTS/M value index
  2014-03-13 20:38 [PATCH] intel_audio_dump: fix CTS/M value index mengdong.lin
@ 2014-03-14  1:44 ` Xiang, Haihao
  2014-03-15  6:07   ` Ben Widawsky
  0 siblings, 1 reply; 3+ messages in thread
From: Xiang, Haihao @ 2014-03-14  1:44 UTC (permalink / raw)
  To: mengdong.lin; +Cc: intel-gfx

On Thu, 2014-03-13 at 16:38 -0400, mengdong.lin@intel.com wrote: 
> From: Mengdong Lin <mengdong.lin@intel.com>
> 
> This patch fixes the reversed CTS/M value index when dumping the
> 'audio M/CTS programing enable' register.
> 
> Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
> 
> diff --git a/tools/intel_audio_dump.c b/tools/intel_audio_dump.c
> index 46eebdb..3ed2918 100644
> --- a/tools/intel_audio_dump.c
> +++ b/tools/intel_audio_dump.c
> @@ -97,6 +97,11 @@ static int get_num_pipes(void)
>  	return num_pipes;
>  }
>  
> +static const char * const cts_m_value_index[] = {
> +	[0] = "CTS",
> +	[1] = "M",
> +};
> +
>  static const char * const pixel_clock[] = {
>  	[0] = "25.2 / 1.001 MHz",
>  	[1] = "25.2 MHz",
> @@ -1408,7 +1413,8 @@ static void dump_aud_m_cts_enable(int index)
>  
>  	printf("%s  CTS_programming\t\t\t%#lx\n",        prefix, BITS(dword, 19, 0));
>  	printf("%s  Enable_CTS_or_M_programming\t%lu\n", prefix, BIT(dword, 20));
> -	printf("%s  CTS_M value Index\t\t\t%s\n",        prefix, BIT(dword, 21) ? "CTS" : "M");
> +	printf("%s  CTS_M value Index\t\t\t[0x%lx] %s\n",prefix, BIT(dword, 21),
> +		OPNAME(cts_m_value_index, BIT(dword, 21)));
>  }
>  
>  static void dump_aud_power_state(void)

It is OK for me.
Reviewed-by: Haihao Xiang <haihao.xiang@intel.com>

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

* Re: [PATCH] intel_audio_dump: fix CTS/M value index
  2014-03-14  1:44 ` Xiang, Haihao
@ 2014-03-15  6:07   ` Ben Widawsky
  0 siblings, 0 replies; 3+ messages in thread
From: Ben Widawsky @ 2014-03-15  6:07 UTC (permalink / raw)
  To: Xiang, Haihao; +Cc: intel-gfx

On Fri, Mar 14, 2014 at 09:44:03AM +0800, Xiang, Haihao wrote:
> On Thu, 2014-03-13 at 16:38 -0400, mengdong.lin@intel.com wrote: 
> > From: Mengdong Lin <mengdong.lin@intel.com>
> > 
> > This patch fixes the reversed CTS/M value index when dumping the
> > 'audio M/CTS programing enable' register.
> > 
> > Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
> > 
> > diff --git a/tools/intel_audio_dump.c b/tools/intel_audio_dump.c
> > index 46eebdb..3ed2918 100644
> > --- a/tools/intel_audio_dump.c
> > +++ b/tools/intel_audio_dump.c
> > @@ -97,6 +97,11 @@ static int get_num_pipes(void)
> >  	return num_pipes;
> >  }
> >  
> > +static const char * const cts_m_value_index[] = {
> > +	[0] = "CTS",
> > +	[1] = "M",
> > +};
> > +
> >  static const char * const pixel_clock[] = {
> >  	[0] = "25.2 / 1.001 MHz",
> >  	[1] = "25.2 MHz",
> > @@ -1408,7 +1413,8 @@ static void dump_aud_m_cts_enable(int index)
> >  
> >  	printf("%s  CTS_programming\t\t\t%#lx\n",        prefix, BITS(dword, 19, 0));
> >  	printf("%s  Enable_CTS_or_M_programming\t%lu\n", prefix, BIT(dword, 20));
> > -	printf("%s  CTS_M value Index\t\t\t%s\n",        prefix, BIT(dword, 21) ? "CTS" : "M");
> > +	printf("%s  CTS_M value Index\t\t\t[0x%lx] %s\n",prefix, BIT(dword, 21),
> > +		OPNAME(cts_m_value_index, BIT(dword, 21)));
> >  }
> >  
> >  static void dump_aud_power_state(void)
> 
> It is OK for me.
> Reviewed-by: Haihao Xiang <haihao.xiang@intel.com>

Pushed. Thanks.

-- 
Ben Widawsky, Intel Open Source Technology Center

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

end of thread, other threads:[~2014-03-15  9:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-13 20:38 [PATCH] intel_audio_dump: fix CTS/M value index mengdong.lin
2014-03-14  1:44 ` Xiang, Haihao
2014-03-15  6:07   ` Ben Widawsky

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