Dave Airlie
98706ea99f
drm/nouveau: fix 32-bit build
...
This uses the proper div macro.
Signed-off-by: Dave Airlie <airlied@redhat.com>
11 years ago
Emil Velikov
4c60fac111
drm/nouveau: consider CLASS_DISPLAY_3D devices while detecting dsm/optimus
...
The present code assumes that optimus is present whenever two
VGA (PCI_CLASS_DISPLAY_VGA) devices are present. This does not
seem to be the case of newer laptops with optimus, in which
case the nvidia gpu is a PCI_CLASS_DISPLAY_3D device.
Rework the logic so that we count both VGA and 3D devices,
when contemplating if optimus is present on the platform.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70208
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
11 years ago
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>
11 years ago
Ben Skeggs
26fdd78cce
drm/nouveau: implement a simple sysfs interface to new pm code
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years ago
Ben Skeggs
9838366c15
drm/nouveau/device: initial control object class, with pstate control methods
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years ago
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>
11 years ago
Ben Skeggs
c9c0ccae48
drm/nouveau/volt: implement voltage control in core
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years ago
Ben Skeggs
0833428e7d
drm/nouveau/bios: parsing for various tables required for power management
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years ago
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>
11 years ago
Ben Skeggs
2984506fb6
drm/nouveau/bus: add interfaces/helpers for sequencer
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years ago
Ben Skeggs
48ae0b355f
drm/nouveau/bus: make external class definitions pointers
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years ago
Ben Skeggs
ff4b42c753
drm/nouveau/pwr: initial implementation
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years ago
Ben Skeggs
682b1fc793
drm/nouveau/therm: update target fanspeed outside of therm lock
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years ago
Ben Skeggs
208cf0b789
drm/nouveau/therm: automatic mode by default
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years ago
Ben Skeggs
21b1ed10df
drm/nouveau/therm: no toggle fan control either if we can't guarantee no pwm connected
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years ago
Ben Skeggs
09b8d73bd5
drm/nvc0/therm: allow fan control if we've killed the vbios ppwr ucode
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years ago
Ben Skeggs
36faa2fc22
drm/nouveau/therm: if no bios trip/linear info, default to perf-suggested speed
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years ago
Ben Skeggs
6387e2cbdc
drm/nouveau/therm: add hook for clk to suggest fanspeed to therm
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years ago
Ben Skeggs
547807b8ce
drm/nouveau/pwr: assign a subdev id for upcoming implementation
...
THERM will use this before it exists.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years ago
Ben Skeggs
2d976e3d64
drm/nouveau/gpio: return different error code for not found vs invalid
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years ago
Ben Skeggs
b9ed919f1c
drm/nouveau/drm/pm: remove everything except the hwmon interfaces to THERM
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years ago
Ben Skeggs
c52f4fa61d
drm/nouveau/core: make all info-level messages silent for runtime pm
...
Removes the need for special handling of messages in init paths.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years ago
Ben Skeggs
16c4f227ff
drm/nouveau/fifo: make external class definitions into pointers
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years ago
Ben Skeggs
aabf19c27f
drm/nouveau/device: recognise GK208
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years ago
Ben Skeggs
13d2b35a06
drm/nvc0-/gr: fix a number of missing explicit array terminators...
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years ago
Ben Skeggs
0c0888473d
drm/nouveau/mc: fix (incorrect) reporting of unknown pending intr bits
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years ago
Ben Skeggs
8df1d0c07f
drm/nouveau/disp: semi-complete link training sequence even if display disappears
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years ago
Ben Skeggs
4767fae8f8
drm/nouveau/bios: some older boards have shorter displayport tables
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years ago
Ben Skeggs
46ea16884c
drm/nouveau/fbcon: bracket entrypoints with a per-device enabled check
...
We don't necessarily have fbcon on all devices these days.
Fixes suspend on (at least) Quadro NVS 450.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years ago
Ben Skeggs
6d8d163132
drm/nvd0-/disp: reorder writes to lane current control regs
...
Matches the nv94-nvc0 commit with the same title. Doesn't fix a reported issue,
but NVIDIA use this ordering here too, so let's do it just in case.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years ago
Ben Skeggs
d7b023d87a
drm/nv94-nvc0/disp: reorder writes to lane current control regs
...
Fixes link training issues on some boards.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years ago
Ben Skeggs
687d8f66b1
drm/nouveau/disp: log if DP link training fails
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years ago
Martin Peres
9e2b734f1c
drm/nouveau/i2c: use a custom bitbanging delay for the adt7473
...
This patch adds a way to define a custom delay when scanning for i2c devices
because the adt7473 sometimes doesn't like the default bitbanging udelay.
Signed-off-by: Martin Peres <martin.peres@labri.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years ago
Ilia Mirkin
fd34381b0e
drm/nouveau/agp: add a quirk list to limit agp modes
...
Certain combinations of hardware can't actually support the maximum
detected speed. Add a quirk list that lists pairs of hostbridge/chip pci
ids and the mode that they should work with.
See https://bugs.freedesktop.org/show_bug.cgi?id=20341
Reported-by: Jason Detring <detringj@gmail.com>
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years ago
Ben Skeggs
e8d95b22b4
drm/nvd9-/disp: disable display underflow reporting at init
...
Reported-by: Andy Ritger <aritger@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years ago
Ben Skeggs
d29b992470
drm/nva0/clk: fix accidental limiting of pll coefficients
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years ago
Ben Skeggs
75faef78c9
drm/nv50-nvaf/fb: split fbram oclass in preparation for reclocking
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years ago
Ben Skeggs
20cdeaf938
drm/nouveau/fb: merge more bits and pieces into oclass definitions
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years ago
Ben Skeggs
8613e7314a
drm/nouveau/fb: remove ram oclass argument from base fb constructor
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years ago
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>
11 years ago
Ben Skeggs
1e9fc30e38
drm/nouveau/fb: make external class definitions pointers
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years ago
Ben Skeggs
0fef9d8a59
drm/nvaa/mc: blacklist msi to off by default
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years ago
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>
11 years ago
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>
11 years ago
Ben Skeggs
08f6fbdb9b
drm/nouveau/mc: store static data in nouveau_mc class definition
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years ago
Ben Skeggs
3c792a15ec
drm/nouveau/mc: fetch NV_PMC_INTR again after re-arming MSI
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years ago
Ben Skeggs
ab5beca895
drm/nouveau/mc: bracket interrupt handler with NV_PMC_INTR_EN disable/re-enable
...
This looks to be what NVIDIA do pretty much everywhere, since forever.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years ago
Ben Skeggs
6dcee40a9b
drm/nouveau/mc: have single entry and exit points to the interrupt handler
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years ago
Ben Skeggs
cfc2f2637a
drm/nouveau/mc: msi rearm write via subdev, not device
...
This way we can catch it with debugging on for PMC subdev.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years ago
Ben Skeggs
dd5b84ac3c
drm/nouveau/device: use an additional bit from NV_PMC_BOOT_0 to identify chipset
...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years ago