public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* Re: [Patch V2] intel: Export pooled EU and min no. of eus in a pool.
       [not found] <1468566499-31522-1-git-send-email-rong.r.yang@intel.com>
@ 2016-07-15 10:37 ` Arun Siluvery
  2016-07-15 10:47   ` [Beignet] " Chris Wilson
  0 siblings, 1 reply; 2+ messages in thread
From: Arun Siluvery @ 2016-07-15 10:37 UTC (permalink / raw)
  To: Yang Rong, beignet, dri-devel
  Cc: intel-gfx@lists.freedesktop.org, Chris Wilson

On 15/07/2016 08:08, Yang Rong wrote:
> Update kernel interface with new I915_GETPARAM ioctl entries for
> pooled EU and min no. of eus in a pool. Add a wrapping function
> for each parameter. Userspace drivers need these values when decide
> the thread count. This kernel enabled pooled eu by default for BXT
> and for fused down 2x6 parts it is advised to turn it off.
>
> But there is another HW issue in these parts (fused
> down 2x6 parts) before C0 that requires Pooled EU to be enabled as a
> workaround. In this case the pool configuration changes depending upon
> which subslice is disabled and the no. of eus in a pool is different,
> So userspace need to know min no. of eus in a pool.
>
> V2: use return value as the query results.
>      ret < 0 when error, ret = 0 when not support, and ret > 0 indicate
>      query results.(Chris)
>
> Signed-off-by: Yang Rong <rong.r.yang@intel.com>
> ---

[+ chris, intel-gfx]


regards
Arun

