ENGR00278179 query gpu memory with seperate types

In this new implementation, gpu memory can be queried with seperate types,

root@sabresd_6dq:/ # ./gmem_info
 Pid          Total      Reserved    Contiguous       Virtual      Nonpaged    Name
 2367   143,845,248    42,575,232    98,124,288             0     3,145,728    /system/bin/surfaceflinger
 3870    46,297,952    19,706,720    26,066,944             0       524,288    com.android.email
 2794    32,802,656     9,753,952    22,524,416             0       524,288    com.android.inputmethod.latin
 2844    21,292,240    20,767,952             0             0       524,288    com.android.launcher
 2735    15,037,248    14,512,960             0             0       524,288    com.android.systemui
 2658    13,812,480    10,273,536             0             0     3,538,944    system_server
 3706    10,759,776    10,235,488             0             0       524,288    com.android.settings
 3654    10,742,656    10,218,368             0             0       524,288    com.android.contacts
 3725    10,719,552    10,195,264             0             0       524,288    com.android.gallery3d
 3793    10,715,456    10,191,168             0             0       524,288    com.android.calendar
 3837    10,707,904    10,183,616             0             0       524,288    com.android.mms
 3774    10,707,072    10,182,784             0             0       524,288    com.android.calculator2
 2370       262,144             0             0             0       262,144    /system/bin/mediaserver
 ------------------------------------------------------------------------------
   13   337,702,384   178,797,040   146,715,648             0    12,189,696    Summary
    -             -     5,752,336             -             -             -    Availabe

Signed-off-by: Xianzhong <b07117@freescale.com>
Acked-by: Jason Liu
ENGR00279566: ARM: i.MX6: Enable L2 cache I/D prefetch function

This patch enable the L2 cache I/D prefetch function on the i.MX6 family.
Based on Android test result, it has the performance improvement:

Before the change:
JB4.3 RC1:
Browser Vellamo scores See The Sun Canvas: 51.16
Browser Vellamo scores Deep Sea Canvas: 65.41
Browser Vellamo scores Aquarium Canvas: 50.23

After the change:
Browser Vellamo scores See The Sun Canvas: 70.28
Browser Vellamo scores Deep Sea Canvas: 78.57
Browser Vellamo scores Aquarium Canvas: 53.73

Signed-off-by: Jason Liu <r64343@freescale.com>
(cherry picked from commit a51f75c318241c26bf7d41ad92c0e255b925863c)
ENGR00278701 use alloc_pages instead of alloc_pages_exact

alloc_pages_exact is added by Vivante in gpu git commit
e3debfdf4c3f29519ee66d60ac9b5e4db4c41026.

alloc_pages_exact is more easy make memory fragment,
video playback and camera recording case need large
physical continue memory, using alloc_pages_exact will
easy make memory fragment and no large physical continue
memory, it will impact video playback and camera case.

Signed-off-by: Richard Liu <r66033@freescale.com>
ENGR00278899: IPU: fix screen black issue on mx6dq

black screen occurs sometimes during 720p recording
when wifi display enable and WFD source is HDMI 720p
or 1080p output. This patch is a workaround to fix
IPU CSC done on IPU0.

console log is below when black screen happen:
imx-ipuv3 imx-ipuv3.1: IPU Warning - IPU_INT_STAT_10 = 0x00080000
imx-ipuv3 imx-ipuv3.1: IPU Warning - IPU_INT_STAT_5 = 0x00800000
imx-ipuv3 imx-ipuv3.1: IPU Warning - IPU_INT_STAT_5 = 0x00800000

Signed-off-by: Richard Liu <r66033@freescale.com>
Acked-by: Jason Liu
netfilter: xt_qtaguid: fix error exit that would keep a spinlock.

qtudev_open() could return with a uid_tag_data_tree_lock held
when an kzalloc(..., GFP_ATOMIC) would fail.
Very unlikely to get triggered AND survive the mayhem of running out of mem.

Signed-off-by: JP Abgrall <jpa@google.com>
netfilter: qtaguid: Don't BUG_ON if create_if_tag_stat fails

If create_if_tag_stat fails to allocate memory (GFP_ATOMIC) the
following will happen:

qtaguid: iface_stat: tag stat alloc failed
...
kernel BUG at xt_qtaguid.c:1482!

Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
Signed-off-by: Jianzheng Zhou <jianzheng.zhou@freescale.com>
netfilter: xt_qtaguid: remove AID_* dependency for access control

qtaguid limits what can be done with /ctrl and /stats based on group
membership.
This changes removes AID_NET_BW_STATS and AID_NET_BW_ACCT, and picks
up the groups from the gid of the matching proc entry files.

Signed-off-by: JP Abgrall <jpa@google.com>
Change-Id: I42e477adde78a12ed5eb58fbc0b277cdaadb6f94
Signed-off-by: Jianzheng Zhou <jianzheng.zhou@freescale.com>
netfilter: xt_qtaguid: extend iface stat to report protocols

