History log of /linux-master/drivers/gpu/drm/nouveau/nouveau_bios.c
Revision Date Author Comments
# cf92bb77 11-Apr-2024 Mikhail Kobuk <m.kobuk@ispras.ru>

drm: nv04: Fix out of bounds access

When Output Resource (dcb->or) value is assigned in
fabricate_dcb_output(), there may be out of bounds access to
dac_users array in case dcb->or is zero because ffs(dcb->or) is
used as index there.
The 'or' argument of fabricate_dcb_output() must be interpreted as a
number of bit to set, not value.

Utilize macros from 'enum nouveau_or' in calls instead of hardcoding.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 2e5702aff395 ("drm/nouveau: fabricate DCB encoder table for iMac G4")
Fixes: 670820c0e6a9 ("drm/nouveau: Workaround incorrect DCB entry on a GeForce3 Ti 200.")
Signed-off-by: Mikhail Kobuk <m.kobuk@ispras.ru>
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240411110854.16701-1-m.kobuk@ispras.ru


# e672f5f3 18-Sep-2023 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/kms/tu102-: disable vbios parsing when running on RM

- on HW, parts of this will still be used to support LVDS
- LVDS appears to have dissapeared before Turing, so this won't be
needed at all when running on RM

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230918202149.4343-31-skeggsb@gmail.com


# 073bde45 19-Sep-2023 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/kms/nv50-: disable dcb parsing

- nvkm should provide all this info now
- preparation for GSP-RM

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Acked-by: Danilo Krummrich <me@dakr.org>
Signed-off-by: Lyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230919220442.202488-45-lyude@redhat.com


# 1b255f1c 01-Jun-2022 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/disp: add output class

Will be used to more cleanly implement existing method interfaces that
take some confusing (IEDTkey, inherited from VBIOS, which RM no longer
uses on Ampere) match values to determine which display path to operate
on.

Methods will be protected from racing with supervisor, and from being
called where they shouldn't be (ie. without an OR assigned).

v2:
- use ?: (lyude)
v3:
- fix return code if noacquire() method fails

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


# 78ad449d 19-Mar-2021 Jiapeng Chong <jiapeng.chong@linux.alibaba.com>

drm/nouveau: Remove unused variable ret

Fix the following coccicheck warnings:

./drivers/gpu/drm/nouveau/nouveau_bios.c:2048:5-8: Unneeded variable:
"ret". Return "0" on line 2061.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Link: https://gitlab.freedesktop.org/drm/nouveau/-/merge_requests/10


# 09b20988 22-Jan-2021 Ye Bin <yebin10@huawei.com>

drm/nouveau: remove set but not used variable ‘pdev’ in nouveau_bios_init

Fix follow warning:
drivers/gpu/drm/nouveau/nouveau_bios.c:2086:18: warning: variable ‘pdev’ set but not used [-Wunused-but-set-variable]
struct pci_dev *pdev;
^~~~

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ye Bin <yebin10@huawei.com>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20210123013014.3815870-1-yebin10@huawei.com


# b9377df1 22-Jan-2021 Ye Bin <yebin10@huawei.com>

drm/nouveau: remove set but not used variable ‘pdev’ in nouveau_bios_init

Fix follow warning:
drivers/gpu/drm/nouveau/nouveau_bios.c:2086:18: warning: variable ‘pdev’ set but not used [-Wunused-but-set-variable]
struct pci_dev *pdev;
^~~~

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ye Bin <yebin10@huawei.com>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20210123013014.3815870-1-yebin10@huawei.com
(cherry picked from commit 09b20988ff29eecc422484c266bee61b2fe58d8c)
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>


# 4c0d42f7 07-Jan-2021 Thomas Zimmermann <tzimmermann@suse.de>

drm/nouveau: Remove references to struct drm_device.pdev

Using struct drm_device.pdev is deprecated. Convert nouveau to struct
drm_device.dev. No functional changes.

v3:
* fix nv04_dfp_update_backlight() as well (Jeremy)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jeremy Cline <jcline@redhat.com>
Cc: Ben Skeggs <bskeggs@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210107080748.4768-8-tzimmermann@suse.de


# 607db661 02-Jun-2019 Rhys Kidd <rhyskidd@gmail.com>

drm/nouveau/bios: downgrade absence of tmds table to info from an error

Absence of a TMDS Info Table is common on Optimus setups where the NVIDIA
gpu is not connected directly to any outputs.

Reporting an error in this scenario is too harsh. Accordingly, change the
error message to an info message.

By default the error message also causes a boot flicker for these sytems.

Signed-off-by: Rhys Kidd <rhyskidd@gmail.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# 690ae20c 19-May-2019 Sam Ravnborg <sam@ravnborg.org>

drm/nouveau: drop use of drmp.h

Drop use of the deprecated drmP.h file from drm/nouveau.

Build tested using allyesconfig and allmodconfig.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: nouveau@lists.freedesktop.org
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# 1a5c8164 02-Nov-2017 Colin Ian King <colin.king@canonical.com>

drm/nouveau/bios: make const arrays hwsq_signature and edid_sig static

Don't populate arrays hwsq_signature and edid_sig on the stack but
instead make them static. Makes the object code smaller by over 190
bytes:

Before:
text data bss dec hex filename
35676 3312 64 39052 988c nouveau_bios.o

After:
text data bss dec hex filename
35319 3472 64 38855 97c7 nouveau_bios.o

(gcc version 7.2.0 x86_64)

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# 3a0bc8cb 31-Oct-2017 Ilia Mirkin <imirkin@alum.mit.edu>

drm/nouveau/kms: add 8.1Gbps DP link rate

This was already done in dcb.c inside nvkm, but the other parser did not
get the update.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# 81904932 25-Jul-2017 Rosen Penev <rosenp@gmail.com>

drm/nouveau/bios: Demote missing fp table message to NV_DEBUG.

