All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: linux-media@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org,
	linux-samsung-soc@vger.kernel.org, linux-input@vger.kernel.org,
	lars@opdenkamp.eu, linux@arm.linux.org.uk,
	Hans Verkuil <hans.verkuil@cisco.com>
Subject: [PATCHv15 06/15] cec: add compat32 ioctl support
Date: Mon, 25 Apr 2016 14:24:33 +0200	[thread overview]
Message-ID: <1461587082-48041-7-git-send-email-hverkuil@xs4all.nl> (raw)
In-Reply-To: <1461587082-48041-1-git-send-email-hverkuil@xs4all.nl>

From: Hans Verkuil <hans.verkuil@cisco.com>

The CEC ioctls didn't have compat32 support, so they returned -ENOTTY
when used in a 32 bit application on a 64 bit kernel.

Since all the CEC ioctls are 32-bit compatible adding support for this
API is trivial.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
 fs/compat_ioctl.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c
index bd01b92..c1e9f29 100644
--- a/fs/compat_ioctl.c
+++ b/fs/compat_ioctl.c
@@ -57,6 +57,7 @@
 #include <linux/i2c-dev.h>
 #include <linux/atalk.h>
 #include <linux/gfp.h>
+#include <linux/cec.h>
 
 #include "internal.h"
 
@@ -1377,6 +1378,17 @@ COMPATIBLE_IOCTL(VIDEO_GET_NAVI)
 COMPATIBLE_IOCTL(VIDEO_SET_ATTRIBUTES)
 COMPATIBLE_IOCTL(VIDEO_GET_SIZE)
 COMPATIBLE_IOCTL(VIDEO_GET_FRAME_RATE)
+/* cec */
+COMPATIBLE_IOCTL(CEC_ADAP_G_CAPS)
+COMPATIBLE_IOCTL(CEC_ADAP_G_LOG_ADDRS)
+COMPATIBLE_IOCTL(CEC_ADAP_S_LOG_ADDRS)
+COMPATIBLE_IOCTL(CEC_ADAP_G_PHYS_ADDR)
+COMPATIBLE_IOCTL(CEC_ADAP_S_PHYS_ADDR)
+COMPATIBLE_IOCTL(CEC_G_MODE)
+COMPATIBLE_IOCTL(CEC_S_MODE)
+COMPATIBLE_IOCTL(CEC_TRANSMIT)
+COMPATIBLE_IOCTL(CEC_RECEIVE)
+COMPATIBLE_IOCTL(CEC_DQEVENT)
 
 /* joystick */
 COMPATIBLE_IOCTL(JSIOCGVERSION)
-- 
2.8.1


WARNING: multiple messages have this Message-ID (diff)
From: Hans Verkuil <hverkuil@xs4all.nl>
To: linux-media@vger.kernel.org
Cc: linux-samsung-soc@vger.kernel.org, linux@arm.linux.org.uk,
	dri-devel@lists.freedesktop.org, lars@opdenkamp.eu,
	Hans Verkuil <hans.verkuil@cisco.com>,
	linux-input@vger.kernel.org
Subject: [PATCHv15 06/15] cec: add compat32 ioctl support
Date: Mon, 25 Apr 2016 14:24:33 +0200	[thread overview]
Message-ID: <1461587082-48041-7-git-send-email-hverkuil@xs4all.nl> (raw)
In-Reply-To: <1461587082-48041-1-git-send-email-hverkuil@xs4all.nl>

From: Hans Verkuil <hans.verkuil@cisco.com>

The CEC ioctls didn't have compat32 support, so they returned -ENOTTY
when used in a 32 bit application on a 64 bit kernel.

Since all the CEC ioctls are 32-bit compatible adding support for this
API is trivial.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
 fs/compat_ioctl.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c
index bd01b92..c1e9f29 100644
--- a/fs/compat_ioctl.c
+++ b/fs/compat_ioctl.c
@@ -57,6 +57,7 @@
 #include <linux/i2c-dev.h>
 #include <linux/atalk.h>
 #include <linux/gfp.h>