>   include/drm/i915_drm.h   |  2 ++
>   intel/intel_bufmgr.h     |  3 +++
>   intel/intel_bufmgr_gem.c | 32 ++++++++++++++++++++++++++++++++
>   3 files changed, 37 insertions(+)
>
> diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h
> index c4ce6b2..eb611a7 100644
> --- a/include/drm/i915_drm.h
> +++ b/include/drm/i915_drm.h
> @@ -357,6 +357,8 @@ typedef struct drm_i915_irq_wait {
>   #define I915_PARAM_HAS_GPU_RESET	 35
>   #define I915_PARAM_HAS_RESOURCE_STREAMER 36
>   #define I915_PARAM_HAS_EXEC_SOFTPIN	 37
> +#define I915_PARAM_HAS_POOLED_EU         38
> +#define I915_PARAM_MIN_EU_IN_POOL        39
>
>   typedef struct drm_i915_getparam {
>   	__s32 param;
> diff --git a/intel/intel_bufmgr.h b/intel/intel_bufmgr.h
> index a1abbcd..96a4d9d 100644
> --- a/intel/intel_bufmgr.h
> +++ b/intel/intel_bufmgr.h
> @@ -273,6 +273,9 @@ int drm_intel_get_reset_stats(drm_intel_context *ctx,
>   int drm_intel_get_subslice_total(int fd, unsigned int *subslice_total);
>   int drm_intel_get_eu_total(int fd, unsigned int *eu_total);
>
> +int drm_intel_get_pooled_eu(int fd);
> +int drm_intel_get_min_eu_in_pool(int fd);
> +
>   /** @{ Compatibility defines to keep old code building despite the symbol rename
>    * from dri_* to drm_intel_*
>    */
> diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
> index 0a4012b..4d9899d 100644
> --- a/intel/intel_bufmgr_gem.c
> +++ b/intel/intel_bufmgr_gem.c
> @@ -3237,6 +3237,38 @@ drm_intel_get_eu_total(int fd, unsigned int *eu_total)
>   	return 0;
>   }
>
> +int
> +drm_intel_get_pooled_eu(int fd)
> +{
> +	drm_i915_getparam_t gp;
> +	int ret;
> +
> +	memclear(gp);
> +	gp.param = I915_PARAM_HAS_POOLED_EU;
> +	gp.value = &ret;
> +	ret = drmIoctl(fd, DRM_IOCTL_I915_GETPARAM, &gp);
> +	if (ret)
> +		return -errno;
> +
> +	return ret;
> +}
> +
> +int
> +drm_intel_get_min_eu_in_pool(int fd)
> +{
> +	drm_i915_getparam_t gp;
> +	int ret;
> +
> +	memclear(gp);
> +	gp.param = I915_PARAM_MIN_EU_IN_POOL;
> +	gp.value = &ret;
> +	ret = drmIoctl(fd, DRM_IOCTL_I915_GETPARAM, &gp);
> +	if (ret)
> +		return -errno;
> +
> +	return ret;
> +}
> +
>   /**
>    * Annotate the given bo for use in aub dumping.
>    *
>

_______________________________________________
Beignet mailing list
Beignet@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/beignet

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Beignet] [Patch V2] intel: Export pooled EU and min no. of eus in a pool.
  2016-07-15 10:37 ` [Patch V2] intel: Export pooled EU and min no. of eus in a pool Arun Siluvery
@ 2016-07-15 10:47   ` Chris Wilson
  0 siblings, 0 replies; 2+ messages in thread
From: Chris Wilson @ 2016-07-15 10:47 UTC (permalink / raw)
  To: Arun Siluvery; +Cc: dri-devel, intel-gfx@lists.freedesktop.org, beignet

On Fri, Jul 15, 2016 at 11:37:41AM +0100, Arun Siluvery wrote:
> On 15/07/2016 08:08, Yang Rong wrote:
> >Update kernel interface with new I915_GETPARAM ioctl entries for
> >pooled EU and min no. of eus in a pool. Add a wrapping function
> >for each parameter. Userspace drivers need these values when decide
> >the thread count. This kernel enabled pooled eu by default for BXT
> >and for fused down 2x6 parts it is advised to turn it off.
> >
> >But there is another HW issue in these parts (fused
> >down 2x6 parts) before C0 that requires Pooled EU to be enabled as a
> >workaround. In this case the pool configuration changes depending upon
> >which subslice is disabled and the no. of eus in a pool is different,
> >So userspace need to know min no. of eus in a pool.
> >
> >V2: use return value as the query results.
> >     ret < 0 when error, ret = 0 when not support, and ret > 0 indicate
> >     query results.(Chris)
> >
> >Signed-off-by: Yang Rong <rong.r.yang@intel.com>
> >---
> 
> [+ chris, intel-gfx]
> 
> 
> regards
> Arun
> 
> >  include/drm/i915_drm.h   |  2 ++
> >  intel/intel_bufmgr.h     |  3 +++
> >  intel/intel_bufmgr_gem.c | 32 ++++++++++++++++++++++++++++++++
> >  3 files changed, 37 insertions(+)
> >
> >diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h
> >index c4ce6b2..eb611a7 100644
> >--- a/include/drm/i915_drm.h
> >+++ b/include/drm/i915_drm.h
> >@@ -357,6 +357,8 @@ typedef struct drm_i915_irq_wait {
> >  #define I915_PARAM_HAS_GPU_RESET	 35
> >  #define I915_PARAM_HAS_RESOURCE_STREAMER 36
> >  #define I915_PARAM_HAS_EXEC_SOFTPIN	 37
> >+#define I915_PARAM_HAS_POOLED_EU         38
> >+#define I915_PARAM_MIN_EU_IN_POOL        39
> >
> >  typedef struct drm_i915_getparam {
> >  	__s32 param;
> >diff --git a/intel/intel_bufmgr.h b/intel/intel_bufmgr.h
> >index a1abbcd..96a4d9d 100644
> >--- a/intel/intel_bufmgr.h
> >+++ b/intel/intel_bufmgr.h
> >@@ -273,6 +273,9 @@ int drm_intel_get_reset_stats(drm_intel_context *ctx,
> >  int drm_intel_get_subslice_total(int fd, unsigned int *subslice_total);
> >  int drm_intel_get_eu_total(int fd, unsigned int *eu_total);
> >
> >+int drm_intel_get_pooled_eu(int fd);
> >+int drm_intel_get_min_eu_in_pool(int fd);
> >+
> >  /** @{ Compatibility defines to keep old code building despite the symbol rename
> >   * from dri_* to drm_intel_*
> >   */
> >diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
> >index 0a4012b..4d9899d 100644
> >--- a/intel/intel_bufmgr_gem.c
> >+++ b/intel/intel_bufmgr_gem.c
> >@@ -3237,6 +3237,38 @@ drm_intel_get_eu_total(int fd, unsigned int *eu_total)
> >  	return 0;
> >  }
> >
> >+int
> >+drm_intel_get_pooled_eu(int fd)
> >+{
> >+	drm_i915_getparam_t gp;
> >+	int ret;
> >+
> >+	memclear(gp);
> >+	gp.param = I915_PARAM_HAS_POOLED_EU;
> >+	gp.value = &ret;
> >+	ret = drmIoctl(fd, DRM_IOCTL_I915_GETPARAM, &gp);
> >+	if (ret)
> >+		return -errno;

Do I need to point out how the above is broken?

if (drmIoctl(fd, DRM_IOCTL_I915_GETPARAM, &gp))
	return -errno;
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-07-15 10:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1468566499-31522-1-git-send-email-rong.r.yang@intel.com>
2016-07-15 10:37 ` [Patch V2] intel: Export pooled EU and min no. of eus in a pool Arun Siluvery
2016-07-15 10:47   ` [Beignet] " Chris Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox