History log of /drivers/gpu/drm/nouveau/nouveau_state.c
Revision Date Author Comments
4a206ffc0bfe8e8c3fc0468a052f5b0bb625a57b 27-Mar-2012 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: oops, create m2mf for nvd9 too

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
c61205b24b79cd3708e751ed9c33970f487686ab 23-Mar-2012 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: fix thinko causing init to fail on cards without accel

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
68455a43debe26dd1d2a42c0b67dd5697c201420 04-Mar-2012 Ben Skeggs <bskeggs@redhat.com> drm/nve0: initial modesetting support for kepler chipsets

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
48aca13f0167ae78c28c6b48d82a157a6692eecb 17-Mar-2012 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: remove m2mf creation on userspace channels

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2f5394c3ed573de2ab18cdac503b8045cd16ac5e 12-Mar-2012 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: map first page of mmio early and determine chipset earlier

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
7d3a766b6aa4e293e72bfd6add477f05ac7fdf5a 01-Feb-2012 Ben Skeggs <bskeggs@redhat.com> drm/nouveau/pm: init only after display subsystem has been created

This patch fixes an oops cause by pm_trigger accessing the (uninitialised)
crtc list.

Reported-by: Roy Spliet <r.spliet@student.tudelft.nl>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
668b6c097dbaf190f5d3974798fef37aee025385 15-Dec-2011 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: rework the init/takedown ordering

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
ff92a6cda74c0a51cb723f5e224124cf74e62f25 12-Dec-2011 Ben Skeggs <bskeggs@redhat.com> drm/nv20-nv40: add memory type detection

NV20/NV30 is partially educated guesswork at this point, based on any
information around about available memory types and a horribly unspeakable
amount of vbios image scouring. I'm not entirely certain the GDDR3 define
is correct, I have not spotted a single vbios with that value yet (though
it is mentioned in some 1218-using nv4x vbios), but there are reports that
some nv3x did use it..

NV40(100914) confirmed by switching an NV49 to DDR1/DDR2 values and making
sure that the binary driver behaviour showed it had detected DDR1/DDR2
instead of GDDR3 before dying horribly.

NV40(100474) confirmed by doing much the same task as above on an NV44,
except this was *much* easier as changing the values didn't seem to have
any noticable effect on the memory controller aside from changing the
binary driver's behaviour.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
d81c19e312a22bdcebef1370f3af30a146670787 12-Dec-2011 Ben Skeggs <bskeggs@redhat.com> drm/nv20: split PFB code out of nv10_fb.c

Most functions were quite different between NV10/NV20 already, and they're
about to get even more so.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
7ad2d31cb692597f7918fce2f52a4c1949fbcf8d 10-Dec-2011 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: move vram detection funcs to chipset-specific fb code

Also, display detected memory type in logs - though, we don't even try to
detect this yet.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
466e69b8b03b8c1987367912782bc12988ad8794 19-Dec-2011 Dave Airlie <airlied@redhat.com> drm: move pci bus master enable into driver.

The current enabling of bus mastering in the drm midlayer allows a large
race condition under kexec. When a kexec'ed kernel re-enables bus mastering
for the GPU, previously setup dma blocks may cause writes to random pieces
of memory. On radeon the writeback mechanism can cause these sorts of issues.

This patch doesn't fix the problem, but it moves the bus master enable under
the individual drivers control so they can move enabling it until later in
their load cycle and close the race.

Fix for radeon kms driver will be in a follow-up patch.

Signed-off-by: Dave Airlie <airlied@redhat.com>
d099230cc355c485e556121c034b1fca5a5fd18b 17-Dec-2011 Peter Lekensteyn <lekensteyn@gmail.com> nouveau: Support Optimus models for vga_switcheroo

Newer nVidia cards with Optimus do not support/use the DSM switching functions.
Instead, it require a DSM function to be called prior to bringing a device into
D3 state. No other _DSM calls are necessary before/after enabling/disabling a
device. Switching between discrete and integrated GPU is not supported by
this Optimus _DSM call, therefore return on the switching method.

Signed-off-by: Peter Lekensteyn <lekensteyn@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
045da4e55581d9b4de135bbdbdd1b7fa98dc18a9 28-Oct-2011 Ben Skeggs <bskeggs@redhat.com> drm/nvc0/pm: initial engine reclocking

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
47e5d5cb83d4b41168f4afa1ca32843d4a126cc8 22-Nov-2011 Ben Skeggs <bskeggs@redhat.com> drm/nv40/disp: implement support for hotplug irq

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
a0b25635515ef5049f93b032a1e37f18b16e0f6f 21-Nov-2011 Ben Skeggs <bskeggs@redhat.com> drm/nouveau/gpio: reimplement as nouveau_gpio.c, fixing a number of issues

- moves out of nouveau_bios.c and demagics the logical state definitions
- simplifies chipset-specific driver interface
- makes most of gpio irq handling common, will use for nv4x hpd later
- api extended to allow both direct gpio access, and access using the
logical function states
- api extended to allow for future use of gpio extender chips
- pre-nv50 was handled very badly, the main issue being that all GPIOs
were being treated as output-only.
- fixes nvd0 so gpio changes actually stick, magic reg needs bashing

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
3376ee374d2318d311bd3aa7b9bb0186f64ccca5 12-Nov-2011 Ben Skeggs <bskeggs@redhat.com> drm/nvd0/disp: add support for page flipping

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
f62b27db6b5479efe376b408802a081a834ef50e 09-Nov-2011 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: shutdown display on suspend/hibernate

Known to fix some serious issues with hibernate on a couple of systems.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2a44e4997c5fee8e1da1589ff57e0bd1c53f03ce 09-Nov-2011 Ben Skeggs <bskeggs@redhat.com> drm/nouveau/disp: introduce proper init/fini, separate from create/destroy

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
06784090ecb3f925616fc797164a74b03d5c0968 11-Jul-2011 Ben Skeggs <bskeggs@redhat.com> drm/nvc0/gr: add initial support for nvd9, not quite there yet..

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
36f1317ed05f76bfafb442f70575cdaed6da2d8c 27-Oct-2011 Ben Skeggs <bskeggs@redhat.com> drm/nv04-nv30/pm: port to newer interfaces

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
f3fbaf34e2b1459eab248c5f0180928e7861120b 26-Oct-2011 Ben Skeggs <bskeggs@redhat.com> drm/nv50/pm: rewrite clock management, and switch to the new pm hooks

This area is horrifically complicated on these chipsets, and it's likely we
will need at least a few more tweaks yet.

Oh yes, and it's completely disabled on IGPs for the moment. From traces,
things look potentially different there yet again. Sigh...

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
6109183794a711d80c08705d477d2a19b437d5c1 22-Oct-2011 Martin Peres <martin.peres@ensi-bourges.fr> drm/nvd0: read temperature as we did on nv84+ boards

