Age | Commit message (Collapse) | Author |
|
Implement per channel counter for jobs in each priority level. If
there are jobs active with higher priority than the one being
submitted, throttle.
Bug 926690
Change-Id: I5fed341e3f248325873b31d1c53bf57bf0a78074
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/104939
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
|
|
- remove usage of custom interface of nvmap to patch the relocs and
and pin the gathers/relocs
- convert code that references nvmap_handle to nvmap_handle_ref
- add logic to pin and map only unique gathers and relocs
- rename nvhost_channel_gather to nvhost_job_gather, because it's
used in nvhost_job code only
Bug 965206
Change-Id: Iaa7fbac9e4a7b08c0a7c1e184b8dd3566e1edfe2
Signed-off-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/95299
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
|
|
Use nvmap.h include file from kernel/include instead of mach-tegra/include.
Bug 854182
Change-Id: I9a44471dc77d1ed7aa3b6e61a5eca4833fe6dc25
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/102721
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
|
|
nvhost attempts to purge all buffers from timed out contexts. This is
very error prone, and not necessary. Change behavior so that only the
hung job, and the immediately following jobs from same context are
purged. This simplifies code, and corrects bug where the push buffer
modifications caused panics.
Bug 982946
Change-Id: Ifb26484cf02ef40f8d5b20338eebc0a731f453cf
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/102234
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
|
|
- currently, nvhost_master holds the reference to struct
chip_support
- the struct chip_support hides the chip specific implementation
for channel submit, cdma, push buffer operations etc. so
it exposed all the internal structures through nvhost_master
- move chip_support to be a part of nvhost_bus since it only has
function pointers to chip specific api implementations
- nvhost_master is host1x device specific private data so
ideally it should not hold reference to chip specifics
Bug 871237
Change-Id: I4f3f48ee5fc47a90288d110ea8eef905150275a0
Signed-off-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Reviewed-on: http://git-master/r/94421
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
GVS: Gerrit_Virtual_Submit
|
|
Add context switch to the ftrace dump.
Change-Id: I5df032273982b919fb94263cff38d8b8b6b6be45
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/101523
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
|
|
Clean up #includes. Replace #includes with forward declarations where
possible, and remove extraneous #includes.
Bug 871237
Change-Id: I6942e0c632b42ad7009589ebdd78def88ae4baa4
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/99046
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
|
|
Replace license information in nvhost with GPLv2. Also adds
copyright year 2012 in files which have been changed in 2012.
Change-Id: I86e8ed27095df13d99e0250e57e244d531fdacec
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/89735
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
|
|
Sync queue is the list of jobs still in flight. As context priorities
requires possibility to insert a job in the middle of the queue, the
structure needs to be changed into a linked list.
Bug 926690
Change-Id: Id257a11f18476c70dd69e36ba44ed2d380c80040
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/83127
|
|
Use standard drvdata interface for storing and accessing nvhost_master.
Reviewed-on: http://git-master/r/72846
Change-Id: I191987c8f6d313a6ede9b59f723269cb6a197e8a
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/76815
Reviewed-by: Automatic_Commit_Validation_User
|
|
Move all device data from nvhost_channeldesc, nvhost_moduledesc and
nvhost_module to nvhost_device. nvhost_devices are also assigned into
a hierarchy to prepare for implementation of runtime power management.
Change-Id: I1e18daae8fe538086cd1f453d316e0f73e9d7d92
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/72844
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Reviewed-on: http://git-master/r/74560
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>
|
|
Timeout struct contains fields which are accessed even after client has
quit. Move the fields to hwctx and nvhost_job so that they can be
accessed when submits complete.
Bug 917340
Change-Id: I322c38d32bc801aa9b061355a17be7f605692e18
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/71004
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
|
|
When a submit arrive in kernel, package it as a new data type nvhost_job
and use that for submitting to channel. That data type is used for
tracking the state of the job through its lifetime.
Change-Id: I0cfdb1721cc6c08efbd215917f5f46fdb7131ca0
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/67682
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
|
|
Enhance nvhost_debug_dump() output, as follows:
- Swap FIFO and GATHER dump so that even if GATHER dump blows out
seq_printf 1k buffer, we still have FIFO information;
- Write FIFO signature pattern (0xd???d???) to indirect save input
data to help pinpoint FIFO position within debug dumps;
- Prevent long data sequences from blowing out the seq_printf 1k
buffer, by limiting such sequences to 64 words.
Change-Id: I83f6118f8af14a6c46fd1080c03b718a7a3bc66c
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/62424
(cherry picked from commit cb37e4212b78546411b33b32044f30feb0579b86)
Reviewed-on: http://git-master/r/63788
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
Rebase-Id: R39329ae8eb252ced3da604e4f33c272e26921d27
|
|
Add timeout to throttling low-priority thread. Low priority threads are
allowed to push work either when push buffer is empty, or when they've
waited for a pre-defined period. Setting the period to 50ms for now.
Bug 864407
Reviewed-on: http://git-master/r/58330
(cherry picked from commit a9469db8c4c04fa7cd8f080bafdca26d99a3018c)
Change-Id: I5fa310acf6cf5563eda6b7343ad82679f76162af
Reviewed-on: http://git-master/r/61734
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
Rebase-Id: R587f052c75a23b1a5a2349d4bf0feecc49cad898
|
|
Debug code used to rely on being able to calculate the base address of a
pinned page by masking it. Now we always retrieve the physical address
from nvmap and find the correct command buffer using that.
Bug 840976
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/48105
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
Reviewed-by: Scott Williams <scwilliams@nvidia.com>
(cherry picked from commit 0ef5f2d4d94464b8d5562327c9cf5b56fe93fff5)
Change-Id: I1a17665cf19d8758f154d4fd05f6a5ec6c07caff
Reviewed-on: http://git-master/r/56266
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Rebase-Id: R12cdbf7b335ca46cd063cdf9dd7783b18255a3f1
|
|
In this change, nvhost_cdma starts a timer (if a timeout is specified
in the userctx), for the buffer at the head of the sync_queue that has
not reached its syncpt threshold.
If the timeout fires, nvhost_cdma initiates a channel / module reset.
It then detects up to where in the sync_queue it stopped execution
(based on the current HW syncpt value).
For any remaining uncompleted buffers in the context, nvhost_cdma NOPs
the entry and CPU incrs the syncpt to where it should be had it completed.
If one of the sync_queue entries belongs to another context, it still
does the syncpt incrs for this context, but via the PB as a GATHER opcode,
At the end, CDMA is restarted, so buffers are refetched (either with
NOP slots, or GATHERs to incr syncpts). This appears as though the
buffer has completed (and the associated resources released).
For testing, debugfs entries have been added under /d/tegra_nvhost
force_timeout_val - set the timeout value, in ms
force_timeout_channel - channel ID, were timeouts checks occur
force_timeout_pid - process ID to set the userctx
The idea is to set the timeout_val, then the timeout_channel (e.g. for
3D, the channel ID is 1) and then the process ID, gotten from running
adb shell ps.
Bug 625545
Original-Change-Id: I659e9255f1105f3439ce23e9169a19739b83ea52
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/42655
Reviewed-by: Scott Williams <scwilliams@nvidia.com>
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Rebase-Id: R89759c129e2db8f7dbf83a6066fc29947f95cc27
|
|
Add tracking of mapping between push buffer gathers and nvmap handles.
Use the mapping to access contents of gather buffers.
Bug 840976
Original-Change-Id: Ic6fe2fc7a83e8f14cd606a9e638b6420aa714495
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/44779
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Rebase-Id: Rd0c946095890cfe15a68d3c5eaa181a9ac02cf07
|
|
To prepare for kernel modularization, nvhost include files need to be
moved from mach-tegra/include to kernel/include. At the same time
user space specific part is split into nvhost_ioctl.h.
Bug 854182
Original-Change-Id: I3694a40d786028733310ecf5b59341282af571be
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/43211
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Rebase-Id: Rc4fadf65d59ddfb5bb924e7adfccd39e86a0b2c7
|
|
Original-Change-Id: Ia203886a3b013612b4159393ff43a25a313d1ece
Reviewed-on: http://git-master/r/35911
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Rebase-Id: R01b763362c13e09111f60700c3d3a7d2a9a3fc1c
|
|
Bring in changes to enable dumping the debug state
to the kernel log (used when module suspend times out).
Rewrote debug code to get that working more cleanly (no 16K buffer).
Refactored & cleaned up debug code to make it easier to understand.
Original-Change-Id: I22db36a627bfb1815a46866dfe23a5d3aa693edc
Reviewed-on: http://git-master/r/24157
Reviewed-by: Scott Williams <scwilliams@nvidia.com>
Tested-by: Scott Williams <scwilliams@nvidia.com>
Original-Change-Id: I92d7dcc4ede088179a5a1bca982fdfba1eeb3553
Rebase-Id: Ra013bf33c1002d2e37a7c97b7d4b441ad51f7211
|
|
Google's 2.6.36 nvhost driver branched from NVIDIA's 2.6.32 nvhost at some
point before it was actually committed to 2.6.32, but the former's
original commit included some fixes that were added to the latter after
that. Confusing... Also Google's version has some changes that we like
so they will remain, but that makes merging difficult.
Anyway, this commit brings the rest of our 2.6.32 changes into 2.6.36
and cleans it up a bit. It might be nicer to break this up into a load
of smaller commits but it turned out to be very difficult to do that.
Original-Change-Id: I828b624b089b811d6130173e55258da8f52a5cc2
Reviewed-on: http://git-master/r/12563
Tested-by: Jussi Rasanen <jrasanen@nvidia.com>
Reviewed-by: Scott Williams <scwilliams@nvidia.com>
Tested-by: Wei Sun <wsun@nvidia.com>
Original-Change-Id: I72fbcff16ec6df62cc7299052a84b91db252c8d1
Rebase-Id: Rb3aa29f2ecbecf889bbc6ccf7d0b26925f7b94fb
|
|
Signed-off-by: Erik Gilling <konkers@android.com>
Change-Id: Ia14a2bad23ae1c6401755d413ffdc32c9f35b0fd
|
|
the graphics and display hardware on tegra SoCs is accessed
through a command DMA front-end called host1x
host driver clients place commands into memory objects called
streams, and submit a stream on one of 8 channels: the assignment
of streams-to-channels depends on the hardware module(s) programmed
by the stream: for example, all streams which program the 3D
hardware are submitted on channel 1.
the host1x hardware includes two synchronization primitives to
allow command streams to synchronize access to memory or to
hardware engines shared across channels (e.g. the 2D blitter):
sync points and module mutexes. both primitives can also be
used to synchronize with the CPU.
the host1x driver performs power management for all modules
behind the host block: once a module is idle (i.e., the
last stream which accesses it has completed, indicated by
a syncpoint) and has remained idle for an extended period
of time, the module's clock (and power gate island, if the
module is uniquely power-gated) is disabled, and will be
automatically re-enabled when a new stream is submitted for
that module.
includes channel debugging support originally implemented
by Erik Gilling <konkers@google.com>
Original Author: Antti Hatala <ahatala@nvidia.com>
Signed-off-by: Gary King <gking@nvidia.com>
Change-Id: Idf0ecc8e7710f3839903a9fbfbe5650990a96b2c
|