Commit Graph

4899 Commits

Author SHA1 Message Date
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
Linux Build Service Account
1cf4e8e2e1 Merge "diag: Replace banned API" into msm-3.0 2011-10-28 19:35:55 -07:00
Colin Cross
2bb3e31015 Merge commit 'v3.0.8' into android-3.0 2011-10-27 15:01:19 -07:00
Linux Build Service Account
f3543d7249 Merge "msm: rotator: add check for buffers boundaries" into msm-3.0 2011-10-24 15:40:16 -07:00
Linux Build Service Account
391afad386 Merge "diag: Add support for APQ8064" into msm-3.0 2011-10-21 03:06:17 -07:00
Shalabh Jain
9c07c4bd9b diag: Replace banned API
The deprecated API has been replaced by recommended one.
This fixes Klocwork error: 41336

Change-Id: I2996ffb413dcc3ff4998357b7e31972897da1826
CRs-Fixed: 313372
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
2011-10-20 13:27:20 -07:00
Shalabh Jain
fb8e3c1d0c diag: Add support for APQ8064
This change will add DIAG support for new target APQ8064.

Change-Id: Ic8d21dc39e42fc254f71ee62df8160641c8068f8
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
2011-10-19 17:29:42 -07:00
Ramesh Masavarapu
5ad3739317 msm: Add PRNG to MSM9615 device.
Add configuration parameters for MSM9615 device.
PRNG hardware registers initialization in msm_rng.c is done
currently for MSM9615.

Change-Id: I2a05e9e582ce94a25bec71e1acaee95d62cd9469
Signed-off-by: Ramesh Masavarapu <rameshm@codeaurora.org>
2011-10-19 10:53:03 -07:00
Adrian Salido-Moreno
8841186628 msm: rotator: add check for buffers boundaries
check that offset is within the range of buffer to avoid possible
access to other memory regions.

Change-Id: I37f49b0c95cc9bf79a09c7b0fa04f1135b691a5d
CRs-Fixed: 308058
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
2011-10-17 18:13:00 -07:00
Linux Build Service Account
bde99403d6 Merge "diag: Add Subsystem restart support" into msm-3.0 2011-10-17 17:01:16 -07:00
Shalabh Jain
c2ec829942 diag: Add Subsystem restart support
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.

Change-Id: I191099242bb9997efe5612a8b02ca3dc17f096ff
CRs-Fixed: 311580
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
2011-10-17 12:21:51 -07:00
Pradeep Jilagam
9b4a6be7c4 msm: rotator: Add YV12 support in the Rotator
Added changes to support YV12 input format in the Rotator.
Output will be Pseudoplanar in this case.

Change-Id: Ic77ad2b6a3aaa66ad923494fb6c96e07738d674b
Signed-off-by: Pradeep Jilagam <pjilagam@codeaurora.org>
2011-10-13 22:03:39 +05:30
Shalabh Jain
69890aa09a diag: Add UART support
DIAG traffic has been supported over USB and SD card. This
change adds capability to route DIAG traffic over UART.

Change-Id: I0d6732fcbb19950700218140d581b5759e676b74
Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
2011-10-10 13:21:41 -07:00
Shalabh Jain
3893bf924b diag: Edit lock conditions for USB buffers
DIAG uses dedicated buffers for each peripheral processor, to
write their data to USB. Setting the right locking condition
before DIAG uses buffer, enables mutual exclusion.

Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
2011-10-03 16:20:09 -07:00
Nagamalleswararao Ganji
bcdea00932 msm: rotator: fix the rotation issue on 8960 V2
8960 V2 contains different version from V1, until we
have the proper soc check in the board file to modify
the rotator device version disabling the check in the
rotator driver. It won't have any side effects.

Signed-off-by: Nagamalleswararao Ganji <nganji@codeaurora.org>
2011-10-03 16:20:02 -07:00
Shalabh Jain
8e9750a422 diag: Add additional USB buffer for WCNSS processor
DIAG opens connection with USB to drain traffic generated on
different processors. With 8960, we have a new processor added.
Thus, DIAG-USB connection needs to account for an extra buffer for
traffic generated on this processor.

Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
2011-10-03 16:19:41 -07:00
kuogee hsieh
7a46d59228 msm_fb: display: replace task_tgid_nr with current->pid
rotator session is not be shared by threads with same parent.
Therefore repalce task_tgid_nr(current) with current->pid.

Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
2011-10-03 16:18:32 -07:00
Shalabh Jain
5d9ba343da diag: Add functionality to close SDIO channel.
DIAG driver pulls MDM9k traffic onto MSM using the SDIO bridge.
This patch adds capability to close this channel under special
circumstances.

Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
2011-10-03 16:18:23 -07:00
Shalabh Jain
f89c546377 diag: Avoid memory leak
DIAG allocates memory to read from SMD channel. if for some reason,
the read function is to be exited, the allocated memory should be
released.

Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
2011-10-03 16:18:10 -07:00
Matt Wagantall
c120529341 msm: clock: Use device names to distinguish between PRNG clocks
Drivers should now use their device names to distinguish between
clocks of the same type rather than the clock name. This allows
the clock names to be updated to match the new naming convention.

Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
2011-10-03 16:18:06 -07:00
Shalabh Jain
cf5f20e114 diag: Poll SMD control channel for data after USB connects
DIAG uses SMD control channels to transfer packet registration
information from slave processors. While USB is disconnected, under
some scenarios, the SMD data might be left unread. Hence, when USB
gets connected, a special effort has to be made to read any unread
data on SMD control channel. Also each time a registration information
is stored in diag table, the SMD channel needs to be polled once more.

Signed-off-by: Shalabh Jain <shalabhj@codeaurora.org>
2011-10-03 16:15:47 -07:00
Matt Wagantall
ef391acc67 msm: rotator: Don't control rot_axi_clk explicitly
It is now controlled implicitly along with the rotator core clock
for all SoCs.

Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
2011-10-03 16:15:27 -07:00
Peter Huewe
1d43a87614 TPM: Zero buffer after copying to userspace
commit 3321c07ae5068568cd61ac9f4ba749006a7185c9 upstream.

Since the buffer might contain security related data it might be a good idea to
zero the buffer after we have copied it to userspace.

This got assigned CVE-2011-1162.

Signed-off-by: Rajiv Andrade <srajiv@linux.vnet.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 11:40:58 -07:00