summaryrefslogtreecommitdiff
path: root/drivers/video
AgeCommit message (Collapse)Author
2013-10-21hdmi: retry edid reads up to 4 times until failingMax Krummenacher
When hotpluging hdmi the read of edid often fails. Add up to 4 retries with a 500ms delay before giving up.
2013-09-09apalis/colibri_t30: fix HDMI hang issueMax Krummenacher
Initialisation of the framebuffer console on DVI-D aka HDMI always failed on monitors which report the vertical front porch to be 1 in their EDID. The fix now changes also the modedb and not only the list of videomodes with a compatible timing. This was particularly bad on Apalis T30 where this is activated by default. On Colibri T30 this was observed when enabling it using the fbcon=map:1 boot argument.
2013-06-24video: tegra: fb: apalis/colibri_t30: hack avoid 24 Hz modeMarcel Ziswiler
Hack to avoid 24 Hz mode in X resulting in no display at all. This has been encountered using e.g. a Samsung SyncMaster F2380 if connected by HDMI. root@apalis-t30:~# xrandr Screen 0: minimum 256 x 128, current 1920 x 1080, maximum 2048 x 2048 LVDS-1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 0mm x 0mm 1920x1080 58.6*+ HDMI-1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 160mm x 90mm 1920x1080 60.0 + 24.0* 1680x1050 59.9 1280x1024 75.0 60.0 1440x900 75.0 59.9 1280x960 60.0 1280x800 59.9 1152x864 75.0 1280x720 60.0 50.0 1024x768 75.0 70.1 60.0 832x624 74.6 800x600 72.2 75.0 60.3 56.2 720x576 50.0 720x480 59.9 640x480 75.0 72.8 66.7 59.9 720x400 70.1
2013-06-12video: tegra: nvmap: fix CONFIG_NVMAP_PAGE_POOLS=n compilationPeter Gielda
Move paddr to correct ifdef to enable CONFIG_NVMAP_PAGE_POOLS=n compilation.
2013-06-12video: tegra: nvmap: export symbols to build tegra_v4l2_camera modulePiotr Zierhoffer
2013-03-03tegra: When using V4L2, don't use vi client.Andrew Chew
The VI client within drivers/video/tegra is mutually exclusive with the Tegra V4L2 framework, since they both want to own the camera hardware. Signed-off-by: Andrew Chew <achew@nvidia.com>
2013-03-03Make it accessible outside of drivers/video/tegra. V4L2 driver needs toAndrew Chew
set some platform_data. Signed-off-by: Andrew Chew <achew@nvidia.com>
2013-03-03Conflicts:Marcel Ziswiler
arch/arm/mach-tegra/common.c drivers/ata/ahci-tegra.c
2013-01-25fbcon: logo: allow easy integration of a custom Linux boot logoT30_LinuxImageV2.0Beta1_20130314T20_LinuxImageV2.0_20130305T20_LinuxImageV2.0Beta2_20130129Marcel Ziswiler
This patch allows for easy integration of a custom Linux boot logo to replace the Tux' being shown by default. Use gimp or the like to create a raw PPM in your desired resolution. Reduce the number of colours in the image to 224: user@host:~$ ppmquant 224 Toradex-640x480.ppm > \ Toradex-640x480-224.ppm ppmquant: making histogram... ppmquant: 370 colors found ppmquant: choosing 224 colors... ppmquant: mapping image to new colors... Convert it from raw PPM to ASCII format: user@host:~$ pnmnoraw Toradex-640x480-224.ppm > \ Toradex-640x480-ascii-224.ppm Copy it into the Linux sources: cp Toradex-640x480-ascii-224.ppm linux-toradex/drivers/video/logo/\ logo_custom_clut224.ppm Activate exclusively custom Linux logo in the kernel configuration: Device Drivers -> Graphics support -> Bootup logo -> Custom 224-color Linux logo And re-compile the kernel.
2013-01-14video: tegra: dc: minimum window size is 1x1Jon Mayo
Use 1x1 as the minimum window size. Bug 1193195 Change-Id: I42e13fec82bbc2dc37bde6416088f3ae49b304b7 Signed-off-by: Jon Mayo <jmayo@nvidia.com> Reviewed-on: http://git-master/r/173302 (cherry picked from commit 3f160560b48fdf501547b9fc1f7c5bf8bd5e32af) Reviewed-on: http://git-master/r/190810 Reviewed-by: Eric Brower <ebrower@nvidia.com> Tested-by: Eric Brower <ebrower@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
2012-12-21arm: tegra: fb: Fix merge errorShashank Sharma
Fix manual rebase error Change-Id: I3b2165488b11bddda271cecdc979341c130def9b Signed-off-by: Shashank Sharma <shashanks@nvidia.com> Reviewed-on: http://git-master/r/173554 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Winnie Hsu <whsu@nvidia.com>
2012-12-20arm: tegra: fb: Set new mode to all vc'sShashank Sharma
Send change all vc's notification from HDMI hot-plug reader to fbcon, so that the new selected mode can be applied on all the vc's from vc1 to vc6. This sometimes causes corruption on HDMI hot plugin, when fbcon is mapped to HDMI Bug 1166008 Signed-off-by: Shashank Sharma <shashanks@nvidia.com> Change-Id: Id173de3014597f79c8c8b31bbbee7c9c560547b6 Reviewed-on: http://git-master/r/168683 Reviewed-by: Matthew Pedro <mapedro@nvidia.com> Tested-by: Matthew Pedro <mapedro@nvidia.com>
2012-12-20arm: tegra: dc: corrct order to enable/disable dc irqJong Kim
When porting change from mainline to balance dc irq, the change of enable/disable order was not ported, thus dc irq is disabled if dc is enabled during probe. This is part of http://git-master/r/146107. Original change is big for many bugs, only port one here. bug 1173177 bug 1173038 bug 1008313 Change-Id: Idd703daca9f980e905b185eeeae19dc6309d76e5 Signed-off-by: Dongfang Shi <dshi@nvidia.com> Reviewed-on: http://git-master/r/162868 (cherry picked from commit 6ddd8b02f7a17d2269290d06159c20860ffb92e9) Signed-off-by: Jong Kim <jongk@nvidia.com> Reviewed-on: http://git-master/r/173249 Reviewed-by: Winnie Hsu <whsu@nvidia.com> Reviewed-by: Jon Mayo <jmayo@nvidia.com>
2012-12-20arm: tegra: fb: Update line_length using display widthJong Kim
Unconditionally update line_length using disply width to avoid discrepancy between line_length and actual display width. bug 1186388 Change-Id: I8ef2f9cf76a61764c2121f3c2c013b72b830ce2e Signed-off-by: Jong Kim <jongk@nvidia.com> Reviewed-on: http://git-master/r/170664 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Winnie Hsu <whsu@nvidia.com>
2012-12-17tegra: Add nvmap_mark_global()Andrew Chew
Add this function, to be able to set the global field of an nvmap_handle while preserving the nvmap API's encapsulation mechanisms. Change-Id: I62de773a65119722f059b114e2d0e906c7e04e83 Signed-off-by: Andrew Chew <achew@nvidia.com> Signed-off-by: Bryan Wu <pengw@nvidia.com> Reviewed-on: http://git-master/r/169834 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Winnie Hsu <whsu@nvidia.com>
2012-12-17tegra: Add function to release resourcesAndrew Chew
Add a companion function to nvhost_client_device_get_resources() called nvhost_client_device_put_resources() that does the opposite thing. This is useful for any nvhost clients that need to be loaded as modules, since the driver removal path will be exercised in that case. Change-Id: Ib5cec6fce7b05c780b135b03fcd88e068f772244 Signed-off-by: Andrew Chew <achew@nvidia.com> Signed-off-by: Bryan Wu <pengw@nvidia.com> Reviewed-on: http://git-master/r/169833 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Winnie Hsu <whsu@nvidia.com>
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>