Age | Commit message (Collapse) | Author |
|
Move initialization for HOST1X sync point irq to nvhost driver.
Bug 871237
Change-Id: I0d31e03b43999c609194665cdcbd2f0e498d848f
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/100250
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Juha Tukkinen <jtukkinen@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
|
|
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>
|
|
Split host1x_channel_submit() into subfunctions.
Bug 926690
Change-Id: I8be55cbc9d25ee76c758a918de4a9bb27e2ea846
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/90626
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
|
|
Currently nvhost hard codes usage of context handler and sync point
id. Split the context handler and context structures into generic and
host1x specific parts, and move the allocation to happen via a
function pointer in nvhost_device.
Also updates gr3d and mpe to use sync point id and waitbase from
nvhost_device.
Bug 926690
Change-Id: I7f00b450cac99f3816baa27b37ee4e4cf68cfe24
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/84901
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@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>
|
|
Add current values of sync points to sync point read and wait
IOCTL's.
Change-Id: I479a66e283b47867ed13685b75c1858b4fb65c2d
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/80006
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
|
|
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>
|
|
Do not access the timeout struct during context save. The timeout struct
is part of userctx, and it might be already deallocated.
Bug 896579
Change-Id: Id72931aa7350e0219d64f8c6f4dcc8d6847f5cb9
Reviewed-on: http://git-master/r/63207
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Rebase-Id: Raab50bca6333ac72e1383851ce0e7cf01731f3ec
|
|
Adds checks for memory allocation failures, and proper propagation
of error conditions. Adds clearing of pointers after free or unpin
has been called to catch use after free.
Bug 877551
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/54027
Reviewed-by: Antti Miettinen <amiettinen@nvidia.com>
Reviewed-by: Hiroshi Doyu <hdoyu@nvidia.com>
Reviewed-by: Scott Williams <scwilliams@nvidia.com>
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Tested-by: Gerrit_Virtual_Submit
(cherry picked from commit bfbf2766d11a5f85781532ddce3a87b7ae762ba3)
Change-Id: I04171ee5db6a42bb1689221d4f80d5f3d35e7399
Reviewed-on: http://git-master/r/57462
Rebase-Id: Rc9f43312c8b818869d746f4b73700d8b56e4569d
|
|
Context to be restored needs to be reference counted. Otherwise a
sequence of process submitting the work and exiting before hardware
executes the work can result in access to memory that is not mapped
anymore.
Bug 870787
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/55706
Reviewed-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Reviewed-by: Antti Miettinen <amiettinen@nvidia.com>
Reviewed-by: Hiroshi Doyu <hdoyu@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
(cherry picked from commit 02331c00e0233c09fdeea8cce65f2c0abc50d358)
Change-Id: I4ff6095932e0db709e01645bf6dc9fe5e496706f
Reviewed-on: http://git-master/r/56198
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Rebase-Id: R18960ec5074c7e7217a55b6fb40b8eac51325eb8
|
|
The only warnings left are one for
"./nvhost_cdma.c: 609: WARNING: consider using a completion"
and all "over 80 char line" warnings.
Change-Id: I5aa113dac1deb60570c326976baba96386b041ec
Reviewed-on: http://git-master/r/53842
Reviewed-by: Ken Adams <kadams@nvidia.com>
Tested-by: Ken Adams <kadams@nvidia.com>
Reviewed-by: Scott Williams <scwilliams@nvidia.com>
Reviewed-by: Jeff Smith <jsmith@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
Rebase-Id: R83200f349310910a04705d0f7a94d8163e0666fe
|
|
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
|
|
Adds trace commands for times when a command buffer has been submitted
and when the channel's command buffer has been processed. Also adds
tracing when cdma buffer is full.
This patch fixes a spelling mistake in waitchk trace function.
Original-Change-Id: Ib5609a56c6c2d9ce6cbd019a94f3e102d419bb60
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/36863
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Rebase-Id: R34c172eff1e9c128a7748bb4f9af0cf05a30aa7d
|
|
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
|
|
Limiting an intra-file local function's visibility/scope to static.
Reviewed-on: http://git-master/r/16448
(cherry picked from commit 77ba728673bde431af2eb0cdb0050b91c3f8b647)
Original-Change-Id: I560fa431c81205513701f1e8263dd79ae371c813
Reviewed-on: http://git-master/r/16591
Tested-by: Hiro Sugawara <hsugawara@nvidia.com>
Reviewed-by: Scott Williams <scwilliams@nvidia.com>
Original-Change-Id: I2981d976885b7c734a2c3000e41d9602ab04ce95
Rebase-Id: R8368b938b9854d300ca873cee2f38d28a2b927ae
|
|
Adding support for Tegra3:
* auto context save (without FIFO reading in interrupt)
* new registers
* SLI
Note: currently hardcoded to Tegra3, SLIx2. Need query function.
Original-Change-Id: I7daff768540ac0f0af12a655a664428a3ae55665
Reviewed-on: http://git-master/r/12564
Tested-by: Andrew Howe <ahowe@nvidia.com>
Tested-by: Jussi Rasanen <jrasanen@nvidia.com>
Reviewed-by: Andrew Howe <ahowe@nvidia.com>
Reviewed-by: Scott Williams <scwilliams@nvidia.com>
Original-Change-Id: I42bfa94856676bfd82b4c11cc8cf523ca2c0dbe6
Rebase-Id: R9b1f81b7a0323f87a4c13804e483383595971550
|
|
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
|
|
Rebase-Id: Rd2cb19d9e8f80e63483b6e7542c9cbc30d6fa807
|
|
Change-Id: I5e58f5fe8935741441e2b30f585bb997b6317d3d
Author: Alex Frid <afrid@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
|
|
Change-Id: I2a82ecadafacec53990db25cb456809dbffd999b
Author: Alex Frid <afrid@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
|
|
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
|