Commit Graph

4921 Commits

Author SHA1 Message Date
Ravishangar Kalyanam
6bc448aefa msm_fb: display: Add IOMMU support to MDP and rotator driver
Add IOMMU support to MDP and rotator driver for operating with
virtual addresses instead of physical addresses

Change-Id: Ia5afcf33220e0e75e92948649c2bd4d7ef32917d
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
2012-03-29 10:13:06 -07:00
Linux Build Service Account
55eaa32436 Merge "diag: Remove memory leak" into msm-3.0 2012-03-20 18:50:27 -07:00
Shalabh Jain
fbf3bdc54f diag: Fix incorrect parsing of log codes
DIAG maintains mask info in a buffer. This buffer is parsed
using a structure. Recently this structure was modified to add
another member. Now, the parsing code has to change to account
for this new member, otherwise, the parsing is incorrect and
misses certain log codes.

Also updated log codes with the latest on modem.

Change-Id: Iaaf86e4f3342fd73898eb11124b4893ec79aa564
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
2012-03-16 21:12:39 -07:00
Dixon Peterson
ee6fb2b08c diag: Remove memory leak
Remove memory leak on early return due to a memory allocation
failure.

Change-Id: I53822afbc145fbd018c6d84120e3aee8ecd082aa
Signed-off-by: Dixon Peterson <dixonp@codeaurora.org>
2012-03-16 20:29:58 -07:00
Dixon Peterson
b4618a48b8 diag: Add diag support for new 8625 and 8974 targets
Also, add more generic cpu type identification logic
to remove having to modify code each time a new target
variant comes out.

Change-Id: I9493ffad0960ab4863205191937ea5c56be97de2
Signed-off-by: Dixon Peterson <dixonp@codeaurora.org>
2012-03-08 12:28:23 -08:00
Shalabh Jain
321c8b53cb diag: Propagate mask info to slave processor
From 8960 onwards, application processor handles master diag. Other
slave processors can come up on different time. This change will
update each slave processor with latest mask info when it comes up.

Also each time, any PC tool tries to change masks, application processor
will propagate this new mask info to the peripherals. Now, this mask
updation tasks need to be delayed. Hence, such tasks cannot be put on
regular work queue. Thus, this change also adds a new work queue for such
tasks.

This feature also requires latest build time masks on apps processor. Thus,
updated the build time masks as well.

Change-Id: I5120c3d507230d3209773cc9f929a8f2f0bf0a3d
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
2012-03-07 18:41:36 -08:00
Linux Build Service Account
5c59616f05 Merge changes I966e7b2b,Idda450a3 into msm-3.0
* changes:
  msm_fb: display: decrease file->f_count when play
  msm_fb: display: call mdp_pipe_ctrl() with correct block name
2012-03-06 22:18:43 -08:00
Linux Build Service Account
f28f4996fc Merge "diag: Increase itemsize of diag memory pool." into msm-3.0 2012-03-06 12:45:29 -08:00
Kuogee Hsieh
beaa935671 msm_fb: display: decrease file->f_count when play
Frame buffer's (fb0) f_count needed to be decreased after both
overlay play and rotation so that fb0 can be closed and display
will be blanked out after system suspended.

CRs-fixed: 336254
Change-Id: I966e7b2bb4def0c9c09580be12048933723e2c2e
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
2012-03-06 08:25:38 -08:00
Ashay Jaiswal
1fe33273a4 diag: Increase itemsize of diag memory pool.
Diag allocates memory objects from mempool for copying packet from user
space to kernel space. Fix increases oject size of mempool to 4KB and any
packet of size greater than 4KB is dropped.

CRs-Fixed: 326579
Change-Id: I1cacd294df9a535fbe5f0466603eb7e69f7b43ef
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
2012-03-05 17:04:18 +05:30
Jack Pham
b60775a560 usb: diag_bridge: support autosuspend and autoresume
Allow automatic power management by the USB core by enabling
autosuspend in the DIAG Bridge driver. This allows the MDM device
to be suspended and draw minimal power when idle.

