Re: [Intel-gfx] [PATCH] i915/perf: Disable OA sseu config param for non-gen11 platforms

2022-07-07 Thread Umesh Nerlige Ramappa

On Thu, Jul 07, 2022 at 11:49:30AM -0700, Matt Roper wrote:

On Thu, Jul 07, 2022 at 11:27:38AM -0700, 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. Return ENODEV for non-gen11
platforms.

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


The commit message doesn't really match reality anymore with v2; you
might want to update the commit message a bit.

Also, minor nitpick:  although we write IP version numbers as
"arc.release" in shorthand, we shouldn't make the mistake of treating
those as fractional numbers since ".5" != ".50" the way they get handled
in the driver.  So this should say "12.50+" rather than "12.5+."


will do. I think I posted an updated patch before seeing your comments, 
so ignore that one.






Signed-off-by: Umesh Nerlige Ramappa 
---
 drivers/gpu/drm/i915/i915_perf.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c
index 1577ab6754db..0ba98f73f217 100644
--- a/drivers/gpu/drm/i915/i915_perf.c
+++ b/drivers/gpu/drm/i915/i915_perf.c
@@ -3706,6 +3706,12 @@ 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_DEBUG("SSEU config not supported on gfx 
%x\n",
+ GRAPHICS_VER_FULL(perf->i915));


This should probably be using the device-specific drm_dbg() call.

Actually the perf code in general needs some updates to eliminate
DRM_DEBUG throughout...not only do we want to avoid using the old
non-device-aware interface in newer code, that's also the wrong old
interface to call (DRM_DEBUG categorizes messages as DRM_UT_CORE,
whereas DRM_DEBUG_DRIVER is the one that treats them as driver messages
with DRM_UT_DRIVER).


will replace with drm_dbg()

Thanks,
Umesh





Matt


