Commit graph

212,646 commits

Author SHA1 Message Date
Jon Mayo
cf030d95bb [ARM] tegra: hdmi nvhdcp driver
Device /dev/nvhdcpX is used to manage NVHDCP on framebuffer /dev/fbX.
These devices are created on hdmi driver initialition when it is
attached to dc. Currently only one nvhdcp device may be created. An ioctl
interface is in video/nvhdcp.h

Check for repeaters and store repeater info. userspace application
queries this status to authenticate the connection. When authentication
fails, auto-renegotiate every 1.75 seconds. Give up after 5 failed attempts,
reset after hotplug or policy change.

use TEGRA_DC_OUT_NVHDCP_POLICY_ON_DEMAND in tegra_dc_out.flags in board
panel configuration to select a different default policy at probe. Currently
only TEGRA_DC_OUT_NVHDCP_POLICY_ALWAYS_ON is supported.

Change-Id: I0db66fc86096b98d2604544061721d291523de75
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
Tested-by: Jon Mayo <jmayo@nvidia.com>
Reviewed-by: Phillip Smith <psmith@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
Signed-off-by: Erik Gilling <konkers@android.com>
2011-02-24 16:59:40 -08:00
Todd Poynor
bb2a3184bc ARM: tegra: PL310 restore dynamic clock gating on resume
Tegra 2.6.36 code needs to restore PL310 dynamic clock gating upon
resume from a power event.

As of 2.6.39 the PL310 is re-init'ed from scratch upon resume,
and this patch can be dropped.

Change-Id: I8c1fb1add3c3cfcffff58fab642b84d8d5a7a90a
Signed-off-by: Todd Poynor <toddpoynor@google.com>
2011-02-24 16:38:22 -08:00
Todd Poynor
996d8ccfe7 ARM: tegra: Enable PL310 dynamic clock gating
The cache controller will stop its clock when idle after several
clock cycles.

Change-Id: Ifc9997d4e7fd4f1e3c6129bac2fd42f8995a069e
Signed-off-by: Todd Poynor <toddpoynor@google.com>
2011-02-16 13:30:34 -08:00
Todd Poynor
e4c3b484a4 ARM: PL310: Add power control register definition
Change-Id: Ia1f759aab15a241e8e29447622cd1e2998fa745c
Signed-off-by: Todd Poynor <toddpoynor@google.com>
2011-02-16 13:26:42 -08:00
Prajakta Gudadhe
7ee1f8c222 video: tegra: add some missing mutex locking to nvhost_cdma
Change-Id: Ie4606d9a5154090274168babc110ea2d79747c05
Signed-off-by: Erik Gilling <konkers@android.com>
2011-02-14 17:51:44 -08:00
kartamonov
d5ed97e8e2 video: tegra: nvmap: Fix broken optimization
An attempt had been made to reduce the number of pte operations
while patching relocs.  The optimization was incorrectly coded
and was not providing the expected speedup.

Credit for the find goes to Peter Pipkorn.

Change-Id: Ic83b20ee470e54d5053f747dbcbdf7b038b7c7c4
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
2011-02-14 15:31:15 -08:00
Chris Fries
6c77fdda35 [ARM] tegra: Enable pl310 data prefetching and prefetch offset
Enable data prefetching in the L2 cache controller, and set
the prefetch offset to 7.

Memcpy performance measured copying 16 MB buffers 78 times:
Data prefetch disabled, prefetch offset 0: 440 MB/s
Enabling data prefetching, prefetch offset 0: 430 MB/s
Enabling data prefetching, prefetch offset 7: 502 MB/s

Overall, this patch gives a 14% improvement in memcpy performance.

Prefetch offset of 8 causes prefetches to cross 4k boundaries
and cannot be used.

Original-author: Gary King <gking@nvidia.com>
Signed-off-by: Chris Fries <C.Fries@motorola.com>
Signed-off-by: Colin Cross <ccross@android.com>
Change-Id: I7ce0810b3f94edc2640df3f643cf81357052f2f1
2011-02-12 14:52:03 -08:00
Colin Cross
6b53bad8ac Revert "mmc: subtract boot sectors from disk size for eMMC 4.3+ devices"
This reverts commit 2cdc235bbe.

