All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] lib/ioctl_wrappers: Fix function descriptions
@ 2017-06-23 13:21 Radoslaw Szwichtenberg
  2017-06-23 14:01 ` [PATCH i-g-t v2] " Radoslaw Szwichtenberg
  2017-06-28 10:40 ` [PATCH i-g-t] lib/ioctl_wrappers: Fix some comments Arkadiusz Hiler
  0 siblings, 2 replies; 5+ messages in thread
From: Radoslaw Szwichtenberg @ 2017-06-23 13:21 UTC (permalink / raw)
  To: intel-gfx

Function description incorrectly stated that gem_context_get_param
and gem_context_set_param were freeing hw context.

Signed-off-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com>
---
 lib/ioctl_wrappers.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c
index 0816a7b..a78ff47 100644
--- a/lib/ioctl_wrappers.c
+++ b/lib/ioctl_wrappers.c
@@ -977,8 +977,8 @@ int __gem_context_get_param(int fd, struct local_i915_gem_context_param *p)
  * @fd: open i915 drm file descriptor
  * @p: i915 hw context parameter
  *
- * This is a wraps the CONTEXT_GET_PARAM ioctl, which is used to free a hardware
- * context. Not that similarly to gem_set_caching() this wrapper calls
+ * This is a wraps the CONTEXT_GET_PARAM ioctl, which is used to get a context
+ * parameter. Not that similarly to gem_set_caching() this wrapper calls
  * igt_require() internally to correctly skip on kernels and platforms where hw
  * context parameter support is not available.
  */
@@ -1003,8 +1003,8 @@ int __gem_context_set_param(int fd, struct local_i915_gem_context_param *p)
  * @fd: open i915 drm file descriptor
  * @p: i915 hw context parameter
  *
- * This is a wraps the CONTEXT_SET_PARAM ioctl, which is used to free a hardware
- * context. Not that similarly to gem_set_caching() this wrapper calls
+ * This is a wraps the CONTEXT_SET_PARAM ioctl, which is used to set a context
+ * parameter. Not that similarly to gem_set_caching() this wrapper calls
  * igt_require() internally to correctly skip on kernels and platforms where hw
  * context parameter support is not available.
  */
-- 
2.9.3

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [PATCH i-g-t v2] lib/ioctl_wrappers: Fix function descriptions
  2017-06-23 13:21 [PATCH i-g-t] lib/ioctl_wrappers: Fix function descriptions Radoslaw Szwichtenberg
@ 2017-06-23 14:01 ` Radoslaw Szwichtenberg
  2017-06-28 10:47   ` Arkadiusz Hiler
  2017-06-28 10:40 ` [PATCH i-g-t] lib/ioctl_wrappers: Fix some comments Arkadiusz Hiler
  1 sibling, 1 reply; 5+ messages in thread
From: Radoslaw Szwichtenberg @ 2017-06-23 14:01 UTC (permalink / raw)
  To: intel-gfx

Function description incorrectly stated that gem_context_get_param
and gem_context_set_param were freeing hw context.

v2: removed additional incorrect information

Signed-off-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com>
---
 lib/ioctl_wrappers.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c
index 0816a7b..8e5ec88 100644
--- a/lib/ioctl_wrappers.c
+++ b/lib/ioctl_wrappers.c
@@ -977,10 +977,8 @@ int __gem_context_get_param(int fd, struct local_i915_gem_context_param *p)
  * @fd: open i915 drm file descriptor
  * @p: i915 hw context parameter
  *
- * This is a wraps the CONTEXT_GET_PARAM ioctl, which is used to free a hardware
- * context. Not that similarly to gem_set_caching() this wrapper calls
- * igt_require() internally to correctly skip on kernels and platforms where hw
- * context parameter support is not available.
+ * This is a wraps the CONTEXT_GET_PARAM ioctl, which is used to get a context
+ * parameter.
  */
 void gem_context_get_param(int fd, struct local_i915_gem_context_param *p)
 {
@@ -1003,10 +1001,8 @@ int __gem_context_set_param(int fd, struct local_i915_gem_context_param *p)
  * @fd: open i915 drm file descriptor
  * @p: i915 hw context parameter
  *
- * This is a wraps the CONTEXT_SET_PARAM ioctl, which is used to free a hardware
- * context. Not that similarly to gem_set_caching() this wrapper calls
- * igt_require() internally to correctly skip on kernels and platforms where hw
- * context parameter support is not available.
+ * This is a wraps the CONTEXT_SET_PARAM ioctl, which is used to set a context
+ * parameter.
  */
 void gem_context_set_param(int fd, struct local_i915_gem_context_param *p)
 {
-- 
2.9.3

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [PATCH i-g-t] lib/ioctl_wrappers: Fix some comments
  2017-06-23 13:21 [PATCH i-g-t] lib/ioctl_wrappers: Fix function descriptions Radoslaw Szwichtenberg
  2017-06-23 14:01 ` [PATCH i-g-t v2] " Radoslaw Szwichtenberg
@ 2017-06-28 10:40 ` Arkadiusz Hiler
  2017-06-28 11:25   ` Szwichtenberg, Radoslaw
  1 sibling, 1 reply; 5+ messages in thread
From: Arkadiusz Hiler @ 2017-06-28 10:40 UTC (permalink / raw)
  To: intel-gfx; +Cc: Daniel Vetter

"This is a wraps" -> "This wraps"
"hw/hardware context" -> "context"

gem_context_create does not use igt_require() but igt_skip_on() so make
the similarity note more vague and in result true.

Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
---
 lib/ioctl_wrappers.c | 32 +++++++++++++++-----------------
 1 file changed, 15 insertions(+), 17 deletions(-)

diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c
index 8e5ec88..2bbaed5 100644
--- a/lib/ioctl_wrappers.c
+++ b/lib/ioctl_wrappers.c
@@ -881,7 +881,7 @@ void *gem_mmap__cpu(int fd, uint32_t handle, uint64_t offset, uint64_t size, uns
  * @handle: gem buffer object handle
  * @state: desired madvise state
  *
- * This is a wraps the MADVISE ioctl, which is used in libdrm to implement
+ * This wraps the MADVISE ioctl, which is used in libdrm to implement
  * opportunistic buffer object caching. Objects in the cache are set to DONTNEED
  * (internally in the kernel tracked as purgeable objects). When such a cached
  * object is in need again it must be set back to WILLNEED before first use.
@@ -906,12 +906,11 @@ int gem_madvise(int fd, uint32_t handle, int state)
  * gem_context_create:
  * @fd: open i915 drm file descriptor
  *
- * This is a wraps the CONTEXT_CREATE ioctl, which is used to allocate a new
- * hardware context. Not that similarly to gem_set_caching() this wrapper calls
- * igt_require() internally to correctly skip on kernels and platforms where hw
- * context support is not available.
+ * This wraps the CONTEXT_CREATE ioctl, which is used to allocate a new
+ * context. Note that similarly to gem_set_caching() this wrapper skips on
+ * kernels and platforms where context support is not available.
  *
- * Returns: The id of the allocated hw context.
+ * Returns: The id of the allocated context.
  */
 uint32_t gem_context_create(int fd)
 {
@@ -946,10 +945,9 @@ int __gem_context_destroy(int fd, uint32_t ctx_id)
 /**
  * gem_context_destroy:
  * @fd: open i915 drm file descriptor
- * @ctx_id: i915 hw context id
+ * @ctx_id: i915 context id
  *
- * This is a wraps the CONTEXT_DESTROY ioctl, which is used to free a hardware
- * context.
+ * This wraps the CONTEXT_DESTROY ioctl, which is used to free a context.
  */
 void gem_context_destroy(int fd, uint32_t ctx_id)
 {
@@ -975,9 +973,9 @@ int __gem_context_get_param(int fd, struct local_i915_gem_context_param *p)
 /**
  * gem_context_get_param:
  * @fd: open i915 drm file descriptor
- * @p: i915 hw context parameter
+ * @p: i915 context parameter
  *
- * This is a wraps the CONTEXT_GET_PARAM ioctl, which is used to get a context
+ * This wraps the CONTEXT_GET_PARAM ioctl, which is used to get a context
  * parameter.
  */
 void gem_context_get_param(int fd, struct local_i915_gem_context_param *p)
@@ -999,9 +997,9 @@ int __gem_context_set_param(int fd, struct local_i915_gem_context_param *p)
 /**
  * gem_context_set_param:
  * @fd: open i915 drm file descriptor
- * @p: i915 hw context parameter
+ * @p: i915 context parameter
  *
- * This is a wraps the CONTEXT_SET_PARAM ioctl, which is used to set a context
+ * This wraps the CONTEXT_SET_PARAM ioctl, which is used to set a context
  * parameter.
  */
 void gem_context_set_param(int fd, struct local_i915_gem_context_param *p)
@@ -1012,9 +1010,9 @@ void gem_context_set_param(int fd, struct local_i915_gem_context_param *p)
 /**
  * gem_context_require_param:
  * @fd: open i915 drm file descriptor
- * @param: i915 hw context parameter
+ * @param: i915 context parameter
  *
- * Feature test macro to query whether hw context parameter support for @param
+ * Feature test macro to query whether context parameter support for @param
  * is available. Automatically skips through igt_require() if not.
  */
 void gem_context_require_param(int fd, uint64_t param)
@@ -1098,7 +1096,7 @@ void gem_userptr(int fd, void *ptr, int size, int read_only, uint32_t flags, uin
  * @fd: open i915 drm file descriptor
  * @handle: gem buffer object handle
  *
- * This is a wraps the SW_FINISH ioctl, which is used to flush out frontbuffer
+ * This wraps the SW_FINISH ioctl, which is used to flush out frontbuffer
  * rendering done through the direct cpu memory mappings. Shipping userspace
  * does _not_ call this after frontbuffer rendering through gtt memory mappings.
  */
@@ -1117,7 +1115,7 @@ void gem_sw_finish(int fd, uint32_t handle)
  * @fd: open i915 drm file descriptor
  * @handle: gem buffer object handle
  *
- * This is a wraps the BUSY ioctl, which tells whether a buffer object is still
+ * This wraps the BUSY ioctl, which tells whether a buffer object is still
  * actively used by the gpu in a execbuffer.
  *
  * Returns: The busy state of the buffer object.
-- 
2.9.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH i-g-t v2] lib/ioctl_wrappers: Fix function descriptions
  2017-06-23 14:01 ` [PATCH i-g-t v2] " Radoslaw Szwichtenberg
@ 2017-06-28 10:47   ` Arkadiusz Hiler
  0 siblings, 0 replies; 5+ messages in thread
From: Arkadiusz Hiler @ 2017-06-28 10:47 UTC (permalink / raw)
  To: Radoslaw Szwichtenberg; +Cc: intel-gfx

On Fri, Jun 23, 2017 at 04:01:05PM +0200, Radoslaw Szwichtenberg wrote:
> Function description incorrectly stated that gem_context_get_param
> and gem_context_set_param were freeing hw context.
> 
> v2: removed additional incorrect information
> 
> Signed-off-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>

I'll push it in a moment, thanks!

I followed up with a couple of similar fixes around the area, on top of
your patch.

Feel free to review them :-)

-- 
Cheers,
Arek
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH i-g-t] lib/ioctl_wrappers: Fix some comments
  2017-06-28 10:40 ` [PATCH i-g-t] lib/ioctl_wrappers: Fix some comments Arkadiusz Hiler
@ 2017-06-28 11:25   ` Szwichtenberg, Radoslaw
  0 siblings, 0 replies; 5+ messages in thread
From: Szwichtenberg, Radoslaw @ 2017-06-28 11:25 UTC (permalink / raw)
  To: Hiler, Arkadiusz, intel-gfx; +Cc: Vetter, Daniel

On Wed, 2017-06-28 at 13:40 +0300, Arkadiusz Hiler wrote:
> "This is a wraps" -> "This wraps"
> "hw/hardware context" -> "context"
> 
> gem_context_create does not use igt_require() but igt_skip_on() so make
> the similarity note more vague and in result true.
> 
> Cc: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com>
> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2017-06-28 11:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-23 13:21 [PATCH i-g-t] lib/ioctl_wrappers: Fix function descriptions Radoslaw Szwichtenberg
2017-06-23 14:01 ` [PATCH i-g-t v2] " Radoslaw Szwichtenberg
2017-06-28 10:47   ` Arkadiusz Hiler
2017-06-28 10:40 ` [PATCH i-g-t] lib/ioctl_wrappers: Fix some comments Arkadiusz Hiler
2017-06-28 11:25   ` Szwichtenberg, Radoslaw

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.