intel: Export pooled EU and min no. of eus in a pool.
PATCH 1/1 intel: Export pooled EU and min no. of eus in a pool.
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.
--- include/drm/i915_drm.h | 2 ++ intel/intel_bufmgr.h | 3 +++ intel/intel_bufmgr_gem.c | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+)
include/drm/i915_drm.h +2 -0
@@ -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;
intel/intel_bufmgr.h +3 -0
@@ -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,unsigned int *has_pooled_eu); +int drm_intel_get_min_eu_in_pool (int fd,unsigned int *min_eu); +/** @{ Compatibility defines to keep old code building despite the symbol rename * from dri_* to drm_intel_* */
intel/intel_bufmgr_gem.c +32 -0
@@ -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,unsigned int *has_pooled_eu) +{ +drm_i915_getparam_t gp; +int ret; + +memclear (gp); + gp.value = (int *)has_pooled_eu; + gp.param =I915_PARAM_HAS_POOLED_EU ; + ret =drmIoctl (fd,DRM_IOCTL_I915_GETPARAM , &gp); +if (ret) +return -errno; + +return 0 ; +} + +int +drm_intel_get_min_eu_in_pool (int fd,unsigned int *min_eu) +{ +drm_i915_getparam_t gp; +int ret; + +memclear (gp); + gp.value = (int *)min_eu; + gp.param =I915_PARAM_MIN_EU_IN_POOL ; + ret =drmIoctl (fd,DRM_IOCTL_I915_GETPARAM , &gp); +if (ret) +return -errno; + +return 0 ; +} +/** * Annotate the given bo for use in aub dumping. *
Signature · 6 lines
2.1.4 _______________________________________________ Beignet mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/beignet
Quoted 6 lines · Yang Rong
Update kernel interface with new
I915_GETPARAMioctl 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.
Quoted 8 lines
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.Signed-off-by Yang Rong <[email protected]>---
Could you check this and give comments/ACK to merge this to libdrm? Kernel changes are merged in drm-intel.
regards
Arun
Quoted 66 lines
include/drm/i915_drm.h | 2 ++ intel/intel_bufmgr.h | 3 +++ intel/intel_bufmgr_gem.c | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+)include/drm/i915_drm.h +2
-0@@ -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;intel/intel_bufmgr.h +3
-0@@ -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,unsigned int *has_pooled_eu); +int drm_intel_get_min_eu_in_pool (int fd,unsigned int *min_eu); +/** @{ Compatibility defines to keep old code building despite the symbol rename * from dri_* to drm_intel_* */ intel/intel_bufmgr_gem.c +25
-0@@ -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,unsigned int *has_pooled_eu) +{ +drm_i915_getparam_t gp; +int ret; + +memclear (gp); + gp.value = (int *)has_pooled_eu; + gp.param =I915_PARAM_HAS_POOLED_EU ; + ret =drmIoctl (fd,DRM_IOCTL_I915_GETPARAM , &gp); +if (ret) +return -errno; + +return 0 ; +} + +int +drm_intel_get_min_eu_in_pool (int fd,unsigned int *min_eu) +{ +drm_i915_getparam_t gp; +int ret; + +memclear (gp); + gp.value = (int *)min_eu; + gp.param =I915_PARAM_MIN_EU_IN_POOL ;
intel/intel_bufmgr_gem.c drm_intel_get_eu_total(int fd, unsigned int *eu_total) · line 3274
Quoted 10 lines
intel/intel_bufmgr_gem.c +7
-0+ ret =drmIoctl (fd,DRM_IOCTL_I915_GETPARAM , &gp); +if (ret) +return -errno; + +return 0 ; +} +/** * Annotate the given bo for use in aub dumping. *
_______________________________________________
Beignet mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/beignet
Quoted 48 lines · Arun Siluvery
Quoted 6 lines · Yang Rong
Update kernel interface with new
I915_GETPARAMioctl 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.Quoted 8 lines
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.Signed-off-by Yang Rong <[email protected]>---
Could you check this and give comments/ACK to merge this to libdrm? Kernel changes are merged in drm-intel.
regards
ArunQuoted 26 lines
include/drm/i915_drm.h | 2 ++ intel/intel_bufmgr.h | 3 +++ intel/intel_bufmgr_gem.c | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+)include/drm/i915_drm.h +2
-0@@ -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;intel/intel_bufmgr.h +0
-0@@ -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);
Quoted 2 lines
intel/intel_bufmgr.h int drm_intel_get_reset_stats(drm_intel_context *ctx, · line 277
Quoted 2 lines
intel/intel_bufmgr.h +2
-0+int drm_intel_get_pooled_eu (int fd,unsigned int *has_pooled_eu); +int drm_intel_get_min_eu_in_pool (int fd,unsigned int *min_eu);
Do we export more than 2 billion eu? Or more than 2 billion states for the bool has_pooled_eu?
Could we not just use
int drm_intel_get_pooled_eu(int fd);
ret < 0 => error occurred / unknown
ret == 0 => no
ret > 0 => yes
and same for get_min_eu.
Quoted 12 lines
Quoted 12 lines
intel/intel_bufmgr.h +1
-0+/** @{ Compatibility defines to keep old code building despite the symbol rename * from dri_* to drm_intel_* */ intel/intel_bufmgr_gem.c +0
-0@@ -3237,6 +3237,38 @@ drm_intel_get_eu_total(int fd, unsigned int *eu_total)return 0 ; }
Quoted 11 lines
intel/intel_bufmgr_gem.c drm_intel_get_eu_total(int fd, unsigned int *eu_total) · line 3250
Quoted 11 lines
intel/intel_bufmgr_gem.c +11
-0+int +drm_intel_get_pooled_eu (int fd,unsigned int *has_pooled_eu) +{ +drm_i915_getparam_t gp; +int ret; + +memclear (gp); + gp.value = (int *)has_pooled_eu; + gp.param =I915_PARAM_HAS_POOLED_EU ; + ret =drmIoctl (fd,DRM_IOCTL_I915_GETPARAM , &gp); +if (ret)
save a few electrons....
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;
if (drmIoctl(fd, DRM_IOCTL_I915_GETPARAM, &gp))
return -errno;
return ret;
}(save a few more by calling this int __getparam(int fd, unsigned name)) -Chris
Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
OK, I have send a new version patch.
Quoted 118 lines
-----Original Message-----
From: Chris Wilson [mailto:[email protected]]
Sent: Thursday, July 14, 2016 3:10
To: Arun Siluvery <[email protected]>
Cc: Yang, Rong R <[email protected]>; [email protected]; [email protected]; Daniel Vetter <[email protected]>; Tvrtko Ursulin <[email protected]>; [email protected]
Subject: Re: [Beignet] [PATCH] intel: Export pooled EU and min no. of eus in a pool.Quoted 50 lines · Arun Siluvery
Quoted 6 lines · Yang Rong
Update kernel interface with new
I915_GETPARAMioctl 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.Quoted 8 lines
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.
Signed-off-by Yang Rong <[email protected]>---
Could you check this and give comments/ACK to merge this to libdrm? Kernel changes are merged in drm-intel.
regards
ArunQuoted 28 lines
include/drm/i915_drm.h | 2 ++ intel/intel_bufmgr.h | 3 +++ intel/intel_bufmgr_gem.c | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+)include/drm/i915_drm.h index renamed from include/drm/i915_drm.h +0
-0c4ce6b2..eb611a7 100644
include/drm/i915_drm.h +2
-0@@ -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;intel/intel_bufmgr.h index renamed from intel/intel_bufmgr.h +0
-0a1abbcd..8370694 100644
intel/intel_bufmgr.h +0
-0@@ -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);Quoted 2 lines
intel/intel_bufmgr.h int drm_intel_get_reset_stats(drm_intel_context *ctx, · line 277
Quoted 2 lines
intel/intel_bufmgr.h +2
-0+int drm_intel_get_pooled_eu (int fd,unsigned int *has_pooled_eu); +int drm_intel_get_min_eu_in_pool (int fd,unsigned int *min_eu);Do we export more than 2 billion eu? Or more than 2 billion states for the bool
has_pooled_eu?Could we not just use
int
drm_intel_get_pooled_eu(int fd);ret < 0 => error occurred / unknown
ret == 0 => no
ret > 0 => yesand same for
get_min_eu.Quoted 2 lines
intel/intel_bufmgr.h int drm_intel_get_reset_stats(drm_intel_context · line 281
Quoted 2 lines
intel/intel_bufmgr.h +1
-0+/** @{ Compatibility defines to keep old code building despite the symbol rename
Quoted 7 lines
intel/intel_bufmgr_gem.c drm_intel_get_eu_total(int fd, unsigned int
Quoted 7 lines
* from dri_* to drm_intel_*
*/intel/intel_bufmgr_gem.c +0
-0@@ -3237,6 +3237,38 @@ drm_intel_get_eu_total(int fd, unsigned int
*eu_total)Quoted 13 lines
intel/intel_bufmgr_gem.c drm_intel_get_eu_total(int fd, unsigned int *eu_total) · line 3250
Quoted 13 lines
intel/intel_bufmgr_gem.c +10
-0return 0 ; } +int +drm_intel_get_pooled_eu (int fd,unsigned int *has_pooled_eu) { +drm_i915_getparam_t gp; +int ret; + +memclear (gp); + gp.value = (int *)has_pooled_eu; + gp.param =I915_PARAM_HAS_POOLED_EU ; + ret =drmIoctl (fd,DRM_IOCTL_I915_GETPARAM , &gp); +if (ret)save a few electrons....
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; if (drmIoctl(fd, DRM_IOCTL_I915_GETPARAM, &gp)) return -errno; return ret; }
Quoted 5 lines
(save a few more by calling this int
__getparam(int fd, unsigned name)) - Chris--
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Beignet mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/beignet