The reverted commit incorrectly calculates the size of eMMC
devices in some (all?) cases.

This revert may cause problems in cases where the bootloader was
bug-compatible and puts a GPT partition at the incorrect end of
the eMMC device.

Change-Id: Icc9ddb3d294aa2a1caeddfe8fedd2e12aa7691e1
2011-02-11 14:03:52 -08:00
Colin Cross
5f2e1258ff Revert "mmc: fix non-arm build due to eMMC 4.3+ change"
This reverts commit 1c119f2c16.
2011-02-11 13:54:41 -08:00
Todd Poynor
6b825e9aaa ARM: tegra: Handle timers during LP2 idle ticks
Timer ticks aren't properly serviced while a CPU is in LP2 idle.
Although the Tegra LP2 idle code calls hrtimer_peek_ahead_timers,
because no IRQ regs have been saved, update_process_times is not
called, and thus the timer list is not serviced (and neither is
SMP rebalancing, etc.)  This can cause significant delays
scheduling timer-based activity, especially on CPU 1 (which is
not servicing most other IRQs).

Colin Cross suggested a patch based on upstream review feedback
that uses clock notifiers to switch to the "broadcast" clock event
source ("timer0" Tegra timer 3) during LP2, which has a real
interrupt handler defined that calls the clock event handler in
IRQ context, allowing timers to be checked.

Change-Id: Ifa3f4ec662f07dc9636e433f278358f75b65d10c
Signed-off-by: Todd Poynor <toddpoynor@google.com>
2011-02-08 18:50:26 -08:00
Robert Morell
da0fbc7f9b USB: ehci: tegra: Align DMA transfers to 32 bytes
The Tegra2 USB controller doesn't properly deal with misaligned DMA
buffers, causing corruption.  This is especially prevalent with USB
network adapters, where skbuff alignment is often in the middle of a
4-byte dword.

To avoid this, allocate a temporary buffer for the DMA if the provided
buffer isn't sufficiently aligned.

Signed-off-by: Robert Morell <rmorell@nvidia.com>
2011-02-08 15:18:24 -08:00
Robert Morell
a0d7774b25 USB: HCD: Add driver hooks for (un)?map_urb_for_dma
Provide optional hooks for the host controller driver to override the
default DMA mapping and unmapping routines.  In general, these shouldn't
be necessary unless the host controller has special DMA requirements,
such as alignment contraints.  If these are not specified, the
general usb_hcd_(un)?map_urb_for_dma functions will be used instead.
Also, pass the status to unmap_urb_for_dma so it can know whether the
DMA buffer has been overwritten.

Finally, add a flag to be used by these implementations if they
allocated a temporary buffer so it can be freed properly when unmapping.

Signed-off-by: Robert Morell <rmorell@nvidia.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-08 15:18:16 -08:00
Robert Morell
736268d863 USB: HCD: Add usb_hcd prefix to exported functions
The convention is to prefix symbols exported from the USB HCD core with
"usb_hcd".  This change makes unmap_urb_setup_for_dma() and
unmap_urb_for_dma() consistent with that.

Signed-off-by: Robert Morell <rmorell@nvidia.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-08 15:18:11 -08:00
Erik Gilling
719f267754 video: tegra: only enable HDMI features if detected from edid
Change-Id: I94c5c83c25a8aa1de344339f5759953074488720
Signed-off-by: Erik Gilling <konkers@android.com>
2011-02-07 14:56:21 -08:00
Erik Gilling
cef13d98eb video: fbmon: add HDMI dectetion to fbmod edid parsing
Looks for ieee registration numver 0x000c03 as per HDMI spec.

Change-Id: I6875b24c66e8754510edabcb4f9ba682a50d6ac1
Signed-off-by: Erik Gilling <konkers@android.com>
2011-02-07 14:56:20 -08:00
Erik Gilling
4a6469b9eb video: tegra: add height/width to dc and fb
Change-Id: I22c280928079af04263375fce63a87776588a457
Signed-off-by: Erik Gilling <konkers@android.com>
2011-02-03 13:21:31 -08:00
Erik Gilling
29c4c67185 video: tegra: set h/v sync polarity for HDMI
Change-Id: I4be0eb963c3779b9313ef94476b1589059d4aa3c
Signed-off-by: Erik Gilling <konkers@android.com>
2011-02-02 18:36:55 -08:00
Erik Gilling
29cf32156d video: tegra: support v/h sync polarity
Change-Id: Ida82a70efaeadc9d5b11d8703e688063680b72a8
Signed-off-by: Erik Gilling <konkers@android.com>
2011-02-02 18:36:55 -08:00
Erik Gilling
7baed3b180 video: tegra: correct HDMI h/vsync polairty in some modes
Change-Id: I0e988d1724461ff2d5bd1009f2fdc379bd154703
Signed-off-by: Erik Gilling <konkers@android.com>
2011-02-02 18:36:55 -08:00
Eric Laurent
a0bcb8eaba [ARM] tegra_i2s_audio: separate TX/RX DMA setup
Fixed a problem preventing independent setup/teardown
of TX and RX DMAs when setting playback or capture buffer count.

Signed-off-by: Eric Laurent <elaurent@google.com>
2011-01-28 13:44:56 -08:00
Nathan Connell
769922c5aa ARM: tegra: usb_phy: Configure USB1 PHY to use programmed value
instead of fused value.  This is required
to meet High Speed USB signaling requirements.

Change-Id: I659b33faa950605ecf040598112e1972047ae7ad
Signed-off-by: Nathan Connell <w14185@motorola.com>
2011-01-25 17:33:24 -08:00
Dmitriy Gruzman
41fec00c4b watchdog: tegra_wdt: Several changes to watchdog driver
Fix not re-enabling watchdog resume if it was enabled in probe
Add clearing watchdog interrupt in probe
Remove tegra_wdt_set_timeout

Change-Id: I8fdbb6da3eda64a85a73ed85ab979a5ee0261c37
Signed-off-by: Dmitriy Gruzman <dmitriy.gruzman@motorola.com>
2011-01-25 17:12:59 -08:00
Benoit Goby
3f0fad7ec4 usb: host: tegra: Request 400MHz emc clock
while USB is active to eliminate all USB buffer underruns.

Change-Id: I9977224601e715e950284708958be98d37b3e6b1
Signed-off-by: Nathan Connell <w14185@motorola.com>
2011-01-25 12:37:56 -08:00
Benoit Goby
2418fe42cc usb: gadget: tegra_udc: Request 400MHz emc clock
while USB is active to eliminate all USB buffer underruns.

Change-Id: I7ad8ebfa2d802f91b81839e14fde906da1a0569e
Signed-off-by: Nathan Connell <w14185@motorola.com>
2011-01-25 12:37:50 -08:00
Rebecca Schultz Zavin
82fa87e2ca video: tegra: nvmap: Several changes to carveout killer
-Add a module param to enable/disable carveout killer
-Fix race condition in code to wait for something to free memory
after firing carveout killer
-Fix the check for current so we always compare task->group_leaders

