aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/gcx/gccore
Commit message (Collapse)AuthorAgeFilesLines
* gcx: improved MMU table dumping.Alexei Shlychkov2014-10-014-70/+220
| | | | | Change-Id: Ib08231c481533e349affd792ef944386dbcc0593 Signed-off-by: Alexei Shlychkov <x0177296@ti.com>
* gcx: Use GFP_ATOMIC flag for opp_freqs table.Oleg Matcovschi2014-10-011-1/+1
| | | | | | | Use GFP_ATOMIC instead of GFP_KERNEL to avoid potential blocking. Change-Id: Id405a2aa609560b849adf0e096970d0251cfd140 Signed-off-by: Oleg Matcovschi <oleg.matcovschi@ti.com>
* gcx: fix main thread looping.Alexei Shlychkov2014-10-011-3/+12
| | | | | | | | | If the thread has no work scheduled and is kicked off by a soft trigger, it would start looping until the next work gets scheduled. Change-Id: Ia7256622c61f45c9483c722dd968a1dfec752f89 Signed-off-by: Alexei Shlychkov <x0177296@ti.com>
* gcx: added gcpwr_get_speed function and cur_freq debugfs entry.Alexei Shlychkov2014-10-013-1/+54
| | | | | | | Determines the current speed of GC320 in megahertz. Change-Id: I0aadf024193d8c1d2aac7ef79604367249939831 Signed-off-by: Alexei Shlychkov <x0177296@ti.com>
* gcx: make gccmdthread interruptible to avoid false hung task detection.Craig Stout2014-10-011-2/+5
| | | | | Change-Id: I0e7172e2ddcf32571d745daed7b4e9e3bad1e0c6 Signed-off-by: Craig Stout <craig.stout@ti.com>
* gcx: fixed pulse skipping init bug.Alexei Shlychkov2014-10-012-72/+99
| | | | | Change-Id: I4556ac3ec2b4b3445fb96f3ec0e7849800768f88 Signed-off-by: Alexei Shlychkov <x0177296@ti.com>
* gcx: fix race conditions on suspend.Craig Stout2014-10-011-8/+20
| | | | | | | | | | | | | There was a race between the suspend thread waiting for idle and an app thread attempting to push more into the gcqueue, which could cause the suspend to block until the max retry count was reached. Also, it was possible for the gccmdthread to notice gc320 is idle while attempting to suspend and simultanesouly gc320 completed processing some cmd buffers that require proper interrupt-aware cleanup. Change-Id: Ia7fdb29c5e2936d07b4c7ce58638b57c1f10c955 Signed-off-by: Craig Stout <craig.stout@ti.com>
* gcx: fix mmu context switch issues.Craig Stout2014-10-011-0/+6
| | | | | | | | | | | | On an mmu context switch, an mmu flush is required. When the mmu is enabled after a power off, the mmu context at the head of the cmd buffer queue is made current but the cached current context was not updated so the next process to try a commit would throw an l3 bus error. Change-Id: Ifc5e315e2c237644399db39c60bf8d6dfcd6e491 Signed-off-by: Craig Stout <craig.stout@ti.com>
* gcx: added scaling support.Alexei Shlychkov2014-10-015-122/+214
| | | | | | | Includes support for nv12 source. Change-Id: I6af32e3d38bfbcc804c0f64ae1b863f8327a5af1 Signed-off-by: Alexei Shlychkov <x0177296@ti.com>
* gcx: split in several files by function.Alexei Shlychkov2014-10-014-27/+46
| | | | | | | Also added GC_SHOW_TIME switch. Change-Id: Ib166f4c58cefbdc9732c9f5cc5d077a157ef4bee Signed-off-by: Alexei Shlychkov <x0177296@ti.com>
* gcx: changed GC_THREAD_TIMEOUT valueVictor Kleinik2014-10-011-1/+1
| | | | | | | | GC_THREAD_TIMEOUT value was changed from 1000 to 20. This change gives us nearly 60mA power saving. Change-Id: If5a2e3af2e1771f25c1697424151a822312e91f5 Signed-off-by: Victor Kleinik <x0150886@ti.com>
* gcx: fixed thread lockup.Alexei Shlychkov2014-10-013-9/+15
| | | | | | | | Added a missing unlock. Also minor refactoring of the suspend flag. Change-Id: I4781a7d35d3fda9177405b15b39de4d2a490cbee Signed-off-by: Alexei Shlychkov <x0177296@ti.com>
* gcx: fixed suspend synchronization.Alexei Shlychkov2014-10-014-42/+76
| | | | | | | | | | It's possible for suspend to be called while the gcgpu is busy. Switching to power off in this state doesn't shutdown cleanly and the device can't sleep. Have suspend wait for gpu activity to complete. Change-Id: I280bda56a2017491aa5e812cbeed2bd3a625056a Signed-off-by: Craig Stout <craig.stout@ti.com>
* gcx: rotation fixes.Alexei Shlychkov2014-10-013-45/+70
| | | | | | | | | | Fixed 90/270 degree rotation. Fixed clipping for multi-source setup. Fixed thread racing condition. Also adds 8-pixel source stride check. Change-Id: If718d8b84565ea5da4c48e6387c4e41242c4dff7 Signed-off-by: Alexei Shlychkov <x0177296@ti.com>
* gcx: process cleanupJack Yen2014-10-012-6/+47
| | | | | | | Properly free kernel resources when userspace application gets killed Change-Id: I9fe38949311d9b4f1d6a8f2bff94eaf0d4cf6b24 Signed-off-by: Jack Yen <jyen@ti.com>
* gcx: driver optimizations.Alexei Shlychkov2014-10-013-161/+175
| | | | | | | | | | Optimized interrupt usage. Optimize throughput by having the main thread program the hardware directly rather than handing off cmd buffers to the gccmdthread. Change-Id: I4159dbf425ecc495734e59f17382148067ac7010 Signed-off-by: Craig Stout <craig.stout@ti.com>
* gcx: added support for rotation.Alexei Shlychkov2014-10-011-0/+7
| | | | | | | Also added GC_C_BUFFER debugger option. Change-Id: I7cacf34003eada5ee0fe7f21d0e87b2c6ab628a0 Signed-off-by: Alexei Shlychkov <x0177296@ti.com>
* gcx: status dump displayed even when debugging is compiled outCraig Stout2014-10-013-142/+142
| | | | | Change-Id: I480cdd184b920243050ed40dfcd632c2464dfb56 Signed-off-by: Craig Stout <craig.stout@ti.com>
* gcx: stability improvements.Alexei Shlychkov2014-10-012-29/+67
| | | | | | | | Fixes hangs in asynchronous mode. Fixes command buffer mapping. Change-Id: I52e9b27160268de73de94d3d19e2e4db349bcec7 Signed-off-by: Alexei Shlychkov <x0177296@ti.com>
* gcx: preparation for userspace bltsville support.Alexei Shlychkov2014-10-015-10/+11
| | | | | | | | Merged differences between bltsville userspace and proxy. Added support for callback in user bltsville. Change-Id: I8ab9d4d5d120f7feda9642c22140ce7abf6ce12d Signed-off-by: Alexei Shlychkov <x0177296@ti.com>
* gcx: reduce cmdbuffer sizeCraig Stout2014-10-011-1/+1
| | | | | Change-Id: I45f9c73893ee5a5a3230cbfbe814f506c98417e9 Signed-off-by: Craig Stout <craig.stout@ti.com>
* gcx: Disable write all permission for cache_status_every_irqCraig Stout2014-10-011-1/+1
| | | | | | | Android CTS requires that no sysfs entry is writeable by anyone Change-Id: I55123b9ba69072a730b2b7889752ed5b1ab88770 Signed-off-by: Craig Stout <craig.stout@ti.com>
* gcx: debugging improvements.Alexei Shlychkov2014-10-013-250/+365
| | | | | Change-Id: I6d169956e0e3d70dd7ee7d619e39bb2101a25f2b Signed-off-by: Alexei Shlychkov <x0177296@ti.com>
* gcx: added support for asynchronous operation.Alexei Shlychkov2014-10-0111-943/+2476
| | | | | Change-Id: I9eff91d89e9d9c5260805bd0ae54a3c324806144 Signed-off-by: Alexei Shlychkov <x0177296@ti.com>
* gcx: added pulse skipping enable to power off case.Alexei Shlychkov2014-10-011-3/+3
| | | | | | | | This allows to at least enter the less power consuming mode if power off is not possible at the moment. Change-Id: If684849f1149da2805db2841dd3ecfd55110f43f Signed-off-by: Alexei Shlychkov <x0177296@ti.com>
* gcx: mmu improvements.Alexei Shlychkov2014-10-0111-316/+416
| | | | | | | | | Moved mmu shared object to the driver context; Added mmu init/exit functions; Memory alloc/free moved to gcmem. Change-Id: I6475b839423377d80ff7fda50699a43012b7b6d7 Signed-off-by: Alexei Shlychkov <x0177296@ti.com>
* gcx: removed iounmap from exit.Alexei Shlychkov2014-10-011-5/+0
| | | | | | | | We don't explicitly map register space anymore so we shouldn't unmap it explicitly either. Change-Id: I20acf9510c60362069b929e77c06c887c02fde3a Signed-off-by: Alexei Shlychkov <x0177296@ti.com>
* gcx: debug logging.Alexei Shlychkov2014-10-017-532/+2654
| | | | | | | Includes std linux logging and custom logging backends. Change-Id: I8f93e87390f6473964407c21c8f243c186e2270f Signed-off-by: Alexei Shlychkov <x0177296@ti.com>
* gcx: mmu refactoring.Alexei Shlychkov2014-10-016-1076/+1236
| | | | | | | | | | | | | Switch to using cached memory for MMU. MMU walking optimizied/simplified in map/unmap. Slave allocation changed to allocate in chunks rather then one at time. Moved global variables to gccorecontext structure. Renamed MMU definitions. Minor MMU cleanup. Use standard list constructs. Change-Id: I9eabc9d421ed0df7a9e2899e2a4a3e379bcf203d Signed-off-by: Alexei Shlychkov <shlychkov@gmail.com>
* OMAP4470: gcx: Use device scaling instead of L3 throughput.Oleg Matcovschi2014-10-011-4/+68
| | | | | | | | | Previously, L3 throughput affected BB2D clock frequency indirectly due bug. Problem is fixed, so driver should use device scaling mechanism to switch OPP's. Change-Id: I1900fe1add7fd3ae597f2a7abf59d7231228125a Signed-off-by: Oleg Matcovschi <oleg.matcovschi@ti.com>
* gcx: fixed error handling.Alexei Shlychkov2014-10-012-20/+48
| | | | | Change-Id: I4e38c35b51fbff71f2f9070e67478ebb726c3c4a Signed-off-by: Alexei Shlychkov <shlychkov@gmail.com>
* gc320: determine whether context was lost and reset gpuTony Lofthouse2014-10-011-2/+12
| | | | | | | | | If the context is lost this means BB2D_RST is asserted and we will need to take appropriate action. This assumes that resetting the GPU is the limit of this. There could be more. Change-Id: I71ec274e6dd46d0b22c0b1f708eaa3303bef824d Signed-off-by: Tony Lofthouse <a0741364@ti.com>
* gcx: driver cleanup; fixed debug printing; dumping improvement.Alexei Shlychkov2014-10-013-114/+14
| | | | | Change-Id: If875cf055c2904be498b8c15652d5eb3798bc919 Signed-off-by: Alexei Shlychkov <shlychkov@gmail.com>
* gcx: use pm_runtime calls to obtain omap power resources.Tony Lofthouse2014-10-011-38/+10
| | | | | | | | | | | These are the proper PM apis to use for GC320. Remove explicit usage of the bb2d fclk. Remove idle wait check. Any handling of prcm wait states should be done in the hwmod if needed in the future. Change-Id: I16a53e98fa4c1efca512b7506e2fe9934e9b185f Signed-off-by: Tony Lofthouse <a0741364@ti.com>
* gcx: boot stability fixes.Alexei Shlychkov2014-10-012-61/+6
| | | | | | | | | Fixed export strucure initialization. Fixed state loading and optimized source states. Simplified waiting for the interrupt. Change-Id: Ifefd6e9ce2d42a9c6f52aa75b8478dd22b95f207 Signed-off-by: Alexei Shlychkov <shlychkov@gmail.com>
* gcx: image offset issue fixed; accounts for pageoffset and pagesize.Alexei Shlychkov2014-10-011-18/+14
| | | | | Change-Id: I64a9f4fdb8c33d89c4cd883e17fa40c6d1550b04 Signed-off-by: Alexei Shlychkov <shlychkov@gmail.com>
* gcx: driver cleanup.David Sin2014-10-014-79/+24
| | | | | | | | | Remove unused flush pages function. Replace hardcoded irq value with proper method. Remove hardcoded 2d base address & direct allocation. Change-Id: I79c1089db935bfddc17e85f761113e3f709738b6 Signed-off-by: David Sin <davidsin@ti.com>
* gccore: (work-around) attempt to power off gc320 during early suspendTony Lofthouse2014-10-011-0/+34
| | | | | | | | | Ideally we would cut clocks after each batch blit however it appears that frequent off / on of the gc320 is still unstable. So handle the early suspend anyway. Change-Id: Ie47600863fcbe670bf67bc00aff8df9f462851b4 Signed-off-by: Tony Lofthouse <a0741364@ti.com>
* gccore: enable suspend handler and poll for idle statusTony Lofthouse2014-10-011-17/+23
| | | | | | | | | When a system level suspend event occurs the gccore driver will set the GCHOLD bit in the GC320 and wait for the module to become idle. Change-Id: I139b57ede6f42c8c08689eec21d2d8d919ea2038 Signed-off-by: Tony Lofthouse <a0741364@ti.com>
* gccore: Remove Android early suspend late resume handlersTony Lofthouse2014-10-011-46/+2
| | | | | | | | | | | | | | Early suspend/late resume handlers are primarily present for the purpose of getting the screen into a low power state for Android. On the OMAP platform the principle means of handling this is that DSSCOMP will blank the screen. In order to enter the lowest power state gccore should use the standard Linux suspend/resume handlers. Change-Id: I3dded7c5c83bc2f03048d6c8ef32fce697ab847c Signed-off-by: Tony Lofthouse <a0741364@ti.com>
* gccore: move power off directly to module exitTony Lofthouse2014-10-011-5/+1
| | | | | | | | In order to remove any doubts about when off state should be achieved move the power off to the module exit. Change-Id: I023cb9e9f275c2b6143709dd16a4a839875e6888 Signed-off-by: Tony Lofthouse <a0741364@ti.com>
* gccore: create a separate state for pulse skippingTony Lofthouse2014-10-013-11/+13
| | | | | | | When a blt has been committed enter a low latency power state Change-Id: Ie94c15db496f3943317f74e20808fb8393e32734 Signed-off-by: Tony Lofthouse <a0741364@ti.com>
* gcx: more driver cleanupRick Tillery2014-10-011-1/+1
| | | | | | Change-Id: I21cb347232c56427d7f89200c6ccc1793aea79c1 Signed-off-by: Rick Tillery <rtillery@ti.com> Signed-off-by: Alexei Shlychkov <shlychkov@gmail.com>
* gcx: Fixed l3 data throughput requested value.Oleg Matcovschi2014-10-011-2/+2
| | | | | | | | Change 0xA0000000 to smaller value because of calculation overflow. Request 800MB/s, so bus target value calculation produces 800000*1000/4=200Mhz. Change-Id: I5a1ecea50f7ff7faeb90c25e7c3b4fa49ce85e83 Signed-off-by: Oleg Matcovschi <oleg.matcovschi@ti.com>
* gcx: use uncached memory for command buffer.David Sin2014-10-012-48/+13
| | | | | | | | currently, we are using cached mem for the cmdbuf, which requires expensive flush calls before queuing to the 2d hw. Change-Id: Ib4bbb1979c9329a7937a10105d7e82ad4f096cf7 Signed-off-by: David Sin <davidsin@ti.com>
* gcx: fixed command buffer overrun.Alexei Shlychkov2014-10-011-1/+1
| | | | | Change-Id: Idfbb3b199cd40eb7df81532425c98c1c98b208fb Signed-off-by: Alexei Shlychkov <shlychkov@gmail.com>
* gcx: added zoned debug printing.Alexei Shlychkov2014-10-016-566/+418
| | | | | Change-Id: I449393e1c1566a646ac3ef0920a8b471203df784 Signed-off-by: Alexei Shlychkov <ashlychkov@vivantecorp.com>
* gcx: driver cleanup, corrected structure size validationDavid Sin2014-10-013-50/+0
| | | | | | Change-Id: I3cff33bca512c5485ff7b327642a715a92316cb8 Signed-off-by: David Sin <davidsin@ti.com> Signed-off-by: Rick Tillery <rtillery@ti.com>
* gcx: add debugfs featureCraig Stout2014-10-014-1/+433
| | | | | Change-Id: I8171fe2788ad7661ea133979e76155cd3d080ab1 Signed-off-by: Craig Stout <craig.stout@ti.com>
* gccore: fixed power off/on transition.Alexei Shlychkov2014-10-015-297/+239
| | | | | | | | | | | | | | | | | | | | | | Simplify the power transition functionality, there is now just an OFF and ON transition and the initial state is UNKNOWN. This patch also enables GC320 to power off when at suspend time (though it does not have an explicit suspend/resume handler). ON means running at full speed, it enables the GC320 FCK, clears the GC320 out0 idle state and enables interrupts. OFF means enabling pulse keeping, setting the idle bit in the out0 GC320 status register and disabling the functional clock for GC320. However note that this does not explicily power off the GC320 core, however when the DSS & the system enters suspend the interface clock appears to be disabled and this results in the GC320 h/w turning off. Change-Id: I7d3187ca0b5dd803af81c22a8407067a6aaeb5cd Signed-off-by: Alexei Shlychkov <shlychkov@gmail.com> Signed-off-by: Tony Lofthouse <a0741364@ti.com>