History log of /drivers/gpu/drm/nouveau/nouveau_bios.c
Revision Date Author Comments
bf0eb89859439f016a1fab4cdf737c95f36dbb2e 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>
0ad72863ea426d46b2786cba9430e122a40aad0b 09-Aug-2014 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: port to nvif client/device/objects

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
967e7bde8739fe3b215f7537e8f1f39c044902af 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>
db2bec187dd68e79d512112df1f6e7a849e7f0ce 09-Aug-2014 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: kill nouveau_dev() + wrap register macros

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14f97da7e74cf8cc2e7e0721bd02f535a6e3a29e 20-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>
420b94697722512a2c0732970dc1530197a49adb 17-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>
ffbab09bf939975b62ec233c426bf7df0dd4cea8 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>
791dc143ed2c441f5202d8721609d94dce9fcf88 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>
d2898713fbd6431d7c09a52eb5e814805fcf8194 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>
1a6463425552a8b9960e5a19b25421895846925c 21-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>
eb6313add6dddf07ea3e50c4caa33a9c3b2379f1 11-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>
f533da1027e294a2d6e0b455bf8ee915609ff216 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>
f1aa4a1de5e13b794a7e31efc0b3ddcda6926c56 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>
230881821a4467727f4100b5ee5c3ef0b67f3128 06-Dec-2012 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: remove some more unnecessary legacy bios code

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
e84e4b67ddd6fcbfe5ab39c7aed1d490a8c6283c 06-Dec-2012 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: remove legacy vbios type detection

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8f2abc2586279166722f0d88d24990baba4a2eaf 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>
b6e4ad200a726a32c7083f491383713bc8680f86 12-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>
77145f1cbdf8d28b46ff8070ca749bad821e0774 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>
84058eb80e0b790c877962e3f4cf49725e23ffce 26-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>
d38ac5217ab43cf61e8ebe6d7114fb2d1ca9a3a4 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>
cb75d97e9c77743ecfcc43375be135a55a4d9b25 11-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>
70790f4f819875e8f390871fd15bbbf823f28e1b 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>
4196faa8623264b79279a06fd186654c959f2767 10-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>
e0996aea4c349ba302b63203b7d5cab6034dbdca 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>
cd42439da48529a3cd6f957b226fc627a64fb771 10-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>
02a841d434513c7b3620250271c372fabce56de5 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>
760285e7e7ab282c25b5e90816f7c47000557f4f 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>
16fde6cd323a4f7654ac76dae12cb36208ed4c5d 08-Jun-2012 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: dcb table quirk for fdo#50830

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
299bee10fb228fce4a3fc5dd89f32787a6e58fe5 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>
78339fb75c21403677f61a02e1839b626a79325b 30-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>
5206b524c9b4e289ab0565e7bffd503d2e671c6e 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>
f3718a818f7fb3636130d5f34bde8df34f45c5e5 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>
d06221c0617ab6d0bc41c4980cefdd9c8cc9a1c1 02-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>
ea71f98d680c9ac768a7849d26d7ce4744064510 02-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>
6544599249086ce50f216a6cedbea56514ffefc6 11-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>
4489b9835a0867617a9ec29cc978a9c2c9eca363 07-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>
05a7c15d48ff53b054bc36fc8a2be8bc9b60d9e7 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>
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>
abbd3f8e3bea4b2b0490260e67357067a2dc2039 18-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>
b4c26818aeb4159dd537eff6453ae5ebf7a69723 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>
befb51e9c97e783c86a1da27bdda3a638d2f02c7 18-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>
486a45c2a6c19b159602d044ab601a92cd81f524 11-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>
6b5a81a2e783f26a69fc262b3c393f0b391c8613 10-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>
0f8067c7054d22f240fca376e01430eecdc112df 10-Nov-2011 Ben Skeggs <bskeggs@redhat.com> drm/nouveau/bios: fold fixup_legacy_i2c

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
f9f9f536312d4c3ca39502ccf6a3af60cfe38ff4 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>
d4cca9e1fccb9f7804ddfbbc2aebff7be23faa1e 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>
85a2a365216e8e4eccf826e7dcc06c6298ab5fc1 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>
ee9f7ef99f4422463634c075b22197c22c5cfa71 23-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>
59ef9742f6b24d1f3062b975ec959512519f8987 12-Aug-2011 Ben Skeggs <bskeggs@redhat.com> drm/nv40/pm: execute memory reset script from vbios

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
5f1800bd8a774f773e3be71702da7ec77188b283 05-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>
721b0821ad8fea80ea1b6b84cb9646881959e662 05-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>
75a1fccf92ac6703e7cd4d2a2d1d25b87102402b 04-Aug-2011 Ben Skeggs <bskeggs@redhat.com> drm/nouveau/dp: store unencoded link_bw everywhere

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
27a4598737f8b315ba7827cb84578ba38c9b883c 04-Aug-2011 Ben Skeggs <bskeggs@redhat.com> drm/nouveau/dp: restructure link training code

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
a8e415d3eb1bed184d73e22c62cd1f992bd33d63 04-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>
02e4f5877dc7b963b3dd2beaf9664cf29c12d728 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>
75139063b7a369f7fa849922d5a204b8ba96d582 03-Jul-2011 Ben Skeggs <bskeggs@redhat.com> drm/nouveau/bios: fix INIT_GPIO for new chipsets

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>
f0d07d6e89e1abe75748dd506dee3df8f6b86864 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>
9617757fb3dc6274b42afd2dcaa4fbc3ef6db98b 24-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>
1562ffde94fc232e5b7d6d32f43abb3e25468dac 01-Jun-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>
e540afc32585664840506a7198966d18318381af 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>
8c3f6bb970413c6a537736f409a1bc9d8abd671c 18-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>
ce521846b9bde836d010416b6120a694b5f06e96 14-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>
c0929b499f834210561fe5e8c48bcad4f2130d25 21-Mar-2011 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: quirk for XFX GT-240X-YA

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
ec64a40868469d308ad1e040c6ead2373af334dd 21-Mar-2011 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: implement init table opcode 0x5c

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
a589e87fe704808120e6e30f6723b720a085669d 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>
c7ca4d1b6b529dac9de9ff3f951689f2e4365cc2 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>
77b1d5dc119f9b72bcfbb49d2431fd3679382dab 03-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>
670820c0e6a9c82dd2f96663dc4c6aec2a18c32b 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>
e8a8b252fb37489f881957ab0f2f8ea9a2341dd1 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>
2e5702aff39532662198459726c624d5eadbdd78 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>
c1b60ece91460214b5135360a375f3f6fbb59608 11-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>
3e4d3af501cccdc8a8cca41bdbe57d54ad7e7e73 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>
eadc69cc9054594ff7860d407f855536af13af99 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>
0cba1b7644cbcd855d0a2b2ea4d8da26fd08dec4 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>
56edd964e883f2746bad7268cf557ab9b1d232cd 24-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>
5e6a74436e378eb021a74f3e5f329eecf49d928e 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>
64d202b4d78968979c0d44306854d41f9b71626d 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>
e49f70f775335ab1ee0ecd54904d2b25982a2600 20-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>
6f876986bedf23b40ab707543e88fae7eac27f1f 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>
4709bff02adcb0d05d2d1a397e60581baa562de9 13-Sep-2010 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: make bios code easier to use externally

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
855a95e4fc2ac6b758145ca7d6a0c95b66a57ef8 16-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>
fba675283429e41270feb661a1f6f3bc05d71981 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>
d31e078d847fb2816d26c9476f4a68e89dc65a0b 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>
acae116ce16833859eb4eb929de571b9a800d685 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>
44a1246f320312b84134a962caf3bf6af989e193 17-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>
625db6b7e34580b750a13fd36a211a4366f6c3e2 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>
20d66daf0aeae4abd2f498d0cedf3e506946f3c2 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>
45a68a072ee3b7f8fbd84b946aac827cc61256b0 13-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>
98720bf4e1ba5f1d0109f97a49a9028b91f25cbe 13-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>
27d50fcc9ac7a39a4ab3107a619ee60ed05c6de8 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>
0746b5da53af533e3e525aeea47d1020c8f99c67 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>
1849719ef86e29def631a473e496507a4e052c06 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>
54bf67dee9551f7fd45540a9dec3e5144323c877 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>
b715d64028ea90bcb67b3823ae1cc908a4ae0bc6 04-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>
e3a1924f3e5aeabdb1a1ae1a87b4097e48b7f2c5 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>
1ac7b528a0e924308cfedea5d71b78c31c23b851 04-Aug-2010 Ben Skeggs <bskeggs@redhat.com> drm/nvc0: implement crtc pll setting

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
080feda59c6133ad5edcfa06e8e3d775dd0240a2 04-Aug-2010 Ben Skeggs <bskeggs@redhat.com> drm/nvc0: allow INIT_GPIO

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
4a9f822fe1a6ca5de7d8cdd5efbead3b9ab4283b 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>
3c9b25349e8fd6e29c4e8298dc08fb052f45a18b 04-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>
0bf9b0e0ce9140c200c0db67a0c71983f07e1a65 04-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>
fca3ec01e0b40cab82cac7745e154b01969e6219 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>
ee2e013131dcf6427334663662dbe760ccdba735 26-Jul-2010 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: introduce gpio engine

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
946fd35f88ae7ef910229e7995ab0c32d52517b4 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>
45d60d1bfcbaa660a510e3b4be5d857ca8d81088 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>
03cd06ca9046190e8418749c2c8f636e2625556c 20-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>
67eda20e6b7a757ed45f6b5a8a4d30c2a0d47c7a 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>
3c7066bca990a440b512663f89680bd1c1cae6c1 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>
eae6192a9d0d31f657b50873789175794767bf38 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>
c58754703c7d448c94aebf5e500d4278f6fc0678 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>
a6ed76d7ffc62ffa474b41d31b011b6853c5de32 12-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>
03639b50385810c2153624c0c8cb85de93d31356 15-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>
14d7ec11d165fe11c2bce5b412773af70b7c8e1b 12-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>
41090eb4243bef2e90159b2a6acdc671ad0f825b 12-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>
ae55321c50434a57fca62aa9b243d575f0de8e6b 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>
df4cf1b72d726d788388858673fa61e42fdb9ad8 01-Jul-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>
309b8c89c8ddf9dd8e5f253c185d6af1d0358a79 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>
3af76454a70cd09d8e3ede94ee50a35c772ba439 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>
190a43783f2c43186180c827444d4eac901b4bcf 17-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>
75047944480a33afad76a272b21116d032ba61fa 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>
1eb38100abc467f1133e548d82ab171cab34292b 01-Jun-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>
afeb3e11147adb357603b071d6d7d1f30ea7f19d 07-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>
23484874e6bf837704bf1fa61605d33a12b174e3 28-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>
73db4bedc5dde97adf59b5b5a07c6cf0ee56e668 26-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>
f50c0b91e7718e7deda46475cfd0ea1413daed04 25-May-2010 Ben Skeggs <bskeggs@redhat.com> drm/nv40: allow cold-booting of nv4x chipsets

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
d13102c6b4836289138431e3fbfc08e90c925ffd 25-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>
893887ed75cacbfe1a855c63659838e0261d17e8 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>
04f542c07e9376c732c72b40de7cdc71801f8cd5 12-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>
f8b0be1a75dc62d2b5f5b9a8406c97d6c5f82b7d 12-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>
92b9618761465d190b68519bcc6a6fbd8847cf2c 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>
9170a82438230da63ed09cf6fd1f4d2f87baf68c 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>
07fee3d561eb7634b08e4362dc9c5c5708facd03 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>
4c389f00d5c1726755e014c3cd87cb371a1dec87 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>
25908b77979cb7a5a91fe83043897709c60813b3 19-Apr-2010 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: bios parser fixes for eDP boards

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
4528416291e26456e68f7217576e40e589d276bf 06-Apr-2010 Ben Skeggs <bskeggs@redhat.com> drm/nv50: implement gpio set/get routines

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
02faec09b2814b6ad3fd202e2f28b3c4b712a3f1 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>
2535d71c80b3d79090c9d44ec6d35342e2d258f0 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>
2eb92c80074ecfbc691741720382007417f64523 18-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>
f3bbb9ccbf2a0362363ce6d7e4e57dbf34a5cef1 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>
d544d623c5ef3ca14407e8bc042fdf938a966b04 10-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>
53c44c3a065ac48c4ccb38f811cf7c5d305c9d4e 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>
da647d5bf3c0a4b7ad150803910cb1d737ac522e 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>
c52e53fd38b195169c67a8cc9ed1af0125d2655c 25-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>
dc5bc4ed3815dfec2f3ecfbf6f7983440040fe22 24-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>
f66fa771d5046fd8c3e3c6f09407e9168e261b8d 24-Feb-2010 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: check for known dcb connector types

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
54abb5ddae28f6e676f659902cfc8c3ce63b3e16 24-Feb-2010 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: parse dcb gpio/connector tables after encoders

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
e7cc51c5652a8195bc638ce52987fb265ace2a9a 24-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>
04a39c577f4114a3f098ee8ef0e20f7778b5ddad 24-Feb-2010 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: merge nvbios and nouveau_bios_info

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
7f245b20e30515264b94f6373ef7d721155990a4 24-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>
a6678b2ace023912000119a14eeb39a56050bc7c 24-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>
761c5a69751967f4fe7430eb65b3a0ea92f3b673 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>
df31ef4dbd48eca2772d8d88b12ee5eb5117c86e 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>
d9184fa97b6f48d399636e5e2669bc8419f9369e 16-Feb-2010 Ben Skeggs <bskeggs@redhat.com> drm/nouveau: use mutex for vbios lock

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
39c9bfb453b748ce220ceefacbe2a5c19fabf67b 09-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>
3ad2f3fbb961429d2aa627465ae4829758bc7e07 03-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>
e235c1f3e132a243a1f81b3d95c99ee199b4d3f3 22-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>
3d9aefb8bd1be2b5e07acf0f938c21769f03cc64 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>
b79d8a65d52d3d80204e1bad30ee57bb5a58ced1 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>
b0d2de860bd621959bc826ffd42618fe1de37a61 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>
ed42f8240cfea13580fe91195e52c5247275e7df 14-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>
9855e584d296a32bbcc1bb3d29b7e0ed078b03cc 12-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>
37383650e4f47aef633055e3f62e87a44d83312d 15-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>
657b6245ba23d32c7a4fd273549c8c0beebec770 15-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>
ef2bb506687a5f1cc8ef2fef370bb168b2808106 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>
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>