Change-Id: Ie030978827dce6b0fbbfa1db0d80e4abe59eaa51
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
2011-01-24 15:44:07 -08:00
Erik Gilling
22dcde2e84 video: tegra: incresase delay in underflow recovery
Change-Id: I8093c83a2749c63b6ece051cc9b892d87e55fe04
Signed-off-by: Erik Gilling <konkers@android.com>
2011-01-24 15:35:28 -08:00
Erik Gilling
28b85f11c6 video: tegra: dump host state when timing out on suspend
Change-Id: I718fb071ac74f5a051a7d5b9fcdd782163ed48b6
Signed-off-by: Erik Gilling <konkers@android.com>
2011-01-24 12:37:38 -08:00
Colin Cross
3edd9628c0 ARM: tegra: Prevent dynamically ioremapping device io memory
Change-Id: I893a42bd773b1acdf2b83f8602fe1aa6a8ea6741
Signed-off-by: Colin Cross <ccross@android.com>
2011-01-21 17:05:18 -08:00
Colin Cross
5d8b46b6df ARM: tegra: Statically map all device io memory
Change-Id: I0c750b766dcdd166ddff6317b93556f9f5cce899
Signed-off-by: Colin Cross <ccross@android.com>
2011-01-21 17:05:16 -08:00
Benoit Goby
66eaaf9564 usb: gadget: tegra: Enable emc clock while usb is connected
Change-Id: Icb94c516a580e29b42b1899e622c9b91f8701dd2
Signed-off-by: Benoit Goby <benoit@android.com>
2011-01-20 15:42:52 -08:00
Benoit Goby
1df24cc5cf ARM: tegra: clocks: Add shared emc clocks for usb gadget
Change-Id: Idf1982fac02b987cb16ef89509cfe4d72953d1e5
Signed-off-by: Benoit Goby <benoit@android.com>
2011-01-20 15:41:58 -08:00
Benoit Goby
1b02fb1f5c usb: host: tegra: Enable emc clock while usb is resumed
Change-Id: I03a102f40134686fabbd5cfa1830816a691cf876
Signed-off-by: Benoit Goby <benoit@android.com>
2011-01-20 15:19:33 -08:00
Benoit Goby
d3cd98591c ARM: tegra: clocks: Add shared emc clocks for ehci driver
Change-Id: I02f9d798159e14007fa2e5abfc3493a2d779d515
Signed-off-by: Benoit Goby <benoit@android.com>
2011-01-20 15:19:32 -08:00
Jay Cheng
69f118a448 ARM: tegra: DVFS: set 1.2V core voltage for USB to work
Change-Id: Idb7822329f1975307748a72d1786da68c0635738
Signed-off-by: Jay Cheng <jacheng@nvidia.com>
2011-01-20 15:19:32 -08:00
Benoit Goby
ba487c7c5e usb: host: tegra: Fix SetPortFeature PORT_SUSPEND
This fixes a regression where hubs cannot detect new devices once they
have been auto-suspended.

Change-Id: I4b3efcaa9634b9a912060e438527000bbc83dc32
Signed-off-by: Benoit Goby <benoit@android.com>
2011-01-18 19:40:17 -08:00
Benoit Goby
b3328e4c67 usb: host: tegra: Fix resuming low speed devices from lp0
Change-Id: I9576853bbe0fae52c5c2cfab26ce8f2017077d4e
Signed-off-by: Benoit Goby <benoit@android.com>
2011-01-18 17:14:04 -08:00
Benoit Goby
d72d507ae9 ARM: tegra: usb_phy: Program DPDM_OBSERVE depending on the device speed
Low speed devices require a K-state resume signaling instead of J.

Change-Id: Ic06011f45c2b0f4cd969d018f2783acea57cb510
Signed-off-by: Benoit Goby <benoit@android.com>
2011-01-18 17:13:53 -08:00
Varun Wadekar
65a1f91c2f crypto: tegra-aes: perf: remove unnecessary polling and memset
Change-Id: I69731fcd50933ccea73542d046c3c5d86d03fcd9
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
2011-01-15 16:44:22 +05:30
Colin Cross
684defe4fd video: tegra: host: Force memory bus to full when using 2d, 3d or mpe
Change-Id: I7138af5d26c3f406537bc4b2bc4bb052de37f7bf
Signed-off-by: Colin Cross <ccross@android.com>
2011-01-14 15:28:21 -08:00
Colin Cross
11dc248e04 ARM: tegra: clock: Add shared emc clock for tegra_grhost
Change-Id: Ie2814726d151777140c20d2bc0a3c1a3822043a8
Signed-off-by: Colin Cross <ccross@android.com>
2011-01-14 15:28:20 -08:00
Colin Cross
5feeeb6ace ARM: tegra: clock: Add round_rate op for shared clocks
Change-Id: Ica3f9fd9db4fe38f2c9ca3fc248526211f59c622
Signed-off-by: Colin Cross <ccross@android.com>
2011-01-14 15:28:20 -08:00
Mayuresh Kulkarni
cea5c11234 video: tegra: host: disable MPE auto-power-gate
It is seen that auto-power-gate of MPE causes some issues when long run
camera stress test is run. The issue manifest itself in the form of
MPE sync-point not getting triggered from hardware and hence the caller
who is waiting on it hangs up the system.

