i.MX6DL - GPU Scaling from Userspace

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX6DL - GPU Scaling from Userspace

1,599 Views
jameshuang
Contributor I

I've noticed that the GPU3D clock speed on my imx6 device gets scaled to 1/64 clock speed when it overheats to a particular temperature. It calls gckHARDWARE_SetFscaleValue. 

Is there an easy way from the command line or a C program for me to set the GPU3D clock speed myself? 

James

Tags (3)
0 Kudos
Reply
3 Replies

1,137 Views
igorpadykov
NXP Employee
NXP Employee

Hi James

scaling functionality is described in Chapter 24 Dynamic Bus Frequency Driver

attached Linux Manual and one can look at its codes for using in custom application.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

1,137 Views
jameshuang
Contributor I

Thanks Igor,

You pointed me to a chapter on scaling bus frequencies. The GPU is not a bus is it?

The drive code that I think is relevant to me is in Chapter 25 (Thermal Driver).

I had put together this from the code in thermal driver (kernel-module-imx-gpu-viv/gc_hal_kernel_platform_imx6q14.c at master · Freescale/kernel-module-imx-g... ) but I've gotten a little stuck:
IN gckPLATFORM Platform
struct platform_device *pdevice = Platform->device;
gckGALDEVICE galDevice = platform_get_drvdata(pdevice);
if (galDevice) {
  if (galDevice->kernels[gcvCORE_MAJOR]) {
    gckHARDWARE hardware = galDevice->kernels[gcvCORE_MAJOR]->hardware;
    if (hardware) {
      gckHARDWARE_SetFscaleValue(hardware, minFscale);
    }
  }
}
How do I initialize my Platform struct properly? 
What does the "IN" prefix/macro mean? 
0 Kudos
Reply

1,137 Views
igorpadykov
NXP Employee
NXP Employee

Hi James

one can look at description of GPU driver in Chapter 13 and GPU Tools:

IDE - Debug, Compile and Build Tools (15)
IMX6_L4.1.15_2.0.0_GPU_TOOL
https://www.nxp.com/products/processors-and-microcontrollers/applications-processors/i.mx-applicatio...

Also NXP has special service: Professional Services for helping with developing custom drivers.
NXP Professional Services|NXP 

Best regards
igor

0 Kudos
Reply