This warning seems to pop up mainly in laptop cards. Silence it as
it is expected behavior.

Signed-off by: Rosen Penev <rosenp@gmail.com>

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


# 6c22ea37 19-May-2017 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/disp: introduce acquire/release display path methods

These exist to give NVKM information on the set of display paths that
the DD needs to be active at any given time.

Previously, the supervisor attempted to determine this solely from OR
state, but there's a few configurations where this information on its
own isn't enough to determine the specific display paths in question:

- ANX9805, where the PIOR protocol for both DP and TMDS is TMDS.
- On a device using DCB Switched Outputs.
- On GM20x and newer, with a crossbar between the SOR and macro links.

After this commit, the DD tells NVKM *exactly* which display path it's
attempting a modeset on.

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


# 1167c6bc 17-May-2016 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: allocate device object for every client

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


# 768e8477 18-Oct-2016 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/kms: lvds panel strap moved again on maxwell

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Cc: stable@vger.kernel.org


# 4dc28134 19-May-2016 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: rename nouveau_drm.h to nouveau_drv.h

Fixes out-of-tree build issue where uapi/drm/nouveau_drm.h gets picked
up instead.

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


# a01ca78c 19-Aug-2015 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/nvif: simplify and tidy library interfaces

A variety of tweaks to the NVIF library interfaces, mostly ripping out
things that turned out to be not so useful.

- Removed refcounting from nvif_object, callers are expected to not be
stupid instead.
- nvif_client is directly reachable from anything derived from nvif_object,
removing the need for heuristics to locate it
- _new() versions of interfaces, that allocate memory for the object
they construct, have been removed. The vast majority of callers used
the embedded _init() interfaces.
- No longer storing constructor arguments (and the data returned from
nvkm) inside nvif_object, it's more or less unused and just wastes
memory.

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


# 2aa5eac5 19-Aug-2015 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/i2c: transition pad/ports away from being based on nvkm_object

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


# 9ad97ede 19-Aug-2015 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: use dev_* for logging

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


# 7c11c99b 20-Aug-2015 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/bios/dcb: accept "maxwell" lane count values for dcb 4.0

We previously assumed that the values "2" and "4" were new in DCB 4.1,
however, there's at least one GM107 DCB 4.0 board (Quadro K620) that
uses the newer values.

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


# be83cd4e 13-Jan-2015 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: finalise nvkm namespace switch (no binary change)

The namespace of NVKM is being changed to nvkm_ instead of nouveau_,
which will be used for the DRM part of the driver. This is being
done in order to make it very clear as to what part of the driver a
given symbol belongs to, and as a minor step towards splitting the
DRM driver out to be able to stand on its own (for virt).

Because there's already a large amount of churn here anyway, this is
as good a time as any to also switch to NVIDIA's device and chipset
naming to ease collaboration with them.

A comparison of objdump disassemblies proves no code changes.

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


# 989aa5b7 11-Jan-2015 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/nvif: namespace of nvkm accessors (no binary change)

NVKM is having it's namespace switched to nvkm_, which will conflict
with these functions (which are workarounds for the fact that as of
yet, we still aren't able to split DRM and NVKM completely).

A comparison of objdump disassemblies proves no code changes.

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


# dbbd6bcf 18-Aug-2014 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: add support for gm204

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


# 5b34cebe 23-Sep-2014 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/i2c: segregate aux channel adapter indices from bit-banged i2c

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


# bf0eb898 09-Aug-2014 Ben Skeggs <bskeggs@redhat.com>

drm/nv50-/disp: audit and version DAC_PWR method

The full object interfaces are about to be exposed to userspace, so we
need to check for any security-related issues and version the structs
to make it easier to handle any changes we may need in the future.

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


# 0ad72863 09-Aug-2014 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: port to nvif client/device/objects

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


# 967e7bde 09-Aug-2014 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: initial pass at moving to struct nvif_device

This is an attempt at isolating some of the changes necessary to port
to NVIF in a separate commit.

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


# db2bec18 09-Aug-2014 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: kill nouveau_dev() + wrap register macros

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


# 14f97da7 19-Mar-2014 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: recognise higher link rate for available dp bw calculations

I should resurrect/merge that cleanup branch to remove the weird
duplication.. One day.

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


# 420b9469 16-Feb-2014 Alexandre Courbot <acourbot@nvidia.com>

support for platform devices

Upcoming mobile Kepler GPUs (such as GK20A) use the platform bus instead
of PCI to which Nouveau is tightly dependent. This patch allows Nouveau
to handle platform devices by:

- abstracting PCI-dependent functions that were typically used for
resource querying and page mapping,
- introducing a nv_device_is_pci() function that allows to make
PCI-dependent code conditional,
- providing a nouveau_drm_platform_probe() function that takes a GPU
platform device to be probed.

Core code as well as engine/subdev drivers are updated wherever possible
to make use of these functions. Some older drivers are too dependent on
PCI to be properly updated, but all newer code on which future chips may
depend should at least be runnable with platform devices.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# ffbab09b 04-Oct-2013 Ville Syrjälä <ville.syrjala@linux.intel.com>

drm: Remove pci_vendor and pci_device from struct drm_device

We can get the PCI vendor and device IDs via dev->pdev. So we can drop
the duplicated information.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>


# 791dc143 27-Jun-2013 Maarten Lankhorst <maarten.lankhorst@canonical.com>

drm/nvd0-/disp: handle case where display engine is missing/disabled

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


# d2898713 24-Jun-2013 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/kms: don't fail if there's no dcb table entries

Fixes module not loading on Tesla K20.

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


# 1a646342 20-Mar-2013 Ben Skeggs <bskeggs@redhat.com>

drm/nv04/disp: hide all the cruft away in its own little hole

It'd be pretty awesome if someone would care enough to port this all
properly to a class interface, perhaps submitting a command stream to
the core via a sw object on PFIFO (emulating how EVO works basically,
and also what nvidia have done forever..)..

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

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

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


# eb6313ad 10-Feb-2013 Ben Skeggs <bskeggs@redhat.com>

drm/nv50: initial kms support for off-chip TMDS/DP encoders

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


# f533da10 09-Dec-2012 Marcin Slusarz <marcin.slusarz@gmail.com>

drm/nouveau: use pr_cont

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# f1aa4a1d 07-Dec-2012 Emil Velikov <emil.l.velikov@gmail.com>

drm/nouveau: set legacy bios data before parsing the structure

Commit 767baf82 drm/nouveau: remove some more unnecessary legacy bios code

has introduced a regression my misplacing the code that sets the major/chip
versions, which are used whist parsing the bmp/bit structure in vbios

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# 23088182 05-Dec-2012 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: remove some more unnecessary legacy bios code

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


# e84e4b67 05-Dec-2012 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: remove legacy vbios type detection

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


# 8f2abc25 15-Nov-2012 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/dp: remove last bits of VBIOS parsing from DRM code

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


# b6e4ad20 11-Nov-2012 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: remove (now obsolete) BIT U table parsing from DRM code

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


# 77145f1c 31-Jul-2012 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: port remainder of drm code, and rip out compat layer

v2: Ben Skeggs <bskeggs@redhat.com>
- fill in nouveau_pm.dev to prevent oops
- fix ppc issues (build + OF shadow)

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


# 84058eb8 25-Jul-2012 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: flatten nv{Read,Write}{MC,VIDEO,FB,EXTDEV}

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


# d38ac521 22-Jul-2012 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/mxm: split up into bios code and a subdev module

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


# cb75d97e 10-Jul-2012 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: implement devinit subdev, and new init table parser

v2:
- make sure not to execute display scripts unless resuming

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


# 70790f4f 10-Jul-2012 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/clock: pull in the implementation from all over the place

Still missing the main bits we use to change performance levels, I'll get
to it after all the hard yakka has been finished.

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


# 4196faa8 09-Jul-2012 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/i2c: port to subdev interfaces

v2/v3: Ben Skeggs <bskeggs@redhat.com>
- fix typo in default bus selection
- fix accidental loss of destructor

v4: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com>
- fix typo causing incorrect default i2c port settings when no BMP data

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


# e0996aea 09-Jul-2012 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/gpio: port gpio to subdev interfaces

v2: Ben Skeggs <bskeggs@redhat.com>
- rebase on top of v3.6-rc6 with gpio reset patch integrated already

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


# cd42439d 09-Jul-2012 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/oldbios: remove shadowing support, use bios subdev's image

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


# 02a841d4 04-Jul-2012 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: restructure source tree, split core from drm implementation

Future work will be headed in the way of separating the policy supplied by
the nouveau drm module from the mechanisms provided by the driver core.

There will be a couple of major classes (subdev, engine) of driver modules
that have clearly defined tasks, and the further directory structure change
is to reflect this.

No code changes here whatsoever, aside from fixing up a couple of include
file pathnames.

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


# 760285e7 02-Oct-2012 David Howells <dhowells@redhat.com>

UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/

Convert #include "..." to #include <path/...> in drivers/gpu/.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Dave Jones <davej@redhat.com>


# 16fde6cd 07-Jun-2012 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: dcb table quirk for fdo#50830

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


# 299bee10 04-May-2012 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/bios: fix some shadowing issues, particularly acpi

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


# 78339fb7 29-Mar-2012 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/bios: allow loading alternate vbios image as firmware

Useful for debugging different VBIOS versions.

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


# 5206b524 13-Apr-2012 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/bios: fix regression on some nv4x board

We started using the connector table on nv4x a while back, and this VBIOS
has bad connector indices which causes the wrong encoders to get paired
with connectors.

Add a quirk to fix this...

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


# f3718a81 04-Apr-2012 Linus Torvalds <torvalds@linux-foundation.org>

Revert "nouveau/bios: Fix tracking of BIOS image data"

This reverts commit d06221c0617ab6d0bc41c4980cefdd9c8cc9a1c1.

It turns out to trigger the "BUG_ON(!PageCompound(page))" in kfree(),
apparently because the code ends up trying to free somethng that was
never kmalloced in the first place.

BenH points out that the patch was untested and wasn't meant to go into
the upstream kernel that quickly in the first place.

Backtrace:
bios_shadow
bios_shadow_prom
nv_mask
init_io
bios_shadow
nouveau_bios_init
NVReadVgaCrtc
NVSetOwner
nouveau_card_init
nouveau_load

Reported-by: Meelis Roos <mroos@linux.ee>
Requested-by: Dave Airlie <airlied@gmail.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# d06221c0 01-Apr-2012 Benjamin Herrenschmidt <benh@kernel.crashing.org>

nouveau/bios: Fix tracking of BIOS image data

The code tries various methods for retreiving the BIOS data. However
it doesn't clear the bios->data pointer between the iterations.

In some cases, the shadow() method will fail and not update bios->data
at all, which will cause us to "score" the old data and incorrectly
attribute that score to the new method. This can cause double frees
later when disposing of the unused data.

Additionally, we were not freeing the data for methods that fail the
score test (we only freed when a "best" is superseeded, not when the
new method has a lower score than the exising "best"). Fix that as well.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>


# ea71f98d 01-Apr-2012 Benjamin Herrenschmidt <benh@kernel.crashing.org>

nouveau: Fix crash when pci_ram_rom() returns a size of 0

From b15b244d6e6e20964bd4b85306722cb60c3c0809 Mon Sep 17 00:00:00 2001
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: Mon, 2 Apr 2012 13:28:18 +1000
Subject:

Under some circumstances, pci_map_rom() can return a valid mapping
but a size of 0 (if it cannot find an image in the header).

This causes nouveau to try to kmalloc() a 0 sized pointer and
dereference it, which crashes.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>


# 65445992 10-Mar-2012 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/dp: support version 4.0 of DP table

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


# 4489b983 06-Mar-2012 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/bios: rework vbios shadowing

Refactored to allow shadowing of VBIOS images longer than 64KiB, which
allows us to pass the VBIOS checksum test on certain boards.

There's also a workaround for reading the PROM VBIOS on some chipsets.

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


# 05a7c15d 04-Mar-2012 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/bios: attempt acpi rom fetch before pcirom

There's cards out there with completely messed up PCIROM images that have
a perfectly valid signature.. Sigh!

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


# a0b25635 20-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>


# abbd3f8e 17-Nov-2011 Ben Skeggs <bskeggs@redhat.com>

drm/nv04/disp: handle dual-link spwg panels without needing quirks

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


# b4c26818 12-Oct-2011 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/mxm: initial implementation of dcb sanitisation

The DCB table provided by the VBIOS on most MXM chips has a number of
entries which either need to be disabled, or modified according to the
MXM-SIS Output Device Descriptors.

The x86 vbios code usually takes care of this for us, however, with the
large number of laptops now with switchable graphics or optimus, a lot
of the time nouveau is responsible for POSTing the card instead - leaving
some fun situations like, plugging in a monitor and having nouveau decide
3 connectors actually just got plugged in..

No MXM-SIS fetching methods implemented yet.

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


# befb51e9 17-Nov-2011 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/disp: parse connector info directly in nouveau_connector.c

Another case where we parsed vbios data to some structs, then again use
that info once to construct another set of data. Skip the intermediate
step.

This is also slightly improved in that we can now use DCB 3.x connector
table info, which will allow NV4x to gain hotplug support, and to make
quirks for SPWG LVDS panels unnecessary.

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


# 486a45c2 10-Nov-2011 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/i2c: do parsing of i2c-related vbios info in nouveau_i2c.c

Not much point parsing the vbios data into a struct which is only used once
to parse the data into another struct, go directly from vbios to
nouveau_i2c_chan.

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


# 6b5a81a2 09-Nov-2011 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/bios: start refactoring dcb routines

This primary reason for this was mostly to avoid duplication of some of
this stuff by the MXM-SIS parser. However, some other cleanups will also
follow this as a result.

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


# 0f8067c7 09-Nov-2011 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/bios: fold fixup_legacy_i2c

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


# f9f9f536 12-Oct-2011 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/bios: pass drm_device to ROMPTR, rather than nvbios

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


# d4cca9e1 06-Oct-2011 Martin Peres <martin.peres@ensi-bourges.fr>

drm/nv50/pm: s/PLL_UNK05/PLL_VDEC/

Following to "drm/nv50/pm: s/unk05/vdec/", let's rename the PLL to PLL_VDEC

PLL names are purely indicative and are based on the most important engine
it clocks.

Signed-off-by: Martin Peres <martin.peres@labri.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# 85a2a365 12-Sep-2011 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/gpio: remove invert flag, use state[] everywhere

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


# ee9f7ef9 22-Sep-2011 Ben Skeggs <bskeggs@redhat.com>

drm/nv50/bios: fixup mpll programming from the init table parser

Reportedly this has been causing stability and corruption issues after
resuming from suspend for a few people.

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


# 59ef9742 11-Aug-2011 Ben Skeggs <bskeggs@redhat.com>

drm/nv40/pm: execute memory reset script from vbios

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


# 5f1800bd 04-Aug-2011 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/dp: return master dp table pointer too when looking up encoder

Will need to be able to distinguish 2.0/2.1 from 3.0 soon. Also, move
the vbios parsing to nouveau_dp where it belongs.

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


# 721b0821 04-Aug-2011 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/bios: simplify U/d table hash matching func to just match

The caller is now responsible for parsing its own lists (or whatever) of
possible encoders.

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


# 75a1fccf 03-Aug-2011 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/dp: store unencoded link_bw everywhere

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


# 27a45987 03-Aug-2011 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/dp: restructure link training code

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


# a8e415d3 03-Aug-2011 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/bios: check for null script pointers in parser

Allows us to be lazy elsewhere...

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


# 02e4f587 06-Jul-2011 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/bios: allow passing in crtc to the init table parser

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


# 75139063 02-Jul-2011 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/bios: fix INIT_GPIO for new chipsets

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


# d7f8172c 02-Jul-2011 Ben Skeggs <bskeggs@redhat.com>

drm/nvd0/gpio: initial implementation

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


# f0d07d6e 10-Jul-2011 Emil Velikov <emil.l.velikov@gmail.com>

drm/nouveau: Add a quirk for Gigabyte NX86T

The connector table lies, the card has DVI-I not HDMI
Fixes bug https://bugs.freedesktop.org/show_bug.cgi?id=35675

v2: Mention the bugreport
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# 9617757f 23-Jun-2011 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: fix fetching vbios from above 4GiB vram addresses

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


# 1562ffde 31-May-2011 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: silence error for missing dac loadval table

There's lots of boards (all recent ones) that don't have this anymore, so
punt the message to debug loglevel.

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


# e540afc3 29-May-2011 Ben Skeggs <bskeggs@redhat.com>

drm/nv50: DCB table quirks for another busted XFX board

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


# 8c3f6bb9 17-Apr-2011 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: recognise DCB connector type 0x41 as LVDS

After looking at a number of different logs, it appears 0x41 likely
indicates the presense of an LVDS panel following the SPWG spec
(http://www.spwg.org/)

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


# ce521846 13-Apr-2011 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: pull refclk from vbios on limits 0x40 boards

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


# c0929b49 20-Mar-2011 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: quirk for XFX GT-240X-YA

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


# ec64a408 21-Mar-2011 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: implement init table opcode 0x5c

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


# a589e87f 16-Feb-2011 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau/vbios: parse more gpio tag bits from connector table

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


# c7ca4d1b 03-Feb-2011 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: make vbios parser runnable from an atomic context

The nv50 display isr bh needs to be converted to a tasklet, which means
we can't sleep anymore. The places we execute vbios init tables are
rare, and not in any way performance critical, so this isn't a huge
problem.

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


# 77b1d5dc 02-Feb-2011 Francisco Jerez <currojerez@riseup.net>

drm/nouveau: Fix detection of DDC-based LVDS on DCB15 boards.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# 670820c0 25-Dec-2010 Francisco Jerez <currojerez@riseup.net>

drm/nouveau: Workaround incorrect DCB entry on a GeForce3 Ti 200.

Fixes the DVI-D output on that board (fdo bug 32645).

Reported-by: Bryan Quigley <BryanQuigley@Ubuntu.com>
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# e8a8b252 02-Jan-2011 Stefan Weil <weil@mail.berlios.de>

Fix spelling mistakes in comments

milisecond -> millisecond
meassge -> message

Cc: Kalle Valo <kvalo@adurom.com>
Cc: Jiri Kosina <trivial@kernel.org>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 2e5702af 19-Nov-2010 Francisco Jerez <currojerez@riseup.net>

drm/nouveau: fabricate DCB encoder table for iMac G4

In typical Apple fashion there's no standard information about what
encoders are present on this machine, this patch adds a quirk to
provide it.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# c1b60ece 10-Nov-2010 Francisco Jerez <currojerez@riseup.net>

drm/nouveau: Fix a few confusions between "chipset" and "card_type".

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# 3e4d3af5 26-Oct-2010 Peter Zijlstra <a.p.zijlstra@chello.nl>

mm: stack based kmap_atomic()

Keep the current interface but ignore the KM_type and use a stack based
approach.

The advantage is that we get rid of crappy code like:

#define __KM_PTE \
(in_nmi() ? KM_NMI_PTE : \
in_irq() ? KM_IRQ_PTE : \
KM_PTE0)

and in general can stop worrying about what context we're in and what kmap
slots might be appropriate for that.

The downside is that FRV kmap_atomic() gets more expensive.

For now we use a CPP trick suggested by Andrew:

#define kmap_atomic(page, args...) __kmap_atomic(page)

to avoid having to touch all kmap_atomic() users in a single patch.

[ not compiled on:
- mn10300: the arch doesn't actually build with highmem to begin with ]

[akpm@linux-foundation.org: coding-style fixes]
[akpm@linux-foundation.org: fix up drivers/gpu/drm/i915/intel_overlay.c]
Acked-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Chris Metcalf <cmetcalf@tilera.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: David Miller <davem@davemloft.net>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Dave Airlie <airlied@linux.ie>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# eadc69cc 26-Sep-2010 Emil Velikov <eeydev@nottingham.ac.uk>

drm/nouveau: don't use the default pll limits in table v2.1 on nv50+ cards

This fixes issues bug 30370 and prevents another possible divide by zero on
the original nv50 cards, by returning -ENOENT

Signed-off-by: Emil Velikov <eeydev@nottingham.ac.uk>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# 0cba1b76 29-Sep-2010 Marcin Kościelnicki <koriakin@0x04.net>

drm/nouveau: Add a module option to force card POST.

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


# 56edd964 23-Sep-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: v3.0 pll limits tables have type<->register mapping too

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


# 5e6a7443 22-Sep-2010 Francisco Jerez <currojerez@riseup.net>

drm/nouveau: Don't try to parse a GPIO table on early DCBv2.2 BIOSes.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# 64d202b4 20-Sep-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: correct INIT_DP_CONDITION subcondition 5

Fixes DP output on a GTX 465 board I have.

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


# e49f70f7 19-Sep-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: implement parsing of DCB 2.2 GPIO table

Found on NV3x boards, this should allow voltage modifications to work
on these chipsets.

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


# 6f876986 16-Sep-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: allow static performance level setting

Guarded by a module parameter for the moment, read the code for the
magic value which enables it.

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


# 4709bff0 12-Sep-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: make bios code easier to use externally

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


# 855a95e4 15-Sep-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: make the behaviour of get_pll_limits() consistent

This replaces all the pll_types definitions for ones that match the types
used in the tables in recent VBIOS versions.

get_pll_limits() will now accept either type or register value as input
across all limits table versions, and will store the actual register ID
that a PLL type refers to in the returned structure.

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


# fba67528 24-Aug-2010 Francisco Jerez <currojerez@riseup.net>

drm/nouveau: Fix TMDS on some DCB1.5 boards.

The TMDS output of an nv11 was being detected as LVDS, because it uses
DCB type 2 for TMDS instead of type 4.

Reported-by: Bertrand VIEILLE <Vieille.Bertrand@free.fr>
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# d31e078d 20-Aug-2010 Francisco Jerez <currojerez@riseup.net>

drm/nouveau: Fix backlight control on PPC machines with an internal TMDS panel.

This commit fixes fdo bug 29685.

Reported-by: Vlado Plaga <rechner@vlado-do.de>
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# acae116c 15-Aug-2010 Francisco Jerez <currojerez@riseup.net>

drm/nouveau: Use a helper function to match PCI device/subsystem IDs.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# 44a1246f 16-Aug-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nv50: add dcb type 14 to enum to prevent compiler complaint

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


# 625db6b7 16-Aug-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: fix earlier mistake when fixing merge conflict

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


# 20d66daf 15-Aug-2010 Francisco Jerez <currojerez@riseup.net>

drm/nouveau: Workaround missing GPIO tables on an Apple iMac G4 NV18.

This should fix the reported TV-out load detection false positives
(fdo bug 29455).

Reported-by: Vlado Plaga <rechner@vlado-do.de>
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# 45a68a07 12-Aug-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: punt some more log messages to debug level

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


# 98720bf4 12-Aug-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: remove warning about unknown tmds table revisions

This message is apparently confusing people, and is being blamed for some
modesetting issues. Lets remove the message, and instead replace it
with an unconditional printout of the table revision.

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


# 27d50fcc 08-Aug-2010 Francisco Jerez <currojerez@riseup.net>

drm/nouveau: Fix DCB TMDS config parsing.

Thinko caused by 43bda05428a3d2021f3c12220073e0251c65df8b.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>


# 0746b5da 05-Aug-2010 Francisco Jerez <currojerez@riseup.net>

drm/nv04: Fix up SGRAM density detection.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# 1849719e 03-Aug-2010 Francisco Jerez <currojerez@riseup.net>

drm/nouveau: Init dcb->or on cards that have no usable DCB table.

We need a valid OR value because there're a few nv17 cards with DCB v1.4.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# 54bf67de 04-Aug-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: reduce severity of some "error" messages

There's some known configurations where the lack of these tables/scripts
is perfectly normal, reduce visibilty of complaint messages to debug.

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


# b715d640 03-Jul-2010 Marcin Kościelnicki <koriakin@0x04.net>

drm/nouveau: implement init table opcodex 0x5e and 0x9a

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Marcin Kościelnicki <koriakin@0x04.net>


# e3a1924f 02-Jul-2010 Marcin Kościelnicki <koriakin@0x04.net>

drm/nouveau: implement init table op 0x57, INIT_LTIME

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Marcin Kościelnicki <koriakin@0x04.net>


# 1ac7b528 04-Aug-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nvc0: implement crtc pll setting

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


# 080feda5 03-Aug-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nvc0: allow INIT_GPIO

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


# 4a9f822f 20-Jul-2010 Francisco Jerez <currojerez@riseup.net>

drm/nv17-nv4x: Attempt to init some external TMDS transmitters.

sil164 and friends are the most common, usually they just need to be
poked once because a fixed configuration is enough for any modes and
clocks, so they worked without this patch if the BIOS had done a good
job on POST. Display couldn't survive a suspend/resume cycle though.
Unfortunately, BIOS scripts are useless here.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# 3c9b2534 03-Aug-2010 Francisco Jerez <currojerez@riseup.net>

drm/nouveau: Fix the INIT_CONFIGURE_PREINIT BIOS opcode.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# 0bf9b0e0 03-Aug-2010 Francisco Jerez <currojerez@riseup.net>

drm/nouveau: Don't pass misaligned offsets to io_mapping_map_atomic_wc().

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# fca3ec01 04-Aug-2010 Chris Wilson <chris@chris-wilson.co.uk>

drm,io-mapping: Specify slot to use for atomic mappings

This is required should we ever attempt to use an io-mapping where
KM_USER0 is verboten, such as inside an IRQ context.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>


# ee2e0131 25-Jul-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: introduce gpio engine

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


# 946fd35f 24-Jul-2010 Francisco Jerez <currojerez@riseup.net>

drm/nouveau: Get rid of the remaining VGA CRTC locking.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# 45d60d1b 20-Jul-2010 Francisco Jerez <currojerez@riseup.net>

drm/nouveau: Reset CRTC owner to 0 before BIOS init.

Fixes suspend+multihead on some boards that also use BIOS scripts for
modesetting.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# 03cd06ca 19-Jul-2010 Francisco Jerez <currojerez@riseup.net>

drm/nouveau: No need to lock/unlock the VGA CRTC regs all the time.

Locking only makes sense in the VBIOS parsing code as it's executed
before CRTC init.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# 67eda20e 13-Jul-2010 Francisco Jerez <currojerez@riseup.net>

drm/nv04-nv3x: Implement init-compute-mem.

Init-compute-mem was the last piece missing for nv0x-nv3x card
cold-booting. This implementation is somewhat lacking but it's been
reported to work on most chipsets it was tested in. Let me know if it
breaks suspend to RAM for you.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Tested-by: Patrice Mandin <patmandin@gmail.com>
Tested-by: Ben Skeggs <bskeggs@redhat.com>
Tested-by: Xavier Chantry <chantry.xavier@gmail.com>
Tested-by: Marcin Kościelnicki <koriakin@0x04.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# 3c7066bc 13-Jul-2010 Francisco Jerez <currojerez@riseup.net>

drm/nouveau: Add some PFB register defines.

Also collect all the PFB registers in a single place and remove some
duplicated definitions.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# eae6192a 13-Jul-2010 Francisco Jerez <currojerez@riseup.net>

drm/nouveau: Fix a sparse warning.

It doesn't like variable length arrays.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# c5875470 16-Jul-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nv50: fix regression that break LVDS in some places

A previous commit started additionally using the SOR link when trying to
match the correct output script. However, we never fill in this field
for LVDS so we can never match a script at all.

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


# a6ed76d7 11-Jul-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: support fetching LVDS EDID from ACPI

Based on a patch from Matthew Garrett.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Acked-by: Matthew Garrett <mjg@redhat.com>


# 03639b50 14-Jul-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: remove quirk to fabricate DVI-A output on DCB 1.5 boards

There's a report of this quirk breaking modesetting on at least one board.
After discussion with Francisco Jerez, we've decided to remove it:

<darktama> it's not worth limiting the quirk to just where we know it can
work? i'm happy either way really :)
<curro> hmm, don't think so, most if not all DCB15 cards have just one DAC
<curro> and with that quirk there's no way to tell if the load comes from
the VGA or DVI port

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Acked-by: Francisco Jerez <currojerez@riseup.net>


# 14d7ec11 11-Jul-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: fix pcirom vbios shadow breakage from acpi rom patch

On nv50 it became impossible to attempt a PCI ROM shadow of the VBIOS,
which will break some setups.

This patch also removes the different ordering of shadow methods for
pre-nv50 chipsets. The reason for the different ordering was paranoia,
but it should hopefully be OK to try shadowing PRAMIN first.

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


# 41090eb4 11-Jul-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: fix pcirom vbios shadow breakage from acpi rom patch

On nv50 it became impossible to attempt a PCI ROM shadow of the VBIOS,
which will break some setups.

This patch also removes the different ordering of shadow methods for
pre-nv50 chipsets. The reason for the different ordering was paranoia,
but it should hopefully be OK to try shadowing PRAMIN first.

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


# ae55321c 03-Jul-2010 Francisco Jerez <currojerez@riseup.net>

drm/nouveau: INIT_CONFIGURE_PREINIT/CLK/MEM on newer BIOSes is not an error.

No need to spam the logs when they're found, they're equivalent to
INIT_DONE.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# df4cf1b7 30-Jun-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nv50: DCB quirk for Dell M6300

Uncertain if this is a weirdo configuration, or a BIOS bug. If it's not
a BIOS bug, we still don't know how to make it work anyway so ignore a
"conflicting" DCB entry to prevent a display hang.

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


# 309b8c89 29-Jun-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: downgrade severity of most init table parser errors

As long as we know the length of the opcode, we're probably better off
trying to parse the remainder of an init table rather than aborting in
the middle of it.

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


# 3af76454 19-Jun-2010 Francisco Jerez <currojerez@riseup.net>

drm/nouveau: Ignore broken legacy I2C entries.

The nv05 card in the bug report [1] doesn't have usable I2C port
register offsets (they're all filled with zeros). Ignore them and use
the defaults.

[1] http://bugs.launchpad.net/bugs/569505

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# 190a4378 16-Jun-2010 Francisco Jerez <currojerez@riseup.net>

drm/nouveau: Don't clear AGPCMD completely on INIT_RESET.

We just need to clear the SBA and ENABLE bits to reset the AGP
controller: If the AGP bridge was configured to use "fast writes",
clearing the FW bit would break the subsequent MMIO writes and
eventually end with a lockup.

Note that all the BIOSes I've seen do the same as we did (it works for
them because they don't use MMIO), OTOH the blob leaves FW untouched.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# 75047944 25-May-2010 Dan Carpenter <error27@gmail.com>

drm/nouveau: off by one in init_i2c_device_find()

dcb->i2c[] has DCB_MAX_NUM_I2C_ENTRIES entries.

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


# 1eb38100 31-May-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: match U/DP script against SOR link

It appears version 0x21 'U' and 'd' tables require us to take the SOR link
into account when selecting the appropriate table for a particular output.

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


# afeb3e11 06-Apr-2010 Dave Airlie <airlied@redhat.com>

drm/nouveau: attempt to get bios from ACPI v3

Some of the laptops with the switchable graphics, seem to not post the secondary GPU at all, and we can't find a copy of the BIOS anywhere except in the ACPI rom retrieval.

This adds support for ACPI ROM retrieval to nouveau.

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


# 23484874 27-May-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nv50: fix duallink_possible calculation for DCB 4.0 cards

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


# 73db4bed 25-May-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: don't execute INIT_GPIO unless we're really running the table

This resulted in accidently switching off the eDP panel on certain laptops
since the default state in the GPIO table was off.

Fixes rh#582621

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


# f50c0b91 24-May-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nv40: allow cold-booting of nv4x chipsets

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


# d13102c6 24-May-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: fix POST detection for certain chipsets

We totally fail at detecting un-POSTed chipsets prior to G80. This commit
changes the pre-G80 POST detection to read the programmed horizontal total
from CRTC 0, and assume the card isn't POSTed if it's 0.

NVIDIA use some other heuristics more similar to what we do on G80, but I
wasted quite a long time trying to figure out the exact specifics of what
they do so we can try this for a bit instead.

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


# 893887ed 12-May-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: fix i2c-related init table handlers

Mutliple issues. INIT_ZM_I2C_BYTE/INIT_I2C_BYTE didn't even try and
use the register value, and all the handlers were using the wrong
slave address.

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


# 04f542c0 11-May-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: support init table i2c device identifier 0x81

It appears to be meant to reference the second "default index".

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


# f8b0be1a 11-May-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: ensure we've parsed i2c table entry for INIT_*I2C* handlers

We may not have parsed the entry yet if the i2c_index is for an i2c bus
that's not referenced by a DCB encoder.

This could be done oh so much more nicely, except we have to care about
prehistoric DCB tables too, and they make life painful.

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


# 92b96187 10-May-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: display error message for any failed init table opcode

Some handlers don't report specific errors, but we still *really* want to
know if we failed to parse a complete init table.

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


# 9170a824 10-May-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: fix init table handlers to return proper error codes

We really want to be able to distinguish between INIT_DONE and an actual
error sometimes. This commit fixes up several lazy "return 0;" to be
actual error codes, and explicitly reserves "0" as "success, but stop
parsing this table".

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


# 07fee3d5 23-Apr-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nv50: store full dcb i2c entry from vbios

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


# 4c389f00 22-Apr-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: dump pll limits entries when debugging is on

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


# 25908b77 19-Apr-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: bios parser fixes for eDP boards

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


# 45284162 06-Apr-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nv50: implement gpio set/get routines

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


# 02faec09 06-Apr-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nv50: parse/use some more de-magiced parts of gpio table entries

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


# 2535d71c 06-Apr-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: store raw gpio table entry in bios gpio structs

And use our own version of the GPIO table for the INIT_GPIO opcode.

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


# 2eb92c80 17-Mar-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nv40: add LVDS table quirk for Dell Latitude D620

Should fix:
https://bugzilla.redhat.com/show_bug.cgi?id=505132
https://bugzilla.redhat.com/show_bug.cgi?id=543091
https://bugzilla.redhat.com/show_bug.cgi?id=530425
https://bugs.edge.launchpad.net/ubuntu/+source/xserver-xorg-video-nouveau/
+bug/539730

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


# f3bbb9cc 17-Mar-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nv40: rework lvds table parsing

All indications seem to be that the version 0x30 table should be handled
the same way as 0x40 (as used on G80), at least for the parts that we
currently try use.

This commit cleans up the parsing to make it clearer about what we're
actually trying to achieve, and unifies the 0x30/0x40 parsing.

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


# d544d623 09-Mar-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nv50: fix connector table parsing for some cards

The connector table index in the DCB entry for each output type is an
index into the connector table, and does *not* necessarily match up
with what was previously called "index" in the connector table entries
themselves.

Not real sure what that index is exactly, renamed to "index2" as we
still use it to prevent creating multiple TV connectors.

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


# 53c44c3a 03-Mar-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: Gigabyte NX85T connector table lies, it has DVI-I not HDMI

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


# da647d5b 03-Mar-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: add option to allow override of dcb connector table types

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


# c52e53fd 24-Feb-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: support version 0x20 displayport tables

Not entirely identical to 0x21, the per-encoder table header lacks the
third init table pointer. However, our current parsing of the table
should work just fine.

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


# dc5bc4ed 23-Feb-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: construct a connector table for cards that lack a real one

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


# f66fa771 23-Feb-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: check for known dcb connector types

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


# 54abb5dd 23-Feb-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: parse dcb gpio/connector tables after encoders

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


# e7cc51c5 23-Feb-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: reorganise bios header, add dcb connector type enums

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


# 04a39c57 23-Feb-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: merge nvbios and nouveau_bios_info

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


# 7f245b20 23-Feb-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: merge parsed_dcb and bios_parsed_dcb into dcb_table

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


# a6678b2a 23-Feb-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: rename parsed_dcb_gpio to dcb_gpio_table

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


# 761c5a69 15-Feb-2010 Marcin Slusarz <marcin.slusarz@gmail.com>

drm/nouveau: fix i2ctable bounds checking

i2c_entries seems to be the number of i2c entries,
so with index equal to this number, we could read
invalid data from i2ctable. Fix it.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# df31ef4d 17-Feb-2010 Marcin Slusarz <marcin.slusarz@gmail.com>

drm/nouveau: fix pramdac_table range checking

get_tmds_index_reg reads some value from stack when mlv happens
to be equal to size of pramdac_table array. Fix it.

Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# d9184fa9 15-Feb-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: use mutex for vbios lock

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


# 39c9bfb4 08-Feb-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nv50: prevent multiple init tables being parsed at the same time

With DVI and DP plugged, the DVI clock change interrupts being run can
cause DP link training to fail. This adds a spinlock around init table
parsing to prevent this.

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


# 3ad2f3fb 02-Feb-2010 Daniel Mack <daniel@caiaq.de>

tree-wide: Assorted spelling fixes

In particular, several occurances of funny versions of 'success',
'unknown', 'therefore', 'acknowledge', 'argument', 'achieve', 'address',
'beginning', 'desirable', 'separate' and 'necessary' are fixed.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Joe Perches <joe@perches.com>
Cc: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# e235c1f3 21-Jan-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nv40: make INIT_COMPUTE_MEM a NOP, just like nv50

It appears we aren't required to do memory sizing ourselves on nv40
either. NV40 init tables read a strap from PEXTDEV_BOOT_0 into a
CRTC register, and then later use that value to select a memory
configuration (written to PFB_CFG0, just like INIT_COMPUTE_MEM on
earlier cards) with INIT_IO_RESTRICT_PROG.

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


# 3d9aefb8 14-Jan-2010 Francisco Jerez <currojerez@riseup.net>

drm/nouveau: Break some long lines.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# b79d8a65 14-Jan-2010 Andrea Tacconi <tacconet@libero.it>

drm/nouveau: add NV18 device id to call_lvds_manufacturer_script

This fixes imac black screen (NV18 card)

Signed-off-by: Andrea Tacconi <tacconet@libero.it>
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# b0d2de86 14-Jan-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: less magic DCB 1.5 parsing

This in the very least matches the parsing of all the previously known
entries, and hopefully (at least closer to) correct for any we haven't
seen yet.

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


# ed42f824 13-Jan-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: assume no nv04 board has a DCB table

There's a report of a TNT2 where the DCB table pointer is *not* NULL
(it contains a part of a VBIOS data string), and we assume this means
a DCB table is present, causing all kinds of hilarity.

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


# 9855e584 11-Jan-2010 Ben Skeggs <bskeggs@redhat.com>

drm/nouveau: trust init table registers are safe

Apparently the original reason for checking this was there were known
register accesses that caused hangs on some chipsets. This was more
than likely because of incorrect parsing of previous opcodes, and I
hardly think aborting a script half way through is going to be any
better (in fact, we have had bug reports where this has been the cause
of s/r failures among other things).

This patch (which has been in Fedora 12 for a long time now) removes
all checking for known register ranges, and just leaves the check to
ensure the access is within the mapped aperture to avoid an oops.

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


# 37383650 14-Dec-2009 Marcin Kościelnicki <koriakin@0x04.net>

drm/nouveau: Kill global state in BIOS script interpreter

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>


# 657b6245 14-Dec-2009 Marcin Kościelnicki <koriakin@0x04.net>

drm/nouveau: Kill global state in NvShadowBIOS

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>


# ef2bb506 13-Dec-2009 Maarten Maathuis <madman2003@gmail.com>

drm/nouveau: use drm debug levels

- Use driver level (0x2) for NV_DEBUG instead of all levels
- Create a NV_DEBUG_KMS for KMS level (0x4) and use them in modesetting code
- Remove a few odd NV_TRACE calls and replace some of them with NV_DEBUG_KMS or
NV_INFO

Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>


# 6ee73861 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>