summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* gr/gf100: wait for GR idle after GO_IDLE bundletegra-fixesAlexandre Courbot2015-06-082-0/+38
| | | | | | | | | After submitting a GO_IDLE bundle, one must wait for GR to effectively be idle before submitting the next bundle. Failure to do so may result in undefined behavior in some rare cases. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Reported-by: Kary Jin <karyj@nvidia.com>
* gr/gf100: wait on bottom half of FE's pipelineAlexandre Courbot2015-06-081-1/+1
| | | | | | | | When emitting the ICMD bundle, wait on the bottom half (bit 3 of the GR_STATUS register) instead of upper half (bit 2) to make sure methods are effectively emitted. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
* fifo/gk104: kick channels when deactivating themAlexandre Courbot2015-06-081-8/+21
| | | | | | | | | | | | Kicking channels is part of their deactivation process. Maxwell chips are particularly sensitive to this, and can start fetching the previous pushbuffer of a recycled channel if this is not done. While we are at it, improve the channel preemption code to only wait for bit 20 of 0x002634 to turn to 0, as it is the bit indicating a preempt is pending. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
* ibus/gk20a: increase SM wait timeoutAlexandre Courbot2015-06-081-0/+8
| | | | | | | Increase clock timeout for SYS, FPB and GPC in order to avoid operation failure at high gpcclk rate. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
* platform: fix compile error if !CONFIG_IOMMUAlexandre Courbot2015-06-081-0/+16
| | | | | | | | | The lack of IOMMU API support can make nouveau_platform_probe_iommu() fail to compile because struct iommu_ops is then empty. Fix this by skipping IOMMU probe in that case - lack of IOMMU on platform devices is sub-optimal, but is not an error. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
* drm: Do not leak client objectsThierry Reding2015-06-061-0/+1
| | | | | | | | | | | | The memory allocated for a nouveau_cli object in nouveau_cli_create() is never freed. Free the memory in nouveau_cli_destroy() to plug this leak. kmemleak recorded this after running a couple of nouveau test programs. Note that kmemleak points at drm_open_helper() because for some reason it thinks that skipping the first two stack frames is a good idea. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* clk/nv50: Enable user reclocking for NVA0Roy Spliet2015-06-031-1/+2
| | | | | | | | Tested on a few cards. Probably works quite well for most, given they should all be GDDR3. Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* fb/gddr3: Add a few CL and WR entries observed on GTX260Roy Spliet2015-06-031-4/+4
| | | | | Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* fb/ramnv50: GDDR3 script for NVA0Roy Spliet2015-06-031-25/+104
| | | | | | | | | This looks surprisingly similar to scripts on earlier cards as well but they don't seem to work just yet. That... and I don't have any, which makes it a tough job to reverse engineer. Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* bios/ramcfg: Separate out RON pull valueRoy Spliet2015-06-034-3/+9
| | | | | Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* bios/rammap: Parse perf mode as if it's a rammap entryRoy Spliet2015-06-034-0/+24
| | | | | | | Some of the bits in there are similar to the bits in the gt215 rammap. Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* fb/ramnv50: Ressurect timing code, use proper timing/rammap handlersRoy Spliet2015-06-034-33/+182
| | | | | | | Might need some generalisation to < GT200. For those: use at your own risk! Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* fb/ramgt215: No need to cuss like thatRoy Spliet2015-06-031-1/+1
| | | | | Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* fb/ramnv50: Make 0x100da0 per-partitionRoy Spliet2015-06-031-7/+13
| | | | | | | Like on GT215 Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* bios/rammap: Pull DLLoff bit out of version 0x10 structRoy Spliet2015-06-036-8/+8
| | | | | | | In preparation of NV50 reclocking, where there is no version Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* clk/gt215: u32->s32 for difference in req. and set clockRoy Spliet2015-06-031-1/+2
| | | | | | | This difference can of course be negative too... Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* remove unnecessary includeBen Skeggs2015-05-291-30/+0
| | | | | | | This was merged with core/device.h in an earlier commit, but somehow never got removed. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* gr/gm204: remove a stray printkBen Skeggs2015-05-291-1/+0
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* devinit/gm100-: force devinit table execution on boards without PDISPBen Skeggs2015-05-294-3/+6
| | | | | | Should fix fdo#89558 Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* devinit/gf100: make the force-post condition more obviousBen Skeggs2015-05-291-1/+4
| | | | | | And also more generic, so it can be used on newer chipsets. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* gr/gf100-: fix wrong constant definitionLars Seipel2015-05-291-1/+1
| | | | | | | | | | Commit 3740c82590d8 ("drm/nouveau/gr/gf100-: add symbolic names for classes") introduced a wrong macro definition causing acceleration setup to fail. Fix it. Signed-off-by: Lars Seipel <ls@slrz.net> Fixes: 3740c82590d8 ("drm/nouveau/gr/gf100-: add symbolic names for classes") Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* v4.1-rc5Ben Skeggs2015-05-299-23/+32
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* bios: fix fetching from acpi on certain systemsJan Vesely2015-04-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | nvbios_extend() returns 1 to indicate "extended the array" and 0 to indicate the array is already big enough. This is used by the core shadowing code to prevent re-fetching chunks of the image that have already been shadowed. The ACPI fetching code may possibly need to extend this further due to requiring fetches to happen in 4KiB chunks. Under certain circumstances (that happen if the total image size is a multiple of 4KiB), the memory allocated to store the shadow will already be big enough, causing the ACPI code's nvbios_extend() call to return 0, which is misinterpreted as a failure. The fix is simple, accept >= 0 as a successful condition here. The core will have already made sure that we're not re-fetching data we already have. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89047 v2 (Ben Skeggs): - dropped hunk which would cause unnecessary re-fetching - more descriptive explanation Signed-off-by: Jan Vesely <jano.vesely@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* gr/gm206: initial init+ctx codeBen Skeggs2015-04-149-16/+162
| | | | | | | | Uncertain whether the GPC pack change is due to a newer driver version, or a legitimate difference from GM204. My GM204 has broken vram, so can't currently try a newer binary driver on it to confirm. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* ce/gm206: enable support via gm204 codeBen Skeggs2015-04-141-1/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* fifo/gm206: enable support via gm204 codeBen Skeggs2015-04-141-2/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* gr/gm204: initial init+ctx codeBen Skeggs2015-04-1410-18/+1484
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm: support for buffer moves via MaxwellDmaCopyABen Skeggs2015-04-141-0/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* ce/gm204: initial supportBen Skeggs2015-04-144-1/+178
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm: add support for gm20x fifo channelsBen Skeggs2015-04-142-1/+3
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* fifo/gm204: initial supportBen Skeggs2015-04-147-5/+68
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* gr/gk104-: prevent reading non-existent regs in intr handlerBen Skeggs2015-04-131-1/+6
| | | | | | | | | Under certain circumstances the trapped address will contain subc 7, which GK104 GR doesn't have anymore. Notice this case to avoid causing additional priv ring faults. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* gr/gm107: very slightly demagic part of attrib cb setupBen Skeggs2015-04-131-1/+1
| | | | | | | No idea if "3" is a constant or derived from something else, but the value is unchanged in the limited traces of gm107/gm204 I have here. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* gr/gk104-: correct crop/zrop num_active_fbps settingBen Skeggs2015-04-133-14/+11
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* gr/gf100-: add symbolic names for classesBen Skeggs2015-04-139-17/+24
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* bin: fix some missed search+replacesBen Skeggs2015-04-133-9/+9
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* gr/gm107: support tpc "strand" ctxsw in gpccs ucodeBen Skeggs2015-04-1310-766/+1025
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* gr/gf100-: support mmio access with gpc offset from gpccs ucodeBen Skeggs2015-04-138-709/+726
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* gr: fix engine name, cosmetic search+replace mistakeBen Skeggs2015-04-131-1/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* pmu/gk20a: add some missing staticsAlexandre Courbot2015-04-131-3/+4
| | | | | | | Make static a few functions and structures that should be. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* platform: fix probe error pathAlexandre Courbot2015-04-131-2/+1
| | | | | | | | | | | | A "return 0" found its way in the middle of the error path of nouveau_platform_probe(), remove it as it will make the kernel crash if we try to unload the module afterwards. While we are at it, also remove the IOMMU domain if it has been created, as we should. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* platform: release IOMMU's mm upon exitAlexandre Courbot2015-04-131-0/+1
| | | | | | | | nvkm_mm_fini() was not called when exiting the driver, resulting in a memory leak. Fix this. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* gr/gk104-gk20a: call pmu to disable any power-gating before ctor()Ben Skeggs2015-04-135-4/+18
| | | | | | | | On some of these chipsets, reading NV_PGRAPH_GPC_GPM_PD_PES_TPC_ID_MASK can trigger a PRI fault and return an error code instead of a TPC mask, unless PGOB has been disabled first. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* pmu/gk208: implement gr power-up magic with gk110_pmu_pgob()Ben Skeggs2015-04-134-39/+5
| | | | | | | | Before we moved gk110's implementation of this to pmu, the functions were identical. This commit just switches GK208 to use the new (more complete) implementation of the power-up sequence. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* pmu/gk110: implement gr power-up magic like PGOB on earlier chipsBen Skeggs2015-04-137-44/+101
| | | | | | | Turns out the PTHERM part of this dance is bracketed by the same PMU fiddling that occurs on GK104/6, let's assume it's also PGOB. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* pbus/hwsq: Make code size u16Roy Spliet2015-04-131-1/+1
| | | | | | | So we can actually use the full 512 byte code space Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* pbus/hwsq: Support strided register writesRoy Spliet2015-04-131-7/+37
| | | | | Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* instmem/gk20a: fix crash during error pathAlexandre Courbot2015-04-131-1/+1
| | | | | | | | | | | | | If a memory allocation fails when using the DMA allocator, gk20a_instobj_dtor_dma() will be called on the failed instmem object. At this time, node->handle might not be NULL despite the call to dma_alloc_attrs() having failed. node->cpuaddr is the right member to check for such a failure, so use it instead. Reported-by: Vince Hsu <vinceh@nvidia.com> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Reviewed-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* disp/gf110-: fix base channel update debug/error outputBen Skeggs2015-03-171-2/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* disp/nv50-: fix push buffers in vramBen Skeggs2015-03-171-1/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>