summaryrefslogtreecommitdiff
path: root/drivers/video/tegra
AgeCommit message (Collapse)Author
2012-11-16android: dc: tegra: video: conditionally revert timestamp supportMarcel Ziswiler
Android R14 userspace seems to have issues with timestamp support: [ 14.764337] host1x host1x: SurfaceFlinger: syncpoint id 8 (disp0_a) stuck waiting 3, timeout=2147483447 [ 14.773845] host1x host1x: id 8 (disp0_a) min 2 max 4 [ 14.779163] host1x host1x: id 9 (disp1_a) min 2 max 4 [ 14.784316] host1x host1x: id 18 (2d_0) min 21 max 25 [ 14.789586] host1x host1x: id 20 (disp0_b) min 2 max 4 [ 14.794889] host1x host1x: id 21 (disp1_b) min 2 max 4 [ 14.800241] host1x host1x: id 22 (3d) min 77 max 95 [ 14.805217] host1x host1x: id 24 (disp0_c) min 2 max 4 [ 14.810573] host1x host1x: id 25 (disp1_c) min 2 max 4 [ 14.815873] host1x host1x: id 26 (vblank0) min 800 max 0 [ 14.821264] host1x host1x: id 27 (vblank1) min 684 max 0 [ 14.826810] host1x host1x: waitbase id 3 val 77 Therefore conditionally revert it in that case for now. See e4e2e776a3d4bf1adf37fc061cfdfb92281f3ace.
2012-11-12Merge branch 'l4t/l4t-r16-r2' into colibriMarcel Ziswiler
Conflicts: arch/arm/mach-tegra/tegra3_usb_phy.c arch/arm/mach-tegra/usb_phy.c drivers/usb/gadget/tegra_udc.c drivers/usb/otg/Makefile drivers/video/tegra/fb.c sound/soc/tegra/tegra_pcm.c
2012-11-02arm: tegra: fb: Update fix line_lengthtegra-l4t-r16r2-rcShashank Sharma
Update framebuffer's fix line_length parameter when changing video mode dynamically.The new line_length should be according to new x resolution. On addition, check the return value from dc driver while setting a mode. Bug 1163682 Bug 1056767 Bug 1056782 Signed-off-by: Shashank Sharma <shashanks@nvidia.com> Change-Id: Ib0ab48474f0af3235556a7f7f0d8354af3b50994 Reviewed-on: http://git-master/r/147511 (cherry picked from commit 5856c4afde9459ba6afaf2cdcb07361d9fbf8c79) Reviewed-on: http://git-master/r/160788 Tested-by: Matthew Pedro <mapedro@nvidia.com> Reviewed-by: Winnie Hsu <whsu@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User
2012-11-02video: tegra: dc: fix size optimised nvhdcp build using gcc 4.7.2Marcel Ziswiler
With our default gcc 4.7.2 toolchain from oe building nvhdcp with activated CONFIG_CC_OPTIMIZE_FOR_SIZE fails as follows: /linux-toradex.git/drivers/video/tegra/dc/nvhdcp.c: In function 'nvhdcp_downstream_worker': /linux-toradex.git/drivers/video/tegra/dc/nvhdcp.c:807:3: error: 'b_status' may be used uninitialized in this function [-Werror=maybe-uninitialized] /linux-toradex.git/drivers/video/tegra/dc/nvhdcp.c:763:6: note: 'b_status' was declared here make[5]: *** [drivers/video/tegra/dc/nvhdcp.o] Error 1
2012-10-01arm: tegra: fb: Apply new mode even if its currentShashank Sharma
Set activation of a mode forcefully via setting FB_ACTIVATE_FORCE flag. Required for stereo modes also. Bug 1005399 Change-Id: I37872cc2a04abc8774a5f9f9df7d9e90f2c977f6 Signed-off-by: Shashank Sharma <shashanks@nvidia.com> Reviewed-on: http://git-master/r/122087 (cherry picked from commit 80a7b7b2d10a97427e12884d469a518cc2b5f765) Reviewed-on: http://git-master/r/140033 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Matthew Pedro <mapedro@nvidia.com> Tested-by: Matthew Pedro <mapedro@nvidia.com> Reviewed-by: Winnie Hsu <whsu@nvidia.com>
2012-10-01video: tegra: fb: Configure dc from fbShashank Sharma
This patch contains following changes: 1. Modify tegra_fb_update_monspecs to select best mode to apply on framebuffer, in HDMI hotplug. 2. Add a console_lock to prevent corruption while fbcon running in multiple threads. 3. Add a tegra_dc_disable/enable in tegra_fb_set_par to reflect the programmed new mode applied on DC. Bug: 1005399 Change-Id: I133b38b00f25f767afc05549550fecde8d092fb2 Signed-off-by: Shashank Sharma <shashanks@nvidia.com> Reviewed-on: http://git-master/r/120932 (cherry picked from commit ec7552ef36c0d0979cb31db6d2d4bd54e7f1c9fb) Reviewed-on: http://git-master/r/140031 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Matthew Pedro <mapedro@nvidia.com> Tested-by: Matthew Pedro <mapedro@nvidia.com> Reviewed-by: Winnie Hsu <whsu@nvidia.com>
2012-09-11video: tegra: host: add idle time estimate in 3dfsIlan Aelion
When a throughput hint is available, still keep track of the idle time percentage and use both in gpu scaling. Also modifying fallback scaling code to use same idle estimate used when a throughput hint is available. Dropping different time frames for scaling up and down. Bug 1034948 Bug 965517 Change-Id: Ib3945642768e36a6c0c50f4195c89e3bb67f8442 Signed-off-by: Ilan Aelion <iaelion@nvidia.com> Reviewed-on: http://git-master/r/129410 (cherry picked from commit 1e9974097286a78f34367683a3921c9b5bf77d4d) Reviewed-on: http://git-master/r/131155 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com>
2012-09-10WAR: gr3d: limit 3d clock when camera is onJihoon Bang
As WAR, limit 3d clock frequency and emc clock frequency when camera is on and chip is AP37. 3d clock is set to 361MHz and 437MHz is requested for emc clock with this change. This change allows 3d to request 1.1V in Core instead of 1.3V in AP37. Bug 1001262 Bug 1019309 Change-Id: I9f46f93d8da0fcf5afe05839177bf0d6e43a5840 Signed-off-by: Jihoon Bang <jbang@nvidia.com> Reviewed-on: http://git-master/r/130945 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
2012-09-10tegra: dc: Fix div by zero in frame time computation.Raghavendra VK
- Set frame duration to 0 in NULL modeset. bug 1039104 Reviewed-on: http://git-master/r/127603 (cherry picked from commit 604cda21d79ed168e9863f0122eb0c23fa1a901b) Change-Id: I0be1b96529e40a374e4507ecd3da990677d4cbd4 Signed-off-by: Raghavendra VK <rvk@nvidia.com> Reviewed-on: http://git-master/r/130943 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
2012-09-05drivers:video:tegra: Fix CDMA timeout recoveryArto Merilainen
This patch fixes wait base handling in CDMA timeouts. Bug 1025617 Change-Id: Ia93e55631c1159da161d5c4f257d3beebf0d3149 Signed-off-by: Arto Merilainen <amerilainen@nvidia.com> Reviewed-on: http://git-master/r/129278 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com> Reviewed-by: Kirill Artamonov <kartamonov@nvidia.com> Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
2012-09-05video: tegra: dc: fix boot issue with HDMIDeepak Nibade
Set default mode for probe and resume to enable initialization of dc.1 Skipping this initialization results in hard system hang. bug 1030415 Reviewed-on: http://git-master/r/124001 (cherry picked from commit 50fa5e50b74a0534d7524fb6d7dcaa65b2e6e74c) Change-Id: Id9ad95e114a27c1667f0286443534a23b7fa64d4 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/128533 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-09-05video: tegra: dc: move set default videomode out of _tegra_dc_enable.Marvin Zhang
Set default videomode happens during probe and resume. _tegra_dc_enable is also called during hotplug, setting default videomode there causes hdcp test failure. Bug 991805 Reviewed-on: http://git-master/r/121052 (cherry picked from commit 7d4e0461a88b8cf638963e69829274824fecc38b) Change-Id: I98be07e883699ba9fa6e222bb1d8ea68d199dfc6 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/128532 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-09-03video: tegra: dc: support for vblank syncRakesh Iyer
Add wait for vsync support for one-shot panels. The code supports extension of this feature to other panels. Bug 1033411. Change-Id: Ie4d6cb45e5de81083458169ccdfa33230235ed72 Signed-off-by: Rakesh Iyer <riyer@nvidia.com> Reviewed-on: http://git-master/r/128927 Reviewed-by: Mrutyunjay Sawant <msawant@nvidia.com> Tested-by: Mrutyunjay Sawant <msawant@nvidia.com>
2012-08-29video: tegra: host: Use unsigned integer in sysfsTerje Bergstrom
Sync point values are unsigned, but sysfs creates the text representation as signed. Correct to use unsigned representation. Bug 1039058 Change-Id: I96de13952eeeba9510bae179a036459ddee18dcd Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/128075 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com> Reviewed-by: Michal Pecio <mpecio@nvidia.com>
2012-08-29video: tegra: host: Disable irq when clock gatingTerje Bergstrom
Disable host1x interrupts when clock gating host1x. This fixes a race where host1x interrupt was raised at the same time when host1x clock is turned off. Bug 1031724 Change-Id: I169cd5796608b8888a6b48ed99bb5da754559b2c Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/125129 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
2012-08-29video: tegra: fb: Default stride from HWChristopher Freeman
This patch adds: 1. line_stride value is honored in fb_set_par routine 2. Hardware value for line_stride is used in fb_register Bug 1025739 Change-Id: Ic37c4c90911c2c70e74b8d5609f3b32b521772ff Signed-off-by: Christopher Freeman <cfreeman@nvidia.com> Reviewed-on: http://git-master/r/127690 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Kevin Huang (Eng-SW) <kevinh@nvidia.com> Reviewed-by: Jon Mayo <jmayo@nvidia.com>
2012-08-28video: tegra: cardhu: Default bpp from hardwareChristopher Freeman
This patch adds: 1. A kernel config option that hints to DC driver to use the current value of the color depth register as the default for initializing the FB driver. 2. Checks to see if DC is enabled before reading off the color depth register in tegra_dc_probe. Change-Id: I852cc1328fcf42f33052f46b86d753e691744329 Signed-off-by: Christopher Freeman <cfreeman@nvidia.com> Reviewed-on: http://git-master/r/127297 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-08-28video: tegra: nvmap: implement full L2 clean/flushKirill Artamonov
When allocation is bigger than L2 size it is more optimal to flush or writeback whole L2 instead of doing maintenance for each allocated page. bug 983964 Signed-off-by: Kirill Artamonov <kartamonov@nvidia.com> Change-Id: Ieaa70875b92920567ad7cd75eca6eac8197f46de Reviewed-on: http://git-master/r/108511 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-08-28Revert "video: tegra: hdcp: Fix Locking Issue"Matt Wagner
This reverts commit 51f746421b73f8f378bd7908b35fd6c79687e239. Bug 1030468 Bug 1030415 Signed-off-by: Matt Wagner <mwagner@nvidia.com> Change-Id: If9b5febd812e84848913431dcaf0bdefc518e5d1 Reviewed-on: http://git-master/r/126948 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Jon Mayo <jmayo@nvidia.com>
2012-08-28Revert "video: tegra: hdcp: Add Missing Lock"Matt Wagner
This reverts commit 77c8da0aa18fad9e33fd8b1afb2013b1a476d74e. Bug 1030468 Bug 1030415 Signed-off-by: Matt Wagner <mwagner@nvidia.com> Change-Id: I2b85159dfcfc40b3a3632dc1300c729e0977a18f Reviewed-on: http://git-master/r/126946 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Jon Mayo <jmayo@nvidia.com>
2012-08-27video: tegra: host: fix integer overflowsTuomas Tynkkynen
job_size() calculates the size of a job structure based on a struct passed as a ioctl parameter. This calculation was not checked for overflow. Bug 1038551 Change-Id: I13d087dbd5aad5fef1c5d13ceb23e50f565acf95 Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com> Reviewed-on: http://git-master/r/127185 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
2012-08-27video: tegra: nvmap: fix handle usecount trackingTuomas Tynkkynen
A handle's usecount used to be incremented once during the mmap ioctl, and decremented when the mapping is closed by the kernel. However, that fails if a mapping cloned, for example if the mapping was split due to a munmap, or (presumably) during fork, as the decrement will then happen for each cloned mapping. Therefore increment the usecount when a mapping is opened. Also fix a BUG_ON() that would have caught this bug, if it wouldn't have done the check by checking if the unsigned usecount field is less than zero. Bug 1033981 Change-Id: I72ac9361a19e44f91ffd6b1126f4632e0f7b6726 Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com> Reviewed-on: http://git-master/r/123710 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
2012-08-23video: tegra: host: Clear intr list at intr_putTerje Bergstrom
Process wait list when removing a waiter. This clears the interrupt once it is no longer needed. Bug 1031724 Change-Id: Ifb46672f70c8bbd6359d0a8aeaac0d718a5394b2 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/125230 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
2012-08-23video: tegra: dc: Make framebuffer console init OKMark Zhang
Update framebuffer's modelist after we changed it's fb_var_screeninfo. This makes sure the framebuffer console can be inited successfully. During framebuffer console init, it'll check whether the var info of the framebuffer is consistent with the modelist. Unsuccessful init of framebuffer console driver makes VT driver doesn't work in right way. Bug 996992 Signed-off-by: Mark Zhang <markz@nvidia.com> Change-Id: I96a1db1f389be75dcba48b20447cf1510ad3768b Reviewed-on: http://git-master/r/107866 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Shashank Sharma <shashanks@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Jon Mayo <jmayo@nvidia.com>
2012-08-22video: tegra: host: Fix freeing a ERR_PTR valueTuomas Tynkkynen
nvhost_3dctx_alloc_common correctly checks the return value of an allocator function, and attempts to perform cleanup. However, this particular allocation API returns ERR_PTR values in case of failure, which then gets passed to the deallocation function, causing a crash. Also, the return value of that allocator API is checked with IS_ERR in some places, and with IS_ERR_OR_NULL in others. For consistency and avoiding surprises if the allocation implementation changes, use IS_ERR_OR_NULL in all places. Bug 1035878 Change-Id: I65ce97e11f9712b2e9630b38183f6e70bc14b254 Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com> Reviewed-on: http://git-master/r/124657 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
2012-08-22video: tegra: host: Fix crash if allocation failsTuomas Tynkkynen
nvhost_module_remove_client assumes that a client structure to be freed exists in the linked list. However, if an allocation fails in nvhost_module_add_client, no client structure is allocated, and during cleanup, nvhost_module_remove_client would then attempt to free an invalid pointer. Bug 1034729 Change-Id: Ie1a641071b86f8246951e9be824a6003f14b04b6 Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com> Reviewed-on: http://git-master/r/124096 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
2012-08-21video: tegra: dc: Add timestamp supportRaghavendra VK
bug 1021221 Change-Id: Ifbe007de5bdeafaa15a0b3f2a138086045eba160 Signed-off-by: Raghavendra VK <rvk@nvidia.com> Reviewed-on: http://git-master/r/118179 (cherry picked from commit 74be8d4e7210d7bcea0d55565a7cbb06d6cc960e) Reviewed-on: http://git-master/r/121087 Reviewed-by: Jon Mayo <jmayo@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Robert Morell <rmorell@nvidia.com>
2012-08-20video: tegra: nvmap: Fix overflow in nvmap_heapTuomas Tynkkynen
do_heap_alloc locates a suitable free block from a nvmap heap given a size and alignment. Unfortunately, if a heap block happens to be smaller than the alignment passed to the function, an integer overflow will occur, and a block that's too small gets accidentally returned. Bug 1032642 Change-Id: Ic650c520409134d753e968f62f144ddeb065ccc7 Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com> Reviewed-on: http://git-master/r/123076 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
2012-08-16video: tegra: nvmap: Add sanity checks for page pools.Krishna Reddy
Check return code for set_page_array_* calls. Change-Id: Ie62ac78b82321939d5bd9d2a636d72dadea50d28 Signed-off-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-on: http://git-master/r/123544
2012-08-16video: tegra: nvmap: fix input check in mmap ioctlTuomas Tynkkynen
nvmap_map_into_caller_ptr takes a memory handle from usermode and adds a memory mapping for the handle. However, the handle is not checked for being allocated. An unallocated handle would cause a kernel panic later on from a NULL dereference. Change-Id: I73987b097a0c843b913660445e8bd1b4755dac61 Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com> Reviewed-on: http://git-master/r/119689 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-08-16video: tegra: dc: disuse notifierIlan Aelion
Due to issues with rcu notifiers on secureos, modifying dc flip notifications to use a simple callback instead. Bug 1028850 Change-Id: Iebf2a6d64d7316e3df2b88444201f9f9a29698c5 Signed-off-by: Ilan Aelion <iaelion@nvidia.com> Reviewed-on: http://git-master/r/123103 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Jon Mayo <jmayo@nvidia.com> Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: Nitin Kumbhar <nkumbhar@nvidia.com>
2012-08-15video: tegra: host: Fix leak in 3D register readTerje Bergstrom
When 3D register is read, and we need to do a context switch, the old context reference is incremented, but it never gets decremented. Fix by using nvhost_job_get_hwctx() to acquire the reference. Bug 1031746 Change-Id: Ic72637cb2399f960e2297733bfe45e585a8ec180 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/123678 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Arto Merilainen <amerilainen@nvidia.com> Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com> GVS: Gerrit_Virtual_Submit
2012-08-15video: tegra: nvmap: Add support for zeroed pagesAlex Waterman
Add support to alloc zeroed pages for user space alloc requests. Also define a config option to force userspace allocation requests to be zeroed. Change-Id: I75d3b2bc36e808f1470b423578ec4cba99e0f967 Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: http://git-master/r/122549 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-08-15video: tegra: host: Disable host1x irqs at suspendTerje Bergstrom
host1x interrupts have been left on at suspend due to using wrong constant for the interrupt register. Disable host1x interrupts at suspend. Change-Id: I915fc4e663e6ad90fccacff6fb223c5080e21fcd Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/123055 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Andrew Howe <ahowe@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com> Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
2012-08-14video: tegra: hdcp: Add Missing LockMatt Wagner
Lock was missing around one state set, so we add it here. Bug 1024031 Change-Id: Iab013fff7e8519e8bcc91e84a5ca7cd6e6e783da Signed-off-by: Matt Wagner <mwagner@nvidia.com> Reviewed-on: http://git-master/r/122802 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Jon Mayo <jmayo@nvidia.com>
2012-08-13video: tegra: host: Fix section mismatchesTerje Bergstrom
nvhost context related functions were in init section, even though they are called from non-init functions. Bug 1022681 Change-Id: Ie85e9dd3f19873aec4153e34c7bffa19f40d37fa Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/120884 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-08-10video: tegra: nvmap: fix usermode input validationTuomas Tynkkynen
nvmap_pin_ids accepts a list of handles to pin, which are passed directly from usermode when called from nvmap_ioctl_pinop. However, if invalid handles are passed in, the function might still access them as valid handles, and cause a crash. Bug 1023954 Change-Id: I6b98a2ef448bb496be7d569ddd4fb516fc399cba Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com> Reviewed-on: http://git-master/r/119667 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
2012-08-10arm: tegra: fb: Apply new mode even if its currentShashank Sharma
Set activation of a mode forcefully via setting FB_ACTIVATE_FORCE flag. Required for stereo modes also. Bug 1005399 Change-Id: I37872cc2a04abc8774a5f9f9df7d9e90f2c977f6 Signed-off-by: Shashank Sharma <shashanks@nvidia.com> Reviewed-on: http://git-master/r/122087 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
2012-08-09video: tegra: host: invalidate FDC before context saveNuno Subtil
Invalidate the FDC before submitting the context save pushbuffer to ensure cache coherency across both GPU cores. Bug 1020291 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/121945 (cherry picked from commit cef956d07ec717f4714f5101805bbe2f0f149e71) Change-Id: I43ffee6a77122b4f2fe17f063dc6756c501e59c7 Reviewed-on: http://git-master/r/122323 Tested-by: Donghan Ryu <dryu@nvidia.com> Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: Donghan Ryu <dryu@nvidia.com>
2012-08-09video: tegra: hdcp: Fix Locking IssueMatt Wagner
Locking in nvhdcp was set up in such a way that we couldn't change the state of the HDMI plug while negotiating the HDCP connection. Another lock was added that is only taken when the state of the plug or hdcp session are changed. This enables correct failure if the plug is removed during negotiation. Bug 1024031 Reviewed-on: http://git-master/r/120546 (cherry picked from commit 51f746421b73f8f378bd7908b35fd6c79687e239) Change-Id: Id9a9b09f2cd03a1b51e7334391f35fc076a1e1dd Signed-off-by: Matt Wagner <mwagner@nvidia.com> Reviewed-on: http://git-master/r/121399 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Jon Mayo <jmayo@nvidia.com>
2012-08-07video: tegra: fb: Configure dc from fbShashank Sharma
This patch contains following changes: 1. Modify tegra_fb_update_monspecs to select best mode to apply on framebuffer, in HDMI hotplug. 2. Add a console_lock to prevent corruption while fbcon running in multiple threads. 3. Add a tegra_dc_disable/enable in tegra_fb_set_par to reflect the programmed new mode applied on DC. Bug: 1005399 Change-Id: I133b38b00f25f767afc05549550fecde8d092fb2 Signed-off-by: Shashank Sharma <shashanks@nvidia.com> Reviewed-on: http://git-master/r/120932 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Jon Mayo <jmayo@nvidia.com> Reviewed-by: Kiran Adduri <kadduri@nvidia.com> Reviewed-by: Winnie Hsu <whsu@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
2012-08-07video: tegra: nvmap: Fix breakage for T20Hiroshi DOYU
NVMAP_CONVERT_CARVEOUT_TO_IOVMM is only available for IOMMU less SoCs. This was introduced by (in 'main'): commit b8b0b4c42fc77d94b8deadaa46f795784f3bbb5e video: tegra: nvmap: Make IOMMU/IOVMM selectable in Kconfig Bug 1017112 Change-Id: I2a6f101b15085ece600f77690bc77adc042eb29f Reviewed-on: http://git-master/r/117976 (cherry picked from commit a68ae587edbc3ca5d3216d39c462abd84f469027) Reviewed-on: http://git-master/r/121409 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Hiroshi Doyu <hdoyu@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Matthew Pedro <mapedro@nvidia.com> Tested-by: Matthew Pedro <mapedro@nvidia.com>
2012-08-02video: tegra: hdmi: cleanup error handling in initGaurav Batra
In case tegra_dc_init fails, this change will prevent unbalanced call to dc->out_ops->disable(). Also mark tegra_dc_io_end in case tegra_dc_controller_enable fails, this is required to not stop device from going into suspend mode. Bug 1003874 Change-Id: I5af6b46fc50e1ae8e54f9f4eb8540d751364fed7 Signed-off-by: Gaurav Batra <gbatra@nvidia.com> Reviewed-on: http://git-master/r/120108 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-08-02video: tegra: host: use strcmp in nvhost_bus_matchMayuresh Kulkarni
- replace the usage of strncmp with strcmp in nvhost_bus_match() - strncmp was needed when we had device name as <name.ip-version>. but now the device name is <name> which matches with the driver name. - multiple devices get bind with the same driver using id_table which uses .version field as an index in id_table Change-Id: If0b6f0ee18626d5e7ff801b8515ef5168069c3f2 Signed-off-by: Mayuresh Kulkarni <mkulkarni@nvidia.com> Reviewed-on: http://git-master/r/117953 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Ken Adams <kadams@nvidia.com> Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
2012-07-31video: tegra: dc: suppress underflow warningJay Cheng
change printk to trace_printk Bug 995270 Change-Id: I71caadb76f6101f377e44ad3f3dc24ede0a099d5 Signed-off-by: Jay Cheng <jacheng@nvidia.com>
2012-07-31video: tegra: nvmap: Fix two integer overflows.Tuomas Tynkkynen
nvmap_ioctl_pinop kmalloc's a temporary buffer, whose length is directly given by ioctl parameter from usermode. The total size of the buffer is not checked for overflow, which will cause a kernel panic with some inputs. Also, a sizeof() is applied to wrong type when calculating the amount of bytes to copy from userspace. nvmap_map_into_caller_ptr attempts to validate that the memory range to be mapped is correct, but integer overflow can cause the check to fail. This will lead to mapping wrong pages from the allocated handle later on, when the page fault handler gets called. Bug 1025502 Change-Id: I71a09c40c209dba9c5b37c3912e92a81e6f87e80 Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
2012-07-30video: tegra: dsi: Fix host HS transmissionAnimesh Kishore
Fixing host transmission with HS enabled. Bug 999141 Change-Id: I9dcc5282971830865dacf16dbbbebf4096aeb00e Signed-off-by: Animesh Kishore <ankishore@nvidia.com> Reviewed-on: http://git-master/r/118315 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
2012-07-30video: tegra: host: use fps in 3dfs by defaultIlan Aelion
enable using frame rate information in 3d frequency scaling by default Bug 991589 Change-Id: I410c86e3a56ddf00610133333dd518b4f46aa9ec Reviewed-on: http://git-master/r/116867 Reviewed-by: Lokesh Pathak <lpathak@nvidia.com> Tested-by: Lokesh Pathak <lpathak@nvidia.com>
2012-07-30video: tegra: host: adding throughput hint in 3dfsIlan Aelion
adding support for using a throughput hint given by the tegra-gfx misc device in the 3d scaling code. If throughput hint usage is enabled and the latest throughput hint is recent enough (less than 1 second old), the throughput hint is used to control 3d frequency scaling. Otherwise the existing idle time percentage estimate is used. Bug 991589 Change-Id: I68893e5ce7ef922b95ce5f5b3664eb8e1fdd4027 Signed-off-by: Ilan Aelion <iaelion@nvidia.com> Reviewed-on: http://git-master/r/116866 Reviewed-by: Lokesh Pathak <lpathak@nvidia.com> Tested-by: Lokesh Pathak <lpathak@nvidia.com>
2012-07-30misc: tegra-throughput: adding throughput dev nodeIlan Aelion
Creates a miscdev at /dev/tegra-throughput which gl will use to set a target frame rate. In addition it receives notifications from dc on flip events. On each notification the percentage ratio of the actual frame time to the target frame time is calculated. In subsequent changes this ratio will be reported to other modules as a throughput hint. Bug 991589 Change-Id: Ieaa2b2755b63d2d071de31e3ef819d4c3b51a956 Signed-off-by: Ilan Aelion <iaelion@nvidia.com> Reviewed-on: http://git-master/r/116865 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com> Reviewed-by: Jon Mayo <jmayo@nvidia.com>