diff mbox

[IGT,2/6] intel_reg_dumper: recognize LPT

Message ID 1362170662-651-2-git-send-email-przanoni@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Paulo Zanoni March 1, 2013, 8:44 p.m. UTC
From: Paulo Zanoni <paulo.r.zanoni@intel.com>

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
---
 tools/intel_reg_dumper.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Lespiau, Damien March 5, 2013, 11:50 a.m. UTC | #1
On Fri, Mar 01, 2013 at 05:44:18PM -0300, Paulo Zanoni wrote:
> From: Paulo Zanoni <paulo.r.zanoni@intel.com>
> 
> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
> ---
>  tools/intel_reg_dumper.c |    6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/intel_reg_dumper.c b/tools/intel_reg_dumper.c
> index 20f332f..b66a1ea 100644
> --- a/tools/intel_reg_dumper.c
> +++ b/tools/intel_reg_dumper.c
> @@ -2326,8 +2326,12 @@ int main(int argc, char** argv)
>  		if (devid) {
>  			if (IS_GEN5(devid))
>  				pch = PCH_IBX;
> -			else
> +			else if (IS_GEN6(devid) || IS_IVYBRIDGE(devid))
>  				pch = PCH_CPT;
> +			else if (IS_HASWELL(devid))
> +				pch = PCH_LPT;
> +			else
> +				pch = PCH_NONE;

In patch 6/6 you're fixing the PCH detection code in lib/ maybe it'd be
a good idea to use it to detect the PCH of having heuristics on device 2
-> PCH mappings?
Paulo Zanoni March 5, 2013, 4:05 p.m. UTC | #2
Hi

2013/3/5 Damien Lespiau <damien.lespiau@intel.com>:
> On Fri, Mar 01, 2013 at 05:44:18PM -0300, Paulo Zanoni wrote:
>> From: Paulo Zanoni <paulo.r.zanoni@intel.com>
>>
>> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
>> ---
>>  tools/intel_reg_dumper.c |    6 +++++-
>>  1 file changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/tools/intel_reg_dumper.c b/tools/intel_reg_dumper.c
>> index 20f332f..b66a1ea 100644
>> --- a/tools/intel_reg_dumper.c
>> +++ b/tools/intel_reg_dumper.c
>> @@ -2326,8 +2326,12 @@ int main(int argc, char** argv)
>>               if (devid) {
>>                       if (IS_GEN5(devid))
>>                               pch = PCH_IBX;
>> -                     else
>> +                     else if (IS_GEN6(devid) || IS_IVYBRIDGE(devid))
>>                               pch = PCH_CPT;
>> +                     else if (IS_HASWELL(devid))
>> +                             pch = PCH_LPT;
>> +                     else
>> +                             pch = PCH_NONE;
>
> In patch 6/6 you're fixing the PCH detection code in lib/ maybe it'd be
> a good idea to use it to detect the PCH of having heuristics on device 2
> -> PCH mappings?

Do you mean 1/6? We can't use intel_check_pch() here because we're
using the "file" and "devid" options: we're dumping registers from a
file, not from real hardware. So sometimes you create the file on one
machine (e.g., IVB) and dump on another (e.g. ILK).

>
> --
> Damien
Lespiau, Damien March 5, 2013, 4:39 p.m. UTC | #3
On Tue, Mar 05, 2013 at 01:05:32PM -0300, Paulo Zanoni wrote:
> Hi
> 
> 2013/3/5 Damien Lespiau <damien.lespiau@intel.com>:
> > On Fri, Mar 01, 2013 at 05:44:18PM -0300, Paulo Zanoni wrote:
> >> From: Paulo Zanoni <paulo.r.zanoni@intel.com>
> >>
> >> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
> >> ---
> >>  tools/intel_reg_dumper.c |    6 +++++-
> >>  1 file changed, 5 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/tools/intel_reg_dumper.c b/tools/intel_reg_dumper.c
> >> index 20f332f..b66a1ea 100644
> >> --- a/tools/intel_reg_dumper.c
> >> +++ b/tools/intel_reg_dumper.c
> >> @@ -2326,8 +2326,12 @@ int main(int argc, char** argv)
> >>               if (devid) {
> >>                       if (IS_GEN5(devid))
> >>                               pch = PCH_IBX;
> >> -                     else
> >> +                     else if (IS_GEN6(devid) || IS_IVYBRIDGE(devid))
> >>                               pch = PCH_CPT;
> >> +                     else if (IS_HASWELL(devid))
> >> +                             pch = PCH_LPT;
> >> +                     else
> >> +                             pch = PCH_NONE;
> >
> > In patch 6/6 you're fixing the PCH detection code in lib/ maybe it'd be
> > a good idea to use it to detect the PCH of having heuristics on device 2
> > -> PCH mappings?
> 
> Do you mean 1/6? We can't use intel_check_pch() here because we're
> using the "file" and "devid" options: we're dumping registers from a
> file, not from real hardware. So sometimes you create the file on one
> machine (e.g., IVB) and dump on another (e.g. ILK).

Ah, of course, not enough context for that to be obvious :) For that I
guess I get to review the rest of the patches.
diff mbox

Patch

diff --git a/tools/intel_reg_dumper.c b/tools/intel_reg_dumper.c
index 20f332f..b66a1ea 100644
--- a/tools/intel_reg_dumper.c
+++ b/tools/intel_reg_dumper.c
@@ -2326,8 +2326,12 @@  int main(int argc, char** argv)
 		if (devid) {
 			if (IS_GEN5(devid))
 				pch = PCH_IBX;
-			else
+			else if (IS_GEN6(devid) || IS_IVYBRIDGE(devid))
 				pch = PCH_CPT;
+			else if (IS_HASWELL(devid))
+				pch = PCH_LPT;
+			else
+				pch = PCH_NONE;
 		} else {
 			printf("Dumping from file without -d argument. "
 			       "Assuming Ironlake machine.\n");