GitHub/LineageOS/android_kernel_motorola_exynos9610.git
10 years agodrm/nouveau: fix null ptr dereferences on some boards
Ben Skeggs [Tue, 14 Jan 2014 04:56:22 +0000 (14:56 +1000)]
drm/nouveau: fix null ptr dereferences on some boards

Regression from "device: populate master subdev pointer only when fully
constructed"

Reported-by: Bob Gleitsmann <rjgleits@bellsouth.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nouveau/nouveau: fix memory leak in nouveau_crtc_page_flip()
Christian Engelmayer [Sun, 29 Dec 2013 22:08:54 +0000 (23:08 +0100)]
drm/nouveau/nouveau: fix memory leak in nouveau_crtc_page_flip()

Fix a memory leak in the nouveau_crtc_page_flip() error handling path.

Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nouveau/bios: fix offset calculation for BMPv1 bioses
Ilia Mirkin [Tue, 7 Jan 2014 17:33:59 +0000 (12:33 -0500)]
drm/nouveau/bios: fix offset calculation for BMPv1 bioses

The only BIOS on record that needs the 14 offset has a bios major
version 2 but BMP version 1.01. Another bunch of BIOSes that need the 18
offset have BMP version 2.01 or 5.01 or higher. So instead of looking at the
bios major version, look at the BMP version. BIOSes with BMP version 0
do not contain a detectable script, so always return 0 for them.

See https://bugs.freedesktop.org/show_bug.cgi?id=68835

Reported-by: Mauro Molinari <mauromol@tiscali.it>
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nouveau: return offset of allocated notifier
Bob Gleitsmann [Sun, 5 Jan 2014 22:59:07 +0000 (08:59 +1000)]
drm/nouveau: return offset of allocated notifier

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nouveau/bios: make jump conditional
Ilia Mirkin [Mon, 6 Jan 2014 01:07:02 +0000 (20:07 -0500)]
drm/nouveau/bios: make jump conditional

This fixes a hang in VBIOS scripts of the form "condition; jump".
The jump used to always be executed, while now it will only be
executed if the condition is true.

See https://bugs.freedesktop.org/show_bug.cgi?id=72943

Reported-by: Darcy BrĂ¡s da Silva <dardevelin@cidadecool.com>
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: stable@vger.kernel.org
10 years agodrm/nvce/mc: fix msi rearm on GF114
Sid Boyce [Sun, 5 Jan 2014 23:12:05 +0000 (09:12 +1000)]
drm/nvce/mc: fix msi rearm on GF114

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nvc0/gr: fix mthd data submission
Kelly Doran [Fri, 20 Dec 2013 17:07:26 +0000 (11:07 -0600)]
drm/nvc0/gr: fix mthd data submission

If the initial data element is 0, it will never be written, even
though the value from the previous method may be there.

Signed-off-by: Kelly Doran <kel.p.doran@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nouveau: populate master subdev pointer only when fully constructed
Ben Skeggs [Tue, 26 Nov 2013 23:46:56 +0000 (09:46 +1000)]
drm/nouveau: populate master subdev pointer only when fully constructed

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nv50/disp: min/max are reversed in nv50_crtc_gamma_set()
Dan Carpenter [Wed, 27 Nov 2013 22:18:47 +0000 (01:18 +0300)]
drm/nv50/disp: min/max are reversed in nv50_crtc_gamma_set()

We should be taking the minimum here instead of the max.  It could lead
to a buffer overflow.

Fixes: 438d99e3b175 ('drm/nvd0/disp: initial crtc object implementation')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
a/drm/nv50_display.c b/drm/nv50_display.c
index f8e66c08b11a..4e384a2f99c3 100644

10 years agodrm/nouveau/sw: fix oops if gpu has its display block disabled
Ben Skeggs [Tue, 26 Nov 2013 02:33:36 +0000 (12:33 +1000)]
drm/nouveau/sw: fix oops if gpu has its display block disabled

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nouveau: unreference fence after syncing
Ben Skeggs [Thu, 21 Nov 2013 04:22:39 +0000 (14:22 +1000)]
drm/nouveau: unreference fence after syncing

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nouveau/kms: send timestamp data for correct head in flip completion events
Maarten Lankhorst [Wed, 20 Nov 2013 05:14:31 +0000 (15:14 +1000)]
drm/nouveau/kms: send timestamp data for correct head in flip completion events

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nouveau/clk: Add support for NVAA/NVAC
Roy Spliet [Sun, 17 Nov 2013 19:09:06 +0000 (20:09 +0100)]
drm/nouveau/clk: Add support for NVAA/NVAC

Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nouveau/fifo: Hook up pause and resume for NV50 and NV84+
Roy Spliet [Sun, 17 Nov 2013 19:09:05 +0000 (20:09 +0100)]
drm/nouveau/fifo: Hook up pause and resume for NV50 and NV84+

Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nv10/plane: some chipsets don't support NV12
Ilia Mirkin [Fri, 15 Nov 2013 16:26:43 +0000 (11:26 -0500)]
drm/nv10/plane: some chipsets don't support NV12

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nv10/plane: add downscaling restrictions
Ilia Mirkin [Fri, 15 Nov 2013 16:26:42 +0000 (11:26 -0500)]
drm/nv10/plane: add downscaling restrictions

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nv10/plane: fix format computation
Ilia Mirkin [Fri, 15 Nov 2013 16:26:41 +0000 (11:26 -0500)]
drm/nv10/plane: fix format computation

Otherwise none of the format checks pass, since the width was still in
16.16 encoding.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nv04-nv30/clk: provide an empty domain list
Ben Skeggs [Thu, 14 Nov 2013 22:20:45 +0000 (08:20 +1000)]
drm/nv04-nv30/clk: provide an empty domain list

Reported-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nouveau: do not map evicted vram buffers in nouveau_bo_vma_add
Maarten Lankhorst [Tue, 12 Nov 2013 12:34:12 +0000 (13:34 +0100)]
drm/nouveau: do not map evicted vram buffers in nouveau_bo_vma_add

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nvc0-/gr: shift wrapping bug in nvc0_grctx_generate_r406800
Dan Carpenter [Tue, 12 Nov 2013 12:34:11 +0000 (13:34 +0100)]
drm/nvc0-/gr: shift wrapping bug in nvc0_grctx_generate_r406800

We care about the upper 32 bits here so we have to use 1ULL instead of 1
to avoid a shift wrapping bug.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nouveau/pwr: fix missing mutex unlock in a failure path
Ben Skeggs [Wed, 13 Nov 2013 22:31:26 +0000 (08:31 +1000)]
drm/nouveau/pwr: fix missing mutex unlock in a failure path

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nv40/therm: fix slowing down fan when pstate undefined
Ben Skeggs [Wed, 13 Nov 2013 05:52:03 +0000 (15:52 +1000)]
drm/nv40/therm: fix slowing down fan when pstate undefined

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nv11-: synchronise flips to vblank, unless async flip requested
Ben Skeggs [Mon, 11 Nov 2013 03:59:40 +0000 (13:59 +1000)]
drm/nv11-: synchronise flips to vblank, unless async flip requested

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nvc0-: remove nasty fifo swmthd hack for flip completion method
Ben Skeggs [Wed, 13 Nov 2013 00:49:46 +0000 (10:49 +1000)]
drm/nvc0-: remove nasty fifo swmthd hack for flip completion method

Not required anymore as flips are always done on the kernel's channel,
which means we can use a proper software object class instead.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nv10-: we no longer need to create nvsw object on user channels
Ben Skeggs [Wed, 13 Nov 2013 00:58:51 +0000 (10:58 +1000)]
drm/nv10-: we no longer need to create nvsw object on user channels

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nouveau: always queue flips relative to kernel channel activity
Ben Skeggs [Wed, 13 Nov 2013 00:17:17 +0000 (10:17 +1000)]
drm/nouveau: always queue flips relative to kernel channel activity

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nouveau: there is no need to reserve/fence the new fb when flipping
Ben Skeggs [Wed, 13 Nov 2013 00:00:32 +0000 (10:00 +1000)]
drm/nouveau: there is no need to reserve/fence the new fb when flipping

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nouveau: when bailing out of a pushbuf ioctl, do not remove previous fence
Ben Skeggs [Wed, 13 Nov 2013 05:18:32 +0000 (15:18 +1000)]
drm/nouveau: when bailing out of a pushbuf ioctl, do not remove previous fence

Cc: stable@vger.kernel.org
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nouveau: allow nouveau_fence_ref() to be a noop
Ben Skeggs [Wed, 13 Nov 2013 00:23:46 +0000 (10:23 +1000)]
drm/nouveau: allow nouveau_fence_ref() to be a noop

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nvc8/mc: msi rearm is via the nvc0 method
Ben Skeggs [Mon, 11 Nov 2013 02:40:27 +0000 (12:40 +1000)]
drm/nvc8/mc: msi rearm is via the nvc0 method

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/fb: implement various bits of work towards memory reclocking
Ben Skeggs [Mon, 4 Mar 2013 05:01:37 +0000 (15:01 +1000)]
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 agodrm/nouveau: implement a simple sysfs interface to new pm code
Ben Skeggs [Tue, 15 Oct 2013 01:52:56 +0000 (11:52 +1000)]
drm/nouveau: implement a simple sysfs interface to new pm code

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/device: initial control object class, with pstate control methods
Ben Skeggs [Wed, 16 Oct 2013 23:56:02 +0000 (09:56 +1000)]
drm/nouveau/device: initial control object class, with pstate control methods

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/clk: implement power state and engine clock control in core
Ben Skeggs [Sun, 13 Jan 2013 22:28:28 +0000 (08:28 +1000)]
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 agodrm/nouveau/volt: implement voltage control in core
Ben Skeggs [Thu, 7 Feb 2013 23:34:56 +0000 (09:34 +1000)]
drm/nouveau/volt: implement voltage control in core

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/bios: parsing for various tables required for power management
Ben Skeggs [Mon, 14 Jan 2013 22:33:25 +0000 (08:33 +1000)]
drm/nouveau/bios: parsing for various tables required for power management

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/perfmon: initial infrastructure to expose performance counters
Ben Skeggs [Wed, 13 Feb 2013 05:29:11 +0000 (15:29 +1000)]
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 agodrm/nouveau/bus: add interfaces/helpers for sequencer
Ben Skeggs [Tue, 15 Oct 2013 00:49:39 +0000 (10:49 +1000)]
drm/nouveau/bus: add interfaces/helpers for sequencer

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/bus: make external class definitions pointers
Ben Skeggs [Wed, 23 Oct 2013 23:39:05 +0000 (09:39 +1000)]
drm/nouveau/bus: make external class definitions pointers

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/pwr: initial implementation
Ben Skeggs [Mon, 14 Oct 2013 23:38:12 +0000 (09:38 +1000)]
drm/nouveau/pwr: initial implementation

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/therm: update target fanspeed outside of therm lock
Ben Skeggs [Sun, 3 Nov 2013 23:34:55 +0000 (09:34 +1000)]
drm/nouveau/therm: update target fanspeed outside of therm lock

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/therm: automatic mode by default
Ben Skeggs [Thu, 25 Jul 2013 23:51:43 +0000 (09:51 +1000)]
drm/nouveau/therm: automatic mode by default

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/therm: no toggle fan control either if we can't guarantee no pwm connected
Ben Skeggs [Mon, 4 Nov 2013 23:58:27 +0000 (09:58 +1000)]
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 agodrm/nvc0/therm: allow fan control if we've killed the vbios ppwr ucode
Ben Skeggs [Tue, 15 Oct 2013 00:31:05 +0000 (10:31 +1000)]
drm/nvc0/therm: allow fan control if we've killed the vbios ppwr ucode

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/therm: if no bios trip/linear info, default to perf-suggested speed
Ben Skeggs [Thu, 25 Jul 2013 23:58:47 +0000 (09:58 +1000)]
drm/nouveau/therm: if no bios trip/linear info, default to perf-suggested speed

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/therm: add hook for clk to suggest fanspeed to therm
Ben Skeggs [Thu, 25 Jul 2013 23:15:57 +0000 (09:15 +1000)]
drm/nouveau/therm: add hook for clk to suggest fanspeed to therm

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/pwr: assign a subdev id for upcoming implementation
Ben Skeggs [Tue, 15 Oct 2013 00:07:31 +0000 (10:07 +1000)]
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 agodrm/nouveau/gpio: return different error code for not found vs invalid
Ben Skeggs [Thu, 31 Oct 2013 00:07:51 +0000 (10:07 +1000)]
drm/nouveau/gpio: return different error code for not found vs invalid

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/drm/pm: remove everything except the hwmon interfaces to THERM
Ben Skeggs [Mon, 14 Oct 2013 23:44:02 +0000 (09:44 +1000)]
drm/nouveau/drm/pm: remove everything except the hwmon interfaces to THERM

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/core: make all info-level messages silent for runtime pm
Ben Skeggs [Fri, 8 Nov 2013 04:38:40 +0000 (14:38 +1000)]
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 agodrm/nouveau/fifo: make external class definitions into pointers
Ben Skeggs [Tue, 5 Nov 2013 04:26:58 +0000 (14:26 +1000)]
drm/nouveau/fifo: make external class definitions into pointers

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/device: recognise GK208
Ben Skeggs [Tue, 5 Nov 2013 03:14:25 +0000 (13:14 +1000)]
drm/nouveau/device: recognise GK208

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nvc0-/gr: fix a number of missing explicit array terminators...
Ben Skeggs [Mon, 4 Nov 2013 23:28:26 +0000 (09:28 +1000)]
drm/nvc0-/gr: fix a number of missing explicit array terminators...

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/mc: fix (incorrect) reporting of unknown pending intr bits
Ben Skeggs [Mon, 4 Nov 2013 23:09:30 +0000 (09:09 +1000)]
drm/nouveau/mc: fix (incorrect) reporting of unknown pending intr bits

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/disp: semi-complete link training sequence even if display disappears
Ben Skeggs [Mon, 4 Nov 2013 03:40:36 +0000 (13:40 +1000)]
drm/nouveau/disp: semi-complete link training sequence even if display disappears

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/bios: some older boards have shorter displayport tables
Ben Skeggs [Mon, 4 Nov 2013 03:40:03 +0000 (13:40 +1000)]
drm/nouveau/bios: some older boards have shorter displayport tables

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/fbcon: bracket entrypoints with a per-device enabled check
Ben Skeggs [Mon, 4 Nov 2013 01:15:38 +0000 (11:15 +1000)]
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 agodrm/nvd0-/disp: reorder writes to lane current control regs
Ben Skeggs [Mon, 4 Nov 2013 01:00:59 +0000 (11:00 +1000)]
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 agodrm/nv94-nvc0/disp: reorder writes to lane current control regs
Ben Skeggs [Mon, 4 Nov 2013 00:52:29 +0000 (10:52 +1000)]
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 agodrm/nouveau/disp: log if DP link training fails
Ben Skeggs [Thu, 31 Oct 2013 23:36:42 +0000 (09:36 +1000)]
drm/nouveau/disp: log if DP link training fails

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/i2c: use a custom bitbanging delay for the adt7473
Martin Peres [Sun, 20 Oct 2013 23:48:55 +0000 (01:48 +0200)]
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 agodrm/nouveau/agp: add a quirk list to limit agp modes
Ilia Mirkin [Sun, 27 Oct 2013 15:54:09 +0000 (11:54 -0400)]
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 agodrm/nvd9-/disp: disable display underflow reporting at init
Ben Skeggs [Thu, 24 Oct 2013 23:59:14 +0000 (09:59 +1000)]
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 agodrm/nva0/clk: fix accidental limiting of pll coefficients
Ben Skeggs [Tue, 22 Oct 2013 03:45:16 +0000 (13:45 +1000)]
drm/nva0/clk: fix accidental limiting of pll coefficients

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nv50-nvaf/fb: split fbram oclass in preparation for reclocking
Ben Skeggs [Mon, 21 Oct 2013 02:04:43 +0000 (12:04 +1000)]
drm/nv50-nvaf/fb: split fbram oclass in preparation for reclocking

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/fb: merge more bits and pieces into oclass definitions
Ben Skeggs [Mon, 21 Oct 2013 00:26:04 +0000 (10:26 +1000)]
drm/nouveau/fb: merge more bits and pieces into oclass definitions

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/fb: remove ram oclass argument from base fb constructor
Ben Skeggs [Sun, 20 Oct 2013 22:50:25 +0000 (08:50 +1000)]
drm/nouveau/fb: remove ram oclass argument from base fb constructor

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nv50-nvaf/fb: split the class definitions up a bit
Ben Skeggs [Fri, 18 Oct 2013 04:44:23 +0000 (14:44 +1000)]
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 agodrm/nouveau/fb: make external class definitions pointers
Ben Skeggs [Fri, 18 Oct 2013 04:18:04 +0000 (14:18 +1000)]
drm/nouveau/fb: make external class definitions pointers

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nvaa/mc: blacklist msi to off by default
Ben Skeggs [Tue, 22 Oct 2013 04:14:33 +0000 (14:14 +1000)]
drm/nvaa/mc: blacklist msi to off by default

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nv50-nv86,nv92/mc: rearm msi via pci config space, rather than mmio mirror
Ben Skeggs [Mon, 14 Oct 2013 04:58:16 +0000 (14:58 +1000)]
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 agodrm/nvc0,nvc4/mc: handle 0xc0's "special" msi rearm
Ben Skeggs [Fri, 11 Oct 2013 05:38:15 +0000 (15:38 +1000)]
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 agodrm/nouveau/mc: store static data in nouveau_mc class definition
Ben Skeggs [Fri, 11 Oct 2013 05:34:08 +0000 (15:34 +1000)]
drm/nouveau/mc: store static data in nouveau_mc class definition

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/mc: fetch NV_PMC_INTR again after re-arming MSI
Ben Skeggs [Fri, 11 Oct 2013 04:56:39 +0000 (14:56 +1000)]
drm/nouveau/mc: fetch NV_PMC_INTR again after re-arming MSI

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/mc: bracket interrupt handler with NV_PMC_INTR_EN disable/re-enable
Ben Skeggs [Fri, 11 Oct 2013 04:42:47 +0000 (14:42 +1000)]
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 agodrm/nouveau/mc: have single entry and exit points to the interrupt handler
Ben Skeggs [Fri, 11 Oct 2013 04:41:27 +0000 (14:41 +1000)]
drm/nouveau/mc: have single entry and exit points to the interrupt handler

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/mc: msi rearm write via subdev, not device
Ben Skeggs [Fri, 11 Oct 2013 04:28:04 +0000 (14:28 +1000)]
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 agodrm/nouveau/device: use an additional bit from NV_PMC_BOOT_0 to identify chipset
Ben Skeggs [Fri, 27 Sep 2013 21:31:07 +0000 (07:31 +1000)]
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 agodrm/nouveau/bios/init: return failure condition on invalid opcodes
Ben Skeggs [Tue, 10 Sep 2013 02:42:25 +0000 (12:42 +1000)]
drm/nouveau/bios/init: return failure condition on invalid opcodes

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nv31/mpeg: remove need for separate refcnt on engine use
Ben Skeggs [Mon, 9 Sep 2013 05:26:07 +0000 (15:26 +1000)]
drm/nv31/mpeg: remove need for separate refcnt on engine use

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/therm: ack any pending IRQ at init
Martin Peres [Sun, 8 Sep 2013 22:43:27 +0000 (00:43 +0200)]
drm/nouveau/therm: ack any pending IRQ at init

This is safe because ptherm hasn't been configured yet and will be a
little further down the initialization path. Ptherm should be safe
regarding to runtime reconfiguration.

v2:
  - do not limit this patch to nv84-a3 and make it nv84+

v3:
  - move the ack to fini()
  - disable IRQs on fini()
  - silently ignore un-requested IRQs

Signed-off-by: Martin Peres <martin.peres@labri.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nv31/mpeg: split the nv31 and nv40 dma setting implementations
Ilia Mirkin [Sun, 8 Sep 2013 01:04:12 +0000 (21:04 -0400)]
drm/nv31/mpeg: split the nv31 and nv40 dma setting implementations

NV31 has different config bits than NV40+ do. Also fix the DMA_IMAGE
VRAM-only setting to check the right bits.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nv31/mpeg: store chan singleton in engine, use it for dispatch
Ilia Mirkin [Sun, 8 Sep 2013 01:04:11 +0000 (21:04 -0400)]
drm/nv31/mpeg: store chan singleton in engine, use it for dispatch

This makes nv31+ able to actually perform the nv_call, since previously
the inst was not available.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nv40/mpeg: use the nv31-provided classes
Ilia Mirkin [Sun, 8 Sep 2013 01:04:10 +0000 (21:04 -0400)]
drm/nv40/mpeg: use the nv31-provided classes

Since nv40 only covers pre-nv44 now, it can use the nv31-provided
functions.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nv44/mpeg: create a copy of the nv31/nv40 impls
Ilia Mirkin [Sun, 8 Sep 2013 01:04:09 +0000 (21:04 -0400)]
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>
11 years agodrm/nv31/mpeg: no need to set compat mode differently for nv44 gr
Ilia Mirkin [Sun, 8 Sep 2013 01:04:08 +0000 (21:04 -0400)]
drm/nv31/mpeg: no need to set compat mode differently for nv44 gr

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nv10/kms: add plane support for nv10-nv40
Ilia Mirkin [Sun, 8 Sep 2013 00:33:43 +0000 (20:33 -0400)]
drm/nv10/kms: add plane support for nv10-nv40

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nv10: fix chipset checks, mostly for the benefit of nv1a
Ilia Mirkin [Thu, 5 Sep 2013 08:45:03 +0000 (04:45 -0400)]
drm/nv10: fix chipset checks, mostly for the benefit of nv1a

NV1A is numerically higher than NV17 but generationally lower. Use the
new card type to help disambiguate.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nv10: introduce a new NV_11 card type
Ilia Mirkin [Thu, 5 Sep 2013 08:45:02 +0000 (04:45 -0400)]
drm/nv10: introduce a new NV_11 card type

NV11/17/1F/18 come after NV10/15/16/1A. In order to facilitate using
numerical comparisons, split up the two sets into different card types.

This change should be a no-op except that the relevant cards will see
NV11 printed instead of NV10 for the family.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau: fix backlight mask on ppc powerbook
Ilia Mirkin [Thu, 5 Sep 2013 08:45:01 +0000 (04:45 -0400)]
drm/nouveau: fix backlight mask on ppc powerbook

This code was originally moved to using nv_mask by d31e078d84. This
should not have any actual effect since the mask isn't applied to the
value.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau: remove prototype for non-existent nouveau_connector_bpp
Ilia Mirkin [Thu, 5 Sep 2013 08:45:00 +0000 (04:45 -0400)]
drm/nouveau: remove prototype for non-existent nouveau_connector_bpp

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/vic: rename PUNK1C1 to PVIC
Ben Skeggs [Wed, 21 Aug 2013 03:26:42 +0000 (13:26 +1000)]
drm/nouveau/vic: rename PUNK1C1 to PVIC

NVIDIA's name for what rnndb calls PVCOMP.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/therm: kill some over-zealous debugging
Ben Skeggs [Mon, 16 Sep 2013 22:22:01 +0000 (08:22 +1000)]
drm/nouveau/therm: kill some over-zealous debugging

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/core: split lock into list+exec and enable refcount locks
Ben Skeggs [Wed, 2 Oct 2013 23:59:16 +0000 (09:59 +1000)]
drm/nouveau/core: split lock into list+exec and enable refcount locks

This fixes a reported locking inversion when interacting with the DRM
core's vblank routines.

Reviewed-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/core: convert event handler apis to split create/enable semantics
Ben Skeggs [Wed, 2 Oct 2013 21:02:29 +0000 (07:02 +1000)]
drm/nouveau/core: convert event handler apis to split create/enable semantics

This is a necessary step towards being able to work with the insane locking
requirements of the DRM core's vblank routines, and a nice cleanup as a
side-effect.

This is similar in spirit to the interfaces that Peter Hurley arrived at
with his nouveau_event rcu conversion series.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nv50-/sw: share engine/channel constructor between implementations
Ben Skeggs [Wed, 2 Oct 2013 21:42:41 +0000 (07:42 +1000)]
drm/nv50-/sw: share engine/channel constructor between implementations

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/sw: prepare for the sharing of constructors between implementations
Ben Skeggs [Wed, 2 Oct 2013 21:30:11 +0000 (07:30 +1000)]
drm/nouveau/sw: prepare for the sharing of constructors between implementations

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nv50-/sw: make vblank tracking data private to the implementations
Ben Skeggs [Wed, 2 Oct 2013 21:21:34 +0000 (07:21 +1000)]
drm/nv50-/sw: make vblank tracking data private to the implementations

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nv50-/sw: share engine/channel struct definitions between implementations
Ben Skeggs [Wed, 2 Oct 2013 21:17:02 +0000 (07:17 +1000)]
drm/nv50-/sw: share engine/channel struct definitions between implementations

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/core: Allow asymmetric nouveau_event_get/_put
Peter Hurley [Tue, 27 Aug 2013 20:12:57 +0000 (16:12 -0400)]
drm/nouveau/core: Allow asymmetric nouveau_event_get/_put

Most nouveau event handlers have storage in 'static' containers
(structures with lifetimes nearly equivalent to the drm_device),
but are dangerously reused via nouveau_event_get/_put. For
example, if nouveau_event_get is called more than once for a
given handler, the event handler list will be corrupted.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>