All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] intel: Sync the parameter of i915_getparma with the kernel
@ 2012-11-14  4:46 Xiang, Haihao
  2012-11-14  4:46 ` [PATCH 2/2] intel: Add support for VEBOX ring (v2) Xiang, Haihao
  2012-11-15 11:30 ` [PATCH 1/2] intel: Sync the parameter of i915_getparma with the kernel Daniel Vetter
  0 siblings, 2 replies; 6+ messages in thread
From: Xiang, Haihao @ 2012-11-14  4:46 UTC (permalink / raw)
  To: intel-gfx

From: Zhao Yakui <yakui.zhao@intel.com>

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
---
 include/drm/i915_drm.h |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h
index 7e9e9bd..8b069ac 100644
--- a/include/drm/i915_drm.h
+++ b/include/drm/i915_drm.h
@@ -303,6 +303,8 @@ typedef struct drm_i915_irq_wait {
 #define I915_PARAM_HAS_LLC     	 	 17
 #define I915_PARAM_HAS_ALIASING_PPGTT	 18
 #define I915_PARAM_HAS_WAIT_TIMEOUT	 19
+#define I915_PARAM_HAS_SEMAPHORES	 20
+#define I915_PARAM_HAS_PRIME_VMAP_FLUSH 21
 
 typedef struct drm_i915_getparam {
 	int param;
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] intel: Add support for VEBOX ring (v2)
  2012-11-14  4:46 [PATCH 1/2] intel: Sync the parameter of i915_getparma with the kernel Xiang, Haihao
@ 2012-11-14  4:46 ` Xiang, Haihao
  2013-04-27 18:35   ` Ben Widawsky
  2012-11-15 11:30 ` [PATCH 1/2] intel: Sync the parameter of i915_getparma with the kernel Daniel Vetter
  1 sibling, 1 reply; 6+ messages in thread
From: Xiang, Haihao @ 2012-11-14  4:46 UTC (permalink / raw)
  To: intel-gfx

From: "Xiang, Haihao" <haihao.xiang@intel.com>

v2: Fix the test for has_vebox

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
---
 include/drm/i915_drm.h   |    2 ++
 intel/intel_bufmgr_gem.c |    9 +++++++++
 2 files changed, 11 insertions(+)

diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h
index 8b069ac..2341d2a 100644
--- a/include/drm/i915_drm.h
+++ b/include/drm/i915_drm.h
@@ -305,6 +305,7 @@ typedef struct drm_i915_irq_wait {
 #define I915_PARAM_HAS_WAIT_TIMEOUT	 19
 #define I915_PARAM_HAS_SEMAPHORES	 20
 #define I915_PARAM_HAS_PRIME_VMAP_FLUSH 21
+#define I915_PARAM_HAS_VEBOX            22
 
 typedef struct drm_i915_getparam {
 	int param;
@@ -651,6 +652,7 @@ struct drm_i915_gem_execbuffer2 {
 #define I915_EXEC_RENDER                 (1<<0)
 #define I915_EXEC_BSD                    (2<<0)
 #define I915_EXEC_BLT                    (3<<0)
+#define I915_EXEC_VEBOX                  (4<<0)
 
 /* Used for switching the constants addressing mode on gen4+ RENDER ring.
  * Gen6+ only supports relative addressing to dynamic state (default) and
diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
index 512bc6f..758cc52 100644
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
@@ -125,6 +125,7 @@ typedef struct _drm_intel_bufmgr_gem {
 	unsigned int has_wait_timeout : 1;
 	unsigned int bo_reuse : 1;
 	unsigned int no_exec : 1;
+	unsigned int has_vebox : 1;
 	bool fenced_relocs;
 
 	FILE *aub_file;
@@ -2210,6 +2211,10 @@ do_exec2(drm_intel_bo *bo, int used, drm_intel_context *ctx,
 		if (!bufmgr_gem->has_bsd)
 			return -EINVAL;
 		break;
+	case I915_EXEC_VEBOX:
+		if (!bufmgr_gem->has_vebox)
+			return -EINVAL;
+		break;
 	case I915_EXEC_RENDER:
 	case I915_EXEC_DEFAULT:
 		break;
@@ -3123,6 +3128,10 @@ drm_intel_bufmgr_gem_init(int fd, int batch_size)
 	} else
 		bufmgr_gem->has_llc = *gp.value;
 
+	gp.param = I915_PARAM_HAS_VEBOX;
+	ret = drmIoctl(bufmgr_gem->fd, DRM_IOCTL_I915_GETPARAM, &gp);
+	bufmgr_gem->has_vebox = (ret == 0) & (*gp.value > 0);
+
 	if (bufmgr_gem->gen < 4) {
 		gp.param = I915_PARAM_NUM_FENCES_AVAIL;
 		gp.value = &bufmgr_gem->available_fences;
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] intel: Sync the parameter of i915_getparma with the kernel
  2012-11-14  4:46 [PATCH 1/2] intel: Sync the parameter of i915_getparma with the kernel Xiang, Haihao
  2012-11-14  4:46 ` [PATCH 2/2] intel: Add support for VEBOX ring (v2) Xiang, Haihao
@ 2012-11-15 11:30 ` Daniel Vetter
  2012-11-16  1:52   ` Xiang, Haihao
  1 sibling, 1 reply; 6+ messages in thread
From: Daniel Vetter @ 2012-11-15 11:30 UTC (permalink / raw)
  To: Xiang, Haihao; +Cc: intel-gfx

On Wed, Nov 14, 2012 at 12:46:38PM +0800, Xiang, Haihao wrote:
> From: Zhao Yakui <yakui.zhao@intel.com>
> 
> Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>

Fyi the best way is to simply run

$ make headers_install

in the latest kernel tree and copy the resulting userspace header from
usr/include/drm/i915_drm.h to libdrm. Otherwise things tend to get out of
sync. In the commit message you can then mention up to which kernel commit
you've synced.
-Daniel

> ---
>  include/drm/i915_drm.h |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h
> index 7e9e9bd..8b069ac 100644
> --- a/include/drm/i915_drm.h
> +++ b/include/drm/i915_drm.h
> @@ -303,6 +303,8 @@ typedef struct drm_i915_irq_wait {
>  #define I915_PARAM_HAS_LLC     	 	 17
>  #define I915_PARAM_HAS_ALIASING_PPGTT	 18
>  #define I915_PARAM_HAS_WAIT_TIMEOUT	 19
> +#define I915_PARAM_HAS_SEMAPHORES	 20
> +#define I915_PARAM_HAS_PRIME_VMAP_FLUSH 21
>  
>  typedef struct drm_i915_getparam {
>  	int param;
> -- 
> 1.7.9.5
> 
> _______________________________________________
> 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] 6+ messages in thread

* Re: [PATCH 1/2] intel: Sync the parameter of i915_getparma with the kernel
  2012-11-15 11:30 ` [PATCH 1/2] intel: Sync the parameter of i915_getparma with the kernel Daniel Vetter
@ 2012-11-16  1:52   ` Xiang, Haihao
  2012-11-16  8:10     ` Daniel Vetter
  0 siblings, 1 reply; 6+ messages in thread
From: Xiang, Haihao @ 2012-11-16  1:52 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx

On Thu, 2012-11-15 at 12:30 +0100, Daniel Vetter wrote: 
> On Wed, Nov 14, 2012 at 12:46:38PM +0800, Xiang, Haihao wrote:
> > From: Zhao Yakui <yakui.zhao@intel.com>
> > 
> > Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
> 
> Fyi the best way is to simply run
> 
> $ make headers_install
> 
> in the latest kernel tree and copy the resulting userspace header from
> usr/include/drm/i915_drm.h to libdrm. Otherwise things tend to get out of
> sync. In the commit message you can then mention up to which kernel commit
> you've synced.
> -Daniel


Thanks for your comment. But it will bring some changes to the existent
data structures by this way, such as 

-struct drm_i915_gem_cacheing {
+struct drm_i915_gem_caching {

Is this what we want ?

Thanks
Haihao


> 
> > ---
> >  include/drm/i915_drm.h |    2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h
> > index 7e9e9bd..8b069ac 100644
> > --- a/include/drm/i915_drm.h
> > +++ b/include/drm/i915_drm.h
> > @@ -303,6 +303,8 @@ typedef struct drm_i915_irq_wait {
> >  #define I915_PARAM_HAS_LLC     	 	 17
> >  #define I915_PARAM_HAS_ALIASING_PPGTT	 18
> >  #define I915_PARAM_HAS_WAIT_TIMEOUT	 19
> > +#define I915_PARAM_HAS_SEMAPHORES	 20
> > +#define I915_PARAM_HAS_PRIME_VMAP_FLUSH 21
> >  
> >  typedef struct drm_i915_getparam {
> >  	int param;
> > -- 
> > 1.7.9.5
> > 
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] intel: Sync the parameter of i915_getparma with the kernel
  2012-11-16  1:52   ` Xiang, Haihao
@ 2012-11-16  8:10     ` Daniel Vetter
  0 siblings, 0 replies; 6+ messages in thread
From: Daniel Vetter @ 2012-11-16  8:10 UTC (permalink / raw)
  To: Xiang, Haihao; +Cc: intel-gfx

On Fri, Nov 16, 2012 at 2:52 AM, Xiang, Haihao <haihao.xiang@intel.com> wrote:
> On Thu, 2012-11-15 at 12:30 +0100, Daniel Vetter wrote:
>> On Wed, Nov 14, 2012 at 12:46:38PM +0800, Xiang, Haihao wrote:
>> > From: Zhao Yakui <yakui.zhao@intel.com>
>> >
>> > Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
>>
>> Fyi the best way is to simply run
>>
>> $ make headers_install
>>
>> in the latest kernel tree and copy the resulting userspace header from
>> usr/include/drm/i915_drm.h to libdrm. Otherwise things tend to get out of
>> sync. In the commit message you can then mention up to which kernel commit
>> you've synced.
>> -Daniel
>
>
> Thanks for your comment. But it will bring some changes to the existent
> data structures by this way, such as
>
> -struct drm_i915_gem_cacheing {
> +struct drm_i915_gem_caching {
>
> Is this what we want ?

Presuming it doesn't change any of the exposed libdrm interfaces, yes
this is what we want - the kernel and libdrm i915_drm.h file should be
in sync. In this specific case we've decided that the mispelling is
too awful to be allowed to live on ;-)
-Daniel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] intel: Add support for VEBOX ring (v2)
  2012-11-14  4:46 ` [PATCH 2/2] intel: Add support for VEBOX ring (v2) Xiang, Haihao
@ 2013-04-27 18:35   ` Ben Widawsky
  0 siblings, 0 replies; 6+ messages in thread
From: Ben Widawsky @ 2013-04-27 18:35 UTC (permalink / raw)
  To: Xiang, Haihao; +Cc: intel-gfx

On Wed, Nov 14, 2012 at 12:46:39PM +0800, Xiang, Haihao wrote:
> From: "Xiang, Haihao" <haihao.xiang@intel.com>
> 
> v2: Fix the test for has_vebox
> 
> Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>

I've pushed a conflict resolved version of this patch.

[snip]
-- 
Ben Widawsky, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-04-27 18:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-14  4:46 [PATCH 1/2] intel: Sync the parameter of i915_getparma with the kernel Xiang, Haihao
2012-11-14  4:46 ` [PATCH 2/2] intel: Add support for VEBOX ring (v2) Xiang, Haihao
2013-04-27 18:35   ` Ben Widawsky
2012-11-15 11:30 ` [PATCH 1/2] intel: Sync the parameter of i915_getparma with the kernel Daniel Vetter
2012-11-16  1:52   ` Xiang, Haihao
2012-11-16  8:10     ` Daniel Vetter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.