any one use 2GB ddr3 with imx6q android bsp?

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

any one use 2GB ddr3 with imx6q android bsp?

Jump to solution
6,571 Views
kevin_chan
Contributor III

my env:

hardware ----- imx6q with 2GB ddr3 (only use cs0)

software ------  android 13.4 GA bsp

software change:

uboot:

config cs0_end to 0x8fffffff , config 0x021b0000 to 0x841a0000

and use this config, i can pass the ddr_stress test with 2GB.

kernel:

change mx6q_sabresd_reserve()'s

phys = memblock_alloc_base(imx6q_gpu_pdata.reserved_mem_size,SZ_4K, SZ_1G);

to

phys = memblock_alloc_base(imx6q_gpu_pdata.reserved_mem_size,SZ_4K, SZ_2G);

my problem:

In android system,  when moving mouse it would create many mouse shadows, and they don't disappear until you back to home screen or open

a new applications.  you can see it from attachment.

any one can give me suggestion about how to fix this problem??

Labels (4)
1 Solution
3,713 Views
LiuXuegang
NXP Employee
NXP Employee

Summary the conclusion:

1. Confirmed the trailing mouse issue not exist if disable android swap rectangle feature. 

2. GPU reserved memory address region should be limited within 2G as GPU command buffer use reserved memory and it can’t accept virtual memory. Our kernel code has this limit memblock_alloc_base(imx6q_gpu_pdata.reserved_mem_size,SZ_4K, SZ_2G) for 2G DDR device for example FSL SabreAI reference board.  

3. fb0base address can be set to > 2G, but there will be some performance drop, so suggest customer not set fb0base > 2G.

View solution in original post

0 Kudos
18 Replies
3,713 Views
Raana
Contributor III

Hi,
My binaries are working fine with 1GB DDR3.
If I changed my DDR3 to 2GB it's stuck in Starting kernel ...
and my changes from 1GB to 2GB is,

in u-boot level,

CS0_END - 0x00000027 to 0x00000047

MMDC0_MDCTL (0x021b0000)  - 0x83190000 to 0x841A0000

in configuration file,

#define PHYS_SDRAM_1_SIZE (1u * 1024 * 1024 * 1024) to

#define PHYS_SDRAM_1_SIZE (2u * 1024 * 1024 * 1024)

in kernel level,

phys = memblock_alloc_base(imx6q_gpu_pdata.reserved_mem_size,

                                         SZ_4K, SZ_1G);

to

phys = memblock_alloc_base(imx6q_gpu_pdata.reserved_mem_size,

                                         SZ_4K, SZ_2G);

Board Info:

i.Mx6 SabreSD based custom board.

Linux OS (L3.0.35_4.1.0)

2GB RAM (MT41K256M16HA-125 IT:E & Row -15 & Col - 10 & Bank - 8 & CS0 & x16)

Is anything I missed ?

I am struggling here. please anyone help me to go further.

0 Kudos
3,713 Views
gerardbucas
Contributor I

Hi Chen Zengjun


We have EXACTLY the same configuration and the SAME PROBLEM (your attached image is 100% the same and everything passes with flying colors in the DDR STRESS TESTER).

However I am surprised you are setting cs0_end = 8F. For 2GB DDR3, It should be set to (3F+8) = 47h
(this was also verified by FS FAE in USA)

You will notice that in the Android V13.4 BSP, FS sets this cs0_end to 27h (which = 1F +8 ) for sabresd board with 1GB DDR3 (with similar configuration & only one chip select).

However, unfortunately this is NOT your problem as even with this setting = 47h, we still get the same symptoms as you have reported, ie: trailing mouse pointer which does not go away in Android. We have tried many other settings but we cannot solve this problem so we also need some URGENT help! Anyone out there that has solved this?

Can you let me know if you have solved this problem?

If not, I would really appreciate some help from someone at FS to resolve this.

Regards

Gerard Bucas

0 Kudos
3,713 Views
Yuri
NXP Employee
NXP Employee

MX6 SabreAI supports 2G memory. 2G memory configuration was tested with Android JellyBean on MX6 SabreAI board.  The issue was not observed. Can you please check whether  framebuffer region is overlapped with other reserved memory? Such as GPU memory etc.

0 Kudos
3,713 Views
gerardbucas
Contributor I

Hi Yuri

We are using BSP 13.4. Not sure how to check what you are asking me to check. Can you let me me know best way to do this and if there is a problem how can we control/ensure there is no overlap?

Thanks

Gerard

0 Kudos
3,713 Views
Yuri
NXP Employee
NXP Employee

You may try the kernel command line parameter fb0base=memaddr to

directly control the frame buffer address.

0 Kudos
3,713 Views
bingking88
Contributor I

HI Yuri Muhin

I try to add fb0base=memaddr ,but the problem still exists. very troubled:smileyplain:

0 Kudos
3,713 Views
Yuri
NXP Employee
NXP Employee

The memaddr in parameter " fb0base=memaddr" should not be in range 0x80000000-0x90000000.

0 Kudos
3,713 Views
markian
Contributor I

Hi Yuri,

In our setup, the mouse trailing does occur only when fb0base is between 0x80000000-0x90000000. But it doesn't completely make sense why.

