Share Vivante 3d gc2000 work flow

cancel
Showing results for 
Search instead for 
Did you mean: 

Share Vivante 3d gc2000 work flow

No ratings

Share Vivante 3d gc2000 work flow

///////////////////////////create device node /dev/galcore/////////////////////////////
$home/myandroid/kernel_imx/drivers/mxc/gpu-viv/Kbuild
MODULE_NAME ?= galcore

/* define node name*/
$home/myandroid/kernel_imx/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.h

define DEVICE_NAME "galcore"

$home/myandroid/kernel_imx/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_probe.c
drv_init call
ret = register_chrdev(major, DEVICE_NAME, &driver_fops);

///////////////////////////////opengles2 functios///////////////////////////////////////////
myandroid/device/fsl-proprietary/gpu-viv/lib/egl/libGLESv2_VIVANTE.so
glActiveTexture
glBindBuffer
...
...
...
//those glxxxxxx call into sub_D40C
int __fastcall sub_D40C(int a1, int a2, int a3) //address 0x0000D40C {
int result; // r0@1
int v4;
int v5;

v4 = a2;
  v5 = a3;
  gcoOS_GetTLS(&v4);  //------------> goto libGAL.so
  result = v4;
  if ( v4 )
    result = *(_DWORD *)(v4 + 36);
  return result;
}

and

$home/myandroid/device/fsl-proprietary/gpu-viv/lib/libGAL.so
//export function
signed int __fastcall gcoOS_GetTLS(void **a1) {
...
...
gcoOS_GetTLS v4 = open("/dev/galcore", 2);
...
...
}

and

device node /dev/galcore pass command into module galcore
$home/myandroid/kernel_imx/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c
gckKERNEL_Dispatch

This document was generated from the following discussion: Share Vivante 3d gc2000 work flow

Labels (2)
Version history
Revision #:
2 of 2
Last update:
‎09-10-2020 02:30 AM
Updated by: