summaryrefslogtreecommitdiff
path: root/drm
Commit message (Collapse)AuthorAgeFilesLines
* core: rename subclass.base to subclass.superclassBen Skeggs2015-01-101-1/+0
| | | | | | | | Makes things a bit more readable. This is specially important now as upcoming commits are going to be gradually removing the use of macros for down-casts, in favour of compile-time checking. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm-fixes 79305ec6e60d320832505e95c1a028d309fcd2b6Ben Skeggs2015-01-105-15/+5
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm: wake up the card if necessary during gem callbacksBen Skeggs2014-12-221-5/+30
| | | | | | | | | | The failure paths if we fail to wake the card are less than desirable, but there's not really a graceful way to handle this case currently. I'll keep this situation in mind when I get to fixing other vm-related issues. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm: fix missing return statement in nouveau_ttm_tt_unpopulateAlexandre Courbot2014-12-221-1/+3
| | | | | | | | | | nouveau_ttm_tt_unpopulate() is supposed to return right after calling ttm_dma_unpopulate() in the case of a coherent buffer. The return statement was omitted, leading to the pages being unmapped twice. Fix this. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50: drop requirement that framebuffer bos be contig up-frontBen Skeggs2014-12-021-5/+0
| | | | | | We'll move them at pin() time if necessary. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50: directly use cursor image from userspace bufferBen Skeggs2014-12-022-49/+32
| | | | | | | | | Preparation for transition to planes, which use framebuffers for the cursor image. We've always done copies from the userspace buffer up until now for legacy reasons, there's no good reason to do so on the chipsets this code covers. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms: when pinning display-related buffers, force contig vramBen Skeggs2014-12-022-7/+7
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm: teach nouveau_bo_pin() how to force a contig vram allocationBen Skeggs2014-12-0213-27/+52
| | | | | | | | | | | We have the ability to move buffers around in the kernel if necessary, and should probably use it rather than failing if userspace passes us a non-contig buffer for a plane. The NOUVEAU_GEM_TILE_NONCONTIG flag from userspace will become a mere initial placement hint once all the relevant paths have been updated. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* volt: add support for GK20AVince Hsu2014-12-023-0/+3
| | | | | | | | | | The voltage value are calculated by the hardware characterized result. Signed-off-by: Vince Hsu <vinceh@nvidia.com> Reviewed-by: Alexandre Courbot <acourbot@nvidia.com> Acked-by: Martin Peres <martin.peres@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* platform: add GPU speedo information to nouveau platformVince Hsu2014-12-022-0/+4
| | | | | | | For GK20A we need the GPU speedo value to calculate voltage levels. Signed-off-by: Vince Hsu <vinceh@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* bios: add parsing of BIT M(v2) +0x03 tableBen Skeggs2014-12-023-0/+3
| | | | | | | | | We only support one kind of matching here (ramcfg strap), but it appears alternate methods are possible. I wrote a tool to scan our vbios repo for other types, but did not see any used. Hopefully this means there aren't any in the wild that will now break. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm: we need pin_refcnt for nouveau_bo_placement_set()Ben Skeggs2014-12-021-5/+9
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50-: add some evo tracing ability for debuggingBen Skeggs2014-12-021-0/+13
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50: use sclass() instead of trial-and-errorBen Skeggs2014-12-021-6/+20
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50: remove a couple of cursor-related stub functionsBen Skeggs2014-12-022-12/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm: fix pin refcnt leak in failure pathBen Skeggs2014-12-021-12/+12
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm: synchronize BOs when requiredAlexandre Courbot2014-12-023-0/+56
| | | | | | | | | | | | | | | On architectures for which access to GPU memory is non-coherent, caches need to be flushed and invalidated explicitly when BO control changes between CPU and GPU. This patch adds buffer synchronization functions which invokes the correct API (PCI or DMA) to ensure synchronization is effective. Based on the TTM DMA cache helper patches by Lucas Stach. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm: allocate GPFIFOs and fences coherentlyAlexandre Courbot2014-12-022-3/+3
| | | | | | | | | Specify TTM_PL_FLAG_UNCACHED when allocating GPFIFOs and fences to allow them to be safely accessed by the kernel without being synced on non-coherent architectures. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm: implement explicitly coherent BOsAlexandre Courbot2014-12-022-8/+73
| | | | | | | | | | | | | | | Allow nouveau_bo_new() to recognize the TTM_PL_FLAG_UNCACHED flag, which means that we want the allocated BO to be perfectly coherent between the CPU and GPU. This is useful on non-coherent architectures for which we do not want to manually sync some rarely-accessed buffers: typically, fences and pushbuffers. A TTM BO allocated with the TTM_PL_FLAG_UNCACHED on a non-coherent architecture will be populated using the DMA API, and accesses to it performed using the coherent mapping performed by dma_alloc_coherent(). Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm: warn when moving a pinned objectAlexandre Courbot2014-12-021-2/+9
| | | | | | | | | Pinned BOs are supposed to remain in their current location until unpinned. Display a warning for the supposedly-erroneous case where we are trying to move such objects. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* fb/gddr3: Generate MR valuesRoy Spliet2014-12-022-0/+2
| | | | | Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm: move the (far too many...) different s/r paths to the same placeBen Skeggs2014-12-022-138/+144
| | | | | | No code changes. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm: add support for gm204Ben Skeggs2014-12-023-11/+16
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* disp/gm204: initial supportBen Skeggs2014-12-023-0/+4
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* i2c/gm204: add aux channel driverBen Skeggs2014-12-022-0/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* i2c/gm204: add pad driverBen Skeggs2014-12-022-0/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* i2c: segregate aux channel adapter indices from bit-banged i2cBen Skeggs2014-12-021-0/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* devinit/gm204: initial implementationBen Skeggs2014-12-022-0/+2
| | | | | | | | | | Starting from GM204, certain registers are no longer accessible by the host (or unsigned PMU firmware). This commit implements devinit on PMU, using a signed microcode image, and devinit data, from the VBIOS. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* bios: add parsing of pmu image tablesBen Skeggs2014-12-023-0/+3
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* bios: add NPDE parsingBen Skeggs2014-12-023-0/+3
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* bios: add pci data structure parsingBen Skeggs2014-12-023-0/+3
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* bios: split out shadow methodsBen Skeggs2014-12-0210-0/+16
| | | | | | | | | | | We're about to need to be able to fetch additional chunks of data beyond the primary bios image, which makes fetching a lot more complicated. This splits out the verious shadowing routines to be nothing more than very dumb "fetch this much data from this offset" routines, and leaves the logic of what and how much to fetch in common code. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm: a, somehow, missed hunk of "fix regression on agp boards"Ben Skeggs2014-12-021-6/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm-next 5a0e9d72136d90f5456bcc465d318f49d3f45838Ben Skeggs2014-12-024-0/+14
|
* drm: prevent stale fence->channel pointers, and protect with rcuMaarten Lankhorst2014-12-022-29/+67
| | | | | Tested-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nv50/disp: Fix modeset on G94Roy Spliet2014-11-131-2/+23
| | | | | | | | | | | | | | | | | Commit 1dce6264045cd23e9c07574ed0bb31c7dce9354f introduced a regression spotted on several G94 (FDObz #85160). This device seems to expect the vblank period to be set after setting scale instead of before. V2: shove this in a separate function This is a candidate bug-fix for 3.18 Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Tested-by: Zlatko Calusic <zcalusic@bitsync.net> Tested-by: Michael Riesch <michael@riesch.at> Tested-by: "poma" <pomidorabelisima@gmail.com> Tested-by: Adam Williamson <adamw@happyassassin.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* v3.18-rc2Ben Skeggs2014-10-291-3/+9
|
* v3.18-rc1Ben Skeggs2014-10-201-2/+2
|
* drm-next 7a42e83d36d2d0a68622320900dc4e880b1d920aBen Skeggs2014-10-0219-42/+91
|
* drm-next 1dadba87cba20989c5a5a56f2a86fe6672e37c30Ben Skeggs2014-10-023-3/+4
|
* disp/gt214-/dp: enable audioBen Skeggs2014-10-021-4/+7
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/gt214-: fix hda eld regressionBen Skeggs2014-10-021-8/+10
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/gt214-: perform hda codec setup on displayport tooBen Skeggs2014-10-021-2/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* disp/gk104-: infoframe registers moved yet again on keplerBen Skeggs2014-10-022-0/+2
| | | | | | | Thanks to Vincent Pelletier for pointing this out and providing a proof of concept patch on the list. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50: Set VBLANK time in modeset scriptRoy Spliet2014-10-021-3/+8
| | | | | | | | Solves blinking on reclocking memory. The value set is an underestimate, but with non-reduced vblanking this should give us plenty of time Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* gpio: rename g92 class to g94Emil Velikov2014-10-023-2/+2
| | | | | | | | | | | | | | | | | nv92 hardware has only 16 interrupt lines, while nv94 and later has 32. Accessing 0xe0c{0,4} registers on nv92 can lead to incorrect PDISP setup. This is a regression introduced with commit 9d0f5ec9ee0fd5dc5fc1cc2cf559286431e406e3 Author: Ben Skeggs <bskeggs@redhat.com> Date: Mon May 12 15:22:42 2014 +1000 gpio: split g92 class from nv50 Reported-by: estece on #nouveau Cc: stable@vger.kernel.org # 3.16+ Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* bios: add support for parsing table at BIT 'M' v2 + 0x09Ben Skeggs2014-10-023-0/+3
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* bios: add support for parsing table at BIT 'M' v2 + 0x05Ben Skeggs2014-10-023-1/+4
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* fb/sddr2: Generate MR valuesRoy Spliet2014-10-022-0/+2
| | | | | | | V2: Always disable DLL reset Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* subdev: add a pfuse subdev v2Martin Peres2014-10-027-0/+10
| | | | | | | | | | | | We will use this subdev to disable temperature reading on cards that did not get a sensor calibration in the factory. v2: - rename "nouveau_fuse_rd32" to "gxXXX_fuse_rd32" as adviced by Christian Costa - fold the code a little as adviced by Emil Velikov Signed-off-by: Martin Peres <martin.peres@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>