Signed-off-by: Martin Peres <martin.peres@labri.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
27d5030a235d89842ed70e18d924f017b34a496d 05-Oct-2011 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: move master modesetting init to nouveau_display

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
693461801464eb65eb779261b3d9d80dc9131f81 16-Sep-2011 Ben Skeggs <bskeggs@redhat.com> drm/nv40/pm: convert to new pwm hooks, also fixing pwm type detection

A NV49 appeared a while back that was using the "nv41 style" pwm registers,
rather than the "nv40 style" ones my board is using. This disproves the
previous theory that the pwm controller choice is chipset-specific.

So, after looking at a bunch of vbios images it appears that the next viable
theory is that we should select the pwm controller to use based on the gpio
line the fan is tied to, just like we do on nv50.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5a4267ab14b392bdf43893c6175b045b5f85d53d 16-Sep-2011 Ben Skeggs <bskeggs@redhat.com> drm/nv50/pm: convert to new fanspeed pwm controller hooks

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
cb9fa62671ace5ac40b9924e9014cebf04b78228 13-Aug-2011 Ben Skeggs <bskeggs@redhat.com> drm/nv50/pm: add support for pwm fan control

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8f27c54342dffbfbafbddd6e43f011e6cb16d285 11-Aug-2011 Ben Skeggs <bskeggs@redhat.com> drm/nouveau/vdec: implement stub modules for the known engines

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
04de6a046188d86ff60b1ede974dbf580287fc98 28-Jul-2011 Ben Skeggs <bskeggs@redhat.com> drm/nv41/pm: implement a second type of fanspeed pwm

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9232969e19ae7251a93ab72e405cf71e5109ec05 28-Jul-2011 Ben Skeggs <bskeggs@redhat.com> drm/nv40/pm: implement first type of pwm fanspeed funcs

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
1c77e0f7fa4b398652f8e03f125aed258fa7018e 28-Oct-2011 Ben Skeggs <bskeggs@redhat.com> drm/nvc0: enable acceleration for nvc1 by default

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
4c5df493eb30089ff0b8d03a50a86293f758a786 28-Oct-2011 Ben Skeggs <bskeggs@redhat.com> drm/nvc1: hacky workaround to fix accel issues

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
80859760daa01fb38497aa6326a32a16489d8c97 27-Oct-2011 Ben Skeggs <bskeggs@redhat.com> drm/nvc0: enable acceleration on 0xc8 by default

Worked well enough for glxgears and gnome-shell at least, no reason to
have this off anymore.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
ff920bfbe63f240bca6c86ee26daca8a1c43f780 22-Aug-2011 Marcin Slusarz <marcin.slusarz@gmail.com> drm/nouveau: fix printk typo in ioremap failure path

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
1262a206da7d28340dfce954e31bd5fe5ae9e2dd 18-Jul-2011 Ben Skeggs <bskeggs@redhat.com> drm/nv40/pm: write nv40-specific reclocking routines

Not 100% perfect yet, but a good start towards what it'll look like in the
end.

Actually seems stable on a NV44 I have here, as much as running around OA
for a fair amount of time constantly switching between performance levels
can prove..

My NV49 isn't quite so happy, and semaphores mess up somehow (sometimes) as
a result of the memory reclocking.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10b461e40a5a5522fe996805a0625c9cd4e5c1a7 02-Aug-2011 Ben Skeggs <bskeggs@redhat.com> drm/nv50/backlight: take the sor into account when bashing regs

I'm sure that out there somewhere, someone will need this. We currently
haven't seen an example of LVDS being on a non-0 SOR so far though.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
f2cbe46f14427914bdd191795da998588dee4b8c 21-Jul-2011 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: determine timing crystal freq from straps

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9a7824887690836448eb73ccf0d8232da2e5bee3 09-Jul-2011 Roy Spliet <r.spliet@student.tudelft.nl> drm/nouveau/pm: add initial NV3x/NVCx memtiming support, improve other cards

NV30: Create framework for memtm
NV50: Improve reg creation,
NV50: Use P.version instead of card codename/stepping,
NVC0: Initial memtiming code for Fermi,
Renamed regs for consistency,
Overall redesign to improve readability,
Avoid kfree on null-pointer

Signed-off-by: Roy Spliet <r.spliet@student.tudelft.nl>
bd57e7fc2e6d853661e4b802fe2b0ed528a93dbc 11-Jul-2011 Ben Skeggs <bskeggs@redhat.com> drm/nvd0: no page flipping at the moment

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
26f6d88b32706058866a74ecd6600b84fb82d09a 04-Jul-2011 Ben Skeggs <bskeggs@redhat.com> drm/nvd0/disp: very initial evo setup

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
4784e4aa47a1754cdd1be24fd5106b722c4c137d 04-Jul-2011 Ben Skeggs <bskeggs@redhat.com> drm/nvd0/pm: enable clock/voltage hooks

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
d7f8172ca93b61135d6db293c6440b2e97fc87ee 02-Jul-2011 Ben Skeggs <bskeggs@redhat.com> drm/nvd0/gpio: initial implementation

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
d9f61c2d2847fb2889ed01d2240db38927ab7e18 04-Jul-2011 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: initial chipset description for nvdX chipsets

All the non-stubbed functions should be okay for this chipset, the rest
will be added back as they're figured out.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
03bc9675d358ded9db07ba966f2f3f3c2fba2a9c 04-Jul-2011 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: allow modeset module option to select 'headless mode'

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
1575b3646c1c2141cfb68f7581c50d8bd19f17ac 04-Jul-2011 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: fixup init/fini sequence to deal with no CRTCs

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
048a88595a66526f68636b51b1cdb5842bc0f28c 04-Jul-2011 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: make general drm modesetting init common

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
16cd399c65bc68332a860b0b572079d0316df3ca 02-Jul-2011 Ben Skeggs <bskeggs@redhat.com> drm/nvc0/gr: unblacklist nvcf acceleration

Reported to be working.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
3c23a7b8bc6d78f906bbba5eea80b1f8b1002ef9 24-Jun-2011 Ben Skeggs <bskeggs@redhat.com> drm/nvc0/gr: add support for nvcf chipset

untested, written from a trace, accel disabled by default until it is

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
52d073318a4c32865e6439f7f6c247092a6f6af3 23-Jun-2011 Ben Skeggs <bskeggs@redhat.com> drm/nv31/mpeg: support for a single class3174 user

Uncertain if/how the hw does multiple PMPEG channels, supporting one is
better than none however.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
323dcac552b39884cdeff26a38d5dd80854795a1 23-Jun-2011 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: rename nv40_mpeg to nv31_mpeg

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
354d0781e5cef1f227ee3064cb65053365177d3b 18-Jun-2011 Ben Skeggs <bskeggs@redhat.com> drm/nvc0/pm: initial implementation of clocks_get()

Not too certain on memory clock yet, but it gets the right numbers for
each perflvl on my NVC0.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
78e2933d07124ea28593a1bdadc546294f77a504 18-Jun-2011 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: add function to wait until a callback returns true

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
ca94a71fc4d99c99871dfca528a88aab1557641c 17-Jun-2011 Ben Skeggs <bskeggs@redhat.com> drm/nva3/pm: rewrite clock_set, and switch to new interfaces

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
da1dc4cfecdf314241cc5e0c5df1f66b4cc80cc7 09-Jun-2011 Ben Skeggs <bskeggs@redhat.com> drm/nouveau/pm: allow voltage-only perflvl set, enable nvc0

Okay, my card didn't blow up. Lets turn it on!

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
3c71c2330b56ca4304b6cd0273ba861657a60a53 09-Jun-2011 Ben Skeggs <bskeggs@redhat.com> drm/nvc0/pm: enable voltage_get

I don't have a terribly good reason for not enabling voltage_set too, but,
lets wait and see.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
6c320fef5835240bf414b54e697e517a160663f4 20-Jul-2011 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: pass flag to engine fini() method on suspend

It may not be necessary to fail in certain cases (such as failing to idle)
on module unload, whereas on suspend it's important to ensure a consistent
state can be restored on resume.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
58b6542b50ded4243c26c251c0507e5f658642f6 27-Jun-2011 Jon Mason <jdmason@kudzu.us> DRM: remove drm_pci_device_is_pcie

drm_pci_device_is_pcie duplicates the funcationality of pci_is_pcie.
Convert callers of the former to the latter. This has the side benefit
of removing an unnecessary search in the PCI configuration space due to
using a saved PCIe capability offset.

[airlied: update for new callsite]

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: Dave Airlie <airlied@redhat.com>
6002525170df5f72c92ab946b6ebf1656aaec74d 01-Jul-2011 Ben Skeggs <bskeggs@redhat.com> Revert "drm/nvc0: recognise 0xdX chipsets as NV_C0"

Oh boy. That was a bad gamble. PDISP has changed.

This reverts commit cdf81a235f11c8a55023c6b181d21d519a8a5967.

Signed-off-by: Dave Airlie <airlied@redhat.com>
63305de75febc2b7f3252a8b9210e2ec84601640 17-Jun-2011 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: un-blacklist nvce accel

Reported working on IRC.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
24f246ac10ae6a6ae873045387d4501498869f74 10-Jun-2011 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: rework vram init/fini ordering a little

Commit "drm/nouveau: add some debug output if nouveau_mm busy at destroy time"
revealed an issue where vram mm takedown would actually fail due to there
still being nodes present, causing nouveau to leak a small amount of memory
on module unload.

This splits TTM/nouveau_mm a bit more cleanly and ensures nouveau_mm fini
isn't done until all gpuobjs are also destroyed.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
06b75e3552394af66cc1ee4bfb5fe01a94929adb 08-Jun-2011 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: fix display takedown order to match reverse init order

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5de8037ab466d397df17ff72382c33a908f42f6c 08-Jun-2011 Ben Skeggs <bskeggs@redhat.com> drm/nvc0: enable per-client address spaces

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
e41f26e7d18951086611bc78cc35e244bd01d1ca 07-Jun-2011 Ben Skeggs <bskeggs@redhat.com> drm/nv50: enable use of per-client gpu address space

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
fe32b16e7998bae28209834c0f7c21766d7524ec 03-Jun-2011 Ben Skeggs <bskeggs@redhat.com> drm/nv50-nvc0/vm: take client reference on shared channel vm

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
e8a863c10f4ca47e942886dddf70c35e3c2d5dd6 01-Jun-2011 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: store a per-client channel list

Removes the need to disable IRQs to lookup channel struct on every pushbuf
ioctl, among others.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
f8656f0baa316d1f08e224248e0b40ade85a4e80 31-May-2011 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: use NULL file_priv for DRM-created channels

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
3f0a68d8f8ba9d6c0cd9df948fbba90944c3da62 31-May-2011 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: allocate structure to store per-client data

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
ad830d23d31a51997ca0780dddbe919eb1bfb879 27-May-2011 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: log if accel is disabled by default on a chipset

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
aba99a8400e0b1ca9e6306e3a71013cc7a25bc29 25-May-2011 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: default to noaccel on 0xc1/0xc8/0xce for now

Until we know these should work properly, would much rather default to
noaccel than risk giving people corruption/hangs out of the box..

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
74cfad188b9e7e063ddb8d74fa20b38cbad10d79 12-May-2011 Martin Peres <martin.peres@ensi-bourges.fr> drm/nvc0: Read temperature on Fermi like we do on nv84+

Signed-off-by: Martin Peres <martin.peres@ensi-bourges.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
0897554cdd9de8a9f6f93d9ba27c7ebfae286158 14-Jun-2011 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: fix big-endian switch

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
18b54c4d5893f32641d4961563c0f196cc04dc83 25-May-2011 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: don't create accel engine objects when noaccel=1

Fixes various potential oopses.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
cdf81a235f11c8a55023c6b181d21d519a8a5967 25-May-2011 Ben Skeggs <bskeggs@redhat.com> drm/nvc0: recognise 0xdX chipsets as NV_C0

Should hopefully get modesetting at least from this, it appears these are
GF119 chipsets. Accel will come eventually, once I order a board.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
eea55c89e504a4affe66367ba3ecbae16296d9ef 18-Apr-2011 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: fix uninitialised variable warning

Looks like a false positive to me, but, anyways!

Reported-by: Jimmy Rentz <jb17bsome@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
976661093dab143f164b81f15133724fa2a4bb86 17-Apr-2011 Jimmy Rentz <jb17bsome@gmail.com> drm/nouveau: Fix a crash at card takedown for NV40 and older cards

NV40 and older cards (pre NV50) reserve a vram bo for the vga memory at
card init. This bo is then freed at card shutdown. The problem is that
the ttm bo vram manager was already freed. So a crash occurs when the
vga bo is freed. The fix is to free the vga bo prior to freeing the ttm
bo vram manager. There might be other solutions but this seemed the
simplest to me.

Signed-off-by: Jimmy Rentz <jb17bsome@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9548258fbce1e8d6fcd96bba299386f5666840ae 12-Apr-2011 Ben Skeggs <bskeggs@redhat.com> drm/nv50: support PMPEG on original nv50

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
93187450fade03e5de977af9a879683edda64a97 12-Apr-2011 Ben Skeggs <bskeggs@redhat.com> drm/nv50: rename nv84_mpeg to nv50_mpeg

In preparation for adding 0x50 support.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
c0924326c8306249aaae27016b80f3c07bb51705 04-Apr-2011 Ben Skeggs <bskeggs@redhat.com> drm/nv84: add support for PMPEG

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
a02ccc7f97d9e9121aa641aca33ba2a2978aef31 04-Apr-2011 Ben Skeggs <bskeggs@redhat.com> drm/nv40/vpe: add support for PMPEG

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
d5a27370b507be810bd32a01fe493adef7ad85d9 01-Apr-2011 Ben Skeggs <bskeggs@redhat.com> drm/nvc0: implement support for copy engines

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
7ff5441e55feb1f6f38c39f32f31aa8a0e8f4b69 18-Mar-2011 Ben Skeggs <bskeggs@redhat.com> drm/nva3: implement support for copy engine

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
a82dd49f14742e2529f79feb6360e0993277e788 01-Apr-2011 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: remove remnants of nouveau_pgraph_engine

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
96c50082904c7cefa3b01356f62268ee6d9e9f38 01-Apr-2011 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: move set_tile_region to nouveau_exec_engine

In the very least VPE (PMPEG and friends) also has this style of tile
region regs, lets make them just work if/when they get added.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
4976986bd4f51368890f57b964176ec532972543 01-Apr-2011 Ben Skeggs <bskeggs@redhat.com> drm/nv04/gr: move to exec engine interfaces

Like nv10-nv50, needs cleanup.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
d11db279014e881da9f5259c963501b33a413929 31-Mar-2011 Ben Skeggs <bskeggs@redhat.com> drm/nv10/gr: move to exec engine interfaces

Like nv20-nv50, needs cleanup.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
a0b1de84fed49a055a3ecbfab67ff9cdea81aa6f 31-Mar-2011 Ben Skeggs <bskeggs@redhat.com> drm/nv20-nv30/gr: move to exec engine interface

A bit of cleanup done along the way, but, like nv40/nv50, needs more.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
39c8d368273bca9b5f309f9feadfc8575c9fd993 01-Apr-2011 Ben Skeggs <bskeggs@redhat.com> drm/nv40/gr: move to exec engine interfaces

Like nv50, this needs a good cleanup.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
7a45cd19c95a383d81a7b2f5297958c0c16b5a08 01-Apr-2011 Ben Skeggs <bskeggs@redhat.com> drm/nvc0/gr: move to exec engine interfaces

Much nicer to do that nv50, the code was pretty much written to expect
such a change in the future.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2703c21a82301f5c31ba5679e2d56422bd4cd404 01-Apr-2011 Ben Skeggs <bskeggs@redhat.com> drm/nv50/gr: move to exec engine interfaces

This needs a massive cleanup, but to catch bugs from the interface changes
vs the engine code cleanup, this will be done later.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
6dfdd7a61e8fc25552d9de1cb25272324dfc4c13 31-Mar-2011 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: working towards a common way to represent engines

There's lots of more-or-less independant engines present on NVIDIA GPUs
these days, and we generally want to perform the same operations on them.
Implementing new ones requires hooking into lots of different places,
the aim of this work is to make this simpler and cleaner.

NV84:NV98 PCRYPT moved over as a test.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
4ea52f8974392b39ffb192fd31de80dc65b52657 31-Mar-2011 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: move engine object creation into per-engine hooks

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
50066f8117d79163b96d3bf778c41961be1fe5cd 27-Mar-2011 Roy Spliet <r.spliet@student.tudelft.nl> drm/nouveau: improve memtiming table parsing

Improves the parsing of the memory timing table on NV50-NV98revA1 chipsets.

Added stepping to drm_nouveau_private to make sure newer NV98 (105M) is
zero rather than incorrect.

Signed-off-by: Roy Spliet <r.spliet@student.tudelft.nl>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
f212949ced2397b5f00e987bb5d4bb34dc69cc8d 20-Mar-2011 Emil Velikov <emil.l.velikov@gmail.com> drm/nouveau: Clean up trailing whitespace and C99-style comments.

Fix 'ERROR: trailing whitespace',
Fix 'ERROR: do not use C99 // comments'

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
7a7b94ad8ce3e24d4dd97b45583911e0f03aecd6 17-Apr-2011 Jimmy Rentz <jb17bsome@gmail.com> drm/nouveau: Fix a crash at card takedown for NV40 and older cards

NV40 and older cards (pre NV50) reserve a vram bo for the vga memory at
card init. This bo is then freed at card shutdown. The problem is that
the ttm bo vram manager was already freed. So a crash occurs when the
vga bo is freed. The fix is to free the vga bo prior to freeing the ttm
bo vram manager. There might be other solutions but this seemed the
simplest to me.

Signed-off-by: Jimmy Rentz <jb17bsome@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
04eb34a43ce5168e05e2748bd46a62a09289cdde 06-Apr-2011 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: split ramin_lock into two locks, one hardirq safe

Fixes a possible lock ordering reversal between context_switch_lock
and ramin_lock.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2b4cebe4e165b0ef30a138e4cf602538dea15583 29-Mar-2011 Ben Skeggs <bskeggs@redhat.com> drm/nv50: use "nv86" tlb flush method on everything except 0x50/0xac

It has been reported that this greatly improves (and possibly fixes
completely) the stability of NVA3+ chipsets. In traces of my NVA8,
NVIDIA now appear to be doing this too.

The most recent traces of 0x50 and 0xac I could find don't show NVIDIA
checking PGRAPH status on these flushes, so for now, we won't either.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
25985edcedea6396277003854657b5f3cb31a628 31-Mar-2011 Lucas De Marchi <lucas.demarchi@profusion.mobi> Fix common misspellings

Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
7eae3efa13c5d1c8e7d8dd0504ad524963b8add1 23-Mar-2011 Matthew Garrett <mjg@redhat.com> nouveau: change the backlight parent device to the connector, not the PCI dev

We may eventually end up with per-connector backlights, especially with
ddcci devices. Make sure that the parent node for the backlight device is
the connector rather than the PCI device.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: David Airlie <airlied@linux.ie>
Cc: Alex Deucher <alexdeucher@gmail.com>
Acked-by: Ben Skeggs <bskeggs@redhat.com>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Len Brown <lenb@kernel.org>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Tested-by: Sedat Dilek <sedat.dilek@googlemail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
d550c41e4ff11fe69b5f92868157253d27937d1f 15-Feb-2011 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: remove no_vm/mappable flags from nouveau_bo

'mappable' isn't really used at all, nor is it necessary anymore as the
bo code is capable of moving buffers to mappable vram as required.

'no_vm' isn't necessary anymore either, any places that don't want to be
mapped into a GPU address space should allocate the VRAM directly instead.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
bd2f2037a42d4657ead3be2918db22e63626cd35 08-Feb-2011 Ben Skeggs <bskeggs@redhat.com> drm/nvc0: support for sw methods + enable page flipping

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
d7117e0d4e21034202833088e51fc21f8c8271f9 07-Feb-2011 Ben Skeggs <bskeggs@redhat.com> drm/nv50: enable page flipping

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
d82f8e6c802bb1244ce590d3877f7c66a8fb0ff0 26-Jan-2011 Tejun Heo <tj@kernel.org> drm/nouveau: use system_wq instead of dev_priv->wq