In the diagfwd_hsic driver, register suspend and resume callbacks
to know when to temporarily halt queuing read or write requests to
the bridge which would otherwise prevent the HSIC device from
triggering an autosuspend.

Similarly, close the bridge when the USB cable is disconnected to
signify that it is done using it, or else there would forever be a
pending read or write on the bridge that would keep the HSIC active.

Revert allocation flags in diag_bridge_read() and diag_bridge_write()
to GFP_KERNEL, as they now can only be called in process context.

Change-Id: I124460bbc90ff10a1a7f8e6ab94dab0fbfc5d0df
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2012-03-02 15:20:52 -08:00
Linux Build Service Account
f1bd8d1c4a Merge "diag: Release mutex in corner case" into msm-3.0 2012-02-25 16:41:31 -08:00
Shalabh Jain
fe02b0c0c1 diag: Release mutex in corner case
DIAG driver maintains a table for all registrations by remote
peripherals and user space applications. In certain cases, the
number of registrations can exceed table capacity. Thus, diag
re-allocates the table memory, to fit in all registrations.
This re-allocation stops at a threshold, even if requirement
is greater than threshold.

In such a corner case, if the requirement is greater than threshold,
then the mutex might remain locked after filling the table upto full
capacity. Adding unlocking condition to release mutex in such cases.

Change-Id: Iefd02795b531e17ff7cfe3be152e32b3e82c68fb
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
2012-02-24 15:15:55 -08:00
Ramesh Masavarapu
a99fcc24e9 Revert "msm: rng: Disable RNG init on APQ8064"
This reverts commit 46af59fb8f.
The RNG driver was initially disabled because of missing clock
changes and this driver was causing boot up issues.
Now with the clock changes checked in the RNG driver works.

Change-Id: I127f25c8be6b715510c1fb16b274a814416d8a8a
Signed-off-by: Ramesh Masavarapu <rameshm@codeaurora.org>
2012-02-23 04:37:13 -07:00
Ramesh Masavarapu
a54263b005 msm: Removed XPU violations.
During initialization, there is a violation in writing to
"read only" registers for targets that support trust zone.
Trustzone marks certain registers as read-only.
This change fixes the issue by writing to registers only
on targets that do not support trust zone.

Change-Id: I69bb0f1bad199201aa3dd8b378ca1683dfa81c86
Signed-off-by: Ramesh Masavarapu <rameshm@codeaurora.org>
2012-02-21 09:19:37 -08:00
Shalabh Jain
4e1bd3108c diag: Avoid partial packet reads
DIAG driver talks to peripheral processors over SMD channels.
Sometimes, SMD channel can have a partial packet and if diag
reads it, it can mistake them as garbled packets. With this
change, if the packet is incomplete, diag will not read it
and wait until the packet is complete.

This approach will work, as long as, peripheral is sending packets
less than 1000 bytes. Currently even the peripheral is limited to
sending packets upto 1K bytes, so this limitation is fine.

Also fix potential memory allocation failure and unnecessary
reading from SMD channels.

Change-Id: I86e6aa202d1e1159e7b3f099cb1228530489a370
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
2012-02-16 21:13:06 -08:00
Shalabh Jain
f50076b757 diag: Add sanity check for data
DIAG driver communicates to peripherals over SMD channels. It parses
data read and then takes appropriate actions. Sometimes, SMD can pass
corrupted data and cause DIAG driver to crash. Adding checks around
data will prevent such crashes.

Change-Id: Ic82b1e31557eb432e57f3f6b152b22c1d3f5cd37
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
2012-02-15 19:40:11 -08:00
Shalabh Jain
3d29fc39a0 diag: Implement new polling response mechanism
PC tools send various polling commands to target to detect its
presence. Initially modem used to respond to all pollings. However,
with new targets, we have applications processor as master as well
as subsystem restart. Due to these new features, modem does not respond
all the time. This change implements a new mechanism to respond to
polling.

The DIAG driver maintains a flag variable to keep track of any polling
command registered by a remote peripheral. As long as any polling command
is present, diag driver ignores a special polling request. If no peripheral
has registered for any polling at all, then diag responds to this special
polling request.

