Re: [PATCH 2/4] drm: Add dispatcher and driver identification for DRM

2015-06-09 Thread Dmitry V. Levin
On Tue, Jun 09, 2015 at 01:26:42PM +0200, Patrik Jakobsson wrote: [...] > +static int drm_get_driver_name(struct tcb *tcp, char *name, size_t bufsize) > +{ > + char path[PATH_MAX]; > + char link[PATH_MAX]; > + int ret; > + > + ret = getfdpath(tcp, tcp->u_arg[0], path, PATH_MAX - 1);

Re: [PATCH 4/4] drm: Add decoding of DRM and KMS ioctls

2015-06-09 Thread Dmitry V. Levin
On Tue, Jun 09, 2015 at 04:38:40PM +0200, Gabriel Laskar wrote: > On Tue, 9 Jun 2015 16:29:31 +0200 > Patrik Jakobsson wrote: > > > On Tue, Jun 09, 2015 at 03:51:08PM +0200, Gabriel Laskar wrote: > > > On Tue, 9 Jun 2015 13:26:44 +0200 > > > Patrik Jakobsson wrote: > > > > > > > This patch add

Re: [PATCH 4/4] drm: Add decoding of DRM and KMS ioctls

2015-06-09 Thread Dmitry V. Levin
On Tue, Jun 09, 2015 at 01:26:44PM +0200, Patrik Jakobsson wrote: [...] > +static int drm_version(struct tcb *tcp, const unsigned int code, long arg) > +{ > + struct drm_version ver; > + char *name, *date, *desc; > + int ret; > + > + if (entering(tcp) || umove(tcp, arg, &ver)) > +

Re: [PATCH 3/4] drm: Add decoding of i915 ioctls

2015-06-09 Thread Dmitry V. Levin
On Tue, Jun 09, 2015 at 01:26:43PM +0200, Patrik Jakobsson wrote: [...] > +static int i915_getparam(struct tcb *tcp, const unsigned int code, long arg) > +{ > + struct drm_i915_getparam param; > + int value; > + > + if (entering(tcp) || umove(tcp, arg, ¶m)) > + return 0; > +

Re: [PATCH 2/4] drm: Add dispatcher and driver identification for DRM

2015-06-09 Thread Dmitry V. Levin
On Tue, Jun 09, 2015 at 01:26:42PM +0200, Patrik Jakobsson wrote: [...] > --- a/Makefile.am > +++ b/Makefile.am > @@ -121,6 +121,7 @@ strace_SOURCES = \ > utime.c \ > utimes.c\ > v4l2.c \ > + drm.c \ > vsprintf.c \ > wait.c

Re: [PATCH 4/4] drm: Add decoding of DRM and KMS ioctls

2015-06-09 Thread Gabriel Laskar
On Tue, 9 Jun 2015 16:29:31 +0200 Patrik Jakobsson wrote: > On Tue, Jun 09, 2015 at 03:51:08PM +0200, Gabriel Laskar wrote: > > On Tue, 9 Jun 2015 13:26:44 +0200 > > Patrik Jakobsson wrote: > > > > > This patch adds many of the DRM and KMS ioctls. The rest can be added as > > > needed. > > >

Re: [PATCH 0/4] drm: Add decoding for DRM/KMS and i915 ioctls

2015-06-09 Thread Patrik Jakobsson
On Tue, Jun 09, 2015 at 03:51:05PM +0200, Gabriel Laskar wrote: > On Tue, 9 Jun 2015 13:26:40 +0200 > Patrik Jakobsson wrote: > > > This set of patches adds a dispatcher for handling DRM ioctls. The > > kernel headers for DRM might not be available on all distributions > > so we depend on libdrm

Re: [PATCH 2/4] drm: Add dispatcher and driver identification for DRM

2015-06-09 Thread Patrik Jakobsson
On Tue, Jun 09, 2015 at 03:51:10PM +0200, Gabriel Laskar wrote: > On Tue, 9 Jun 2015 13:26:42 +0200 > Patrik Jakobsson wrote: > > > Signed-off-by: Patrik Jakobsson > > --- > > Makefile.am | 1 + > > defs.h | 6 - > > drm.c | 88 > >

Re: [PATCH 4/4] drm: Add decoding of DRM and KMS ioctls

2015-06-09 Thread Patrik Jakobsson
On Tue, Jun 09, 2015 at 03:51:08PM +0200, Gabriel Laskar wrote: > On Tue, 9 Jun 2015 13:26:44 +0200 > Patrik Jakobsson wrote: > > > This patch adds many of the DRM and KMS ioctls. The rest can be added as > > needed. > > > > Signed-off-by: Patrik Jakobsson > > --- > > drm.c | 519 > > +++

Re: [PATCH 4/4] drm: Add decoding of DRM and KMS ioctls

2015-06-09 Thread Gabriel Laskar
On Tue, 9 Jun 2015 13:26:44 +0200 Patrik Jakobsson wrote: > This patch adds many of the DRM and KMS ioctls. The rest can be added as > needed. > > Signed-off-by: Patrik Jakobsson > --- > drm.c | 519 > ++ > 1 file changed, 519 i

Re: [PATCH 2/4] drm: Add dispatcher and driver identification for DRM

2015-06-09 Thread Gabriel Laskar
On Tue, 9 Jun 2015 13:26:42 +0200 Patrik Jakobsson wrote: > Signed-off-by: Patrik Jakobsson > --- > Makefile.am | 1 + > defs.h | 6 - > drm.c | 88 > + > io.c| 2 +- > ioctl.c | 13 - > 5 files

Re: [PATCH 0/4] drm: Add decoding for DRM/KMS and i915 ioctls

2015-06-09 Thread Gabriel Laskar
On Tue, 9 Jun 2015 13:26:40 +0200 Patrik Jakobsson wrote: > This set of patches adds a dispatcher for handling DRM ioctls. The > kernel headers for DRM might not be available on all distributions > so we depend on libdrm for those. If libdrm is not available we fall > back on the kernel headers.

[PATCH 2/4] drm: Add dispatcher and driver identification for DRM

2015-06-09 Thread Patrik Jakobsson
Signed-off-by: Patrik Jakobsson --- Makefile.am | 1 + defs.h | 6 - drm.c | 88 + io.c| 2 +- ioctl.c | 13 - 5 files changed, 107 insertions(+), 3 deletions(-) create mode 100644 drm.c diff --git

[PATCH 0/4] drm: Add decoding for DRM/KMS and i915 ioctls

2015-06-09 Thread Patrik Jakobsson
This set of patches adds a dispatcher for handling DRM ioctls. The kernel headers for DRM might not be available on all distributions so we depend on libdrm for those. If libdrm is not available we fall back on the kernel headers. Since DRM drivers share the same range of private ioctl numbers I've

[PATCH 3/4] drm: Add decoding of i915 ioctls

2015-06-09 Thread Patrik Jakobsson
There are more ioctls to add but the ones in this patch are most commonly used. Signed-off-by: Patrik Jakobsson --- Makefile.am| 1 + defs.h | 2 + drm.c | 6 + drm_i915.c | 287 +++

[PATCH 4/4] drm: Add decoding of DRM and KMS ioctls

2015-06-09 Thread Patrik Jakobsson
This patch adds many of the DRM and KMS ioctls. The rest can be added as needed. Signed-off-by: Patrik Jakobsson --- drm.c | 519 ++ 1 file changed, 519 insertions(+) diff --git a/drm.c b/drm.c index fa98fb7..e550c34 100644 --- a/d

[PATCH 1/4] drm: Add config for detecting libdrm

2015-06-09 Thread Patrik Jakobsson
Use pkg-config to try to find libdrm. If that fails use the standard include directory for kernel drm headers in /usr/include/drm. Signed-off-by: Patrik Jakobsson --- configure.ac | 4 1 file changed, 4 insertions(+) diff --git a/configure.ac b/configure.ac index d829e18..ea3b6e6 100644 --