All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] linux-user: Add support for ioctls related to the frame-buffer/console
@ 2011-06-29 13:09 Cédric VINCENT
  2011-06-29 13:09 ` [Qemu-devel] [PATCH 1/3] linux-user: Add support for KD...LED ioctls Cédric VINCENT
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Cédric VINCENT @ 2011-06-29 13:09 UTC (permalink / raw)
  To: qemu-devel; +Cc: Riku Voipio

This patch series adds support for some ioctls related to the Linux
frame-buffer/console.  It was fully tested for the SH4 target and
partially tested for the x86_64 and ARM targets, this latter fails the
"setleds" tests (embedded within the first commit message) but it
seems the problem doesn't come from the patch.

Regards,
Cédric.

---
 linux-user/ioctls.h        |   13 +++++++++++++
 linux-user/syscall_defs.h  |   13 +++++++++++++
 linux-user/syscall_types.h |   20 ++++++++++++++++++++
 3 files changed, 46 insertions(+), 0 deletions(-)

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

* [Qemu-devel] [PATCH 1/3] linux-user: Add support for KD...LED ioctls
  2011-06-29 13:09 [Qemu-devel] linux-user: Add support for ioctls related to the frame-buffer/console Cédric VINCENT
@ 2011-06-29 13:09 ` Cédric VINCENT
  2011-06-29 13:09 ` [Qemu-devel] [PATCH 2/3] linux-user: Add support for more VT ioctls Cédric VINCENT
  2011-06-29 13:09 ` [Qemu-devel] [PATCH 3/3] linux-user: Add support for even more FB ioctls Cédric VINCENT
  2 siblings, 0 replies; 4+ messages in thread
From: Cédric VINCENT @ 2011-06-29 13:09 UTC (permalink / raw)
  To: qemu-devel; +Cc: Cédric VINCENT, Riku Voipio

DirectFB-1.0 uses at least one of the four added ioctls, and the three
others were added for completeness.  This patch was validated with the
program "setleds" and the following Makefile:

    SETLEDS_INIT  = setleds -v -num -caps -scroll
    SETLEDS_TESTS = sh -c ' \
	setleds -v +num +caps +scroll; \
	setleds -v -num -caps -scroll; \
	setleds -v +num -caps -scroll; \
	setleds -v +num +caps -scroll; \
	setleds -v +num +caps +scroll; \
	setleds -v -num +caps +scroll; \
	setleds -v -num -caps +scroll; \
	setleds -v -num -caps -scroll'

    SETLEDS_HOST = setleds
    SETLEDS_QEMU = "SETLEDS_QEMU not set"

    .PHONY: setleds_tests
    setleds_tests:
	rm -f setleds.host setleds.target
	$(SETLEDS_INIT:setleds=$(SETLEDS_HOST))
	$(SETLEDS_TESTS:setleds=$(SETLEDS_HOST)) >> setleds.host
	$(SETLEDS_INIT:setleds=$(SETLEDS_QEMU))
	$(SETLEDS_TESTS:setleds=$(SETLEDS_QEMU)) >> setleds.target
	cmp setleds.host setleds.target

Signed-off-by: Cédric VINCENT <cedric.vincent@st.com>
Cc: Riku Voipio <riku.voipio@iki.fi>
---
 linux-user/ioctls.h       |    4 ++++
 linux-user/syscall_defs.h |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h
index 42b3ae3..68418e4 100644
--- a/linux-user/ioctls.h
+++ b/linux-user/ioctls.h
@@ -59,6 +59,10 @@
      IOCTL(KDSKBMODE, 0, TYPE_INT)
      IOCTL(KDGKBENT, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_kbentry)))
      IOCTL(KDGKBSENT, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_kbsentry)))