+#include <linux/cec.h>
 
 #include "internal.h"
 
@@ -1377,6 +1378,17 @@ COMPATIBLE_IOCTL(VIDEO_GET_NAVI)
 COMPATIBLE_IOCTL(VIDEO_SET_ATTRIBUTES)
 COMPATIBLE_IOCTL(VIDEO_GET_SIZE)
 COMPATIBLE_IOCTL(VIDEO_GET_FRAME_RATE)
+/* cec */
+COMPATIBLE_IOCTL(CEC_ADAP_G_CAPS)
+COMPATIBLE_IOCTL(CEC_ADAP_G_LOG_ADDRS)
+COMPATIBLE_IOCTL(CEC_ADAP_S_LOG_ADDRS)
+COMPATIBLE_IOCTL(CEC_ADAP_G_PHYS_ADDR)
+COMPATIBLE_IOCTL(CEC_ADAP_S_PHYS_ADDR)
+COMPATIBLE_IOCTL(CEC_G_MODE)
+COMPATIBLE_IOCTL(CEC_S_MODE)
+COMPATIBLE_IOCTL(CEC_TRANSMIT)
+COMPATIBLE_IOCTL(CEC_RECEIVE)
+COMPATIBLE_IOCTL(CEC_DQEVENT)
 
 /* joystick */
 COMPATIBLE_IOCTL(JSIOCGVERSION)
-- 
2.8.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2016-04-25 12:25 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-25 12:24 [PATCHv15 00/15] HDMI CEC framework Hans Verkuil
2016-04-25 12:24 ` [PATCHv15 01/15] input.h: add BUS_CEC type Hans Verkuil
2016-04-25 12:24 ` [PATCHv15 02/15] HID: add HDMI CEC specific keycodes Hans Verkuil
2016-04-25 12:24 ` [PATCHv15 03/15] rc: Add HDMI CEC protocol handling Hans Verkuil
2016-04-25 12:24   ` Hans Verkuil
2016-04-25 12:24 ` [PATCHv15 04/15] cec: add HDMI CEC framework Hans Verkuil
2016-04-25 12:24   ` Hans Verkuil
2016-04-25 12:24 ` [PATCHv15 05/15] cec/TODO: add TODO file so we know why this is still in staging Hans Verkuil
2016-04-25 12:24 ` Hans Verkuil [this message]
2016-04-25 12:24   ` [PATCHv15 06/15] cec: add compat32 ioctl support Hans Verkuil
2016-04-25 12:24 ` [PATCHv15 07/15] cec.txt: add CEC framework documentation Hans Verkuil
2016-04-25 12:24   ` Hans Verkuil
2016-04-25 12:24 ` [PATCHv15 08/15] DocBook/media: add CEC documentation Hans Verkuil
2016-04-25 12:24   ` Hans Verkuil
2016-04-25 12:24 ` [PATCHv15 09/15] cec: adv7604: add cec support Hans Verkuil
2016-04-25 12:24   ` Hans Verkuil
2016-04-25 12:24 ` [PATCHv15 10/15] cec: adv7842: " Hans Verkuil
2016-04-25 12:24   ` Hans Verkuil
2016-04-25 12:24 ` [PATCHv15 11/15] cec: adv7511: " Hans Verkuil
2016-04-25 12:24 ` [PATCHv15 12/15] cec: s5p-cec: Add s5p-cec driver Hans Verkuil
2016-04-25 12:24   ` Hans Verkuil
2016-04-25 12:24 ` [PATCHv15 13/15] vivid: add CEC emulation Hans Verkuil
2016-04-25 12:24 ` [PATCHv15 14/15] pulse8-cec: add new driver Hans Verkuil
2016-04-25 12:24 ` [PATCHv15 15/15] cec: add ARC and CDC support Hans Verkuil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1461587082-48041-7-git-send-email-hverkuil@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hans.verkuil@cisco.com \
    --cc=lars@opdenkamp.eu \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.