summaryrefslogtreecommitdiff
path: root/drivers/video
AgeCommit message (Collapse)Author
2015-08-25video: tegra: dc: handle tegra_dc_sync_windows errorBibek Basu
In case tegra_dc_sync_windows is interrupted by signal, return the error to caller application Bug 200090492 Change-Id: Id69fbe38d0abe0b3e71eb5a413db241ebcf0a0ae Signed-off-by: Bibek Basu <bbasu@nvidia.com> Reviewed-on: http://git-master/r/784754 GVS: Gerrit_Virtual_Submit Reviewed-by: Winnie Hsu <whsu@nvidia.com>
2015-07-14backlight: pwm: Converting benign message to infoPankaj Dabade
Making message "unable to request PWM, trying legacy API". However, failure with legacy API will be treated as error. Bug 200113810 Change-Id: Ie7bae0c62837a4fde89706d1b9600600c2a49651 Signed-off-by: Pankaj Dabade <pdabade@nvidia.com> Reviewed-on: http://git-master/r/761732 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Matthew Pedro <mapedro@nvidia.com> Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
2015-06-18video: tegra: dsi: add delay after register writeNaveen Kumar S
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. bug 200087039 Change-Id: I159d1d75aa2472b9e33bc42d890382f33def218a Signed-off-by: Naveen Kumar S <nkumars@nvidia.com> Reviewed-on: http://git-master/r/746062 (cherry picked from commit d29669af88735a2aeeb87b26f8794c9bcbb9f058) Reviewed-on: http://git-master/r/756015 Reviewed-by: Pankaj Dabade <pdabade@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Venkat Moganty <vmoganty@nvidia.com> Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
2015-06-01video: tegra: host: pod: change vic freq tuningArun Kannan
Tune nvhost_podgov scaling algo params for vic03 frequency scaling. Bug 1640539 Change-Id: Id5583b5cd60d6b4449470d8c3df1e5d06bc4aedb Signed-off-by: Arun Kannan <akannan@nvidia.com> Reviewed-on: http://git-master/r/741438 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Kamal Balagopalan <kbalagopalan@nvidia.com> Reviewed-by: Ming Wong <miwong@nvidia.com> Reviewed-by: Bibek Basu <bbasu@nvidia.com> Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
2015-05-20video : hdmi: Add more checks in mode filterPankaj Dabade
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. Bug 200080781 Change-Id: I6e39249e419bc83d549e561267a57ad25d4652ad Signed-off-by: Pankaj Dabade <pdabade@nvidia.com> Reviewed-on: http://git-master/r/741686 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Miguel Angel Vico Moya <mvicomoya@nvidia.com> Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
2015-05-19video: tegra: hdmi: Fix potential crash when setting up HDMIAlban Bedel
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. Bug 1618089 Change-Id: I8f9dc07d2a4bf7e33e869206ad83ed80af93f566 Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de> Signed-off-by: Bibek Basu <bbasu@nvidia.com> Reviewed-on: http://git-master/r/741616 GVS: Gerrit_Virtual_Submit Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
2015-05-14video: tegra: nvmap: clean L1 on all coresKrishna Reddy
Clean L2 by set/ways doesn't ensure that L1 is cleaned on A15 and A57. Clean L1 on all cores before cleaning L2. Bug 20007733 Change-Id: I8a389317571060ba4716663c03ab75896aa13612 Signed-off-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-on: http://git-master/r/742255 GVS: Gerrit_Virtual_Submit Reviewed-by: Bibek Basu <bbasu@nvidia.com>
2015-05-12video: tegra: nvmap: clean cache during page allocations into page poolKrishna Reddy
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. Bug 1539190 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>
2015-05-12nvmap: page pools: fix lockdep splatColin Cross
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. [ 57.734407] ================================= [ 57.738786] [ INFO: inconsistent lock state ] [ 57.743198] 3.10.40-ge3b2801-dirty #145 Tainted: G W [ 57.749135] --------------------------------- [ 57.753521] inconsistent {RECLAIM_FS-ON-W} -> {IN-RECLAIM_FS-W} usage. [ 57.760082] kswapd0/41 [HC0[0]:SC0[0]:HE1:SE1] takes: [ 57.765159] (&pool->lock#2){+.+.?.}, at: [<ffffffc000404d28>] nvmap_page_pool_shrink+0x48/0x9c [ 57.773953] {RECLAIM_FS-ON-W} state was registered at: [ 57.779118] [<ffffffc000106964>] mark_lock+0x1d0/0x7a8 [ 57.784938] [<ffffffc000107004>] mark_held_locks+0xc8/0x184 [ 57.791543] [<ffffffc000107bd0>] lockdep_trace_alloc+0xb4/0xf8 [ 57.797594] [<ffffffc00015ce24>] __alloc_pages_nodemask+0x98/0x7f8 [ 57.803987] [<ffffffc0004051d8>] nvmap_page_pool_init+0x19c/0x220 [ 57.810287] [<ffffffc0003fbf20>] nvmap_probe+0x9c/0x78c [ 57.815713] [<ffffffc00049c588>] platform_drv_probe+0x18/0x24 [ 57.821662] [<ffffffc00049aadc>] driver_probe_device+0xa8/0x3a8 [ 57.827783] [<ffffffc00049aed0>] __driver_attach+0xa0/0xa8 [ 57.833466] [<ffffffc000498d64>] bus_for_each_dev+0x58/0x9c [ 57.839238] [<ffffffc00049a9d0>] driver_attach+0x1c/0x28 [ 57.844746] [<ffffffc000499828>] bus_add_driver+0x1d8/0x294 [ 57.850517] [<ffffffc00049ba10>] driver_register+0x68/0x174 [ 57.856289] [<ffffffc00049cfe0>] platform_driver_register+0x54/0x60 [ 57.862759] [<ffffffc000d61354>] nvmap_init_driver+0x24/0x40 [ 57.868617] [<ffffffc000d328d4>] do_one_initcall+0xac/0x164 [ 57.874387] [<ffffffc000d32af8>] kernel_init_freeable+0x158/0x1f8 [ 57.880678] [<ffffffc0009e7d40>] kernel_init+0x10/0x158 [ 57.886103] [<ffffffc000084cfc>] ret_from_fork+0xc/0x1c [ 57.891526] irq event stamp: 803 [ 57.894763] hardirqs last enabled at (803): [<ffffffc0009fc208>] _raw_spin_unlock_irqrestore+0x64/0x94 [ 57.904211] hardirqs last disabled at (802): [<ffffffc0009fbfa8>] _raw_spin_lock_irqsave+0x24/0x9c [ 57.913202] softirqs last enabled at (0): [<ffffffc0000a508c>] copy_process.part.55+0x448/0x1150 [ 57.922108] softirqs last disabled at (0): [< (null)>] (null) [ 57.929530] [ 57.929530] other info that might help us debug this: [ 57.936074] Possible unsafe locking scenario: [ 57.936074] [ 57.942008] CPU0 [ 57.944456] ---- [ 57.946905] lock(&pool->lock#2); [ 57.950338] <Interrupt> [ 57.952960] lock(&pool->lock#2); [ 57.956565] [ 57.956565] *** DEADLOCK *** [ 57.956565] [ 57.962502] 1 lock held by kswapd0/41: [ 57.966257] #0: (shrinker_rwsem){++++..}, at: [<ffffffc0001651cc>] shrink_slab+0x54/0x3b0 [ 57.974677] [ 57.974677] stack backtrace: [ 57.979063] CPU: 0 PID: 41 Comm: kswapd0 Tainted: G W 3.10.40-ge3b2801-dirty #145 [ 57.987434] Call trace: [ 57.989888] [<ffffffc0000887e4>] dump_backtrace+0x0/0x188 [ 57.995300] [<ffffffc00008897c>] show_stack+0x10/0x1c [ 58.000363] [<ffffffc0009f3490>] dump_stack+0x1c/0x28 [ 58.005428] [<ffffffc0009f0d6c>] print_usage_bug.part.37+0x28c/0x2a8 [ 58.011799] [<ffffffc0001068f0>] mark_lock+0x15c/0x7a8 [ 58.016951] [<ffffffc000109f50>] __lock_acquire+0x7c0/0xd24 [ 58.022536] [<ffffffc00010ada8>] lock_acquire+0xa8/0x148 [ 58.027862] [<ffffffc0009f870c>] mutex_lock_nested+0x80/0x3e0 [ 58.033623] [<ffffffc000404d24>] nvmap_page_pool_shrink+0x44/0x9c [ 58.039731] [<ffffffc000165364>] shrink_slab+0x1ec/0x3b0 [ 58.045056] [<ffffffc000168554>] balance_pgdat+0x4d0/0x5d4 [ 58.050555] [<ffffffc0001687d0>] kswapd+0x178/0x45c [ 58.055448] [<ffffffc0000d0fa0>] kthread+0xd0/0xdc [ 69.502055] dhd_set_suspend: Remove extra suspend setting [ 69.787786] dhd_set_suspend: force extra Suspend setting Change-Id: I41e908da9c51f353300f32c50354b4f48b2424c5 Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-on: http://git-master/r/664675 GVS: Gerrit_Virtual_Submit Reviewed-on: http://git-master/r/736429 Reviewed-by: Alex Waterman <alexw@nvidia.com> Tested-by: Alex Waterman <alexw@nvidia.com>
2015-05-12nvmap: page pools: replace background allocator with background zeroerColin Cross
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>
2015-05-12nvmap: page pool: fix background threadColin Cross
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>
2015-05-12nvmap: combine two methods of requesting zeroed memoryColin Cross
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>
2015-05-12nvmap: page pools: hide internal lock from nvmap_handle.cColin Cross
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>
2015-05-12nvmap: replace page pool array with a listColin Cross
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>
2015-05-12Revert "video: tegra: nvmap: clean cache during page allocations into page pool"Krishna Reddy
This reverts commit b1d8c6c9415df111e4af1425a3d84b25c00a9c06. Change-Id: Ide7e78780722bdd30426089f38155c7cabf28934 Signed-off-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-on: http://git-master/r/664669 GVS: Gerrit_Virtual_Submit Reviewed-on: http://git-master/r/736423 Reviewed-by: Alex Waterman <alexw@nvidia.com> Tested-by: Alex Waterman <alexw@nvidia.com>
2015-03-18video: tegra: hdmi: fix parent clock searchIvan Raul Guadarrama
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. Bug 1580265 Bug 1552739 Change-Id: I47312116c19813260941abcae42e4067a57f3d2c Signed-off-by: Ivan Raul Guadarrama <iguadarrama@nvidia.com> Reviewed-on: http://git-master/r/714972 GVS: Gerrit_Virtual_Submit Reviewed-by: Pankaj Dabade <pdabade@nvidia.com> Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
2015-03-02tegra: dsi: Deselect CSI pads during calibrationPankaj Dabade
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 Bug 1581879 Change-Id: I535debc233589924a9548a2a1839b617e8d9da0c Reviewed-on: http://git-master/r/665124 (cherry picked from commit f01329808d2cb0f01d6add88ed6904dfff665d74) Signed-off-by: Vineel Kumar Reddy Kovvuri <vineelkumarr@nvidia.com> Signed-off-by: Pankaj Dabade <pdabade@nvidia.com> Reviewed-on: http://git-master/r/711996 GVS: Gerrit_Virtual_Submit Reviewed-by: Matthew Pedro <mapedro@nvidia.com> Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
2015-02-17video: fbcon: Keep atleast one mode in modelistPankaj Dabade
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. Bug 200036424 Change-Id: Ia34da6ab3814f667a485d23ef88e1a52f8b5519b Signed-off-by: Pankaj Dabade <pdabade@nvidia.com> Reviewed-on: http://git-master/r/707309 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Bibek Basu <bbasu@nvidia.com> Reviewed-by: Venkat Moganty <vmoganty@nvidia.com> Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
2015-02-10tegra: fb: Check DC max pixel clock supportedPankaj Dabade
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. Bug 200031813 Change-Id: I9c5d4373ff0ee8de039af42f46323909b0bec272 Signed-off-by: Pankaj Dabade <pdabade@nvidia.com> Reviewed-on: http://git-master/r/676941 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Matthew Pedro <mapedro@nvidia.com> Reviewed-by: Bibek Basu <bbasu@nvidia.com> Reviewed-by: Winnie Hsu <whsu@nvidia.com>
2015-02-10video: tegra: host: Never release firmwareArto Merilainen
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. Bug 200033244 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>
2015-01-20tegra: dc: Unsetting DC to default mode in probePankaj Dabade
During probe, for L4t-HDMI, monitor specs are read and set before DC is enabled. DC will fall back to default mode only when a invalid request is made by monitor. Bug 200020671 Bug 200031813 Change-Id: I5138e76afe8b2e5bfef1ee1941455827df34a1c0 Signed-off-by: Pankaj Dabade <pdabade@nvidia.com> Reviewed-on: http://git-master/r/673655 Reviewed-by: Bibek Basu <bbasu@nvidia.com> Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
2015-01-15tegra: dc: Unsetting DC to default mode in probePankaj Dabade
During probe, for L4t, monitor specs are read and set before DC is enabled. DC will fall back to default mode only when a invalid request is made by monitor. Bug 200020671 Change-Id: Ic78dc9883813d1ca6623ccfde47f8a2bd493cf76 Signed-off-by: Pankaj Dabade <pdabade@nvidia.com> Reviewed-on: http://git-master/r/668839 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Jon Mayo <jmayo@nvidia.com> Reviewed-by: Jong Kim <jongk@nvidia.com> Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
2014-12-31tegra: dc: Check DC max pixel clock supportedPankaj Dabade
Check max clock supported by DC before programming it with that mode. If the requested pixel clock is greater than the maximum supported then fall back to default mode: 640x480. Bug 200031813 Change-Id: Icf1f91fe36e29f2c8c6aefe34d3952948743c3a8 Signed-off-by: Pankaj Dabade <pdabade@nvidia.com> Reviewed-on: http://git-master/r/666089 GVS: Gerrit_Virtual_Submit Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2014-11-06video: tegra: dc: increase V_REF_TO_SYNCJon Mayo
Increase V_REF_TO_SYNC value to the maximum size. This adjusts where the flip activation occurs and permits spool up to include more of the front porch time. Bug 1528419 Change-Id: I981d3ffca49c694acf0806279bcf87d92084169c Signed-off-by: Jon Mayo <jmayo@nvidia.com> Reviewed-on: http://git-master/r/440817 (cherry picked from commit 1c9c042b31735bb1b04780037ba5d7b6aee9fcd2) Reviewed-on: http://git-master/r/441378 (cherry picked from commit 24afa49b1c471bdd90f06a5cee840d8101761b31) Reviewed-on: http://git-master/r/592932 Reviewed-by: Automatic_Commit_Validation_User
2014-10-28tegra: hdmi: Add enable functionality to hotplugPankaj Dabade
Function handle_enable_l will notify virtual terminals about new hotplug, triggering notifier call chain to blank/unblank sequence. Bug 200045281 Change-Id: Iaa6cbf9ca201dd7ac5f390b79af1dae5eac8b3b0 Signed-off-by: Pankaj Dabade <pdabade@nvidia.com> Reviewed-on: http://git-master/r/558798 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Naveen Kumar S <nkumars@nvidia.com> Tested-by: Naveen Kumar S <nkumars@nvidia.com> Reviewed-by: Jeffery Yu <jefferyy@nvidia.com> Reviewed-by: Bibek Basu <bbasu@nvidia.com> Reviewed-by: Venkat Moganty <vmoganty@nvidia.com> Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
2014-10-17video: tegra: host: Fix channel refcount issuesArto Merilainen
This patch fixes few possible races in channel initialisation and deinitialisation: - If two channel initialisations were running concurrently for the same device and the first initialisation failed, we potentially gave an uninitialised channel to the second requester - If putchannel() triggered uninitialisation, we were still able to give the channel in getchannel(). Bug 200013323 Change-Id: I99fa726db99fbb98401d5703cc2572131907f726 (cherry picked from commit 4fb20fef4a9eaf222c3f6d4c83fcb495f207c478) Signed-off-by: Arto Merilainen <amerilainen@nvidia.com> Reviewed-on: http://git-master/r/498509 Reviewed-on: http://git-master/r/538725 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Shreshtha Sahu <ssahu@nvidia.com> Tested-by: Shreshtha Sahu <ssahu@nvidia.com> Reviewed-by: Venkat Moganty <vmoganty@nvidia.com> Reviewed-by: Shridhar Rasal <srasal@nvidia.com>
2014-10-17video: tegra: host: Fix debug dumpArto Merilainen
Currently the debug dump routine is vulnerable against tricky races. As normal operation is more important than getting the full dump always, this patch reworks mutex usage in debug dump routine: - lock the channel list is now before going through channels. This ensures that channel states remain valid even if some of the channels were finished during dump. - this patch modifies mutex_lock() calls to mutex_trylock() calls. This ensures that the function call cannot block. Bug 1517429 Change-Id: Idf170de196bcededbaec6c9031d268cf2d8bc35d (cherry picked from commit 544cbc483b973ca1c78173edcf2072434c02b5dd) Signed-off-by: Arto Merilainen <amerilainen@nvidia.com> Reviewed-on: http://git-master/r/498508 Reviewed-on: http://git-master/r/538724 GVS: Gerrit_Virtual_Submit Reviewed-by: Shreshtha Sahu <ssahu@nvidia.com> Tested-by: Shreshtha Sahu <ssahu@nvidia.com> Reviewed-by: Venkat Moganty <vmoganty@nvidia.com> Reviewed-by: Shridhar Rasal <srasal@nvidia.com>
2014-10-17video: tegra: host: revise channel refcnt API'sShridhar Rasal
Use only one API to subtract channel refcnts. To check unbanalaced channel refcnt add WARN_ON when count goes below zero. Print error number when channel unmap fails. Bug 1526504 Change-Id: If88f028a44c9b796d8eaae4affcd0026758cfbe8 (cherry picked from commit f98ce1fc2066e2309af2ef7a52801abadbd40f00) Signed-off-by: Shridhar Rasal <srasal@nvidia.com> Reviewed-on: http://git-master/r/496479 Reviewed-on: http://git-master/r/538723 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Shreshtha Sahu <ssahu@nvidia.com> Tested-by: Shreshtha Sahu <ssahu@nvidia.com> Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
2014-10-17video: tegra: host: simplify channel map usageShridhar Rasal
Use array instead list to hold all channels. Remove unused references. Bug 1526504 Change-Id: I49596238d38d5aa78ff32a59b8c0f2c116136a09 (cherry picked from commit 93d7a5f52d3f3aad28187aed15877994d8781cbc) Signed-off-by: Shridhar Rasal <srasal@nvidia.com> Reviewed-on: http://git-master/r/496478 Reviewed-on: http://git-master/r/538722 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Shreshtha Sahu <ssahu@nvidia.com> Tested-by: Shreshtha Sahu <ssahu@nvidia.com> Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
2014-09-26video: tegra: nvmap: remove support for Deprecated GET_ID/FROM_ID ioctl'sManeet Singh
Remove support and add warning message for deprecated IOCTL's - NVMAP_IOC_FROM_ID and NVMAP_IOC_GET_ID. These ioctl calls are deprecated by corresponding FD ioctl calls. Bug 1553082 Change-Id: I3cd531422293f19496687f346692fa91ebe58a40 Signed-off-by: Maneet Singh <mmaneetsingh@nvidia.com> Reviewed-on: http://git-master/r/498045 (cherry picked from commit 420dce0a99231453ebbd091f110d0de816e4885e) Reviewed-on: http://git-master/r/538987 GVS: Gerrit_Virtual_Submit Reviewed-by: Winnie Hsu <whsu@nvidia.com>
2014-09-26video: tegra: nvmap: fix use-after-free race conditionManeet Singh
Incremented nvmap_handle ref count in utility function nvmap_get_id_from_dmabuf_fd() before the function release reference to dma buffer. This is required to avoid race conditions in nvmap code where nvmap_handle returned by this function could be freed concurrently while the caller is still using it. As a side effect of above change, every caller of this utility function must decrement nvmap_handle ref count after using the returned nvmap_handle. Bug 1553082 Change-Id: Iffc2e5819f8b493d5ed95a9d0c422ccd52438965 Signed-off-by: Maneet Singh <mmaneetsingh@nvidia.com> Reviewed-on: http://git-master/r/498135 (cherry picked from commit afddea745cc4f4a824be501ecbbb50f55e7e6f04) Reviewed-on: http://git-master/r/538986 GVS: Gerrit_Virtual_Submit Reviewed-by: Winnie Hsu <whsu@nvidia.com>
2014-09-26video: tegra: nvmap: cleanup redundant functionsManeet Singh
Removed redundant function unmarshal_user_id() and replaced it with unmarshal_user_handle() which it internally calls without any other changes. Bug 1553082 Change-Id: I7d998966c593f11a3322b0503ef11311fc1ae5e7 Signed-off-by: Maneet Singh <mmaneetsingh@nvidia.com> Reviewed-on: http://git-master/r/498103 (cherry picked from commit 4880b6c2bdf5b10e4a71b5b79e7878343b9e7e3b) Reviewed-on: http://git-master/r/538985 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Winnie Hsu <whsu@nvidia.com>
2014-09-19edp: sysedp : CPU/GPU priority depends on fGPUMatt Longnecker
Provide sysedp_dynamic_capping with the instantaneous GPU frequency when notifying it of the GPU load. Modify the gpu/cpu priority decision logic to choose CPU priority until GPU frequency gets "near" the CPU-priority-limited-GPU-fmax. Introduce the priority_bias debugfs parameter to facilitate tuning of "near". priority_bias takes a value from 0 to 100. Change-Id: I57df17d50cd8077a512b5932f4a304ca5e6992aa Signed-off-by: Matt Longnecker <mlongnecker@nvidia.com> Reviewed-on: http://git-master/r/481720 (cherry picked from commit b2ac745a45e273e849d7b190913ee97092fdebc2) Reviewed-on: http://git-master/r/498901 GVS: Gerrit_Virtual_Submit Reviewed-by: Winnie Hsu <whsu@nvidia.com>
2014-09-18video: tegra: dc: Avoid FRAME_END_INT conflictDaniel Solomon
Allowing for dc->lock to be acquired by the caller in function tegra_dc_config_frame_end_intr can result in FRAME_END_INT mask register being overwritten if the lock is actually acquired by another thread. Refactor the critical section into its own function and allow callers to call either function. Also Change the name of tegra_dc_wait_for_frame_end to indicate that it should be called with dc->lock locked. Bug 1534724 Change-Id: I87b1fc529f29f707a1bdadf18efa6bb19d6966b3 Signed-off-by: Daniel Solomon <daniels@nvidia.com> Reviewed-on: http://git-master/r/456988 (cherry picked from commit ec9b7f555b9648e3aee0cd9781a92b14178a3344) Reviewed-on: http://git-master/r/496581 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Jong Kim <jongk@nvidia.com> Reviewed-by: Matthew Pedro <mapedro@nvidia.com> Reviewed-by: Jon Mayo <jmayo@nvidia.com> Reviewed-by: Bibek Basu <bbasu@nvidia.com> Tested-by: Bibek Basu <bbasu@nvidia.com> Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
2014-09-18video: tegra: dc: Fix and refactor FRAME_END_INTDaniel Solomon
- Fix a conflict with other DC interrupt masks when the DSI driver waits on FRAME_END_INT - Move generic FRAME_END_INT mask/unmask and wait-for functions to dc.c Bug 1534724 Change-Id: I40e26ada2f0494782979e32c1a22906361b214b5 Signed-off-by: Daniel Solomon <daniels@nvidia.com> Reviewed-on: http://git-master/r/451186 (cherry picked from commit 24a39c49f63eea704003ee27296f1f70d46bcbd0) Reviewed-on: http://git-master/r/496580 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Jong Kim <jongk@nvidia.com> Reviewed-by: Bibek Basu <bbasu@nvidia.com> Tested-by: Bibek Basu <bbasu@nvidia.com> Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
2014-09-08tegra: fb: Notify fbcon DC is unavailablePankaj Dabade
In the absence of hotplug, monitor data and mode database is removed and DC is switched off. However, fbcon is unaware. This patch adds the change to fb_info state to suspend while updating monitor specs. This state will denote that the hardware is unavailable. Info will be restored to state running once modelist is available. Bug 200031817 Change-Id: I0d4a51fdaa383d9201ab299d602fb3cc9ed93f52 Signed-off-by: Pankaj Dabade <pdabade@nvidia.com> Reviewed-on: http://git-master/r/496027 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
2014-09-03tegra: dc: dont synchronize irq from irq threadBibek Basu
Synchronizing IRQ from irq thread context will never return because the thread will sleep forever.And thats the reason for DPM timeout and kernel crash when suspend hook also tries to do so. [ 204.471652] tegradc tegradc.1: **** DPM device timeout **** [ 204.484865] [<c07a58a8>] (__schedule+0x3b4/0x6e0) from [<c00ccf94>] (synchronize_irq+0xac/0xe4) [ 204.501399] [<c00ccf94>] (synchronize_irq+0xac/0xe4) from [<c0341628>] (tegra_dc_suspend+0xcc/0x15c) [ 204.518507] [<c0341628>] (tegra_dc_suspend+0xcc/0x15c) from [<c03da574>] (platform_pm_suspend+0x58/0x64) [ 204.536166] [<c03da574>] (platform_pm_suspend+0x58/0x64) from [<c0032c00>] (tegra_pd_suspend_dev+0x34/0x9c) [ 204.554226] [<c0032c00>] (tegra_pd_suspend_dev+0x34/0x9c) from [<c03e5384>] (pm_genpd_default_suspend+0x24/0x30) [ 204.572942] [<c03e5384>] (pm_genpd_default_suspend+0x24/0x30) from [<c03e5864>] (pm_genpd_suspend+0x58/0xa4) [ 204.591515] [<c03e5864>] (pm_genpd_suspend+0x58/0xa4) from [<c03dfb30>] (dpm_run_callback+0x34/0x54) [ 204.609552] [<c03dfb30>] (dpm_run_callback+0x34/0x54) from [<c03dffe4>] (__device_suspend+0x16c/0x380) Bug 1486344 Change-Id: Ie512262fdfef90dc199f1f39ebffb540b909f3e2 Signed-off-by: Bibek Basu <bbasu@nvidia.com> Reviewed-on: http://git-master/r/450815 GVS: Gerrit_Virtual_Submit Reviewed-by: Winnie Hsu <whsu@nvidia.com>
2014-08-29video: tegra: nvmap: track handle's mapped memoryManeet Singh
Added new file "maps" for nvmap heaps. In addition to data given by existing "allocations" file, this also shows the client's virtual mappings and total amount of handle physical memory that is actually mapped to a client's virtual address space. This change will help in tracking nvmap memory usage of processes. Bug 1529015 Change-Id: I85b5c221c7a7475cbc3585b130fda6a282756662 Signed-off-by: Maneet Singh <mmaneetsingh@nvidia.com> Reviewed-on: http://git-master/r/448503 (cherry picked from commit 1f632679174cea962406980c8201d63c163635ee) Reviewed-on: http://git-master/r/448580 Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
2014-08-18fbcon: Converting benign message to debug printPankaj Dabade
Making message "Display is GTF capable" as a debug print. Bug 1541801 Change-Id: Ic926057e2ac4f6fc0b85488f642c5cc0c74bda2b Signed-off-by: Pankaj Dabade <pdabade@nvidia.com> Reviewed-on: http://git-master/r/457056 GVS: Gerrit_Virtual_Submit Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
2014-08-15video: tegra: nvmap: clean cache during page allocations into page poolKrishna Reddy
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. Bug 1539190 Change-Id: I046289f5e4b52986f477890663bbc7b2cda76c25 Signed-off-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-on: http://git-master/r/453197 (cherry picked from commit 39b0d737566adca113baac1de61f6550634da4ea) Reviewed-on: http://git-master/r/456780 Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: Jon Mayo <jmayo@nvidia.com> GVS: Gerrit_Virtual_Submit
2014-08-15video: tegra: adf: replace nvmap_alloc_dmabuf with v4l2 APIKrishna Reddy
Replace deprecated nvmap_alloc_dmabuf with V4L2 videobuf2 contig dma API. Bug 1540346 Change-Id: I06dd4a64a5a548d29443a0dfb8e4ccdeee62644c Signed-off-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-on: http://git-master/r/450681 (cherry picked from commit 9fa74918f508958b99d0314581683969454f9eb3) Reviewed-on: http://git-master/r/456779 Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: Jon Mayo <jmayo@nvidia.com> GVS: Gerrit_Virtual_Submit
2014-08-15video: adf: fix incorrect dependency on DMA_SHARED_BUFFERKrishna Reddy
ADF should select DMA_SHARED_BUFFER instead of depending on it. Bug 1540346 Change-Id: I6e9e83df1e30834d072a86b525f80461e1b13e62 Signed-off-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-on: http://git-master/r/451063 (cherry picked from commit 2b9e7d3bda3ad1bd4259d85b533d95ff57ea6c47) Reviewed-on: http://git-master/r/456778 Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: Jon Mayo <jmayo@nvidia.com> GVS: Gerrit_Virtual_Submit
2014-08-08video: tegra: nvmap: track handle's vma listManeet Singh
Patch includes following nvmap changes: - added "pid" field in nvmap_vma_list so now looking at handle's vma list, we can say which vma belongs to which process. - sorted handle's vma list in ascending order of handle offsets. Bug 1529015 Change-Id: Ide548e2d97bab8072461c11c9b8865ab4aa01989 Signed-off-by: Maneet Singh <mmaneetsingh@nvidia.com> Reviewed-on: http://git-master/r/448493 (cherry picked from commit 37132fa461d23552b805e32d268acd14b27588c3) Reviewed-on: http://git-master/r/448576 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Krishna Reddy <vdumpa@nvidia.com> Tested-by: Winnie Hsu <whsu@nvidia.com>
2014-08-08video: tegra: nvmap: remove carveout commit accountingKrishna Reddy
Remove obsolete carveout commit accounting. Bug 1529015 Change-Id: If7e25ca2ef43c036558c9c9ead5f67ee8eef6b42 Signed-off-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-on: http://git-master/r/426734 (cherry picked from commit c1ddad1b13332386857f9f2964aa8968094e7e8c) Reviewed-on: http://git-master/r/448554 Tested-by: Winnie Hsu <whsu@nvidia.com>
2014-08-08video: tegra: nvmap: unify debug stats codeKrishna Reddy
Unify debug stats code for iovmm and carveouts. Bug 1529015 Change-Id: Ief800587870845ed6f566cb7afb2c91000d177ca Signed-off-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-on: http://git-master/r/426733 (cherry picked from commit 0c0f7e5a9ef459d7940cc66af0a00321bb54d389) Reviewed-on: http://git-master/r/448536 Tested-by: Winnie Hsu <whsu@nvidia.com>
2014-08-08video: tegra: nvmap: don't count shared memory in fullKrishna Reddy
Don't count shared memory in full in iovmm stats. Add SHARE field to allocations info to show how many processes are sharing the handle. Update few comments in the code. Remove unnecessary iovm_commit accounting. Bug 1529015 Change-Id: I49650bf081d652dedc7139f639aae6da06965ecd Signed-off-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-on: http://git-master/r/426274 (cherry picked from commit 92d47c10fbf7a315d4c953bafb71ee23032b7f65) Reviewed-on: http://git-master/r/448533 Tested-by: Winnie Hsu <whsu@nvidia.com>
2014-08-08video: tegra: nvmap: set handle dmabuf to NULL earlyKrishna Reddy
This can allow catching handle dmabuf usage during its free. Bug 1529015 Change-Id: Ie20c7b860ca5194a190ff7005302bf50602d16ed Signed-off-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-on: http://git-master/r/424329 (cherry picked from commit 10e648c2e2f9760c97ce55a1091d9e7097d2504d) Reviewed-on: http://git-master/r/448530 Tested-by: Winnie Hsu <whsu@nvidia.com>
2014-08-08video: tegra: nvmap: add handle share count to debug statsKrishna Reddy
handle share count provides info on how many processes are sharing the handle. IOW, how many processes are holding a ref on handle. Update the comments for umap/kmap_count. Bug 1529015 Change-Id: I9f543ebf51842dad6ecd3bfeb7480496c98963be Signed-off-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-on: http://git-master/r/426302 (cherry picked from commit 244c41508be0705cc232942b9403e17611f63e45) Reviewed-on: http://git-master/r/448521 Tested-by: Maneet Maneet Singh <mmaneetsingh@nvidia.com>
2014-07-18video: tegra: dc: remove low latency cursor supportJon Mayo
There is no difference in latency. Bug 1333484 Change-Id: I8c1acb14d62df51cac535b2b78df0070744a5b66 Signed-off-by: Jon Mayo <jmayo@nvidia.com> Reviewed-on: http://git-master/r/436700 (cherry picked from commit 6eff7bd5a3a858e92c1088c102b21e86e12bf35b) Reviewed-on: http://git-master/r/439915 Tested-by: Jong Kim <jongk@nvidia.com> Reviewed-by: Winnie Hsu <whsu@nvidia.com>
2014-07-18video: tegra: dc: track cursor stateJon Mayo
save and restore cursor state for suspend and resume. Bug 1486452 Bug 200006001 Change-Id: If5db728a0bca436f0c12ec3de56c4fec9b3d3328 Signed-off-by: Jon Mayo <jmayo@nvidia.com> Reviewed-on: http://git-master/r/436316 (cherry picked from commit bec916df2e450d763a912be37b783450aaf5b862) Reviewed-on: http://git-master/r/439914 Reviewed-by: Automatic_Commit_Validation_User Tested-by: Jong Kim <jongk@nvidia.com> Reviewed-by: Winnie Hsu <whsu@nvidia.com>