+     IOCTL(KDGKBLED, 0, TYPE_INT)
+     IOCTL(KDSKBLED, 0, TYPE_INT)
+     IOCTL(KDGETLED, 0, TYPE_INT)
+     IOCTL(KDSETLED, 0, TYPE_INT)
 
      IOCTL(BLKROSET, IOC_W, MK_PTR(TYPE_INT))
      IOCTL(BLKROGET, IOC_R, MK_PTR(TYPE_INT))
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index 04c268d..2b74547 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -708,6 +708,10 @@ struct target_pollfd {
 #define TARGET_KDSKBMODE       0x4b45
 #define TARGET_KDGKBENT	       0x4B46	/* gets one entry in translation table */
 #define TARGET_KDGKBSENT       0x4B48	/* gets one function key string entry */
+#define TARGET_KDGKBLED        0x4B64	/* get led flags (not lights) */
+#define TARGET_KDSKBLED        0x4B65	/* set led flags (not lights) */
+#define TARGET_KDGETLED        0x4B31	/* return current led state */
+#define TARGET_KDSETLED        0x4B32	/* set led state [lights, not flags] */
 
 #define TARGET_SIOCATMARK      0x8905
 
-- 
1.7.5.1

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

* [Qemu-devel] [PATCH 2/3] linux-user: Add support for more VT ioctls
  2011-06-29 13:09 [Qemu-devel] linux-user: Add support for ioctls related to the frame-buffer/console Cédric VINCENT
  2011-06-29 13:09 ` [Qemu-devel] [PATCH 1/3] linux-user: Add support for KD...LED ioctls Cédric VINCENT
@ 2011-06-29 13:09 ` Cédric VINCENT
  2011-06-29 13:09 ` [Qemu-devel] [PATCH 3/3] linux-user: Add support for even more FB ioctls Cédric VINCENT
  2 siblings, 0 replies; 4+ messages in thread
From: Cédric VINCENT @ 2011-06-29 13:09 UTC (permalink / raw)
  To: qemu-devel; +Cc: Cédric VINCENT, Riku Voipio

DirectFB-1.0 uses at least two of the four added ioctls, and the two
others were added for completeness.  This patch was validated with the
program "vlock -all/-new".

Signed-off-by: Cédric VINCENT <cedric.vincent@st.com>
Cc: Riku Voipio <riku.voipio@iki.fi>
---
 linux-user/ioctls.h        |    4 ++++
 linux-user/syscall_defs.h  |    4 ++++
 linux-user/syscall_types.h |    7 +++++++
 3 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h
index 68418e4..7bc1c48 100644
--- a/linux-user/ioctls.h
+++ b/linux-user/ioctls.h
@@ -336,3 +336,7 @@
   IOCTL(VT_WAITACTIVE, 0, TYPE_INT)
   IOCTL(VT_LOCKSWITCH, 0, TYPE_INT)
   IOCTL(VT_UNLOCKSWITCH, 0, TYPE_INT)
+  IOCTL(VT_GETMODE, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_vt_mode)))
+  IOCTL(VT_SETMODE, IOC_RW, MK_PTR(MK_STRUCT(STRUCT_vt_mode)))
+  IOCTL(VT_RELDISP, 0, TYPE_INT)
+  IOCTL(VT_DISALLOCATE, 0, TYPE_INT)
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index 2b74547..4a59b36 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -940,6 +940,10 @@ struct target_pollfd {
 #define TARGET_VT_WAITACTIVE          0x5607
 #define TARGET_VT_LOCKSWITCH          0x560b
 #define TARGET_VT_UNLOCKSWITCH        0x560c
+#define TARGET_VT_GETMODE             0x5601
+#define TARGET_VT_SETMODE             0x5602
+#define TARGET_VT_RELDISP             0x5605
+#define TARGET_VT_DISALLOCATE         0x5608
 
 /* from asm/termbits.h */
 
diff --git a/linux-user/syscall_types.h b/linux-user/syscall_types.h
index 0e67cd8..94b0ce0 100644
--- a/linux-user/syscall_types.h
+++ b/linux-user/syscall_types.h
@@ -166,6 +166,13 @@ STRUCT(vt_stat,
        TYPE_SHORT, /* v_signal */
        TYPE_SHORT) /* v_state */
 
+STRUCT(vt_mode,
+       TYPE_CHAR,  /* mode   */
+       TYPE_CHAR,  /* waitv  */
+       TYPE_SHORT, /* relsig */
+       TYPE_SHORT, /* acqsig */
+       TYPE_SHORT) /* frsig  */
+
 STRUCT(fiemap_extent,
        TYPE_ULONGLONG, /* fe_logical */
        TYPE_ULONGLONG, /* fe_physical */
-- 
1.7.5.1

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

* [Qemu-devel] [PATCH 3/3] linux-user: Add support for even more FB ioctls
  2011-06-29 13:09 [Qemu-devel] linux-user: Add support for ioctls related to the frame-buffer/console Cédric VINCENT
  2011-06-29 13:09 ` [Qemu-devel] [PATCH 1/3] linux-user: Add support for KD...LED ioctls Cédric VINCENT
  2011-06-29 13:09 ` [Qemu-devel] [PATCH 2/3] linux-user: Add support for more VT ioctls Cédric VINCENT
@ 2011-06-29 13:09 ` Cédric VINCENT
  2 siblings, 0 replies; 4+ messages in thread
From: Cédric VINCENT @ 2011-06-29 13:09 UTC (permalink / raw)
  To: qemu-devel; +Cc: Cédric VINCENT, Riku Voipio

This patch was validated with programs from DirectFB-1.0 and
WebKit/DirectFB.

Signed-off-by: Cédric VINCENT <cedric.vincent@st.com>
Cc: Riku Voipio <riku.voipio@iki.fi>
---
 linux-user/ioctls.h        |    5 +++++
 linux-user/syscall_defs.h  |    5 +++++
 linux-user/syscall_types.h |   13 +++++++++++++
 3 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h
index 7bc1c48..6514502 100644
--- a/linux-user/ioctls.h
+++ b/linux-user/ioctls.h
@@ -329,6 +329,11 @@
   IOCTL(FBIOGET_FSCREENINFO, IOC_R, MK_PTR(MK_STRUCT(STRUCT_fb_fix_screeninfo)))
   IOCTL(FBIOGET_VSCREENINFO, IOC_R, MK_PTR(MK_STRUCT(STRUCT_fb_var_screeninfo)))
   IOCTL(FBIOPUT_VSCREENINFO, IOC_W, MK_PTR(MK_STRUCT(STRUCT_fb_var_screeninfo)))
+  IOCTL(FBIOGETCMAP,        IOC_RW, MK_PTR(MK_STRUCT(STRUCT_fb_cmap)))
+  IOCTL(FBIOPUTCMAP,        IOC_RW, MK_PTR(MK_STRUCT(STRUCT_fb_cmap)))
+  IOCTL(FBIOPAN_DISPLAY,    IOC_RW, MK_PTR(MK_STRUCT(STRUCT_fb_var_screeninfo)))
+  IOCTL(FBIOGET_CON2FBMAP,  IOC_RW, MK_PTR(MK_STRUCT(STRUCT_fb_con2fbmap)))
+  IOCTL(FBIOPUT_CON2FBMAP,  IOC_RW, MK_PTR(MK_STRUCT(STRUCT_fb_con2fbmap)))
 
   IOCTL(VT_OPENQRY, IOC_R, MK_PTR(TYPE_INT))
   IOCTL(VT_GETSTATE, IOC_R, MK_PTR(MK_STRUCT(STRUCT_vt_stat)))
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index 4a59b36..1b73451 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -932,6 +932,11 @@ struct target_pollfd {
 #define TARGET_FBIOGET_VSCREENINFO    0x4600
 #define TARGET_FBIOPUT_VSCREENINFO    0x4601
 #define TARGET_FBIOGET_FSCREENINFO    0x4602
+#define TARGET_FBIOGETCMAP            0x4604
+#define TARGET_FBIOPUTCMAP            0x4605
+#define TARGET_FBIOPAN_DISPLAY        0x4606
+#define TARGET_FBIOGET_CON2FBMAP      0x460F
+#define TARGET_FBIOPUT_CON2FBMAP      0x4610
 
 /* vt ioctls */
 #define TARGET_VT_OPENQRY             0x5600
diff --git a/linux-user/syscall_types.h b/linux-user/syscall_types.h
index 94b0ce0..c370125 100644
--- a/linux-user/syscall_types.h
+++ b/linux-user/syscall_types.h
@@ -161,6 +161,19 @@ STRUCT(fb_var_screeninfo,
        TYPE_INT, /* rotate */
        MK_ARRAY(TYPE_INT, 5)) /* reserved */
 
+STRUCT(fb_cmap,
+       TYPE_INT, /* start  */
+       TYPE_INT, /* len    */
+       TYPE_PTRVOID, /* red    */
+       TYPE_PTRVOID, /* green  */
+       TYPE_PTRVOID, /* blue   */
+       TYPE_PTRVOID) /* transp */
+
+STRUCT(fb_con2fbmap,
+       TYPE_INT, /* console     */
+       TYPE_INT) /* framebuffer */
+
+
 STRUCT(vt_stat,
        TYPE_SHORT, /* v_active */
        TYPE_SHORT, /* v_signal */
-- 
1.7.5.1

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

end of thread, other threads:[~2011-06-29 13:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-29 13:09 [Qemu-devel] linux-user: Add support for ioctls related to the frame-buffer/console Cédric VINCENT
2011-06-29 13:09 ` [Qemu-devel] [PATCH 1/3] linux-user: Add support for KD...LED ioctls Cédric VINCENT
2011-06-29 13:09 ` [Qemu-devel] [PATCH 2/3] linux-user: Add support for more VT ioctls Cédric VINCENT
2011-06-29 13:09 ` [Qemu-devel] [PATCH 3/3] linux-user: Add support for even more FB ioctls Cédric VINCENT

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.