diff mbox

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

Message ID 20180321142958.31107-1-jani.nikula@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jani Nikula March 21, 2018, 2:29 p.m. UTC
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(-)

Comments

Jani Nikula March 21, 2018, 3:12 p.m. UTC | #1
On Wed, 21 Mar 2018, Patchwork <patchwork@emeril.freedesktop.org> wrote:
> == Series Details ==
>
> Series: series starting with [v2,1/2] drm/i915: prefer INTEL_GEN() over INTEL_INFO()->gen
> URL   : https://patchwork.freedesktop.org/series/40380/
> State : failure
>
> == Summary ==
>
> CHK     include/config/kernel.release
>   CHK     include/generated/uapi/linux/version.h
>   CHK     include/generated/utsrelease.h
>   CHK     include/generated/bounds.h
>   CHK     include/generated/timeconst.h
>   CHK     include/generated/asm-offsets.h
>   CALL    scripts/checksyscalls.sh
>   DESCEND  objtool
>   CHK     scripts/mod/devicetable-offsets.h
>   CHK     include/generated/compile.h
>   CHK     kernel/config_data.h
>   CC [M]  drivers/gpu/drm/i915/i915_gem.o
> In file included from drivers/gpu/drm/i915/i915_gem.c:6001:0:
> drivers/gpu/drm/i915/selftests/mock_gem_device.c: In function ‘mock_gem_device’:
> drivers/gpu/drm/i915/selftests/mock_gem_device.c:177:27: error: ‘struct intel_device_info’ has no member named ‘gen’; did you mean ‘__gen’?
>   mkwrite_device_info(i915)->gen = -1;

Looks like someone(tm) has CONFIG_DRM_I915_SELFTEST=n in their dev
repo. *blush*.


>                            ^~
> scripts/Makefile.build:324: recipe for target 'drivers/gpu/drm/i915/i915_gem.o' failed
> make[4]: *** [drivers/gpu/drm/i915/i915_gem.o] Error 1
> scripts/Makefile.build:583: recipe for target 'drivers/gpu/drm/i915' failed
> make[3]: *** [drivers/gpu/drm/i915] Error 2
> scripts/Makefile.build:583: recipe for target 'drivers/gpu/drm' failed
> make[2]: *** [drivers/gpu/drm] Error 2
> scripts/Makefile.build:583: recipe for target 'drivers/gpu' failed
> make[1]: *** [drivers/gpu] Error 2
> Makefile:1051: recipe for target 'drivers' failed
> make: *** [drivers] Error 2
>
Tvrtko Ursulin March 22, 2018, 9:25 a.m. UTC | #2
On 21/03/2018 14:29, 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 a504281e2afa..477cb71b5864 100644
> --- a/drivers/gpu/drm/i915/intel_device_info.c
> +++ b/drivers/gpu/drm/i915/intel_device_info.c
> @@ -809,7 +809,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 */
> 

I was waiting for directly involved parties to feel moral responsibility 
to send this followup. ;)

Regards,

Tvrtko
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c
index a504281e2afa..477cb71b5864 100644
--- a/drivers/gpu/drm/i915/intel_device_info.c
+++ b/drivers/gpu/drm/i915/intel_device_info.c
@@ -809,7 +809,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 */