Change-Id: I6ba1744dd3dd4982027b671efce3beffb9a27786
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
2012-02-13 18:09:09 -08:00
Linux Build Service Account
1b07470c79 Merge "diag: Add support for APQ8064 and MSM8627" into msm-3.0 2012-02-09 20:28:09 -08:00
Stepan Moskovchenko
46af59fb8f msm: rng: Disable RNG init on APQ8064
Change-Id: Ic42a85c51faea8a17b02eb4987d0f5db732716c2
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
2012-02-08 11:56:15 -08:00
Dixon Peterson
e8054f057c diag: Fix parsing of smd control channel buffer
Fix parsing of data sent on the smd control channel to
accomodate types of data other than DIAG_CNTRL_MSG_REG.
Currently, if the type of data in the buffer is other than
DIAG_CNTRL_MSG_REG, progression through the buffer is
not performed correctly.

CRs-fixed: 334307
Change-Id: I406a437168956277190d2bcf2e94345d2eec0783
Signed-off-by: Dixon Peterson <dixonp@codeaurora.org>
2012-02-07 12:04:12 -08:00
Shalabh Jain
118bd8a7b6 diag: Add support for APQ8064 and MSM8627
DIAG driver needs to know which CPU it is working on.
Adding that support for new targets.

Change-Id: I68e353e203cc106b68a1eb18b55462fd7f91cf0d
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
2012-02-06 16:19:17 -08:00
Dixon Peterson
b46bb9907e diag: Apps only polling command response when modem is up
Respond to the apps only polling command with an error
response when the modem is up.

Change-Id: Ifd9ae10a57339bf405a117cacfd987dec1875cd7
Signed-off-by: Dixon Peterson <dixonp@codeaurora.org>
2012-01-27 17:39:52 -07:00
Shalabh Jain
10f5f4351b diag: Add support for 9615, 8260A, and 8974 targets
Also re-structures the code so that adding new target
support will be easier.

Change-Id: I5ad9100932da5454afbf1c996d71a6338dc59dbb
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
2012-01-25 15:34:38 -08:00
Linux Build Service Account
c5f192c7e2 Merge "msm: rotator: Add pseudo-planar output for interleaved format." into msm-3.0 2012-01-19 00:24:15 -08:00
Mayank Chopra
732dcd668f msm: rotator: Add pseudo-planar output for interleaved format.
Rotator gives pseudo-planar H2V1 output for interleaved
H2V1 input format.

Change-Id: I2a7af3243dfb1175ea14d6649b4cec87029fec38
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
2012-01-17 09:54:13 +05:30
Shalabh Jain
2c783cbab9 Revert "diag: Update Slave processor with mask info"
This reverts commit 4ad8986555.
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
2012-01-15 11:09:29 +05:30
Shalabh Jain
c236f98a67 diag: Prevent mask check for UART traffic
DIAG traffic can go over USB, UART and SD card. Input received from SD
card needs to be validated before sending to modem. Whereas, traffic
from UART does not need such check.

Change-Id: If5d29cc3a1eba6ce0336f09c774e11f6060d5ead
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
2012-01-12 23:53:53 +05:30
Shalabh Jain
4ad8986555 diag: Update Slave processor with mask info
From 8960 onwards, application processor handles master diag. Other
slave processors can come up on different time. This change will
update each slave processor with latest mask info when it comes up.

Change-Id: Icc5f607043c8dc00dbfd504952beccaff5641f41
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
2012-01-12 11:05:03 +05:30
Nagamalleswararao Ganji
e1a9f87c79 msm: rotator: Add bus scaling support
Add bus scaling support to rotator driver

Change-Id: I53faf6070a9dc6d6359b6d58cb7cb618217ee8c0
Signed-off-by: Nagamalleswararao Ganji <nganji@codeaurora.org>
2012-01-06 18:13:15 -08:00
Dixon Peterson
32e70bb7c1 diag: Add HSIC communication support
Add support for relaying the MDM 9k diag traffic over HSIC
to the USB DIAG MDM channel and vice versa. Also modify usb
diag_bridge to use signed parameters for buffer sizes. This
is especially needed for the final parameter of the read
and write callbacks, wherein a negative errno value may be
passed to convey an error.

