diff mbox

drm/i915/bxt: Export pooled eu info to userspace

Message ID 1467369782-25992-1-git-send-email-arun.siluvery@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

arun.siluvery@linux.intel.com July 1, 2016, 10:43 a.m. UTC
Pooled EU is a bxt only feature and kernel changes are already merged. This
feature is not yet exposed to userspace as the support was not yet
available. Beignet team expressed interest and added patches to use this.

Since we now have a user and patches to use them, expose them from the
kernel side as well.

v2: fix compile error

[1] https://lists.freedesktop.org/archives/beignet/2016-June/007698.html
[2] https://lists.freedesktop.org/archives/beignet/2016-June/007699.html

Cc: Winiarski, Michal <michal.winiarski@intel.com>
Cc: Zou, Nanhai <nanhai.zou@intel.com>
Cc: Yang, Rong R <rong.r.yang@intel.com>
Cc: Tim Gore <tim.gore@intel.com>
Cc: Jeff McGee <jeff.mcgee@intel.com>
Signed-off-by: Arun Siluvery <arun.siluvery@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_drv.c | 6 ++++++
 include/uapi/drm/i915_drm.h     | 2 ++
 2 files changed, 8 insertions(+)

Comments

Chris Wilson July 1, 2016, 11:56 a.m. UTC | #1
On Fri, Jul 01, 2016 at 11:43:02AM +0100, Arun Siluvery wrote:
> Pooled EU is a bxt only feature and kernel changes are already merged. This
> feature is not yet exposed to userspace as the support was not yet
> available. Beignet team expressed interest and added patches to use this.
> 
> Since we now have a user and patches to use them, expose them from the
> kernel side as well.
> 
> v2: fix compile error
> 
> [1] https://lists.freedesktop.org/archives/beignet/2016-June/007698.html
> [2] https://lists.freedesktop.org/archives/beignet/2016-June/007699.html
> 
> Cc: Winiarski, Michal <michal.winiarski@intel.com>
> Cc: Zou, Nanhai <nanhai.zou@intel.com>
> Cc: Yang, Rong R <rong.r.yang@intel.com>
> Cc: Tim Gore <tim.gore@intel.com>
> Cc: Jeff McGee <jeff.mcgee@intel.com>
> Signed-off-by: Arun Siluvery <arun.siluvery@linux.intel.com>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
arun.siluvery@linux.intel.com July 1, 2016, 12:45 p.m. UTC | #2
On 01/07/2016 12:56, Chris Wilson wrote:
> On Fri, Jul 01, 2016 at 11:43:02AM +0100, Arun Siluvery wrote:
>> Pooled EU is a bxt only feature and kernel changes are already merged. This
>> feature is not yet exposed to userspace as the support was not yet
>> available. Beignet team expressed interest and added patches to use this.
>>
>> Since we now have a user and patches to use them, expose them from the
>> kernel side as well.
>>
>> v2: fix compile error
>>
>> [1] https://lists.freedesktop.org/archives/beignet/2016-June/007698.html
>> [2] https://lists.freedesktop.org/archives/beignet/2016-June/007699.html
>>
>> Cc: Winiarski, Michal <michal.winiarski@intel.com>
>> Cc: Zou, Nanhai <nanhai.zou@intel.com>
>> Cc: Yang, Rong R <rong.r.yang@intel.com>
>> Cc: Tim Gore <tim.gore@intel.com>
>> Cc: Jeff McGee <jeff.mcgee@intel.com>
>> Signed-off-by: Arun Siluvery <arun.siluvery@linux.intel.com>
> Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
> -Chris

Thanks Chris.

Daniel, Tvrtko,

Could you please check this and merge?

regards
Arun

>
Tvrtko Ursulin July 1, 2016, 1:56 p.m. UTC | #3
On 01/07/16 13:45, Arun Siluvery wrote:
> On 01/07/2016 12:56, Chris Wilson wrote:
>> On Fri, Jul 01, 2016 at 11:43:02AM +0100, Arun Siluvery wrote:
>>> Pooled EU is a bxt only feature and kernel changes are already
>>> merged. This
>>> feature is not yet exposed to userspace as the support was not yet
>>> available. Beignet team expressed interest and added patches to use
>>> this.
>>>
>>> Since we now have a user and patches to use them, expose them from the
>>> kernel side as well.
>>>
>>> v2: fix compile error
>>>
>>> [1] https://lists.freedesktop.org/archives/beignet/2016-June/007698.html
>>> [2] https://lists.freedesktop.org/archives/beignet/2016-June/007699.html
>>>
>>> Cc: Winiarski, Michal <michal.winiarski@intel.com>
>>> Cc: Zou, Nanhai <nanhai.zou@intel.com>
>>> Cc: Yang, Rong R <rong.r.yang@intel.com>
>>> Cc: Tim Gore <tim.gore@intel.com>
>>> Cc: Jeff McGee <jeff.mcgee@intel.com>
>>> Signed-off-by: Arun Siluvery <arun.siluvery@linux.intel.com>
>> Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
>> -Chris
>
> Thanks Chris.
>
> Daniel, Tvrtko,
>
> Could you please check this and merge?

Merged to dinq with Jani's ack.

Regards,

Tvrtko
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index c580e24..8a26740 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -365,6 +365,12 @@  static int i915_getparam(struct drm_device *dev, void *data,
 	case I915_PARAM_HAS_EXEC_SOFTPIN:
 		value = 1;
 		break;
+	case I915_PARAM_HAS_POOLED_EU:
+		value = HAS_POOLED_EU(dev);
+		break;
+	case I915_PARAM_MIN_EU_IN_POOL:
+		value = INTEL_INFO(dev)->min_eu_in_pool;
+		break;
 	default:
 		DRM_DEBUG("Unknown parameter %d\n", param->param);
 		return -EINVAL;
diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
index c17d63d..a642bbc 100644
--- a/include/uapi/drm/i915_drm.h
+++ b/include/uapi/drm/i915_drm.h
@@ -361,6 +361,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;