* [PATCH] drm/i915: Export the eLLC size from KMD via IOCTL
@ 2013-10-09 0:06 Guo, Yejun
2013-10-09 7:21 ` Daniel Vetter
0 siblings, 1 reply; 4+ messages in thread
From: Guo, Yejun @ 2013-10-09 0:06 UTC (permalink / raw)
To: intel-gfx@lists.freedesktop.org
[-- Attachment #1.1: Type: text/plain, Size: 1785 bytes --]
commit 6033637a040eeb8ae0f31bdbca8d9c988582f99d
Author: GuoYejun <yejun.guo@intel.com<mailto:yejun.guo@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
[-- Attachment #1.2: Type: text/html, Size: 6927 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/i915: Export the eLLC size from KMD via IOCTL
2013-10-09 0:06 [PATCH] drm/i915: Export the eLLC size from KMD via IOCTL Guo, Yejun
@ 2013-10-09 7:21 ` Daniel Vetter
2013-10-10 3:11 ` Guo, Yejun
0 siblings, 1 reply; 4+ messages in thread
From: Daniel Vetter @ 2013-10-09 7:21 UTC (permalink / raw)
To: Guo, Yejun; +Cc: intel-gfx@lists.freedesktop.org
On Wed, Oct 09, 2013 at 12:06:06AM +0000, Guo, Yejun wrote:
> commit 6033637a040eeb8ae0f31bdbca8d9c988582f99d
> Author: GuoYejun <yejun.guo@intel.com<mailto:yejun.guo@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.
Do we have some examples of such userspace lying around?
Also, your patch is missing the sob line and doesn't look like it's
formatted with git format-patch.
Cheers, Daniel
>
> 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
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/i915: Export the eLLC size from KMD via IOCTL
2013-10-09 7:21 ` Daniel Vetter
@ 2013-10-10 3:11 ` Guo, Yejun
2013-10-10 7:08 ` Daniel Vetter
0 siblings, 1 reply; 4+ messages in thread
From: Guo, Yejun @ 2013-10-10 3:11 UTC (permalink / raw)
To: Daniel Vetter; +Cc: intel-gfx@lists.freedesktop.org
Hi Daniel,
For example, the close source UMD driver also requires this information.
Thanks for the reminder, please see the new patch below generated with git format-patch.
>From 6033637a040eeb8ae0f31bdbca8d9c988582f99d Mon Sep 17 00:00:00 2001
From: GuoYejun <yejun.guo@intel.com>
Date: Fri, 27 Sep 2013 16:26:18 +0800
Subject: [PATCH] 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.
---
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 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;
--
1.7.9.5
Thanks
Yejun
-----Original Message-----
From: Daniel Vetter [mailto:daniel.vetter@ffwll.ch] On Behalf Of Daniel Vetter
Sent: Wednesday, October 09, 2013 15:22
To: Guo, Yejun
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Export the eLLC size from KMD via IOCTL
On Wed, Oct 09, 2013 at 12:06:06AM +0000, Guo, Yejun wrote:
> commit 6033637a040eeb8ae0f31bdbca8d9c988582f99d
> Author: GuoYejun <yejun.guo@intel.com<mailto:yejun.guo@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.
Do we have some examples of such userspace lying around?
Also, your patch is missing the sob line and doesn't look like it's formatted with git format-patch.
Cheers, Daniel
>
> 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
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/i915: Export the eLLC size from KMD via IOCTL
2013-10-10 3:11 ` Guo, Yejun
@ 2013-10-10 7:08 ` Daniel Vetter
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Vetter @ 2013-10-10 7:08 UTC (permalink / raw)
To: Guo, Yejun, Dave Airlie; +Cc: intel-gfx@lists.freedesktop.org
On Thu, Oct 10, 2013 at 03:11:40AM +0000, Guo, Yejun wrote:
> Hi Daniel,
>
> For example, the close source UMD driver also requires this information.
For upstream a userspace blob as consumer isn't good enough, Dave Airlie
has clearly established this precendence in a bunch of loud emails.
So I need something which is open-source as a consumer of this.
-Daniel
>
> Thanks for the reminder, please see the new patch below generated with git format-patch.
>
> From 6033637a040eeb8ae0f31bdbca8d9c988582f99d Mon Sep 17 00:00:00 2001
> From: GuoYejun <yejun.guo@intel.com>
> Date: Fri, 27 Sep 2013 16:26:18 +0800
> Subject: [PATCH] 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.
> ---
> 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 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;
> --
> 1.7.9.5
>
>
> Thanks
> Yejun
>
> -----Original Message-----
> From: Daniel Vetter [mailto:daniel.vetter@ffwll.ch] On Behalf Of Daniel Vetter
> Sent: Wednesday, October 09, 2013 15:22
> To: Guo, Yejun
> Cc: intel-gfx@lists.freedesktop.org
> Subject: Re: [Intel-gfx] [PATCH] drm/i915: Export the eLLC size from KMD via IOCTL
>
> On Wed, Oct 09, 2013 at 12:06:06AM +0000, Guo, Yejun wrote:
> > commit 6033637a040eeb8ae0f31bdbca8d9c988582f99d
> > Author: GuoYejun <yejun.guo@intel.com<mailto:yejun.guo@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.
>
> Do we have some examples of such userspace lying around?
>
> Also, your patch is missing the sob line and doesn't look like it's formatted with git format-patch.
>
> Cheers, Daniel
> >
> > 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
> >
>
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
>
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> +41 (0) 79 365 57 48 - http://blog.ffwll.ch
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-10-10 7:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-09 0:06 [PATCH] drm/i915: Export the eLLC size from KMD via IOCTL Guo, Yejun
2013-10-09 7:21 ` Daniel Vetter
2013-10-10 3:11 ` Guo, Yejun
2013-10-10 7:08 ` Daniel Vetter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox