Bibek Basu [Tue, 23 Jun 2015 05:41:44 +0000 (11:11 +0530)]
mmc: tegra: reverify tuning best tap
tuning best_tap_value at times throws wrong value leading
to data crc error. To make the SW robust, reverify tuning
best_tap_value with previously calculated and then only
proceed.
Bryan Wu [Mon, 8 Jun 2015 22:01:25 +0000 (15:01 -0700)]
media: tegra_camera: add start streaming call
Queueing buffer might happen before starting streaming. So any queueing
buffer operation before starting streaming shouldn't trigger real
capture but just queue the buffer. After starting streaming, it will
wake up kernel workqueue to start real capture.
Bryan Wu [Thu, 28 May 2015 00:09:45 +0000 (17:09 -0700)]
media: tegra_camera: optimize single shot mode
Current single shot mode, pixel parser is disabled after capture one
frame and software waits for memory write ack done syncpoint, which
only gives us half the frame rate.
Optimized single shot mode:
- during capture setup, set single shot mode
- for each frame, wait for FRAME_START syncpoint
- arm single shot bit to start capture
- for the last frame, wait for MWA_DONE syncpoint to make sure capture
finished.
With optimized single shot mode, frame rate is about 4208x3120 @ 24fps
for IMX135 and 1920x1080 @ 30fps for AR0261.
Naveen Kumar S [Wed, 6 May 2015 07:21:43 +0000 (12:51 +0530)]
video: tegra: dsi: add delay after register write
Providing a small delay after writing to dc registers while
stopping dc stream helps in stabilizing the registers. This
helps in resolving the intermittent register read failure issue.
JC Kuo [Wed, 20 May 2015 06:19:24 +0000 (14:19 +0800)]
xhci: tegra: run firmware log thread only if need
Driver doesn't need to run a kernel thread to collect firmware log
if release build firmware is loaded. Only debug build firmware is
capable of generating logs. This commit checks firmware CFGTBL to
know whether a firmware generates logs or not.
Igor Nabirushkin [Mon, 13 Apr 2015 13:00:37 +0000 (17:00 +0400)]
misc: tegra-profiler: fix stop error
Do not verify the existence of profiled process after
start of session.
It fixes the stop error on non-rooted devices when
application is terminated during the profile session.
Bibek Basu [Fri, 22 May 2015 07:30:54 +0000 (13:00 +0530)]
xhci: tegra: load fw from filesystem earlier
Loading firmware from filesystem takes much time. Enabing vbus regualtor
before loading firmware will cause the time gap between vbus ON and host
controller ready too large. So, we move the time of firmware loading
earlier.
Pankaj Dabade [Mon, 18 May 2015 07:12:48 +0000 (12:42 +0530)]
video : hdmi: Add more checks in mode filter
While programming DC controller it is decided at runtime
if a particular mode can be satisfied. This check relies
on the parent pixel clock settings. This patch adds same
check in the mode filter function for HDMI, eliminating
entries from modelist which will not be supported.
Alban Bedel [Tue, 12 May 2015 08:28:51 +0000 (13:58 +0530)]
video: tegra: hdmi: Fix potential crash when setting up HDMI
The HDMI state machine registers an IRQ handler before all the resources
it needs are available. Ideally the IRQ handler should be registered
later, however it would mean a quite large change. Instead we just add
some check to avoid running the state machine as long as the
framebuffer hasn't been registered.
While at it also prevent scheduling the state machine if it hasn't been
initialized yet.
Alban Bedel [Tue, 12 May 2015 08:34:09 +0000 (14:04 +0530)]
usb: xhci: tegra: fix compilation with lockdep enabled
The sysfs_attr_init() macro expects a pointer to a struct attribute as
argument and not a pointer to a struct device_attribute. This was
bulding with lockdep disabled because in this case the
sysfs_attr_init() macro does nothing.
Change-Id: Ice4c50044f4ac2bfb2bc61114e6264135a92b847 Signed-off-by: Neil Chen <neilc@nvidia.com>
Reviewed-on: http://git-master/r/742125 Reviewed-by: Matthew Pedro <mapedro@nvidia.com> Tested-by: Matthew Pedro <mapedro@nvidia.com>
Krishna Reddy [Tue, 5 Aug 2014 21:43:37 +0000 (14:43 -0700)]
video: tegra: nvmap: clean cache during page allocations into page pool
Clean cache during page allocations into page pool to
avoid cache clean overhead at the time of allocation.
Increase page pool refill size to 1MB from 512KB.
Change-Id: I6c45782e54879541f7b518bbbb016383b24e376b Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/453197 Reviewed-by: Sri Krishna Chowdary <schowdary@nvidia.com>
GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: Michael I Gold <gold@nvidia.com>
[ccross: moved on top of background zeroing patches, replaced
atomic with bool since it has to be protected by a lock anyways] Signed-off-by: Colin Cross <ccross@android.com>
Reviewed-on: http://git-master/r/664676
Reviewed-on: http://git-master/r/736430 Tested-by: Alex Waterman <alexw@nvidia.com>
Colin Cross [Wed, 13 Aug 2014 02:36:04 +0000 (19:36 -0700)]
nvmap: page pools: fix lockdep splat
lockdep complains about the alloc_page call under the pool lock
in nvmap_page_pool_init because the pool lock is also taken during
reclaim in nvmap_page_pool_shrink. Rewrite nvmap_page_pool_init
to perform the allocation in PENDING_PAGES_SIZE chunks outside the
lock. Also move the global pending_pages to a static copy in
nvmap_pp_do_background_zero_pages and a kcalloc'd array during
init to avoid conflicts when two threads try to use the same array.
Colin Cross [Tue, 12 Aug 2014 00:33:09 +0000 (17:33 -0700)]
nvmap: page pools: replace background allocator with background zeroer
The background allocator rapidly becomes useless once the system
has filled memory with cached pages. It refuses to allocate when
free memory < 128MB (which it always is, the kernel is aiming to
keep very little free), and freed pages are not returned to the
page pool when zero_memory=1.
Remove the background allocator completely, and instead return
freed memory to the page pool in a separate list to be zeroed
in the background. This results in a self-balancing pool of
memory available to graphics, and reduces presure on the kernel's
page allocator. If the pool grows too big it will get reduced
by the shrinker. If it gets too small, the next allocation will
fall back to the page allocator, and then later return those pages
to the pool.
Before this change incremental page pool hit rate reported by
/d/nvmap/pagepool/page_pool_hits vs. /d/nvmap/pagepool/page_pool_misses
goes to 0% after boot. After this change it is near 100% for small
app launches and 75% for larger app launches.
Change-Id: I4bc914498d7d0369eef9e621bda110d9b8be90b2 Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/664674
GVS: Gerrit_Virtual_Submit
Reviewed-on: http://git-master/r/736428 Reviewed-by: Alex Waterman <alexw@nvidia.com> Tested-by: Alex Waterman <alexw@nvidia.com>
Colin Cross [Mon, 11 Aug 2014 23:09:51 +0000 (16:09 -0700)]
nvmap: page pool: fix background thread
Fix a race condition in the background allocator where
wake_up_process could be called just before set_current_state
changed the state to TASK_INTERRUPTIBLE, causing the thread
not to wake. Use a waitqueue instead.
Also make the background allocator nicer by marking it freezable
so it doesn't compete with suspend, and setting it SCHED_IDLE so
it only runs when no other threads want to run.
Change-Id: If95da005bb1fc4c9b5e802d40730803a57057fe1 Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/664673
GVS: Gerrit_Virtual_Submit
Reviewed-on: http://git-master/r/736427 Reviewed-by: Alex Waterman <alexw@nvidia.com> Tested-by: Alex Waterman <alexw@nvidia.com>
Colin Cross [Mon, 11 Aug 2014 21:25:20 +0000 (14:25 -0700)]
nvmap: combine two methods of requesting zeroed memory
Combine CONFIG_NVMAP_FORCE_ZEROED_USER_PAGES and the zero_memory
modparam into a single option by forcing zero_memory=1 when
CONFIG_NVMAP_FORCE_ZEROED_USER_PAGES is set, and always using
zero_memory to decided whether to zero or not.
Change-Id: I9ce0106cfaea950bd9494b697916fbc2a03329ea Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/664672
GVS: Gerrit_Virtual_Submit
Reviewed-on: http://git-master/r/736426 Reviewed-by: Alex Waterman <alexw@nvidia.com> Tested-by: Alex Waterman <alexw@nvidia.com>
Colin Cross [Mon, 11 Aug 2014 21:08:40 +0000 (14:08 -0700)]
nvmap: page pools: hide internal lock from nvmap_handle.c
The internal pool lock is exported so that nvmap_handle can lock
it, call a *_locked function, and then unlock it. Provide a
version of the *_locked functions that takes the lock, remove
the lock and unlock helpers, and make the lock private to
the pools again.
Change-Id: I5a99753058e43161d50a0c61f3a984655cd7cd35 Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/664671
GVS: Gerrit_Virtual_Submit
Reviewed-on: http://git-master/r/736425 Reviewed-by: Alex Waterman <alexw@nvidia.com> Tested-by: Alex Waterman <alexw@nvidia.com>
Colin Cross [Fri, 8 Aug 2014 02:35:35 +0000 (19:35 -0700)]
nvmap: replace page pool array with a list
struct page already has a list node that is available to use by
whoever got the page with alloc_page. Use it to keep the free
pages in the pool in a list instead of a circular buffer in an
array.
Change-Id: I0377633be7d620b59daf34799bd4ebc5fd9443fb Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/664670
GVS: Gerrit_Virtual_Submit
Reviewed-on: http://git-master/r/736424 Reviewed-by: Alex Waterman <alexw@nvidia.com> Tested-by: Alex Waterman <alexw@nvidia.com>
Pankaj Dabade [Wed, 6 May 2015 11:23:17 +0000 (16:53 +0530)]
vga: Make absence of device message as debug print
This patch converts message of absence of vga device as a
debug print. This message comes when client tries to
access device on PCI which is absent, in this case DSI.
Jeetesh Burman [Tue, 24 Mar 2015 17:46:48 +0000 (23:16 +0530)]
mmc: tegra: Abort tuning if device is removed
For removable devices, check for the card presence status before
issuing each tuning command. If the device is removed, abort tuning
and return -ENOMEDIUM error.
Jeetesh Burman [Tue, 24 Mar 2015 17:25:34 +0000 (22:55 +0530)]
mmc: tegra: Use 100000 precision instead of 1000
-To derive estimated tuning data for other than boot_mv and vmin
we are using precision of 1000.
-Use precision of 100000 to derive data more accurately
Jeetesh Burman [Tue, 24 Mar 2015 14:49:51 +0000 (20:19 +0530)]
mmc: tegra: Fix missing tap hole margins print
Avoid false warnings by reporting missing fixed tap hole margins only if
NVQUIRK_SELECT_FIXED_TAP_HOLE_MARGINS is set rather than printing the
message unconditionally.
Change-Id: I792062649c247229270678a44d10323d2744b569 Signed-off-by: Kassey Li <kasseyl@nvidia.com>
Reviewed-on: http://git-master/r/721561 Reviewed-by: Matthew Pedro <mapedro@nvidia.com> Tested-by: Matthew Pedro <mapedro@nvidia.com>
Krishna Reddy [Fri, 27 Mar 2015 18:42:40 +0000 (11:42 -0700)]
iommu/tegra: smmu: Fix race condition in writing PTC registers
Fix race condition in programming PTC flush registers.
This race condition results in PTC flush not happening as intended and
can cause either SMMU fault or previous stale mapping access.
Signed-off-by: Sean Paul <seanpaul@chromium.org> Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
BUG=chrome-os-partner:30799
TEST=Tested on ryu
Roger Hsieh [Mon, 2 Mar 2015 11:23:33 +0000 (19:23 +0800)]
arm: tegra12: fix PTSA registers save/restore
Some of PTSA regsiters are restored to wrong value that affects
other clients under memory controller. Correct it to fix audio
noise issue after LP0 resume.
Hans de Goede [Fri, 16 Jan 2015 15:54:02 +0000 (17:54 +0200)]
xhci: Silence "xHCI xhci_drop_endpoint called with disabled ep ..." messages
When re-applying the configuration after a successful usb device reset,
xhci_discover_or_reset_device has already dropped the endpoints, and free-ed
the rings.
The endpoints already being dropped is expected, and should not lead to
warnings. Use the fact that the rings are also free-ed in this scenario to
detect this, and suppress the "xHCI xhci_drop_endpoint called with disabled
ep ..." message in this case.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
--
Changes in v2:
Move the ring check to only guard the xhci_warn, so as to avoid side-effects
in case we have a scenario where the rings are free-ed, but the endpoint is
not yet dropped. Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Change-Id: I94392cf985208f96c7102e5115268c3460338a46 Signed-off-by: Petlozu Pravareshwar <petlozup@nvidia.com>
Reviewed-on: http://git-master/r/721398 Reviewed-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
GVS: Gerrit_Virtual_Submit Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
Bibek Basu [Wed, 25 Mar 2015 04:46:43 +0000 (10:16 +0530)]
arm:tegra: increase cpu edp max limit for CD575MI
For 70degC trip due to edp, increase the max limit further
to 76 as the driver applies a tolerance of 5 degC.
Also increase the shutdown limit to 105degC
Fix the parent clock search for the display
controller. It addresses the corner case when
the divider difference is just smaller than the
chosen precision and wrongly assumed zero.
An explicit ceiling function is applied for
corretness.
Naveen Kumar S [Fri, 6 Mar 2015 09:58:55 +0000 (15:28 +0530)]
ARM: config: Enable Android Sync on Linux
Currently Android sync framework is used only in Android side,
however, it provides a generic synchronization framework that
can be used also in Linux.
This patch enables Android Sync framework on T124, T132 and T210
on Linux.
Naveen Kumar S [Fri, 6 Mar 2015 09:41:39 +0000 (15:11 +0530)]
staging: sync: make sync independent of android
Until now Android Sync framework was being used only in Android,
however, it can be used in Linux too as it provides a generic
synchronization framework. Hence removing Sync framework's dependency
on Android.
Bibek Basu [Tue, 24 Feb 2015 06:09:40 +0000 (11:39 +0530)]
arm: tegra12: dvfs update for embedded SKU
CD575MI:
Max GPU freq is set to 852Mhz for 4/4/16
cpu_g powered by pllx is set to 1.5 and 1.8Ghz below 0 degC
Enable SOC dvfs for default personality
CD575M:
Lower CPU freq to 1912Mhz @ Max 1.12V
Lower GPU freq to 804Mhz @ Max 1.90V
Alban Bedel [Tue, 10 Mar 2015 11:19:45 +0000 (16:49 +0530)]
tegra: ictlr: fix crash when an IRQ fire during the probe
The IRQ handler use drvdata, however drvdata was set *after*
registering the IRQ handler. If an IRQ fired before drvdata was set it
would crash the kernel. Fix this by setting drvdata before registering
the IRQ handler.
Pankaj Dabade [Fri, 27 Feb 2015 13:45:26 +0000 (19:15 +0530)]
tegra: dsi: Deselect CSI pads during calibration
Zeroing out mipical register space during DSI
calibration may lead to timeouts with camera(CSI) interface.
Instead, This fix deselects the required CSI pads
for DSI calibration to succeed
Mahantesh Kumbar [Tue, 14 Oct 2014 12:14:34 +0000 (17:44 +0530)]
gk20a: Moved bind fecs to init_gr_support
-Moved bind fecs from work queue to init_gr_support.
-It makes all CPU->FECS communication to happen before
booting PMU, and after we boot PMU, only PMU talks to
FECS. So it removes possibility to race between CPU
and PMU talking to FECS.
Pankaj Dabade [Thu, 12 Feb 2015 10:28:56 +0000 (15:58 +0530)]
video: fbcon: Keep atleast one mode in modelist
Framebuffer console init requires atleast one valid
mode to exist for it to succeed.
Virtual terminals relies on the success of fbcon_init
without really checking the return value of this function.
Pankaj Dabade [Tue, 10 Feb 2015 10:23:41 +0000 (15:53 +0530)]
tegra: fb: Check DC max pixel clock supported
Check max clock supported by DC before programming it with that mode.
If the requested pixel clock is greater than the maximum supported,
fall back to default mode.
Arto Merilainen [Wed, 3 Sep 2014 16:01:19 +0000 (19:01 +0300)]
video: tegra: host: Never release firmware
Firmwares are currently released at the time we close the channel
device node. This causes unexpected side effects in cases where
the finalize_poweron is called only once to get the device booted
during the first time the device is accessed.
This patch fixes the issue by not releasing the firmware after it
has once loaded.
Change-Id: I8fc6748846e56ac0cc347feb170b239533a47252 Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-on: http://git-master/r/495220
(cherry-picked from commit 69bce0a17ad1e5457cfce0d66f6e1b4add7e9820)
Reviewed-on: http://git-master/r/670671 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Matthew Pedro <mapedro@nvidia.com>