YaGL: Support host OpenGL version report
authorStanislav Vorobiov <s.vorobiov@samsung.com>
Tue, 22 Oct 2013 10:15:56 +0000 (14:15 +0400)
committerSeokYeon Hwang <syeon.hwang@samsung.com>
Wed, 9 Apr 2014 05:42:28 +0000 (14:42 +0900)
Change-Id: Ifaf7abb86f7f0a650ab6954be23ae95233261450

drivers/gpu/yagl/yagl_driver.c
drivers/gpu/yagl/yagl_ioctl.h

index 1bb72619e298b6a659accce60e52b00f7d70b743..93cf973c37d482c9c2b11d9a674625d9b6944171 100644 (file)
@@ -83,8 +83,9 @@ struct yagl_file
     struct page **pages;
     u32 num_pages;
 
-    /* Render type for this client, filled on 'open'. */
+    /* Render type and host OpenGL version for this client, filled on 'open'. */
     u32 render_type;
+    u32 gl_version;
 
     /* List of mlock'ed memory regions. */
     struct list_head mlock_list;
@@ -257,6 +258,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);
 
     kunmap(yfile->pages[0]);
 
@@ -665,6 +667,7 @@ static long yagl_misc_ioctl(struct file* file, unsigned int cmd, unsigned long a
     case YAGL_IOC_GET_USER_INFO:
         value.user_info.index = yfile->index;
         value.user_info.render_type = yfile->render_type;
+        value.user_info.gl_version = yfile->gl_version;
         if (copy_to_user((struct yagl_user_info __user*)arg,
                          &value.user_info,
                          sizeof(value.user_info)) != 0) {
index 33829a613171e2383f7573edb039305032d9c36f..e6046b8914abf5ecc80f2dd57c1cf935fdfb03f6 100644 (file)
@@ -25,6 +25,7 @@ struct yagl_user_info
 {
     unsigned int index;
     unsigned int render_type;
+    unsigned int gl_version;
 };
 
 #define YAGL_IOC_GET_USER_INFO _IOR(YAGL_IOC_MAGIC, 1, struct yagl_user_info)