summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/core
Commit message (Collapse)AuthorAgeFilesLines
* drm/nouveau/bios: fix DCB v1.5 parsingMarcin Slusarz2012-11-192-6/+10
| | | | | | | | | | | | | | 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-193-1/+22
| | | | | | | 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/nv40: allocate ctxprog with kmallocMarcin Slusarz2012-11-193-5/+13
| | | | | | | | | | | Some archs defconfigs have CONFIG_FRAME_WARN set to 1024, which lead to this warning: drivers/gpu/drm/nouveau/core/engine/graph/ctxnv40.c: warning: the frame size of 1184 bytes is larger than 1024 bytes Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvc0/disp: fix thinko in vblank regression fix..Kelly Doran2012-11-191-7/+12
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvc0/disp: fix regression in vblank semaphore releaseKelly Doran2012-11-091-8/+12
| | | | | | Signed-off-by: Kelly Doran <kel.p.doran@gmail.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv40/mpeg: fix context handlingMarcin Slusarz2012-11-091-1/+1
| | | | | | | It slipped in thanks to typeless API. Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv40/graph: fix typo in type namesMarcin Slusarz2012-11-091-2/+2
| | | | | | | nv04_graph_priv / nv04_graph_chan are not defined in this context... Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.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: allow creation of zero-sized mmBen Skeggs2012-10-312-4/+6
| | | | | | | | Useful for places where a given chipset may or may not have a given resource, and we want to avoid having to spray checks for the mm's existance around everywhere. 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-227-16/+38
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: warn when trying to free mm which is still in useMarcin Slusarz2012-10-221-1/+1
| | | | | | | | | | Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau: fix nouveau_mm/nouveau_mm_node leakMarcin Slusarz2012-10-221-0/+5
| | | | | | | | | | | | | | v2: use already existing parent 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-097-34/+14
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | 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-092-2/+2
| | | | | | | | | | | | | | | | 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: remove unused _nouveau_parent_ctorMarcin Slusarz2012-10-092-20/+0
| | | | | | | | | | 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/nv98/crypt: fix fuc build with latest envyasBen Skeggs2012-10-031-1/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/devinit: fixup various issues with subdev ctor/init orderingBen Skeggs2012-10-032-16/+38
| | | | | | | 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/nv04/dmaobj: fixup vm target handling in preparation for nv4x pcieBen Skeggs2012-10-031-7/+10
| | | | | | | We don't need to pull the page address out of the page tables on nv4x chips that have a real GART. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: store supported dma mask in vmmgrBen Skeggs2012-10-036-0/+6
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvc0/ibus: initial implementation of subdevBen Skeggs2012-10-033-0/+133
| | | | 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-0315-2/+971
| | | | | | | | | | | | | | | | | | | | 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-032-0/+89
| | | | | | | 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-032-0/+130
| | | | | | | | | | 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-032-0/+223
| | | | | | | | | 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-032-0/+10
| | | | | | 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/nouveau/core: have client-id be a string, rather than an integerBen Skeggs2012-10-033-7/+7
| | | | | | Can be somewhat more informative that way... Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvc0/fifo: re-bash PBUS regs after vm-fault to BARs/PEEPHOLEBen Skeggs2012-10-031-4/+18
| | | | | | Seems to be required to "re-arm" the engines after a vm fault. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvc0/gr: implement initial trap handlerBen Skeggs2012-10-031-4/+188
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
OpenPOWER on IntegriCloud