1
0
Fork 0
Commit Graph

149 Commits (3c57d85d7d8f2d87c6700327d1db69b73fc66533)

Author SHA1 Message Date
Roy Spliet a7e4201f0f drm/nouveau/clk: Add support for NVAA/NVAC
Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-12-03 23:28:56 +10:00
Ben Skeggs aae95ca708 drm/nouveau/fb: implement various bits of work towards memory reclocking
Not even remotely ready for the vast majority of the world.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08 15:40:19 +10:00
Ben Skeggs 26fdd78cce drm/nouveau: implement a simple sysfs interface to new pm code
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08 15:40:18 +10:00
Ben Skeggs 9838366c15 drm/nouveau/device: initial control object class, with pstate control methods
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08 15:40:18 +10:00
Ben Skeggs 7c85652206 drm/nouveau/clk: implement power state and engine clock control in core
User control of this has been hard-coded as disabled for now.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08 15:40:17 +10:00
Ben Skeggs c9c0ccae48 drm/nouveau/volt: implement voltage control in core
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08 15:40:17 +10:00
Ben Skeggs 0833428e7d drm/nouveau/bios: parsing for various tables required for power management
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08 15:40:16 +10:00
Ben Skeggs aa4d7a4d55 drm/nouveau/perfmon: initial infrastructure to expose performance counters
Internal use only at this point.  Userspace later.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08 15:40:05 +10:00
Ben Skeggs 2984506fb6 drm/nouveau/bus: add interfaces/helpers for sequencer
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08 15:40:05 +10:00
Ben Skeggs ff4b42c753 drm/nouveau/pwr: initial implementation
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08 15:40:04 +10:00
Ben Skeggs b9ed919f1c drm/nouveau/drm/pm: remove everything except the hwmon interfaces to THERM
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08 15:40:00 +10:00
Ben Skeggs 75faef78c9 drm/nv50-nvaf/fb: split fbram oclass in preparation for reclocking
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08 15:39:52 +10:00
Ben Skeggs 9ca3037e60 drm/nv50-nvaf/fb: split the class definitions up a bit
These will diverge further in the future.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08 15:39:51 +10:00
Ben Skeggs 9a9d5c64ef drm/nv50-nv86,nv92/mc: rearm msi via pci config space, rather than mmio mirror
This is what NVIDIA do on these chipsets, let's hope it works around
the reported MSI failures for us on NV86.

v2: updated to include G92, as per information provided by NVIDIA.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08 15:39:38 +10:00
Ben Skeggs 1b4fea0f6a drm/nvc0,nvc4/mc: handle 0xc0's "special" msi rearm
v2. updated to cover GF104, as per information provided by NVIDIA.

Reported-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08 15:39:38 +10:00
Ilia Mirkin 5fa7543041 drm/nv44/mpeg: create a copy of the nv31/nv40 impls
The nv31/nv40 impls are actually fairly nv44-specific, since they assume
the presence of the instance register/context switching. Create a copy
before nv31/nv40 get fixed.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08 15:37:41 +10:00
Maarten Lankhorst 26410c6798 drm/nvd7/gr: initial support
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-07-05 13:43:16 +10:00
Ben Skeggs 30f4e0870d drm/nvc0-/gr: make register lists from initvals functions
Generated context verified to be the same for all supported chipsets.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-07-05 13:42:32 +10:00
Ilia Mirkin 44b1e3bd6a drm/nouveau/core: xtensa engine base class implementation
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-07-01 13:50:48 +10:00
Ilia Mirkin 0d4a1450c9 drm/nouveau/vdec: fork vp3 implementations from vp2
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-07-01 13:50:48 +10:00
Ben Skeggs a0fd4ec8f1 drm/nouveau/core: move falcon class to engine/
Not really "core" per-se.  About to merge Ilia's work adding another
similar class for the VP2 xtensa engines, so, seems like a good time to
move all these to engine/.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-07-01 13:50:47 +10:00
Ben Skeggs dceef5d87c drm/nouveau/fb: initialise vram controller as pfb sub-object
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-07-01 13:44:04 +10:00
Ben Skeggs 88524bc069 drm/nouveau/devinit: move simple pll setting routines to devinit
These are pretty much useless for reclocking purposes.  Lets make it
clearer what they're for and move them to DEVINIT to signify they're
for the very simple PLL setting requirements of running the init
tables.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-07-01 13:43:54 +10:00
Ben Skeggs e5398b23a5 drm/nvf0/disp: expose display class 2.2
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-05-02 16:23:13 +10:00
Ben Skeggs dded35dee3 drm/nouveau/device: convert to engine, rather than subdev
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-04-26 15:38:10 +10:00
Ben Skeggs 0fa9061ae8 drm/nouveau/mc: handle irq-related setup ourselves
We need to be able to process interrupts before the DRM code is able to
actually enable them, set it up ourselves.  Also, it's less convoluted
to *not* use the DRM wrappers it appears...

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-04-26 15:37:52 +10:00
Ben Skeggs 1a64634255 drm/nv04/disp: hide all the cruft away in its own little hole
It'd be pretty awesome if someone would care enough to port this all
properly to a class interface, perhaps submitting a command stream to
the core via a sw object on PFIFO (emulating how EVO works basically,
and also what nvidia have done forever..)..

But, this seems unlikely given how old this hardware is now, so, lets
just hide it away.

There's a heap of other bits and pieces laying around that are still
tangled.  I'll (re)move them in pieces.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-04-26 15:37:51 +10:00
Martin Peres 2f4573679a drm/nouveau/therm: split the nv50 and nv84 code
This is needed because temperature management on nv50 can be enabled and it
looks about the same as nv40.

Signed-off-by: Martin Peres <martin.peres@labri.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-04-26 15:37:35 +10:00
Marcin Slusarz 33b903e828 drm/nouveau: restore debugfs/vbios.rom support
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
2013-02-20 20:46:34 +10:00
Ben Hutchings a91ed42de2 nouveau: ACPI support depends on X86 and X86_PLATFORM_DEVICES
If I build nouveau on ia64, Kconfig warns:

warning: (DRM_NOUVEAU) selects ACPI_WMI which has unmet direct dependencies (X86 && X86_PLATFORM_DEVICES && ACPI)
warning: (DRM_NOUVEAU) selects MXM_WMI which has unmet direct dependencies (X86 && X86_PLATFORM_DEVICES && ACPI_WMI)

Make all the ACPI support depend on X86 and select
X86_PLATFORM_DEVICES.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-02-20 16:05:16 +10:00
Ben Skeggs 5effecd4f8 drm/nouveau/i2c: add support for ddc/aux, and dp link training on anx9805
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-02-20 16:01:05 +10:00
Ben Skeggs a2bc283f39 drm/nv50-/disp: initial work towards supporting external encoders
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-02-20 16:01:04 +10:00
Ben Skeggs 0a0afd282f drm/nv50-/disp: move DP link training to core and train from supervisor
We need to be able to do link training for PIOR-connected ANX9805 from
the third supervisor handler (due to script ordering in the bios, can't
have the "user" call train because some settings are overwritten from
the modesetting bios scripts).

This moves link training for SOR-connected DP encoders to the second
supervisor interrupt, *before* we call the modesetting scripts (yes,
different ordering from PIOR is necessary).  This is useful since we
should now be able to remove some hacks to workaround races between
the supervisor and link training paths.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-02-20 16:01:02 +10:00
Ben Skeggs 7dcd060c0e drm/nouveau/i2c: create proper chipset-specific class implementations
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-02-20 16:01:01 +10:00
Ben Skeggs 31a34aa421 drm/nouveau/i2c: aux channels not necessarily on nvio
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-02-20 16:00:58 +10:00
Ben Skeggs 60e5cb79cb drm/nv17/fence: split from nv10 code
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-02-20 16:00:52 +10:00
Ben Skeggs fa531bc8b4 drm/nouveau/gpio/nve0: interrupt regs moved on kepler apparently
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-02-20 16:00:51 +10:00
Ben Skeggs 1d7c71a3e2 drm/nouveau/disp: port vblank handling to event interface
This removes the nastiness with the interactions between display and
software engines when handling vblank semaphore release interrupts.

Now, all the semantics are handled in one place (sw) \o/.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-02-20 16:00:46 +10:00
Ben Skeggs 51fa0253fb drm/nouveau/core: basic event interface between core and drm
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-02-20 16:00:45 +10:00
Ben Skeggs 112a12aab8 drm/nouveau/bios: add support for parsing xpio table data
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-02-20 16:00:28 +10:00
Martin Peres a10220bbf8 drm/nouveau/pbus: add a PBUS subdev that hands IRQs to the right subdevs
We are going to use PTHERM's IRQs for thermal monitoring but we need to route
them first.

On nv31-50, PBUS's IRQ line is shared with GPIOs IRQs.

It seems like nv10-31 GPIO interruptions aren't well handled. I kept the
original behaviour but it is wrong and may lead to an IRQ storm.

Since we enable all PBUS IRQs, we need a way to avoid being stormed if we
don't handle them. The solution I used was to mask the IRQs that have not been
handled. This will also print one message in the logs to let us know.

v2: drop the shared intr handler because of was racy
v3: style fixes
v4: drop a useless construct in the chipset-dependent INTR
v5: add BUS to the disable mask
v6 (Ben Skeggs):
- general tidy to match the rest of the driver's style
- nva3->nvc0, nva3 can be serviced just fine with nv50.c, rnndb even notes
  that the THERM_ALARM bit got left in the hw until fermi anyway.. so, it's
  not going to conflict
- removed the peephole and user stuff, for the moment.. will handle them
  later if we find a good reason to actually care..
- limited INTR_EN to just what we can handle for now, mostly to prevent
  spam of unknown status bits (seen on at least nv4x)

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Martin Peres <martin.peres@labri.fr>
2013-02-20 16:00:21 +10:00
Martin Peres 0cbf83bbe5 drm/nouveau/fan: add toggle fan support
v2: change percent from int to atomic_t
v3: random fixes
v4 (Ben Skeggs):
- adapted for split-out fan-control "protocol" structure
- removed need for timer resched
- support for forcing 'toggle' control on PWM boards

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Martin Peres <martin.peres@labri.fr>
2013-02-20 16:00:19 +10:00
Ben Skeggs 9c3bd3a531 drm/nouveau/therm: cleanly separate pwm control logic from therm
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Martin Peres <martin.peres@labri.fr>
2013-02-20 16:00:18 +10:00
Ben Skeggs 7b49bd684c drm/nva3/therm: add support for hardware fan tachometer
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-02-20 16:00:17 +10:00
Ben Skeggs 5f066c32a5 drm/nouveau/therm: fix various style issues, make more consistent
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Martin Peres <martin.peres@labri.fr>
2013-02-20 16:00:16 +10:00
Ben Skeggs bc79202f4c nvd0/therm: implement more appropriate pwm fan control functions
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-02-20 16:00:15 +10:00
Maarten Lankhorst 4a7950140b nvc0/ppp: initial implementation of engine
Will allow use of the engine if firmware (nvXX_fuc086) provided.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:58:08 +10:00
Maarten Lankhorst 7d8bd91bf4 nvc0/vp: initial implementation of engine
Will allow use of the engine if firmware (nvXX_fuc085) provided.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:58:07 +10:00
Maarten Lankhorst 23c14ed2ec nvc0/bsp: initial implementation of engine
Will allow use of the engine if firmware (nvXX_fuc084) provided.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:58:07 +10:00
Ben Skeggs a7416d0d8a drm/nve0/vp: implement initial support for engine
Will allow use of the engine if firmware (nvXX_fuc085) provided.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:58:06 +10:00