From 24d112c02e29e1335e4a8dc43024dd37cd8f50f7 Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Fri, 18 Oct 2013 20:54:13 +0000 Subject: replay: make use of using2D and using3D The imx6 kernel 1.1.0 makes use of these vars, so it is a good idea to set them. root@linaro-ubuntu-desktop:~/linux-imx6# grep using3D drivers/mxc/gpu-viv/ -R drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_command.c: if (Context->dirty || commandBufferObject->using3D) drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_command.c: if (Context->dirty || commandBufferObject->using3D) drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_command.c: if (commandBufferObject->using3D && Context->dirty3D) drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_command.c: if (commandBufferObject->using3D && Context->dirty3D) drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_kernel_buffer.h: gctBOOL using3D; root@linaro-ubuntu-desktop:~/linux-imx6# grep using2D drivers/mxc/gpu-viv/ -R drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_command.c: if (commandBufferObject->using2D && Context->dirty2D) drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_kernel_buffer.h: gctBOOL using2D; root@linaro-ubuntu-desktop:~/linux-imx6# Signed-off-by: Christian Gmeiner --- src/replay/viv_raw.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src') diff --git a/src/replay/viv_raw.c b/src/replay/viv_raw.c index b18d041..acb8e6c 100644 --- a/src/replay/viv_raw.c +++ b/src/replay/viv_raw.c @@ -50,6 +50,22 @@ int viv_invoke(struct viv_conn *conn, gcsHAL_INTERFACE *cmd) }; #ifdef GCABI_HAS_HARDWARE_TYPE cmd->hardwareType = (gceHARDWARE_TYPE)conn->hw_type; + + cmd->using3D = 0; + cmd->using2D = 0; + + switch (conn->hw_type) + { + case VIV_HW_3D: + cmd->using3D = 1; + break; + case VIV_HW_2D: + cmd->using2D = 1; + break; + + default: + printf("!!! Implement me !!!\n"); + } #endif if(ioctl(conn->fd, IOCTL_GCHAL_INTERFACE, &ic) < 0) return -1; -- cgit