From: Stanislav Vorobiov Date: Tue, 22 Oct 2013 10:15:56 +0000 (+0400) Subject: YaGL: Support host OpenGL version report X-Git-Tag: submit/tizen_common/20140905.094502~134 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e32825ee777626967c5f5f770942cdf61998a354;p=sdk%2Femulator%2Femulator-kernel.git YaGL: Support host OpenGL version report Change-Id: Ifaf7abb86f7f0a650ab6954be23ae95233261450 --- diff --git a/drivers/gpu/yagl/yagl_driver.c b/drivers/gpu/yagl/yagl_driver.c index 1bb72619e298..93cf973c37d4 100644 --- a/drivers/gpu/yagl/yagl_driver.c +++ b/drivers/gpu/yagl/yagl_driver.c @@ -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) { diff --git a/drivers/gpu/yagl/yagl_ioctl.h b/drivers/gpu/yagl/yagl_ioctl.h index 33829a613171..e6046b8914ab 100644 --- a/drivers/gpu/yagl/yagl_ioctl.h +++ b/drivers/gpu/yagl/yagl_ioctl.h @@ -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)