+   return -ENODEV;
+   }
+
if (copy_from_user(_sseu,
   u64_to_user_ptr(value),
   sizeof(user_sseu))) {
--
2.35.3



--
Matt Roper
Graphics Software Engineer
VTT-OSGC Platform Enablement
Intel Corporation


Re: [Intel-gfx] [PATCH] i915/perf: Disable OA sseu config param for non-gen11 platforms

2022-07-07 Thread Matt Roper
On Thu, Jul 07, 2022 at 11:27:38AM -0700, 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. Return ENODEV for non-gen11
> platforms.
> 
> v2: gfx12 is already shipped with this, disable for gfx12.5+ (Lionel)

The commit message doesn't really match reality anymore with v2; you
might want to update the commit message a bit.

Also, minor nitpick:  although we write IP version numbers as
"arc.release" in shorthand, we shouldn't make the mistake of treating
those as fractional numbers since ".5" != ".50" the way they get handled
in the driver.  So this should say "12.50+" rather than "12.5+."

> 
> Signed-off-by: Umesh Nerlige Ramappa 
> ---
>  drivers/gpu/drm/i915/i915_perf.c | 6 ++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_perf.c 
> b/drivers/gpu/drm/i915/i915_perf.c
> index 1577ab6754db..0ba98f73f217 100644
> --- a/drivers/gpu/drm/i915/i915_perf.c
> +++ b/drivers/gpu/drm/i915/i915_perf.c
> @@ -3706,6 +3706,12 @@ 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_DEBUG("SSEU config not supported on gfx 
> %x\n",
> +   GRAPHICS_VER_FULL(perf->i915));

This should probably be using the device-specific drm_dbg() call.

Actually the perf code in general needs some updates to eliminate
DRM_DEBUG throughout...not only do we want to avoid using the old
non-device-aware interface in newer code, that's also the wrong old
interface to call (DRM_DEBUG categorizes messages as DRM_UT_CORE,
whereas DRM_DEBUG_DRIVER is the one that treats them as driver messages
with DRM_UT_DRIVER).


Matt

> + return -ENODEV;
> + }
> +
>   if (copy_from_user(_sseu,
>  u64_to_user_ptr(value),
>  sizeof(user_sseu))) {
> -- 
> 2.35.3
> 

-- 
Matt Roper
Graphics Software Engineer
VTT-OSGC Platform Enablement
Intel Corporation


Re: [Intel-gfx] [PATCH] i915/perf: Disable OA sseu config param for non-gen11 platforms

2022-07-07 Thread Umesh Nerlige Ramappa

On Thu, Jul 07, 2022 at 11:27:38AM -0700, 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. Return ENODEV for non-gen11
platforms.

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


Pleas ignore, will post an update to this one with commit message 
changes.


Umesh


Signed-off-by: Umesh Nerlige Ramappa 
---
drivers/gpu/drm/i915/i915_perf.c | 6 ++
1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c
index 1577ab6754db..0ba98f73f217 100644
--- a/drivers/gpu/drm/i915/i915_perf.c
+++ b/drivers/gpu/drm/i915/i915_perf.c
@@ -3706,6 +3706,12 @@ 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_DEBUG("SSEU config not supported on gfx 
%x\n",
+ GRAPHICS_VER_FULL(perf->i915));
+   return -ENODEV;
+   }
+
if (copy_from_user(_sseu,
   u64_to_user_ptr(value),
   sizeof(user_sseu))) {
--
2.35.3



[Intel-gfx] [PATCH] i915/perf: Disable OA sseu config param for non-gen11 platforms

2022-07-07 Thread Nerlige Ramappa, Umesh
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. Return ENODEV for non-gen11
platforms.

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

Signed-off-by: Umesh Nerlige Ramappa 
---
 drivers/gpu/drm/i915/i915_perf.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c
index 1577ab6754db..0ba98f73f217 100644
--- a/drivers/gpu/drm/i915/i915_perf.c
+++ b/drivers/gpu/drm/i915/i915_perf.c
@@ -3706,6 +3706,12 @@ 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_DEBUG("SSEU config not supported on gfx 
%x\n",
+ GRAPHICS_VER_FULL(perf->i915));
+   return -ENODEV;
+   }
+
if (copy_from_user(_sseu,
   u64_to_user_ptr(value),
   sizeof(user_sseu))) {
-- 
2.35.3



Re: [Intel-gfx] [PATCH] i915/perf: Disable OA sseu config param for non-gen11 platforms

2022-07-07 Thread Lionel Landwerlin

On 07/07/2022 00:52, 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. Return ENODEV for non-gen11
platforms.

Signed-off-by: Umesh Nerlige Ramappa 



The problem is that we have gfx12 platforms shipped using this.

So I guess have to disable it on gfx12.5+ where it was never accepted.


-Lionel



---
  drivers/gpu/drm/i915/i915_perf.c | 6 ++
  1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c
index 1577ab6754db..512c163fdbeb 100644
--- a/drivers/gpu/drm/i915/i915_perf.c
+++ b/drivers/gpu/drm/i915/i915_perf.c
@@ -3706,6 +3706,12 @@ 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(perf->i915) != 11) {

+   DRM_DEBUG("Global SSEU config not supported on 
gen%d\n",
+ GRAPHICS_VER(perf->i915));
+   return -ENODEV;
+   }
+
if (copy_from_user(_sseu,
   u64_to_user_ptr(value),
   sizeof(user_sseu))) {





[Intel-gfx] [PATCH] i915/perf: Disable OA sseu config param for non-gen11 platforms

2022-07-06 Thread Nerlige Ramappa, Umesh
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. Return ENODEV for non-gen11
platforms.

Signed-off-by: Umesh Nerlige Ramappa 
---
 drivers/gpu/drm/i915/i915_perf.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c
index 1577ab6754db..512c163fdbeb 100644
--- a/drivers/gpu/drm/i915/i915_perf.c
+++ b/drivers/gpu/drm/i915/i915_perf.c
@@ -3706,6 +3706,12 @@ 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(perf->i915) != 11) {
+   DRM_DEBUG("Global SSEU config not supported on 
gen%d\n",
+ GRAPHICS_VER(perf->i915));
+   return -ENODEV;
+   }
+
if (copy_from_user(_sseu,
   u64_to_user_ptr(value),
   sizeof(user_sseu))) {
-- 
2.35.3