diff mbox

[v2,resend,4/5] drm/i915: add I915_PARAM_HAS_RESOURCE_STREAMER to i915_getparam

Message ID 1434456178-12826-1-git-send-email-abdiel.janulgue@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Abdiel Janulgue June 16, 2015, 12:02 p.m. UTC
This will let userspace know whether Resource Streamer is supported
in the kernel.

v2: Update I915_PARAM_HAS_RESOURCE_STREAMER so it's after
    I915_PARAM_HAS_GPU_RESET.

Suggested-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_dma.c | 3 +++
 include/uapi/drm/i915_drm.h     | 1 +
 2 files changed, 4 insertions(+)

Comments

Chris Wilson June 16, 2015, 12:21 p.m. UTC | #1
On Tue, Jun 16, 2015 at 03:02:58PM +0300, Abdiel Janulgue wrote:
> This will let userspace know whether Resource Streamer is supported
> in the kernel.
> 
> v2: Update I915_PARAM_HAS_RESOURCE_STREAMER so it's after
>     I915_PARAM_HAS_GPU_RESET.
> 
> Suggested-by: Kenneth Graunke <kenneth@whitecape.org>
> Cc: Kenneth Graunke <kenneth@whitecape.org>
> Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/i915_dma.c | 3 +++
>  include/uapi/drm/i915_drm.h     | 1 +
>  2 files changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
> index 88795d2..e7ad30f 100644
> --- a/drivers/gpu/drm/i915/i915_dma.c
> +++ b/drivers/gpu/drm/i915/i915_dma.c
> @@ -168,6 +168,9 @@ static int i915_getparam(struct drm_device *dev, void *data,
>  			i915.reset &&
>  			intel_has_gpu_reset(dev);
>  		break;
> +	case I915_PARAM_HAS_RESOURCE_STREAMER:
> +               value = 1;

Really, we support the resource streamer on all platforms in all
configurations? I think you jest!
-Chris
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 88795d2..e7ad30f 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -168,6 +168,9 @@  static int i915_getparam(struct drm_device *dev, void *data,
 			i915.reset &&
 			intel_has_gpu_reset(dev);
 		break;
+	case I915_PARAM_HAS_RESOURCE_STREAMER:
+               value = 1;
+               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 f88cc1c..51137bd 100644
--- a/include/uapi/drm/i915_drm.h
+++ b/include/uapi/drm/i915_drm.h
@@ -355,6 +355,7 @@  typedef struct drm_i915_irq_wait {
 #define I915_PARAM_SUBSLICE_TOTAL	 33
 #define I915_PARAM_EU_TOTAL		 34
 #define I915_PARAM_HAS_GPU_RESET	 35
+#define I915_PARAM_HAS_RESOURCE_STREAMER 36
 
 typedef struct drm_i915_getparam {
 	int param;