summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSooyoung Ha <yoosah.ha@samsung.com>2016-06-16 14:42:05 +0900
committerSooyoung Ha <yoosah.ha@samsung.com>2016-06-16 16:08:44 +0900
commitf55fff79829f7152eee535fe49d32da6a1126d5c (patch)
tree02316a14a3abd7c6860fcc6f5c5b45471a2636cc
parent91eaaec79ad68aad3d7444649bcc59aa60b16303 (diff)
downloademulator-kernel-f55fff79829f7152eee535fe49d32da6a1126d5c.tar.gz
emulator-kernel-f55fff79829f7152eee535fe49d32da6a1126d5c.tar.bz2
emulator-kernel-f55fff79829f7152eee535fe49d32da6a1126d5c.zip
yagl: introduce yagl protocol version
Now yagl driver receives the protocol version from yagl device and send it to user. Change-Id: I156efb5a407bf29ef00460478f246b0621916096 Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
-rw-r--r--drivers/gpu/yagl/yagl_driver.c7
-rw-r--r--drivers/gpu/yagl/yagl_ioctl.h2
2 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/yagl/yagl_driver.c b/drivers/gpu/yagl/yagl_driver.c
index 3a8f4ad6ae4c..1af701678c31 100644
--- a/drivers/gpu/yagl/yagl_driver.c
+++ b/drivers/gpu/yagl/yagl_driver.c
@@ -28,6 +28,8 @@
#define PCI_VENDOR_ID_YAGL 0x19B1
#define PCI_DEVICE_ID_YAGL 0x1010
+static uint32_t protocol_version = 0;
+
static struct pci_device_id yagl_pci_table[] =
{
{
@@ -259,6 +261,7 @@ static int yagl_misc_open(struct inode *inode, struct file *file)
yfile->render_type = yagl_marshal_get_uint32_t(&buff);
yfile->gl_version = yagl_marshal_get_uint32_t(&buff);
+ protocol_version = yagl_marshal_get_uint32_t(&buff);
kunmap(yfile->pages[0]);
@@ -268,7 +271,7 @@ static int yagl_misc_open(struct inode *inode, struct file *file)
mutex_unlock(&device->mutex);
- print_info("%d opened\n", yfile->index);
+ print_info("(protocol %u) %d opened\n", protocol_version, yfile->index);
return nonseekable_open(inode, file);
@@ -660,7 +663,7 @@ static long yagl_misc_ioctl(struct file* file, unsigned int cmd, unsigned long a
switch (cmd) {
case YAGL_IOC_GET_VERSION:
- value.uint = YAGL_VERSION;
+ value.uint = protocol_version;
ret = put_user(value.uint, (unsigned int __user*)arg);
break;
case YAGL_IOC_GET_USER_INFO:
diff --git a/drivers/gpu/yagl/yagl_ioctl.h b/drivers/gpu/yagl/yagl_ioctl.h
index f4f4ab942d2f..9f60985ef6bd 100644
--- a/drivers/gpu/yagl/yagl_ioctl.h
+++ b/drivers/gpu/yagl/yagl_ioctl.h
@@ -6,7 +6,7 @@
/*
* Version number.
*/
-#define YAGL_VERSION 24
+#define YAGL_VERSION 1
/*
* Device control codes magic.