[Intel-gfx] [PATCH] drm/i915: Export the eLLC size from KMD via IOCTL
Guo, Yejun
yejun.guo at intel.com
Wed Oct 9 02:06:06 CEST 2013
commit 6033637a040eeb8ae0f31bdbca8d9c988582f99d
Author: GuoYejun <yejun.guo at intel.com<mailto:yejun.guo at intel.com>>
Date: Fri Sep 27 16:26:18 2013 +0800
drm/i915: Export the eLLC size from KMD via IOCTL
The usermode driver needs the eLLC information in order to
make decisions which can result in significant performance improvements.
Since all userspace drivers require this same information,
it makes sense to store it in one globally accessible place, the kernel.
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index dd76d93..4ce36f4 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1003,6 +1003,9 @@ static int i915_getparam(struct drm_device *dev, void *data,
case I915_PARAM_HAS_EXEC_HANDLE_LUT:
value = 1;
break;
+ case I915_PARAM_ELLC_SIZE:
+ value = dev_priv->ellc_size;
+ 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 3a4e97b..a0d4e00 100644
--- a/include/uapi/drm/i915_drm.h
+++ b/include/uapi/drm/i915_drm.h
@@ -335,6 +335,7 @@ typedef struct drm_i915_irq_wait {
#define I915_PARAM_HAS_EXEC_NO_RELOC 25
#define I915_PARAM_HAS_EXEC_HANDLE_LUT 26
#define I915_PARAM_HAS_WT 27
+#define I915_PARAM_ELLC_SIZE 28
typedef struct drm_i915_getparam {
int param;
Yejun
graphics software engineer
Tel: (+86) 021-6116-6181
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20131009/8bab9d1f/attachment.html>
More information about the Intel-gfx
mailing list