In the past the iface_stat_fmt would only show global bytes/packets
for the skb-based numbers.
For stall detection in userspace, distinguishing tcp vs other protocols
makes it easier.
Now we report
  ifname total_skb_rx_bytes total_skb_rx_packets total_skb_tx_bytes
  total_skb_tx_packets {rx,tx}_{tcp,udp,ohter}_{bytes,packets}

Bug: 6818637
Signed-off-by: JP Abgrall <jpa@google.com>
Signed-off-by: Jianzheng Zhou <jianzheng.zhou@freescale.com>
netfilter: xt_qtaguid: Allow tracking loopback

In the past it would always ignore interfaces with loopback addresses.
Now we just treat them like any other.
This also helps with writing tests that check for the presence
of the qtaguid module.

Signed-off-by: JP Abgrall <jpa@google.com>
Signed-off-by: Jianzheng Zhou <jianzheng.zhou@freescale.com>
netfilter: qtaguid: rate limit some of the printks

Some of the printks are in the packet handling path.
We now ratelimit the very unlikely errors to avoid
kmsg spamming.

Signed-off-by: JP Abgrall <jpa@google.com>
Signed-off-by: Jianzheng Zhou <jianzheng.zhou@freescale.com>
ENGR00277333 gpu: Enable OT limitation for gc880

Enable OT limitation for gc880, without this limitation
3D core may stall system bus when it is running at a very low clock.

Signed-off-by: Loren HUANG <b02279@freescale.com>
Acked-by: Shawn Guo
ENGR00275869 wifi: update new rtl8723as wifi driver

Base on rtl8723as driver(v4.1.8_9180.20130927_BTCOEX20130528_ver3.3_beta)
still do the following changes for imx6:
1.add imx6 in Makefile.
2.fix suspend/resume issue.Just refactor runtime_pm in suspend.

Signed-off-by: Jianzheng Zhou <jianzheng.zhou@freescale.com>
ENGR00278452 PU: fix system hang if run Audio loop test

cpufreq and pu power management will oprate the same register, it looks should
keep them operating in order not concurrent. Then use the cpufreq mutex in xPU
driver to make sure.
Another code bug is in pu power management which base regulator framework, we
set the reister directly not regulator, then there is the chance set_volatage
will miss the chance if this time voltage setting as the last time setting
before PU disable, but we have to do this, so add regulator_sync_voltage to
force sync the voltage setting. The drawback is setting twice...

Note:
This patch is temporary and supposed to be replaced it once we find the
root cause.

Signed-off-by: Robin Gong <b38343@freescale.com>
Acked-by: Jason Liu
ENGR00284988 Camera recording kernel crash on WFD source

Fix kernel crash issue meet when do 720p Camera recording
on WFD source side, the crash is related with timer schedule,
fixed by add protection code in gckOS_StartTimer function.

Kernel crash log:
[<c004ffec>] (__bug+0x1c/0x28) from [<c00a7e00>] (queue_delayed_work_on+0x10c/0x148)
[<c00a7e00>] (queue_delayed_work_on+0x10c/0x148) from [<c046f4d0>] (gckOS_StartTimer+0x44/0x84)
[<c046f4d0>] (gckOS_StartTimer+0x44/0x84) from [<c047f4ac>] (gckHARDWARE_SetPowerManagementState+0xa24/0xa5c)
[<c047f4ac>] (gckHARDWARE_SetPowerManagementState+0xa24/0xa5c) from [<c046e608>] (gckOS_Broadcast+0xb8/0xe8)
[<c046e608>] (gckOS_Broadcast+0xb8/0xe8) from [<c0475734>] (_TryToIdleGPU+0xd8/0x18c)
[<c0475734>] (_TryToIdleGPU+0xd8/0x18c) from [<c0476cdc>] (gckEVENT_Notify+0x2dc/0x4c8)
[<c0476cdc>] (gckEVENT_Notify+0x2dc/0x4c8) from [<c047d494>] (gckHARDWARE_Interrupt+0x58/0x68)
[<c047d494>] (gckHARDWARE_Interrupt+0x58/0x68) from [<c04693a8>] (threadRoutine+0x20/0x78)
[<c04693a8>] (threadRoutine+0x20/0x78) from [<c00ad0c8>] (kthread+0x80/0x88)
[<c00ad0c8>] (kthread+0x80/0x88) from [<c004d408>] (kernel_thread_exit+0x0/0x8)

Signed-off-by: Richard Liu <r66033@freescale.com>
Acked-by: Jason Liu
U-MoBo: late register msp430 to avoid missing regulator setup
Merge tag 'jb4.3_1.0.0-ga' into imx_3.0.35_umobo