With cmwq, there's no reason for nouveau to use a dedicated workqueue.
Drop dev_priv->wq and use system_wq instead. Each work item is sync
flushed when the containing structure is unregistered/destroyed.

Note that this change also makes sure that nv50_gpio_handler is not
freed while the contained work item is still running.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: David Airlie <airlied@linux.ie>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8410ea3b95d105a5be5db501656f44bbb91197c1 14-Dec-2010 Dave Airlie <airlied@gmail.com> drm: rework PCI/platform driver interface.

This abstracts the pci/platform interface out a step further,
we can go further but this is far enough for now to allow USB
to be plugged in.

The drivers now just call the init code directly for their
device type.

Signed-off-by: Dave Airlie <airlied@redhat.com>
5bcf719b7db0f9366cedaf102b081f99b1c325ae 07-Dec-2010 Dave Airlie <airlied@redhat.com> drm/switcheroo: track state of switch in drivers.

We need to track the state of the switch in drivers, so that after s/r
we don't resume the card we've explicitly switched off before. Also
don't allow a userspace open to occur if we've switched the gpu off.

Signed-off-by: Dave Airlie <airlied@redhat.com>
8d608aa6295242fe4c4b6105b8c59c6a5b232d89 06-Dec-2010 Dave Airlie <airlied@redhat.com> vga_switcheroo: add reprobe hook for fbcon to recheck connected outputs.

This adds a hook after the mux is switched for the driver to reprobe
the connected outputs.

Signed-off-by: Dave Airlie <airlied@redhat.com>
5ccb377feaaff3daa1e9a179534bbd7550d78af6 07-Dec-2010 Dave Airlie <airlied@redhat.com> drm/nouveau: add delayed switch complete callback.

this just adds the callback on the delayed switch mechanism.

Signed-off-by: Dave Airlie <airlied@redhat.com>
5216782bf8c195de3befe0742a877c987dd3c4fd 24-Nov-2010 Ben Skeggs <bskeggs@redhat.com> drm/nvc0: skip dma object creation for drm channel

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8984e046153eb1d6b0b24626169f9c6e58232e1b 15-Nov-2010 Ben Skeggs <bskeggs@redhat.com> drm/nvc0: initial vm implementation, use for bar1/bar3 management

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
60d2a88ae896ae51c76f8b15c2f4b762d5b00864 06-Dec-2010 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: kick vram functions out into an "engine"

NVC0 will be able to share some of nv50's paths this way. This also makes
it the card-specific vram code responsible for deciding if a given set
of tile_flags is valid, rather than duplicating the allowed types in
nv50_vram.c and nouveau_gem.c

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12fb9525075982bc65cfd71427dd7afdf47bafed 19-Nov-2010 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: introduce a util function to wait on reg != val

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
7f4a195fcbd8b16f25f1de7f1419414d7505daa5 16-Nov-2010 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: tidy up and extend dma object creation interfaces

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
6d6c5a157af45a5bd50ab913b07d826811a9ea0a 16-Nov-2010 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: remove some useless GETPARAMs

These have been unused since UMS support was ripped out, so lets remove
them completely.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2cb3d3b6c64d37514fd8865748de66ff35a489af 15-Nov-2010 Ben Skeggs <bskeggs@redhat.com> drm/nv84: fix minor issues in PCRYPT implementation

Fix running of destroy_context() when create_context() has never been
called for the channel, and fill in engine's tlb_flush() function pointer.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
e41115d0ad5c40a7ea4d85b1c77b4c02185a5581 01-Nov-2010 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: rework gpu-specific instmem interfaces

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
fce2bad0ee2666d6a10bfeb634b1021469cc3d79 11-Nov-2010 Ben Skeggs <bskeggs@redhat.com> drm/nv50: rework PGPIO IRQ handling and hotplug detection

Allows callers to install their own handlers for when a GPIO line
changes state (such as for hotplug detect).

This also fixes a bug where we weren't acknowledging the GPIO IRQ
until after the bottom half had run, causing a severe IRQ storm
in some cases.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5178d40dff23b5eef7f0a3be2411fa6a347e750d 03-Nov-2010 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: move PFIFO ISR into nv04_fifo.c

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2cbd4c818578ef8f2e486dc77267ead1e503c637 03-Nov-2010 Ben Skeggs <bskeggs@redhat.com> drm/nv50: move GPIO ISR to nv50_gpio.c

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
a5cf68b04b2b8ea716cf6fd8499c1c54d05fdf5e 24-Oct-2010 Francisco Jerez <currojerez@riseup.net> drm/nouveau: Rework tile region handling.

The point is to share more code between the PFB/PGRAPH tile region
hooks, and give the hardware specific functions a chance to allocate
per-region resources.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
332b242f47786d1a43bd7a19a0513dd5d493db8e 20-Oct-2010 Francisco Jerez <currojerez@riseup.net> drm/nouveau: Implement the pageflip ioctl.

nv0x-nv4x should be mostly fine, nv50 doesn't work yet.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
042206c0cd4924879c4292c5ffa2bf1e8023ae5a 21-Oct-2010 Francisco Jerez <currojerez@riseup.net> drm/nouveau: Implement the vblank DRM hooks.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5f80198e43cf96542923269ccb607052e5f144cc 22-Oct-2010 Ben Skeggs <bskeggs@redhat.com> drm/nv50: regression fix, point NVAA/NVAC at correct PM functions

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
35fa2f2ad161024e735fb0cd571cb92e50171afd 21-Oct-2010 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: add support for MSI

Only supported on NV50+ so far, and disabled by default currently. The
module parameter "msi=1" will enable it.

There's a kernel bug which will cause this to fail if the module (or the
NVIDIA binary driver) has ever been loaded before loading nouveau with
MSI enabled. As such, this is only safe to enable if you have nouveau
load on boot, and don't wish to ever reload it.

The workaround is to "echo 0 > /sys/bus/pci/devices/<device>/enable"
until the enable count reads 0. Then you should be able to load nouveau
with MSI enabled.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
bd2e597de8dbd000a3977871f15cb81e2925d63e 19-Oct-2010 Ben Skeggs <bskeggs@redhat.com> drm/nv84: add support for the PCRYPT engine

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
b8c157d3a9a13871742c8a8d3d4598c3791ed5f5 20-Oct-2010 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: only expose the object classes that are supported by the chipset