Change-Id: Ifa516356a5d72597d82929a56d714f8dfb2964de
Signed-off-by: Dixon Peterson <dixonp@codeaurora.org>
2012-01-06 03:51:10 -07:00
Linux Build Service Account
dab66806e9 Merge "msm: rotator: Fix rotator YCrCb planar formats unexpected output" into msm-3.0 2012-01-04 21:44:36 -08:00
Adrian Salido-Moreno
19caf1573c msm: rotator: Fix rotator YCrCb planar formats unexpected output
Rotator expects planar input in YCbCr order, wrong color can be seen
on ouput image when given YCrCb because the chromninance planes picked
are not correct. Swap Cb and Cr plane addresses to output correct image.

Change-Id: Ia05ab704d18da4aac49e63fb805c40a95ea51a33
CRs-Fixed: 327956
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
2012-01-03 18:56:29 -08:00
Shalabh Jain
1fedab9bed diag: Prevent crash due to buffer over run
DIAG provides packet request/response service. A PC tool
can send a request and receive response from an app on
phone. In case, app is not running, the phone should return
an error response, which is almost same length as request.
A buffer overrun can happen, if the request is too huge. Thus,
adding a check to prevent buffer overrun.

Change-Id: I0955f9bcb703274bd1286047102c8303e6691c84
CRs-Fixed: 323841
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
2012-01-03 21:31:47 +05:30
Shalabh Jain
c6c2b1d8bc diag: Add sub-system restart support for peripherals
DIAG char driver maintains registrations for remote processors in a table.
When the remote processor goes down, the registrations should be cleaned
up. This change adds the clean up process in event of a restart. Also when
the peripheral goes down for subsystem restart, the SMD channel between
apps processor and peripheral has to be set to NULL, to prevent further SMD
operations. When the peripheral comes back up, this SMD channel can be
re-initialized.

CRs-Fixed: 326120
Change-Id: I49afad5e3bc04f62024c1dc66f272726ae13c3e6
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
2011-12-28 13:23:41 -07:00
Linux Build Service Account
5e52b25bd7 Merge "msm: rotator: add downscale support in rotator" into msm-3.0 2011-12-27 20:39:14 -08:00
Adrian Salido-Moreno
67273e569f msm: rotator: add downscale support in rotator
Rotator is capable of performing 1/2, 1/4 and 1/8 down scaling. Add
downscale_ratio parameter to provide support for this feature.

CRs-Fixed: 315874
Change-Id: I57dc3456ccc9bec2a125750b3e9909ffcbaf45f6
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
2011-12-27 17:56:49 -08:00
Shalabh Jain
2f4cea6557 diag: Add support for 8930 and other upcoming targets
Change-Id: I73bf347488437955954ebfb81567be30e8da834d
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
2011-12-27 16:10:23 -07:00
Shalabh Jain
482bf12dd4 diag: Add missing fixes for diag sdio bridge
Due to separate branches for Fusion targets, some fixes
for SDIO layer were missing on mainline. This will add the
missing fixes on the mainline.

Change-Id: I56cd617a744ca9d280bac50370dc9aba11958fdf
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
2011-12-19 06:09:14 -08:00
Dixon Peterson
ff425d1653 diag: Add diag mode command (41/0x29) support on 9x15
Change-Id: I42ca5b8665a9d03cf5af1d78b3b42f97d6e1dfdd
Signed-off-by: Dixon Peterson <dixonp@codeaurora.org>
2011-12-06 18:16:00 -08:00
Linux Build Service Account
2c60124cfd Merge "diag: Add support for sub-system restart" into msm-3.0 2011-11-29 16:58:29 -08:00
Matt Wagantall
754f2478f5 msm: rotator: Replace clk_set_min_rate() with clk_set_rate()
The rotator driver requests exact rates.  There is no need to call
the clk_set_min_rate() API, which will soon be removed altogether.
Call clk_set_rate() instead.

