Skip to contentSkip to conversation

I915 GEM context updates

PATCH In review David Weinehall 3 participants 6 messages Jun 30, 2015 – Jul 8, 2015 5 messages not in the archive DRM drivers

lore
Share & tools
lore
#0 lore raw

cover I915 GEM context updates

This patch contains a few minor updates related to I915 GEM context.

David Weinehall (2):
intel: Add get/set context parameter helpers
Add the I915_CONTEXT_PARAM_NO_ZEROMAP parameter

 include/drm/i915_drm.h   |  1 +
 intel/intel_bufmgr.h     |  4 ++++
 intel/intel_bufmgr_gem.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 62 insertions(+)
Signature · 6 lines
2.1.4

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw

PATCH 1/2 intel: Add get/set context parameter helpers

Add helper functions to set/get GEM context parameters.

---
 intel/intel_bufmgr.h     |  4 ++++
 intel/intel_bufmgr_gem.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 61 insertions(+)
intel/intel_bufmgr.h +4 -0
index 285919e4c40d..b9af2361735d 100644
@@ -203,6 +203,10 @@ int drm_intel_gem_bo_wait(drm_intel_bo *bo, int64_t timeout_ns);
 
 drm_intel_context *drm_intel_gem_context_create(drm_intel_bufmgr *bufmgr);
 void drm_intel_gem_context_destroy(drm_intel_context *ctx);
+int drm_intel_gem_context_get_param(drm_intel_context *ctx,
+				    uint64_t param, uint64_t *value);
+int drm_intel_gem_context_set_param(drm_intel_context *ctx,
+				    uint64_t param, uint64_t value);
 int drm_intel_gem_bo_context_exec(drm_intel_bo *bo, drm_intel_context *ctx,
 				  int used, unsigned int flags);
 
intel/intel_bufmgr_gem.c +57 -0

63 lines not on this page · raw message

Signature · 6 lines
2.1.4

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#2 lore raw

PATCH 2/2 Add the I915_CONTEXT_PARAM_NO_ZEROMAP parameter

In reply to David Weinehall

A new parameter was recently added to the i915 GEM contexts. Add its define to i915_drm.h.

---
 include/drm/i915_drm.h | 1 +
 1 file changed, 1 insertion(+)
include/drm/i915_drm.h +1 -0
index ded43b1cb117..a658d1cc367a 100644
@@ -1101,6 +1101,7 @@ struct drm_i915_gem_context_param {
 	__u32 size;
 	__u64 param;
 #define I915_CONTEXT_PARAM_BAN_PERIOD 0x1
+#define I915_CONTEXT_PARAM_NO_ZEROMAP 0x2
 	__u64 value;
 };
 
Signature · 6 lines
2.1.4

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#3 lore raw
In reply to David Weinehall
Quoted 2 lines · David Weinehall

This patch contains a few minor updates related to I915 GEM context.

As a kernel API, this is absolutely awful. Can we please correct it before it is released?
-Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

A message that is not in the archive (sent off-list or not yet received): 20150630130123.GT14570@boom

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): 20150630133655.GU14570@boom

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): 20150701122144.GV14570@boom

#9 lore raw
Quoted 22 lines · David Weinehall
Quoted 21 lines · Chris Wilson
Quoted 19 lines · David Weinehall
Quoted 9 lines · Chris Wilson
Quoted 8 lines · David Weinehall
Quoted 6 lines · Chris Wilson
Quoted 2 lines · David Weinehall

This patch contains a few minor updates related to I915 GEM context.

As a kernel API, this is absolutely awful. Can we please correct it before it is released?

Quoted 6 lines
Quoted 4 lines

Daniel has already merged it and didn't have any objections, so you'll have to convince him, not me.

If you believe it's awful, feel free to provide a better implementation.

As I recall, I did.

Hmmm, I must've missed your patch -- if so I apologise. What was the title of the post, and how come Daniel hasn't merged that one instead?

Quoted 6 lines
Quoted 2 lines

I gave details on a comment to your patch, where I thought the api could be improved.

Yeah, I got the bits about you not liking the approach, but the things you write in this e-mail are the first suggestions that I find concrete enough for me to actually know what you want instead.

Imo NONZEROMAP is still good to go, and good enough for opencl/beignet. Allowing more fancy placement constraints might be useful eventually, but thus far I haven't seen a compelling reason really. Or not compelling enough at least.

And I don't think there's a point in blocking beignet for something too fancy. Hence this still has my Ack. It gets the (really specific) job done for beignet, which seems good enough.
-Daniel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#10 lore raw
Quoted 31 lines · Daniel Vetter
Quoted 22 lines · David Weinehall
Quoted 21 lines · Chris Wilson
Quoted 19 lines · David Weinehall
Quoted 9 lines · Chris Wilson
Quoted 8 lines · David Weinehall
Quoted 6 lines · Chris Wilson
Quoted 2 lines · David Weinehall

This patch contains a few minor updates related to I915 GEM context.

As a kernel API, this is absolutely awful. Can we please correct it before it is released?

Quoted 6 lines
Quoted 4 lines

Daniel has already merged it and didn't have any objections, so you'll have to convince him, not me.

If you believe it's awful, feel free to provide a better implementation.

As I recall, I did.

Hmmm, I must've missed your patch -- if so I apologise. What was the title of the post, and how come Daniel hasn't merged that one instead?

Quoted 6 lines
Quoted 2 lines

I gave details on a comment to your patch, where I thought the api could be improved.

Yeah, I got the bits about you not liking the approach, but the things you write in this e-mail are the first suggestions that I find concrete enough for me to actually know what you want instead.

Quoted 8 lines

Imo NONZEROMAP is still good to go, and good enough for opencl/beignet. Allowing more fancy placement constraints might be useful eventually, but thus far I haven't seen a compelling reason really. Or not compelling enough at least.

And I don't think there's a point in blocking beignet for something too fancy. Hence this still has my Ack. It gets the (really specific) job done for beignet, which seems good enough.

OK, so where do we stand on this? Daniel is OK with the patch (and has merged the kernel side). The last post regarding this on the libdrm list is that Chris objects, meaning that no one is likely to pick up that patch and merge it to libdrm, meaning it's dead in the water until a follow-up comment.

Regards, David
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx