[igt-dev] [PATCH i-g-t v3 1/3] lib/ioctl_wrapper: Add i915_get_param helper

Eric Anholt eric at anholt.net
Mon Nov 26 20:49:06 UTC 2018


Lukasz Kalamarz <lukasz.kalamarz at intel.com> writes:

> getparam is used in few places across IGT, but no helper function
> is used to reduce code duplication.
> v2: Added doc part and changed return value in case of error
>
> Signed-off-by: Lukasz Kalamarz <lukasz.kalamarz at intel.com>
>
> Cc: Michal Winiarski <michal.winiarski at intel.com>
> Cc: Katarzyna Dec <katarzyna.dec at intel.com>
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
> ---
>  lib/ioctl_wrappers.c | 22 ++++++++++++++++++++++
>  lib/ioctl_wrappers.h |  1 +
>  2 files changed, 23 insertions(+)
>
> diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c
> index 9f255508..aec4f15e 100644
> --- a/lib/ioctl_wrappers.c
> +++ b/lib/ioctl_wrappers.c
> @@ -468,6 +468,28 @@ void gem_sync(int fd, uint32_t handle)
>  	errno = 0;
>  }
>  
> +/**
> + * drm_get_param:
> + * @fd: open i915 drm file descriptor
> + * @param: drm parameter we want to read

Could we please call this i915_get_param, to match the commit message,
instead of drm_get_param()?  I know igt used to call i915-only ioctls
drm_* or gem_*, but it would be nice to see new functions use a more
appropriate namespace.

(I wouldn't block this, but if people decide not to do that then the
commit message subject should at least change)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/igt-dev/attachments/20181126/f7543aff/attachment.sig>


More information about the igt-dev mailing list