Disabling auto-power-gate for MPE seems to resolve this issue.

Original work of Jay Cheng <jacheng@nvidia.com>
Signed-off-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>

Change-Id: Iaef9f959cbc00dd715352ca637955cd2bea6f355
2011-01-14 15:28:19 -08:00
Rebecca Schultz Zavin
5be6f571ae video: tegra: nvmap: Several fixes to the carveout killer
-Modify the carveout killer to only kill tasks with lower priorities
than the one that's trying to allocate
-After delivering a sigkill to a task, wait for something to exit and
cleanup before retrying the allocation

Change-Id: If62b6ed008a73fc3c347ff26735a83eee284909e
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
2011-01-12 17:37:17 -08:00
Sergey Kudakov
683d3f2a8f video: tegra: reset default window in release
Change-Id: I242e9fac525472c5c20f213a6de516f95b2f6a12
Cc: Sergey Kudakov <sergey.kudakov@motorola.com>
Signed-off-by: Erik Gilling <konkers@android.com>
2011-01-12 17:00:36 -08:00
Ken Sumrall
82bc79e717 crypto: tegra-aes: Hack to disable HW AES for dm-crypt
The hardware aes engine is required for key management for
HDCP, but since it's performance is bad, we don't want it
enabled for dm-crypt.  This hack changes the cra_name field
so dm-crypt won't find a match, but leaves the cra_driver_name
field unchanged to the device file interface will still find it.

Signed-off-by: Ken Sumrall <ksumrall@android.com>
2011-01-12 15:58:37 -08:00
Varun Wadekar
67c21536bf crypto: tegra-aes: improve encrypt/decrypt performance
- enable/disable clocks only once per request
- create a thread for handling the driver's work queue
- always set vde clocks to the max before processing a request

Change-Id: I935e5523e9e913c93705cc694f8a475d212c15ce
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
2011-01-13 02:29:14 +05:30
Rebecca Schultz Zavin
b7cb0ccbfe video: tegra: nvmap: Don't store task struct for kernel threads
No need to maintain a reference to the task struct if the client
is a kernel thread.  In this case just set the task to NULL.

Change-Id: Ica4785388932f6b298eeb0da04b78b0e1cdc3a44
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
2011-01-12 11:14:55 -08:00
Varun Wadekar
1c10dcd996 crypto: tegra-aes: call INIT_COMPLETION before setting the transfer
Change-Id: I368a9bf8aa1c311532e54d18a813b556576b8da1
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
2011-01-12 00:08:22 -08:00
Varun Wadekar
269ae7240f crypto: tegra-aes: do not reset bsev/vde per operation
avp does not use the crypto engine inside the vde block,
so it is ok if we do not reset the entire block before
any crypto operation. this would save more than 100us per crypto
operation.

Change-Id: I4e6f4940c5b6e95498b6f7a62498fbf956e25254
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
2011-01-12 00:08:09 -08:00
Eric Laurent
a8ac34d55b [ARM] tegra_i2s_audio: fixed several issues
- Acquire the DMA request spinlock in dma_tx_complete_callback()
(this was omitted)
- allow_suspend() was called by mistake in start_recording_if_necessary()
every time it was executed which could cause the wake lock to be
released during audio capture.

Signed-off-by: Eric Laurent <elaurent@google.com>
Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-01-11 20:09:34 -08:00