We previously added all the available classes for the entire generation,
even though the objects wouldn't work on the hardware.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
0541324abce0225a795222558fdfe35c8dbc5b4f 18-Oct-2010 Francisco Jerez <currojerez@riseup.net> drm/nv40: Ignore sync-to-vblank active when waiting for idle.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
36c952e8b3bad911ef13111058f0a5c4b361027e 18-Oct-2010 Francisco Jerez <currojerez@riseup.net> drm/nouveau: Fix lock unbalance on card take down.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
3945e47543863385b54d94c94b023ee7ca9df972 18-Oct-2010 Francisco Jerez <currojerez@riseup.net> drm/nouveau: Refactor context destruction to avoid a lock ordering issue.

The destroy_context() engine hooks call gpuobj management functions to
release the channel resources, these functions use HARDIRQ-unsafe locks
whereas destroy_context() is called with the HARDIRQ-safe
context_switch_lock held, that's a lock ordering violation.

Push the engine-specific channel destruction logic into destroy_context()
and let the hardware-specific code lock and unlock when it's actually
needed. Change the engine destruction order to avoid a race in the small
gap between pgraph and pfifo context uninitialization.

Reported-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
cff5c1332486ced8ff4180e957e04983cb72a39e 06-Oct-2010 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: add more fine-grained locking to channel list + structures

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
56ac7475350ee646f5f7316abcdf65d3be94da1c 22-Oct-2010 Ben Skeggs <bskeggs@redhat.com> drm/nv50: implement possible workaround for NV86 PGRAPH TLB flush hang

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
f13b32630dda7e583a84a8c535880cff7e4a9bdd 10-Oct-2010 Francisco Jerez <currojerez@riseup.net> drm/nouveau: Expose some BO usage flags to userspace.

This will be needed for Z compression and to take smarter placement
decisions.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Acked-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
1397b42b5a2e5b3b982078c89f3594c123e3c2b3 12-Oct-2010 Francisco Jerez <currojerez@riseup.net> drm/nouveau: Reduce severity of the unknown getparam error.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Acked-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
0c6c1c2fb8b0fd4340f78db20ee7f35d2a810907 22-Sep-2010 Francisco Jerez <currojerez@riseup.net> drm/nouveau: Use semaphores to handle inter-channel sync in hardware.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
fade7ad56d929e168ead0f75e591468afa2fe97c 27-Sep-2010 Ben Skeggs <bskeggs@redhat.com> drm/nva3: split pm backend out from nv50

This will end up quite different, it makes sense for it to be completely
separate.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8155cac489eb8cc6fd96b9bdefacdf5a56e6ea32 23-Sep-2010 Francisco Jerez <currojerez@riseup.net> drm/nouveau: Refactor nouveau_temp_get() into engine pointers.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
442b626ece6fbbe7f52c03a09f85ae5755f29eab 16-Sep-2010 Ben Skeggs <bskeggs@redhat.com> drm/nv04-nv40: import initial pm backend

Currently just hooked up to the already-existing nouveau_hw, which should
handle all relevant chipsets as well as we currently can.

This will likely be eventually split out and improved into chipset specific
code at a later point.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
02c30ca0a1d6d8b878fc32f47b3b25192ef4a8ef 16-Sep-2010 Ben Skeggs <bskeggs@redhat.com> drm/nv50: import initial clock get/set routines + hook up pm engine

This will make nouveau_pm attempt to report the card's current performance
level both during bootup, and through sysfs.

This is a very initial implementation, and can be improved a *lot*

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
330c5988ee78045e6a731c3693251aaa5b0d14e3 16-Sep-2010 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: import initial work on vbios performance table parsing

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9f56b1265d66f6698e3155529e6c5d0c34b37afa 07-Sep-2010 Francisco Jerez <currojerez@riseup.net> drm/nouveau: Simplify tile region handling.

Instead of emptying the caches to avoid a race with the PFIFO puller,
go straight ahead and try to recover from it when it happens. Also,
kill pfifo->cache_flush and tile->lock, we don't need them anymore.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
4b5c152a79d512803ea525b0878ccef627cd1629 07-Sep-2010 Francisco Jerez <currojerez@riseup.net> drm/nouveau: Remove implicit argument from nv_wait().

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
fbd2895e45aebdb3d3ea73a3a796cf3bb9c912da 01-Sep-2010 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: rework init ordering so nv50_instmem.c can be less bad

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
a8eaebc6c52bb0cd243b4cb421068f42d378be9c 01-Sep-2010 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: remove nouveau_gpuobj_ref completely, replace with sanity

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
4b223eefe43d201c323d120a01dbd0dcbba64e6d 03-Aug-2010 Ben Skeggs <bskeggs@redhat.com> drm/nvc0: starting point for GF100 support, everything stubbed

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
a0d069ea2c7b81a453d258c7f60e1f61a3fcbd9f 30-Jul-2010 Dan Carpenter <error27@gmail.com> drm/nouveau: unwind on load errors

nouveau_load() just returned directly if there was an error instead of
releasing resources.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
ee2e013131dcf6427334663662dbe760ccdba735 26-Jul-2010 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: introduce gpio engine

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
c88c2e0631b03ffb1485f8790a5b659beb1ac0be 24-Jul-2010 Francisco Jerez <currojerez@riseup.net> drm/nouveau: Move display init to a new nouveau_engine.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8bded189552800cae6c333475a54dabe048a74aa 21-Jul-2010 Francisco Jerez <currojerez@riseup.net> drm/nv30: Init the PFB+0x3xx memory timing regs.

Fixes the randomly flashing vertical lines seen on some nv3x after a
cold-boot.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
734ee8357ac2685a306acd598826d5eb8a3fca30 15-Jul-2010 Ben Skeggs <bskeggs@redhat.com> drm/nv50: use correct PRAMIN flush register on original nv50

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
e88efe056d308d0a3b6b645d0eec7236b2d8c902 09-Jul-2010 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: initialise display before enabling interrupts

In some situations it's possible we can receive a spurious hotplug IRQ
before we're ready to handle it, leading to an oops.

Calling the display init before enabling interrupts should clear any
pending IRQs on the GPU and prevent this from happening.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
f56cb86f9abd229418f894a8ffedfb9ff465c181 08-Jul-2010 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: add instmem flush() hook

This removes the previous prepare_access() and finish_access() hooks, and
replaces it with a much simpler flush() hook.

All the chipset-specific code before nv50 has its use removed completely,
as it's not required there at all.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
b6d3d8717855c72e541bace5edd0460f2eed6dde 07-Jun-2010 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: remove dev_priv->init_state and friends

Nouveau will no longer load at all if card initialisation fails, so all
these checks are unnecessary.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
cd0b072f95b3dbee5d7b97f52edc40f00d5d28e1 01-Jun-2010 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: remove left-over !DRIVER_MODESET paths

It's far preferable to have the driver do nothing at all for "nomodeset".

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
6d696305530c0b3fcd7d15ad87d7203cb53df5b7 02-Jun-2010 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: completely fail init if we fail to map the PRAMIN BAR

On cards where there's a specific BAR for PRAMIN, we used to try and fall
back to the "legacy" aperture within the mmio BAR.