Change-Id: Ica9cb30f85132e92a00b0000eea498c47645b697
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
2011-11-22 16:14:25 -08:00
Shalabh Jain
eefee05861 diag: Add support for sub-system restart
When the modem goes down for subsystem restart, the SMD channel between
apps processor and modem has to be set to NULL, to prevent further SMD
operations. When the modem comes back up, this SMD channel can be
re-initialized.

Change-Id: I4854de8cbdfd157867c2c9513a297f18af51d626
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
2011-11-18 16:42:21 -07:00
Bryan Huntsman
d074fa2796 Merge remote-tracking branch 'common/android-3.0' into msm-3.0
* common/android-3.0: (570 commits)
  misc: remove kernel debugger core
  ARM: common: fiq_debugger: dump sysrq directly to console if enabled
  ARM: common: fiq_debugger: add irq context debug functions
  net: wireless: bcmdhd: Call init_ioctl() only if was started properly for WEXT
  net: wireless: bcmdhd: Call init_ioctl() only if was started properly
  net: wireless: bcmdhd: Fix possible memory leak in escan/iscan
  cpufreq: interactive governor: default 20ms timer
  cpufreq: interactive governor: go to intermediate hi speed before max
  cpufreq: interactive governor: scale to max only if at min speed
  cpufreq: interactive governor: apply intermediate load on current speed
  ARM: idle: update idle ticks before call idle end notifier
  input: gpio_input: don't print debounce message unless flag is set
  net: wireless: bcm4329: Skip dhd_bus_stop() if bus is already down
  net: wireless: bcmdhd: Skip dhd_bus_stop() if bus is already down
  net: wireless: bcmdhd: Improve suspend/resume processing
  net: wireless: bcmdhd: Check if FW is Ok for internal FW call
  tcp: Don't nuke connections for the wrong protocol
  ARM: common: fiq_debugger: make uart irq be no_suspend
  net: wireless: Skip connect warning for CONFIG_CFG80211_ALLOW_RECONNECT
  mm: avoid livelock on !__GFP_FS allocations
  ...

Conflicts:
	arch/arm/mm/cache-l2x0.c
	arch/arm/vfp/vfpmodule.c
	drivers/mmc/core/host.c
	kernel/power/wakelock.c
	net/bluetooth/hci_event.c

Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2011-11-16 13:52:50 -08:00
Linux Build Service Account
70a10a34b7 Merge "diag: Add download mode support for 9x15" into msm-3.0 2011-11-11 04:12:09 -08:00
Naseer Ahmed
1801860c66 msm: rotator: ion support in rotator driver
Add support for ion memory heaps in the rotator
driver

Change-Id: Id844050871e4aaa7fa0e0fc9d69646d6d9875b85
Signed-off-by: Nagamalleswararao Ganji <nganji@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
2011-11-09 18:10:07 -08:00
Dixon Peterson
4cf7d3b874 diag: Add download mode support for 9x15
Change-Id: I97fc2d4269d7673794892dd7b1f0d6bd1bfd3ac8
Signed-off-by: Dixon Peterson <dixonp@codeaurora.org>
2011-11-09 12:23:32 -08:00
Pavankumar Kondeti
16ebc56b24 diag: Fix compilation error with SMD disabled
Change-Id: I8b4dad1da411452738a4c8baa16db0f7146f09a4
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2011-11-04 08:25:04 +05:30
Ramesh Masavarapu
2f963dbc78 msm: Removed target specific changes for enabling PRNG h/w.
The driver checks if the PRNG h/w is enabled. If it is not ON, it
enables the PRNG h/w.

Change-Id: I7c73eba7ba47f4fca116cfe0884758e6dd130ed0
Signed-off-by: Ramesh Masavarapu <rameshm@codeaurora.org>
2011-10-31 16:35:39 -07:00
Stepan Moskovchenko
021e049e08 msm: diag: Update usage of cpu_is_msm8960 for 8930
Update drivers' usage of cpu_is_msm8960() to also include a
check for cpu_is_msm8930(), to support the pre-silicon
effort.

Change-Id: I2d7bbdd297d35764680b2007b941f7344ba85bc7
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
2011-10-30 00:27:28 -07:00