diff mbox series

[2/2] i915/perf: Disable OA sseu config param for gfx12.50+

Message ID 20220707193002.2859653-2-umesh.nerlige.ramappa@intel.com (mailing list archive)
State New, archived
Headers show
Series [1/2] i915/perf: Replace DRM_DEBUG with driver specific drm_dbg call | expand

Commit Message

Umesh Nerlige Ramappa July 7, 2022, 7:30 p.m. UTC
The global sseu config is applicable only to gen11 platforms where
concurrent media, render and OA use cases may cause some subslices to be
turned off and hence lose NOA configuration. Ideally we want to return
ENODEV for non-gen11 platforms, however, this has shipped with gfx12, so
disable only for gfx12.50+.

v2: gfx12 is already shipped with this, disable for gfx12.50+ (Lionel)

v3: (Matt)
- Update commit message and replace "12.5" with "12.50"
- Replace DRM_DEBUG() with driver specific drm_dbg()

Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
---
 drivers/gpu/drm/i915/i915_perf.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Lionel Landwerlin July 8, 2022, 6:35 a.m. UTC | #1
On 07/07/2022 22:30, Nerlige Ramappa, Umesh wrote:
> The global sseu config is applicable only to gen11 platforms where
> concurrent media, render and OA use cases may cause some subslices to be
> turned off and hence lose NOA configuration. Ideally we want to return
> ENODEV for non-gen11 platforms, however, this has shipped with gfx12, so
> disable only for gfx12.50+.
>
> v2: gfx12 is already shipped with this, disable for gfx12.50+ (Lionel)
>
> v3: (Matt)
> - Update commit message and replace "12.5" with "12.50"
> - Replace DRM_DEBUG() with driver specific drm_dbg()
>
> Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
> ---
>   drivers/gpu/drm/i915/i915_perf.c | 7 +++++++
>   1 file changed, 7 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c
> index b3beb89884e0..f3c23fe9ad9c 100644
> --- a/drivers/gpu/drm/i915/i915_perf.c
> +++ b/drivers/gpu/drm/i915/i915_perf.c
> @@ -3731,6 +3731,13 @@ static int read_properties_unlocked(struct i915_perf *perf,
>   		case DRM_I915_PERF_PROP_GLOBAL_SSEU: {
>   			struct drm_i915_gem_context_param_sseu user_sseu;
>   
> +			if (GRAPHICS_VER_FULL(perf->i915) >= IP_VER(12, 50)) {
> +				drm_dbg(&perf->i915->drm,
> +					"SSEU config not supported on gfx %x\n",
> +					GRAPHICS_VER_FULL(perf->i915));
> +				return -ENODEV;
> +			}
> +
>   			if (copy_from_user(&user_sseu,
>   					   u64_to_user_ptr(value),
>   					   sizeof(user_sseu))) {
Andrzej Hajda July 8, 2022, 8:45 a.m. UTC | #2
On 07.07.2022 21:30, Nerlige Ramappa, Umesh wrote:
> The global sseu config is applicable only to gen11 platforms where
> concurrent media, render and OA use cases may cause some subslices to be
> turned off and hence lose NOA configuration. Ideally we want to return
> ENODEV for non-gen11 platforms, however, this has shipped with gfx12, so
> disable only for gfx12.50+.
> 
> v2: gfx12 is already shipped with this, disable for gfx12.50+ (Lionel)
> 
> v3: (Matt)
> - Update commit message and replace "12.5" with "12.50"
> - Replace DRM_DEBUG() with driver specific drm_dbg()
> 
> Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>

Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>

Regards
Andrzej

> ---
>   drivers/gpu/drm/i915/i915_perf.c | 7 +++++++
>   1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c
> index b3beb89884e0..f3c23fe9ad9c 100644
> --- a/drivers/gpu/drm/i915/i915_perf.c
> +++ b/drivers/gpu/drm/i915/i915_perf.c
> @@ -3731,6 +3731,13 @@ static int read_properties_unlocked(struct i915_perf *perf,
>   		case DRM_I915_PERF_PROP_GLOBAL_SSEU: {
>   			struct drm_i915_gem_context_param_sseu user_sseu;
>   
> +			if (GRAPHICS_VER_FULL(perf->i915) >= IP_VER(12, 50)) {
> +				drm_dbg(&perf->i915->drm,
> +					"SSEU config not supported on gfx %x\n",
> +					GRAPHICS_VER_FULL(perf->i915));
> +				return -ENODEV;
> +			}
> +
>   			if (copy_from_user(&user_sseu,
>   					   u64_to_user_ptr(value),
>   					   sizeof(user_sseu))) {
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c
index b3beb89884e0..f3c23fe9ad9c 100644
--- a/drivers/gpu/drm/i915/i915_perf.c
+++ b/drivers/gpu/drm/i915/i915_perf.c
@@ -3731,6 +3731,13 @@  static int read_properties_unlocked(struct i915_perf *perf,
 		case DRM_I915_PERF_PROP_GLOBAL_SSEU: {
 			struct drm_i915_gem_context_param_sseu user_sseu;
 
+			if (GRAPHICS_VER_FULL(perf->i915) >= IP_VER(12, 50)) {
+				drm_dbg(&perf->i915->drm,
+					"SSEU config not supported on gfx %x\n",
+					GRAPHICS_VER_FULL(perf->i915));
+				return -ENODEV;
+			}
+
 			if (copy_from_user(&user_sseu,
 					   u64_to_user_ptr(value),
 					   sizeof(user_sseu))) {