summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/core/subdev
Commit message (Collapse)AuthorAgeFilesLines
* drm/nouveau/bios: fix DCB v1.5 parsingMarcin Slusarz2012-11-191-1/+1
| | | | | | | | | | | | | | memcmp->nv_strncmp conversion, in addition to name change, should have inverted the return value. But nv_strncmp does not act like strncmp - it does not check for string terminator, returns true/false instead of -1/0/1 and has different parameters order. Let's rename it to nv_memcmp and let it act like memcmp. Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: add missing pll_calc callsMaarten Lankhorst2012-11-192-0/+20
| | | | | | | Fixes a null pointer dereference when reclocking on my fermi. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv41/vm: fix typo in type nameMarcin Slusarz2012-11-091-1/+1
| | | | | | | | It's a miracle it compiles at all - nv04_vm_priv does not exist anywhere in the tree. Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50/fb: prevent oops on chipsets without compression tagsBen Skeggs2012-10-311-6/+4
| | | | | | Unconditionally create the tagram mm, even if there's zero tags. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/i2c: fix typo when checking nvio i2c port validityBen Skeggs2012-10-311-1/+1
| | | | | | Reported-by: Mathieu Chouquet-Stringer <mathieu@csetco.com> Tested-by: Mathieu Chouquet-Stringer <mathieu@csetco.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* Merge branch 'drm-nouveau-fixes' of ↵Dave Airlie2012-10-225-15/+32
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.freedesktop.org/git/nouveau/linux-2.6 into drm-fixes Fixes from Ben, off note: ACPI ROM regression fix, some IGP and AGP regressions fixes from rework fallout. * 'drm-nouveau-fixes' of git://git.freedesktop.org/git/nouveau/linux-2.6: drm/nouveau/clock: fix missing pll type/addr when matching default entry drm/nouveau/fb: fix reporting of memory type on GF8+ IGPs drm/nv41/vm: don't init hw pciegart on boards with agp bridge drm/nouveau/bios: fetch full 4KiB block to determine ACPI ROM image size drm/nouveau: validate vbios size drm/nouveau: warn when trying to free mm which is still in use drm/nouveau: fix nouveau_mm/nouveau_mm_node leak drm/nouveau/bios: improve error handling when reading the vbios from ACPI drm/nouveau: handle same-fb page flips
| * drm/nouveau/clock: fix missing pll type/addr when matching default entryBen Skeggs2012-10-221-6/+4
| | | | | | | | | | | | | | | | | | | | This issue is a regression from 70790f4f819875e8f390871fd15bbbf823f28e1b, and causes us to miss a special-case for C51 (NV4E) chipsets and return the wrong reference frequency for the VPLLs. Should fix fdo#56202 Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/fb: fix reporting of memory type on GF8+ IGPsBen Skeggs2012-10-221-0/+1
| | | | | | | | | | | | Purely a cosmetic issue at this point. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nv41/vm: don't init hw pciegart on boards with agp bridgeBen Skeggs2012-10-222-2/+4
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/bios: fetch full 4KiB block to determine ACPI ROM image sizeBen Skeggs2012-10-221-3/+7
| | | | | | | | | | | | Buggy firmware leads to bad things happening otherwise.. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau: validate vbios sizeMarcin Slusarz2012-10-221-3/+13
| | | | | | | | | | | | | | | | | | | | Without checking, we could detect vbios size as 0, allocate 0-byte array (kmalloc returns invalid pointer for such allocation) and crash in nouveau_bios_score while checking for vbios signature. Reported-by: Heinz Diehl <htd@fritha.org> Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/bios: improve error handling when reading the vbios from ACPIMartin Peres2012-10-221-1/+3
| | | | | | | | | | | | Reported-by: Pawel Sikora <pawel.sikora@agmk.net> Signed-off-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | nouveau: fix warning on 32-bit build.Dave Airlie2012-10-161-1/+1
| | | | | | | | Signed-off-by: Dave Airlie <airlied@redhat.com>
* | Merge branch 'drm-nouveau-fixes' of ↵Dave Airlie2012-10-162-2/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-fixes minor set of nouveau fixes. * 'drm-nouveau-fixes' of git://anongit.freedesktop.org/git/nouveau/linux-2.6: drm/nouveau/bios: fix typo in error message drm/nouveau: only call ttm_agp_tt_create when __OS_HAS_AGP drm/nv50/fb: fix double free of vram mm drm/nouveau/pm: do not stop reclocking if failing to set the fan speed drm/nouveau/pm: fix a typo related to the move to the therm subdev drm/nouveau/hwmon: fix the initialization condition
| * drm/nouveau/bios: fix typo in error messageBen Skeggs2012-10-161-1/+1
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nv50/fb: fix double free of vram mmMarcin Slusarz2012-10-161-1/+0
| | | | | | | | | | | | | | nouveau_fb_destroy already calls nouveau_mm_fini on vram mm. Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | Merge branch 'drm-nouveau-fixes' of ↵Dave Airlie2012-10-094-13/+13
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-next Just misc nouveau fixes all over the place. * 'drm-nouveau-fixes' of git://anongit.freedesktop.org/git/nouveau/linux-2.6: drm/nouveau/timer: bump ptimer's alarm delay from u32 to u64 drm/nouveau/fan: fix a typo in PWM's input clock calculation drm/nv50/clk: wire up pll_calc hook drm/nouveau: remove unused _nouveau_parent_ctor drm/nouveau/bios: fix shadowing of ACPI ROMs larger than 64KiB
| * drm/nouveau/timer: bump ptimer's alarm delay from u32 to u64Martin Peres2012-10-091-1/+1
| | | | | | | | | | | | | | | | This is needed for automatic fan management where some delays can be over 0xffffffff ns. Signed-off-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/fan: fix a typo in PWM's input clock calculationMartin Peres2012-10-091-1/+1
| | | | | | | | | | | | Reported-by: Jukka Hopeavuori <jukka.hopea@gmail.com> Signed-off-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nv50/clk: wire up pll_calc hookMarcin Slusarz2012-10-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes crash during reclocking. Call Trace: pll_calc == NULL calc_pll calc_mclk nv50_pm_clocks_pre nouveau_pm_perflvl_set nouveau_pm_trigger nouveau_pm_profile_set nouveau_pm_set_perflvl dev_attr_store sysfs_write_file vfs_write sys_write system_call_fastpath Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/bios: fix shadowing of ACPI ROMs larger than 64KiBBen Skeggs2012-10-091-11/+10
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds2012-10-031-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull drm merge (part 1) from Dave Airlie: "So first of all my tree and uapi stuff has a conflict mess, its my fault as the nouveau stuff didn't hit -next as were trying to rebase regressions out of it before we merged. Highlights: - SH mobile modesetting driver and associated helpers - some DRM core documentation - i915 modesetting rework, haswell hdmi, haswell and vlv fixes, write combined pte writing, ilk rc6 support, - nouveau: major driver rework into a hw core driver, makes features like SLI a lot saner to implement, - psb: add eDP/DP support for Cedarview - radeon: 2 layer page tables, async VM pte updates, better PLL selection for > 2 screens, better ACPI interactions The rest is general grab bag of fixes. So why part 1? well I have the exynos pull req which came in a bit late but was waiting for me to do something they shouldn't have and it looks fairly safe, and David Howells has some more header cleanups he'd like me to pull, that seem like a good idea, but I'd like to get this merge out of the way so -next dosen't get blocked." Tons of conflicts mostly due to silly include line changes, but mostly mindless. A few other small semantic conflicts too, noted from Dave's pre-merged branch. * 'drm-next' of git://people.freedesktop.org/~airlied/linux: (447 commits) drm/nv98/crypt: fix fuc build with latest envyas drm/nouveau/devinit: fixup various issues with subdev ctor/init ordering drm/nv41/vm: fix and enable use of "real" pciegart drm/nv44/vm: fix and enable use of "real" pciegart drm/nv04/dmaobj: fixup vm target handling in preparation for nv4x pcie drm/nouveau: store supported dma mask in vmmgr drm/nvc0/ibus: initial implementation of subdev drm/nouveau/therm: add support for fan-control modes drm/nouveau/hwmon: rename pwm0* to pmw1* to follow hwmon's rules drm/nouveau/therm: calculate the pwm divisor on nv50+ drm/nouveau/fan: rewrite the fan tachometer driver to get more precision, faster drm/nouveau/therm: move thermal-related functions to the therm subdev drm/nouveau/bios: parse the pwm divisor from the perf table drm/nouveau/therm: use the EXTDEV table to detect i2c monitoring devices drm/nouveau/therm: rework thermal table parsing drm/nouveau/gpio: expose the PWM/TOGGLE parameter found in the gpio vbios table drm/nouveau: fix pm initialization order drm/nouveau/bios: check that fixed tvdac gpio data is valid before using it drm/nouveau: log channel debug/error messages from client object rather than drm client drm/nouveau: have drm debugging macros build on top of core macros ...
* drm/nouveau/devinit: fixup various issues with subdev ctor/init orderingBen Skeggs2012-10-031-15/+23
| | | | | | | Details of the problem, and solution, are in comments in the commit proper. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv41/vm: fix and enable use of "real" pciegartBen Skeggs2012-10-032-7/+14
| | | | | | | | | | Hopefully fixed the tlb flush timeout issue. Was able to observe this condition occur occasionally, and it appears the binary driver doesn't wait on the old condition either.. Should give 39-bit DMA addressing on the relevant chipsets. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv44/vm: fix and enable use of "real" pciegartBen Skeggs2012-10-034-41/+29
| | | | | | | | | | | | Something seems to be missing in regards to flushing specific ranges of the TLB. For the moment, flushing the entire thing seems to make it work alright. Should give 39-bit DMA addressing on the relevant chipsets. v2: allocate contig 16KiB for dummy pages, reported by mwk on irc Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: store supported dma mask in vmmgrBen Skeggs2012-10-035-0/+5
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvc0/ibus: initial implementation of subdevBen Skeggs2012-10-032-0/+132
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/therm: add support for fan-control modesMartin Peres2012-10-035-5/+65
| | | | | | | | | | | | | | For now, only 2 control modes are available: - NONE: The fan is never touched (default) - MANUAL: The fan is set to the user-defined fan speed (pwm1) This patch introduces a distinction between ptherm internal fan management and external fan management. The latter is bound to respect the fan mode while the first can still select the speed it wants unless the NONE mode is selected. This is important for automatic fan management. Signed-off-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/therm: calculate the pwm divisor on nv50+Martin Peres2012-10-033-4/+37
| | | | | | | | v2: Martin Peres <martin.peres@labri.fr> - fixed unintentional use of floating point Signed-off-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/fan: rewrite the fan tachometer driver to get more precision, fasterMartin Peres2012-10-031-9/+16
| | | | | | | | | | | | The previous driver waited for 250ms to accumulate data. This version times a complete fan rotation and extrapolates to RPM. The fan rotational speed should now be read in less than 250ms (worst case) and usually in less 50ms. Signed-off-by: Martin Peres <martin.peres@labri.fr> Reviewed-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/therm: move thermal-related functions to the therm subdevMartin Peres2012-10-0313-1/+913
| | | | | | | | | | | | | | | | | | | | It looks scary because of the size, but I tried to keep the differences minimal. Further patches will fix the actual "driver" code and add new features. v2: change filenames, split to submodules v3: add a missing include v4: Ben Skeggs <bskeggs@redhat.com> - fixed set_defaults() to allow min_duty < 30 (thermal table will override this if it's actually necessary) - fixed set_defaults() to not provide pwm_freq so nv4x (which only has pwm_div) can actually work. the boards using pwm_freq will have a thermal table entry to provide us the value. - removed unused files Signed-off-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios: parse the pwm divisor from the perf tableMartin Peres2012-10-031-0/+75
| | | | | | | v2: perf_table now is more in line with the other functions Signed-off-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/therm: use the EXTDEV table to detect i2c monitoring devicesMartin Peres2012-10-031-0/+100
| | | | | | | | | | This commit also adds a static list of all known devices and their possible i2c addresses. v2: use the common table parsing technique as suggested by darktama Signed-off-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/therm: rework thermal table parsingMartin Peres2012-10-031-0/+177
| | | | | | | | | As an accident, it should also fix temperature reading on nv4x. v2: introduce nvbios_therm_entry as advised by darktama Signed-off-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gpio: expose the PWM/TOGGLE parameter found in the gpio vbios tableMartin Peres2012-10-031-0/+3
| | | | | | Signed-off-by: Martin Peres <martin.peres@labri.fr> Reviewed-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios: check that fixed tvdac gpio data is valid before using itBen Skeggs2012-10-031-7/+11
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvc0/ltcg: read LTS count at startupBen Skeggs2012-10-031-1/+3
| | | | | | | Not really sure how to confirm this 100%, but, the numbers match on all the traces I have for NVCx (2 LTS), NVD9 (1LTS) and NVEx (4LTS). Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nve0/ibus: handle PIBUS interrupts to prevent stormBen Skeggs2012-10-033-0/+127
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: quiet some static-related sparse noiseMarcin Slusarz2012-10-034-11/+12
| | | | | Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: constify instances of nouveau_bitfield and nouveau_enum structsMarcin Slusarz2012-10-031-8/+8
| | | | | Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nve0/copy: add initial support for the async copy enginesBen Skeggs2012-10-031-0/+5
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/device: return proper error codes if ioremap failsBen Skeggs2012-10-031-3/+3
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: port remainder of drm code, and rip out compat layerBen Skeggs2012-10-031-1/+29
| | | | | | | | v2: Ben Skeggs <bskeggs@redhat.com> - fill in nouveau_pm.dev to prevent oops - fix ppc issues (build + OF shadow) Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/device: include the official chipset namesBen Skeggs2012-10-039-1/+61
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/mxm: split up into bios code and a subdev moduleBen Skeggs2012-10-038-0/+900
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: port all engines to new engine module formatBen Skeggs2012-10-0319-27/+506
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a HUGE commit, but it's not nearly as bad as it looks - any problems can be isolated to a particular chipset and engine combination. It was simply too difficult to port each one at a time, the compat layers are *already* ridiculous. Most of the changes here are simply to the glue, the process for each of the engine modules was to start with a standard skeleton and copy+paste the old code into the appropriate places, fixing up variable names etc as needed. v2: Marcin Slusarz <marcin.slusarz@gmail.com> - fix find/replace bug in license header v3: Ben Skeggs <bskeggs@redhat.com> - bump indirect pushbuf size to 8KiB, 4KiB barely enough for userspace and left no space for kernel's requirements during GEM pushbuf submission. - fix duplicate assignments noticed by clang v4: Marcin Slusarz <marcin.slusarz@gmail.com> - add sparse annotations to nv04_fifo_pause/nv04_fifo_start - use ioread32_native/iowrite32_native for fifo control registers v5: Ben Skeggs <bskeggs@redhat.com> - rebase on v3.6-rc4, modified to keep copy engine fix intact - nv10/fence: unmap fence bo before destroying - fixed fermi regression when using nvidia gr fuc - fixed typo in supported dma_mask checking Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/instmem: completely new implementation, as a subdev moduleBen Skeggs2012-10-0325-963/+2104
| | | | | | | | v2 (Ben Skeggs): - some fixes for 64KiB PAGE_SIZE - fix porting issues in (currently unused) nv41/nv44 pciegart code Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50/instmem: remove use of nouveau_gpuobj_new_fake()Ben Skeggs2012-10-031-17/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gpuobj: remove flags for vm-mappingsBen Skeggs2012-10-031-18/+0
| | | | | | | | | | Having GPUOBJ and VM intertwined like this makes it *really* hard to continue porting to the new driver architecture, split it out in favour of requiring explit maps be the caller. It's more flexible and obvious this way anyway... Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv04-nv40/instmem: remove use of nouveau_gpuobj_new_fake()Ben Skeggs2012-10-032-88/+77
| | | | | | These type of fake objects will not be supported for much longer. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
OpenPOWER on IntegriCloud