This is doomed to cause problems, so lets just fail completely as there's
obviously something else very wrong anyway.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
fbf81762e385d3d45acad057b654d56972acf58c 01-Jun-2010 Dave Airlie <airlied@redhat.com> drm/kms: disable/enable poll around switcheroo on/off

Because we aren't in a suspend state the poll will still run when we have switcherooed a card off.

Signed-off-by: Dave Airlie <airlied@redhat.com>
7fc74f17e6c9b4d86371c3a947afc32bd6bc9691 23-May-2010 Marcin Kościelnicki <koriakin@0x04.net> drm/nouveau: Add getparam for current PTIMER time.

This will be useful for computing GPU-CPU latency, including
GL_ARB_timer_query extension.

Signed-off-by: Marcin Kościelnicki <koriakin@0x04.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
eb1f8e4f3be898df808e2dfc131099f5831d491d 07-May-2010 Dave Airlie <airlied@redhat.com> drm/fbdev: rework output polling to be back in the core. (v4)

After thinking it over a lot it made more sense for the core to deal with
the output polling especially so it can notify X.

v2: drop plans for fake connector - per Michel's comments - fix X patch sent to xorg-devel, add intel polled/hpd setting, add initial nouveau polled/hpd settings.

v3: add config lock take inside polling, add intel/nouveau poll init/fini calls

v4: config lock was a bit agressive, only needed around connector list reading.
otherwise it could re-enter.

glisse: discard drm_helper_hpd_irq_event

v3: Reviewed-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
3b9676e7ac6eff4f50f1b48b6c36664f55b79507 16-May-2010 Marcin Slusarz <marcin.slusarz@gmail.com> vga16fb, drm: vga16fb->drm handoff

let vga16fb claim 0xA0000+0x10000 region as its aperture;
drm drivers don't use it, so we have to detect it and kick
vga16fb manually - but only if drm is driving the primary card

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: James Simmons <jsimmons@infradead.org>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
06415c564fb98562a4d6b6215615deb2d1cc0dae 16-May-2010 Marcin Slusarz <marcin.slusarz@gmail.com> fbmem, drm/nouveau: kick firmware framebuffers as soon as possible

Currently vesafb/efifb/... is kicked when hardware driver is registering
framebuffer. To do it hardware must be fully functional, so there's a short
window between start of initialisation and framebuffer registration when
two drivers touch the hardware. Unfortunately sometimes it breaks nouveau
initialisation.

Fix it by kicking firmware driver(s) before we start touching the hardware.

Reported-by: Didier Spaier <didier.spaier@epsm.fr>
Tested-by: Didier Spaier <didier.spaier@epsm.fr>
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: Peter Jones <pjones@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
78bb35129e9400fb50580e971d964563fc8e0218 25-Mar-2010 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: fixup the init failure paths some more

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
a76fb4e8ffe42144529e21fe1e609b762e8eb5cc 18-Mar-2010 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: detect vram amount once, and save the value

As opposed to repeatedly reading the amount back from the GPU every
time we need to know the VRAM size.

We should now fail to load gracefully on detecting no VRAM, rather than
something potentially messy happening.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
386516744ba45d50f42c6999151cc210cb4f96e4 30-Mar-2010 Dave Airlie <airlied@redhat.com> drm/fb: fix fbdev object model + cleanup properly.

The fbdev layer in the kms code should act like a consumer of the kms services and avoid having relying on information being store in the kms core structures in order for it to work.

This patch

a) removes the info pointer/psuedo palette from the core drm_framebuffer structure and moves it to the fbdev helper layer, it also removes the core drm keeping a list of kernel kms fbdevs.
b) migrated all the fb helper functions out of the crtc helper file into the fb helper file.
c) pushed the fb probing/hotplug control into the driver
d) makes the surface sizes into a structure for ease of passing
This changes the intel/radeon/nouveau drivers to use the new helper.

Signed-off-by: Dave Airlie <airlied@redhat.com>
5a0e3ad6af8660be21ca98a971cd00f331318c05 24-Mar-2010 Tejun Heo <tj@kernel.org> include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h

percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.

2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).

* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
304424e17dd904cef048ef8966d9f54618a915cc 01-Mar-2010 Marcin Kościelnicki <koriakin@0x04.net> drm/nv50: Improve PGRAPH interrupt handling.

This makes nouveau recognise and report more kinds of PGRAPH errors, as
well as prevent GPU lockups resulting from some of them.

Lots of guesswork was involved and some part of this is probably
incorrect. Some potential-lockuop situations are handled by just
resetting a whole PGRAPH subunit, which doesn't sound like a "proper"
solution, but seems to work just fine... for now.

Signed-off-by: Marcin Kościelnicki <koriakin@0x04.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
6a9ee8af344e3bd7dbd61e67037096cdf7f83289 01-Feb-2010 Dave Airlie <airlied@linux.ie> vga_switcheroo: initial implementation (v15)

Many new laptops now come with 2 gpus, one to be used for low power
modes and one for gaming/on-ac applications. These GPUs are typically
wired to the laptop panel and VGA ports via a multiplexer unit which
is controlled via ACPI methods.

4 combinations of systems typically exist - with 2 ACPI methods.
Intel/ATI - Lenovo W500/T500 - use ATPX ACPI method
ATI/ATI - some ASUS - use ATPX ACPI Method
Intel/Nvidia - - use _DSM ACPI method
Nvidia/Nvidia - - use _DSM ACPI method.

TODO:
This patch adds support for the ATPX method and initial bits
for the _DSM methods that need to written by someone with
access to the hardware.
Add a proper non-debugfs interface - need to get some proper
testing first.

v2: add power up/down support for both devices
on W500 puts i915/radeon into D3 and cuts power to radeon.

v3: redo probing methods, no DMI list, drm devices call to
register with switcheroo, it tries to find an ATPX method on
any device and once there is two devices + ATPX it inits the
switcher.

v4: ATPX msg handling using buffers - should work on more machines

v5: rearchitect after more mjg59 discussion - move ATPX handling to
radeon driver.

v6: add file headers + initial nouveau bits (to be filled out).

v7: merge delayed switcher code.

v8: avoid suspend/resume of gpu that is off

v9: rearchitect - mjg59 is always right. - move all ATPX code to
radeon, should allow simpler DSM also proper ATRM handling

v10: add ATRM support for radeon BIOS, add mutex to lock vgasr_priv

v11: fix bug in resuming Intel for 2nd time.

v12: start fixing up nvidia code blindly.

v13: blindly guess at finishing nvidia code

v14: remove radeon audio hacks - fix up intel resume more like upstream

v15: clean up printks + remove unnecessary igd/dis pointers

mount debugfs

/sys/kernel/debug/vgaswitcheroo/switch - should exist if ATPX detected
+ 2 cards.

DIS - immediate change to discrete
IGD - immediate change to IGD
DDIS - delayed change to discrete
DIGD - delayed change to IGD
ON - turn on not in use
OFF - turn off not in use

Tested on W500 (Intel/ATI) and T500 (Intel/ATI)

Signed-off-by: Dave Airlie <airlied@redhat.com>
a1606a9596e54da90ad6209071b357a4c1b0fa82 12-Feb-2010 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: new gem pushbuf interface, bump to 0.0.16

This commit breaks the userspace interface, and requires a new libdrm for
nouveau to operate again.

The multiple GEM_PUSHBUF ioctls that were present in 0.0.15 for
compatibility purposes are now gone, and replaced with the new ioctl which
allows for multiple push buffers to be submitted (necessary for hw index
buffers in the nv50 3d driver) and relocations to be applied on any buffer.

A number of other ioctls (CARD_INIT, GEM_PIN, GEM_UNPIN) that were needed
for userspace modesetting have also been removed.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
ff9e5279b14dc024599cc705ee199dadb94e90a3 01-Feb-2010 Maarten Maathuis <madman2003@gmail.com> drm/nouveau: protect channel create/destroy and irq handler with a spinlock

The nv50 pgraph handler (for example) could reenable pgraph fifo access
and that would be bad when pgraph context is being unloaded (we need the
guarantee a ctxprog isn't running).

Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
9967b9481d2387af4dbe5ceda7a209466ba004a0 08-Feb-2010 Marcin Kościelnicki <koriakin@0x04.net> drm/nouveau: Add proper vgaarb support.

Signed-off-by: Marcin Kościelnicki <koriakin@0x04.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
69c9700b544e496dc3ccf472a4f3a76dcf4abaf7 26-Jan-2010 Marcin Kościelnicki <koriakin@0x04.net> drm/nouveau: Add getparam to get available PGRAPH units.

On nv50, this will be needed by applications using CUDA to know
how much stack/local memory to allocate.

Signed-off-by: Marcin Kościelnicki <koriakin@0x04.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
a32ed69d7bb3cd259d813d71281d62993b9a70fd 26-Jan-2010 Marcin Kościelnicki <koriakin@0x04.net> drm/nouveau: Add module options to disable acceleration.

noaccel=1 disables all acceleration and doesn't even attempt
initialising PGRAPH+PFIFO, nofbaccel=1 only makes fbcon unaccelerated.

Signed-off-by: Marcin Kościelnicki <koriakin@0x04.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
71666475018a3024fb49499096d26a9350349e8b 16-Jan-2010 Luca Barbieri <luca@luca-barbieri.com> drm/nouveau: Evict buffers in VRAM before freeing sgdma

Currently, we take down the sgdma engine without evicting all buffers
from VRAM.

The TTM device release will try to evict anything in VRAM to GART
memory, but this will fail since sgdma has already been taken down.

This causes an infinite loop in kernel mode on module unload.
It usually doesn't happen because there aren't any buffer on close.
However, if the GPU is locked up, this condition is easily triggered.

This patch fixes it in the simplest way possible by cleaning VRAM
right before cleaning SGDMA memory.

Signed-off-by: Luca Barbieri <luca@luca-barbieri.com>
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
cc6e496587502057af02139931736b0b7a49f637 07-Jan-2010 Ben Skeggs <bskeggs@redhat.com> drm/nv04: differentiate between nv04/nv05

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8f71c29e442e013212a98e2b37eb1074c4d1134f 22-Dec-2009 Francisco Jerez <currojerez@riseup.net> drm/nouveau: Don't skip card take down on nv0x.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
0d87c100312ce75d9bb75a456d8a542e84a1722f 16-Dec-2009 Francisco Jerez <currojerez@riseup.net> drm/nouveau: Pre-G80 tiling support.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
617e234b01757698ed5f8c9a5fbf12717b76e371 13-Dec-2009 Francisco Jerez <currojerez@riseup.net> drm/nouveau: Add cache_flush/pull fifo engine functions.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
1dee7a930bfddd69825fca3e3f9541c8a5333876 07-Jan-2010 Ben Skeggs <bskeggs@redhat.com> drm/nv04: differentiate between nv04/nv05

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
111b459af191891f49682f21e11f348703cd8bdd 22-Dec-2009 Francisco Jerez <currojerez@riseup.net> drm/nouveau: Don't skip card take down on nv0x.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
cb00f7c1419d09ee0daf7d8bed86f253d98db7b4 16-Dec-2009 Francisco Jerez <currojerez@riseup.net> drm/nouveau: Pre-G80 tiling support.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
588d7d1268658b6a010eb7415bff2f936c51acf7 13-Dec-2009 Francisco Jerez <currojerez@riseup.net> drm/nouveau: Add cache_flush/pull fifo engine functions.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
0735f62e116fae1e4f36237a97de28e8a56b4c2c 16-Dec-2009 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: prevent all channel creation if accel not available

Previously, if there was no firmware available, the DRM would just
disable channel creation from userspace, but still use a single
channel for its own purposes.

With a bit of care it should actually be possible to do this, due
to the DRM's very limited use of the engine. It currently doesn't
work correctly however, resulting in corrupted fbcon and hangs on
a number of cards.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
c5804be0627508487bd9eacebf9de7f807e5d4e7 14-Dec-2009 Marcin Kościelnicki <koriakin@0x04.net> drm/nouveau: Add proper error handling to nouveau_card_init

Signed-off-by: Marcin Kościelnicki <koriakin@0x04.net>
Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
6ee738610f41b59733f63718f0bdbcba7d3a3f12 11-Dec-2009 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: Add DRM driver for NVIDIA GPUs

This adds a drm/kms staging non-API stable driver for GPUs from NVIDIA.

This driver is a KMS-based driver and requires a compatible nouveau
userspace libdrm and nouveau X.org driver.

This driver requires firmware files not available in this kernel tree,
interested parties can find them via the nouveau project git archive.

This driver is reverse engineered, and is in no way supported by nVidia.

Support for nearly the complete range of nvidia hw from nv04->g80 (nv50)
is available, and the kms driver should support driving nearly all
output types (displayport is under development still) along with supporting
suspend/resume.

This work is all from the upstream nouveau project found at
nouveau.freedesktop.org.

The original authors list from nouveau git tree is:
Anssi Hannula <anssi.hannula@iki.fi>
Ben Skeggs <bskeggs@redhat.com>
Francisco Jerez <currojerez@riseup.net>
Maarten Maathuis <madman2003@gmail.com>
Marcin Kościelnicki <koriakin@0x04.net>
Matthew Garrett <mjg@redhat.com>
Matt Parnell <mparnell@gmail.com>
Patrice Mandin <patmandin@gmail.com>
Pekka Paalanen <pq@iki.fi>
Xavier Chantry <shiningxc@gmail.com>
along with project founder Stephane Marchesin <marchesin@icps.u-strasbg.fr>

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>