Can you explain why fb0base should not be between 0x80000000-0x90000000? The way I understand it is the 2GB DDR is physically mapped to 0x10000000-0x90000000 so this is still in the valid region. When fb0base was not reserved through bootargs, the allocated memory when I checked was 0x8F000000. So the kernel really thinks this memory is free and usable. We're afraid in the long run when some module allocates and is given this memory region (between 0x80000000 to 0x90000000), it will  cause our system to crash. How do we prove this region is really usable?

0 Kudos
3,713 Views
Yuri
NXP Employee
NXP Employee

This is known issue (in community), but it is not reproduceable  on the AI design (under Android version, that
will be available soon on the Freescale Web). So it is hard to say exactly what is the reason.

0 Kudos
3,713 Views
LiuXuegang
NXP Employee
NXP Employee

Hello, Yuri,

We can't reproduce the issue on our sabreAI board, could you do more try to help us analysis the issue.

First I want to disable 2D hwcomposer to have a try, please follow below steps in console:

1. root@android:/ # cd system/lib/hw/

2. root@android:/system/lib/hw # mount -o remount rw /system

3. root@android:/system/lib/hw # mv hwcomposer_viv.imx6.so hwcomposer_viv.imx6.so.bak

4. root@android:/system/lib/hw # sync

5. root@android:/system/lib/hw # reboot

0 Kudos
3,713 Views
markian
Contributor I

Hi Xuegang,

Yes, disabling 2D hwcomposer also eliminates the issue.

For the sabreAI, I believe you can replicate a related issue by forcing the GPU memory to use 0x80000000-0x90000000.


Change following in kernel_imx\arch\arm\mach-mx6\board-mx6q_sabresd.c (or sabreauto.c)

#ifdefined(CONFIG_MXC_GPU_VIV) || defined(CONFIG_MXC_GPU_VIV_MODULE)

    if (imx6q_gpu_pdata.reserved_mem_size) {

          phys =memblock_alloc_base(imx6q_gpu_pdata.reserved_mem_size,

                             SZ_4K, 0x90000000); // change SZ_2G to 0x90000000

          printk("gpu addr: 0x%08llx!!\r\n", (long long)phys);

          memblock_remove(phys, imx6q_gpu_pdata.reserved_mem_size);

          imx6q_gpu_pdata.reserved_mem_base = phys;

    }

#endif


SabreSD has the max address set to SZ_1G and SabreAI has this set to SZ_2G. I believe the correct value should be 0x50000000 for SabreSD and 0x90000000 for SabreAI since this parameter means the max address to use.Testing 0x50000000 in the SabreSD reference board works. Testing 0x90000000 for our board cause Android bootup to crash. Can you check with your SabreAI board?

0 Kudos
3,713 Views
LiuXuegang
NXP Employee
NXP Employee

Hi Mark,

You said "Testing 0x50000000 in the SabreSD reference board works.", do you see the "trailing mouse" after do the change on SabreSD reference board?

Do customer change any cache policy based on our GA release? Seems it is android partial update feature export the issue but should not the root cause, the trailing mouse issue may disappear if disable partial update I think, you can have a try.

1. disable partial update

frameworks/base/opengl/include/EGL/eglext.h b/opengl/include/EGL/eglext.h

-#define EGL_ANDROID_swap_rectangle 1

+#define EGL_ANDROID_swap_rectangle 0

2. recompile libsurfaceflinger.so

frameworks/base/services/surfaceflinger/

0 Kudos
3,714 Views
LiuXuegang
NXP Employee
NXP Employee

Summary the conclusion:

1. Confirmed the trailing mouse issue not exist if disable android swap rectangle feature. 

2. GPU reserved memory address region should be limited within 2G as GPU command buffer use reserved memory and it can’t accept virtual memory. Our kernel code has this limit memblock_alloc_base(imx6q_gpu_pdata.reserved_mem_size,SZ_4K, SZ_2G) for 2G DDR device for example FSL SabreAI reference board.  

3. fb0base address can be set to > 2G, but there will be some performance drop, so suggest customer not set fb0base > 2G.

0 Kudos
3,713 Views
Raana
Contributor III

Hi,

I already reported the same issue in this discussion. But I didn't get any response.

But the issue is solved after changing MMDC0_MDCFG1 reg value in flash_header.S

and now my question is,

I had used the same plugins value in Yocto but it's not working.

It's stopped in same Starting kernel ... as I mentioned in my previous discussion.

What could be the issue ?

0 Kudos
3,713 Views
bingking88
Contributor I

HI Yuri Muhin

  I use fb0base=0x27b00000

0 Kudos
3,713 Views
fuzhenlin
NXP Employee
NXP Employee

Hi,

Please follow below link to updae GPU lib and driver, and then retry. if problem is still there, please feedback here.

https://community.freescale.com/docs/DOC-94481

Best Regards,

Fuzhen

0 Kudos
3,713 Views
bingking88
Contributor I

Hi fuzhenlin,

I try to hit you said that patch, but the problem still exists. thanks!

0 Kudos
3,713 Views
Yuri
NXP Employee
NXP Employee

Please check memory using DDR_Stress_Tester :

https://community.freescale.com/thread/305794

0 Kudos