[v2,RESEND] drm/i915: prefer INTEL_GEN() over INTEL_INFO()->gen

Submitted by Jani Nikula on April 26, 2018, 11:35 a.m.

Details

Message ID 20180426113521.28417-1-jani.nikula@intel.com
State New
Headers show
Series "drm/i915: prefer INTEL_GEN() over INTEL_INFO()->gen" ( rev: 1 ) in Intel GFX

Not browsing as part of any series.

Commit Message

Jani Nikula April 26, 2018, 11:35 a.m.
Prefer INTEL_GEN() over INTEL_INFO()->gen except in special
circumstances.

v2: don't change device info dump (Chris)

Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/intel_device_info.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c
index a32ba72c514e..0fd13df424cf 100644
--- a/drivers/gpu/drm/i915/intel_device_info.c
+++ b/drivers/gpu/drm/i915/intel_device_info.c
@@ -848,7 +848,7 @@  void intel_device_info_runtime_init(struct intel_device_info *info)
 		gen9_sseu_info_init(dev_priv);
 	else if (INTEL_GEN(dev_priv) == 10)
 		gen10_sseu_info_init(dev_priv);
-	else if (INTEL_INFO(dev_priv)->gen >= 11)
+	else if (INTEL_GEN(dev_priv) >= 11)
 		gen11_sseu_info_init(dev_priv);
 
 	/* Initialize command stream timestamp frequency */

Comments

On 26/04/2018 12:35, Jani Nikula wrote:
> Prefer INTEL_GEN() over INTEL_INFO()->gen except in special
> circumstances.
> 
> v2: don't change device info dump (Chris)
> 
> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>   drivers/gpu/drm/i915/intel_device_info.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c
> index a32ba72c514e..0fd13df424cf 100644
> --- a/drivers/gpu/drm/i915/intel_device_info.c
> +++ b/drivers/gpu/drm/i915/intel_device_info.c
> @@ -848,7 +848,7 @@ void intel_device_info_runtime_init(struct intel_device_info *info)
>   		gen9_sseu_info_init(dev_priv);
>   	else if (INTEL_GEN(dev_priv) == 10)
>   		gen10_sseu_info_init(dev_priv);
> -	else if (INTEL_INFO(dev_priv)->gen >= 11)
> +	else if (INTEL_GEN(dev_priv) >= 11)
>   		gen11_sseu_info_init(dev_priv);
>   
>   	/* Initialize command stream timestamp frequency */
> 

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

Tvrtko
On Thu, 26 Apr 2018, Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> wrote:
> On 26/04/2018 12:35, Jani Nikula wrote:
>> Prefer INTEL_GEN() over INTEL_INFO()->gen except in special
>> circumstances.
>> 
>> v2: don't change device info dump (Chris)
>> 
>> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
>> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>> ---
>>   drivers/gpu/drm/i915/intel_device_info.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c
>> index a32ba72c514e..0fd13df424cf 100644
>> --- a/drivers/gpu/drm/i915/intel_device_info.c
>> +++ b/drivers/gpu/drm/i915/intel_device_info.c
>> @@ -848,7 +848,7 @@ void intel_device_info_runtime_init(struct intel_device_info *info)
>>   		gen9_sseu_info_init(dev_priv);
>>   	else if (INTEL_GEN(dev_priv) == 10)
>>   		gen10_sseu_info_init(dev_priv);
>> -	else if (INTEL_INFO(dev_priv)->gen >= 11)
>> +	else if (INTEL_GEN(dev_priv) >= 11)
>>   		gen11_sseu_info_init(dev_priv);
>>   
>>   	/* Initialize command stream timestamp frequency */
>> 
>
> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Thanks, pushed to dinq.

I'm having second thoughts on the ->gen to ->__gen change. There were
after all some legit users of it.

BR,
Jani.

>
> Regards,
>
> Tvrtko
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx