GitHub/MotorolaMobilityLLC/kernel-slsi.git
14 years agodrm: export drm_global_mutex for drivers to use
Ben Skeggs [Thu, 26 Aug 2010 04:58:57 +0000 (14:58 +1000)]
drm: export drm_global_mutex for drivers to use

Nouveau needs to be able to drop the mutex before sleeping to prevent a
deadlock from occuring.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nv20: Don't use pushbuf calls on the original nv20.
Francisco Jerez [Wed, 25 Aug 2010 10:54:53 +0000 (12:54 +0200)]
drm/nv20: Don't use pushbuf calls on the original nv20.

The "return" command is buggy on the original nv20, it jumps back to
the caller address as expected, but it doesn't clear the subroutine
active bit making the subsequent pushbuf calls fail with a "stack"
overflow.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nouveau: Fix TMDS on some DCB1.5 boards.
Francisco Jerez [Tue, 24 Aug 2010 21:02:02 +0000 (23:02 +0200)]
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>
14 years agodrm/nouveau: Fix backlight control on PPC machines with an internal TMDS panel.
Francisco Jerez [Fri, 20 Aug 2010 12:19:45 +0000 (14:19 +0200)]
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>
14 years agodrm/nv30: Apply modesetting to the correct slave encoder
Patrice Mandin [Wed, 18 Aug 2010 14:07:34 +0000 (16:07 +0200)]
drm/nv30: Apply modesetting to the correct slave encoder

Signed-off-by: Patrice Mandin <patmandin@gmail.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nouveau: Use a helper function to match PCI device/subsystem IDs.
Francisco Jerez [Sun, 15 Aug 2010 12:31:31 +0000 (14:31 +0200)]
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>
14 years agodrm/nv50: add dcb type 14 to enum to prevent compiler complaint
Ben Skeggs [Tue, 17 Aug 2010 04:34:00 +0000 (14:34 +1000)]
drm/nv50: add dcb type 14 to enum to prevent compiler complaint

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nouveau: fix earlier mistake when fixing merge conflict
Ben Skeggs [Tue, 17 Aug 2010 02:02:43 +0000 (12:02 +1000)]
drm/nouveau: fix earlier mistake when fixing merge conflict

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nvc0: fix thinko in instmem suspend/resume
Ben Skeggs [Sun, 15 Aug 2010 22:18:16 +0000 (08:18 +1000)]
drm/nvc0: fix thinko in instmem suspend/resume

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nouveau: Workaround missing GPIO tables on an Apple iMac G4 NV18.
Francisco Jerez [Sun, 15 Aug 2010 12:32:49 +0000 (14:32 +0200)]
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>
14 years agodrm/nouveau: Add TV-out quirk for an MSI nForce2 IGP.
Francisco Jerez [Sat, 14 Aug 2010 16:45:58 +0000 (18:45 +0200)]
drm/nouveau: Add TV-out quirk for an MSI nForce2 IGP.

The blob also thinks there's a TV connected, so hardware bug...

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nv50-nvc0: ramht_size is meant to be in bytes, not entries
Ben Skeggs [Fri, 13 Aug 2010 00:22:41 +0000 (10:22 +1000)]
drm/nv50-nvc0: ramht_size is meant to be in bytes, not entries

Fixes an infinite loop that can happen in RAMHT lookup.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nouveau: punt some more log messages to debug level
Ben Skeggs [Thu, 12 Aug 2010 22:37:55 +0000 (08:37 +1000)]
drm/nouveau: punt some more log messages to debug level

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nouveau: remove warning about unknown tmds table revisions
Ben Skeggs [Thu, 12 Aug 2010 22:31:22 +0000 (08:31 +1000)]
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>
14 years agodrm/nouveau: check for error when allocating/mapping dummy page
Ben Skeggs [Thu, 12 Aug 2010 00:23:06 +0000 (10:23 +1000)]
drm/nouveau: check for error when allocating/mapping dummy page

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nouveau: fix race condition when under memory pressure
Ben Skeggs [Thu, 22 Jul 2010 23:06:52 +0000 (09:06 +1000)]
drm/nouveau: fix race condition when under memory pressure

When VRAM is running out it's possible that the client's push buffers get
evicted to main memory.  When they're validated back in, the GPU may
be used for the copy back to VRAM, but the existing synchronisation code
only deals with inter-channel sync, not sync between PFIFO and PGRAPH on
the same channel.  This leads to PFIFO fetching from command buffers that
haven't quite been copied by PGRAPH yet.

This patch marks push buffers as so, and forces any GPU-assisted buffer
moves to be done on a different channel, which triggers the correct
synchronisation to happen before we submit them.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nv50: fix minor thinko from nvc0 changes
Ben Skeggs [Tue, 10 Aug 2010 00:50:13 +0000 (10:50 +1000)]
drm/nv50: fix minor thinko from nvc0 changes

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nouveau: Don't try DDC on the dummy I2C channel.
Francisco Jerez [Sun, 8 Aug 2010 19:35:57 +0000 (21:35 +0200)]
drm/nouveau: Don't try DDC on the dummy I2C channel.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nvc0: fix typo in PRAMIN flush
Ben Skeggs [Mon, 9 Aug 2010 05:18:44 +0000 (15:18 +1000)]
drm/nvc0: fix typo in PRAMIN flush

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nouveau: Fix DCB TMDS config parsing.
Francisco Jerez [Sun, 8 Aug 2010 15:09:06 +0000 (17:09 +0200)]
drm/nouveau: Fix DCB TMDS config parsing.

Thinko caused by 43bda05428a3d2021f3c12220073e0251c65df8b.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
14 years agodrm/nv30: Fix PFB init for nv31.
Francisco Jerez [Fri, 6 Aug 2010 18:32:25 +0000 (20:32 +0200)]
drm/nv30: Fix PFB init for nv31.

Fixes a regression introduced by 58bbb63720c8997e0136fe1884101e7ca40d68fd
(fdo bug 29324).

Reported-by: Johannes Obermayr <johannesobermayr@gmx.de>
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nv04: Fix up SGRAM density detection.
Francisco Jerez [Thu, 5 Aug 2010 20:58:42 +0000 (22:58 +0200)]
drm/nv04: Fix up SGRAM density detection.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/i2c/ch7006: Don't use POWER_LEVEL_FULL_POWER_OFF on early chip versions.
Francisco Jerez [Thu, 5 Aug 2010 20:57:08 +0000 (22:57 +0200)]
drm/i2c/ch7006: Don't use POWER_LEVEL_FULL_POWER_OFF on early chip versions.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nouveau: Init dcb->or on cards that have no usable DCB table.
Francisco Jerez [Tue, 3 Aug 2010 13:34:53 +0000 (15:34 +0200)]
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>
14 years agodrm/nouveau: reduce severity of some "error" messages
Ben Skeggs [Wed, 4 Aug 2010 13:09:30 +0000 (23:09 +1000)]
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>
14 years agodrm/nvc0: backup bar3 channel on suspend
Ben Skeggs [Wed, 4 Aug 2010 12:48:34 +0000 (22:48 +1000)]
drm/nvc0: backup bar3 channel on suspend

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nouveau: implement init table opcodex 0x5e and 0x9a
Marcin Kościelnicki [Sun, 4 Jul 2010 02:47:16 +0000 (02:47 +0000)]
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>
14 years agodrm/nouveau: implement init table op 0x57, INIT_LTIME
Marcin Kościelnicki [Fri, 2 Jul 2010 19:33:01 +0000 (19:33 +0000)]
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>
14 years agodrm/nvc0: implement crtc pll setting
Ben Skeggs [Wed, 4 Aug 2010 12:08:03 +0000 (22:08 +1000)]
drm/nvc0: implement crtc pll setting

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nvc0: fix evo dma object so we display something
Ben Skeggs [Wed, 4 Aug 2010 07:24:57 +0000 (17:24 +1000)]
drm/nvc0: fix evo dma object so we display something

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nvc0: rudimentary instmem support
Ben Skeggs [Wed, 4 Aug 2010 05:45:33 +0000 (15:45 +1000)]
drm/nvc0: rudimentary instmem support

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nvc0: implement memory detection
Ben Skeggs [Wed, 4 Aug 2010 03:44:41 +0000 (13:44 +1000)]
drm/nvc0: implement memory detection

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nvc0: allow INIT_GPIO
Ben Skeggs [Wed, 4 Aug 2010 03:40:50 +0000 (13:40 +1000)]
drm/nvc0: allow INIT_GPIO

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nvc0: starting point for GF100 support, everything stubbed
Ben Skeggs [Tue, 3 Aug 2010 00:00:56 +0000 (10:00 +1000)]
drm/nvc0: starting point for GF100 support, everything stubbed

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nv30: Workaround dual TMDS brain damage.
Francisco Jerez [Sun, 25 Jul 2010 17:13:43 +0000 (19:13 +0200)]
drm/nv30: Workaround dual TMDS brain damage.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nouveau: No need to set slave TV encoder configs explicitly.
Francisco Jerez [Tue, 20 Jul 2010 15:16:33 +0000 (17:16 +0200)]
drm/nouveau: No need to set slave TV encoder configs explicitly.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nv17-nv4x: Attempt to init some external TMDS transmitters.
Francisco Jerez [Tue, 20 Jul 2010 14:48:08 +0000 (16:48 +0200)]
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>
14 years agodrm/nv10: Fix up switching of NV10TCL_DMA_VTXBUF.
Francisco Jerez [Wed, 4 Aug 2010 02:54:08 +0000 (04:54 +0200)]
drm/nv10: Fix up switching of NV10TCL_DMA_VTXBUF.

Not very nice, but I don't think there's a simpler workaround.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nouveau: Ack the context switch interrupt before switching contexts.
Francisco Jerez [Wed, 4 Aug 2010 02:41:55 +0000 (04:41 +0200)]
drm/nouveau: Ack the context switch interrupt before switching contexts.

Leaving the IRQ unack'ed while switching contexts makes the switch
fail randomly on some nv1x.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nouveau: Fix the INIT_CONFIGURE_PREINIT BIOS opcode.
Francisco Jerez [Wed, 4 Aug 2010 03:15:11 +0000 (05:15 +0200)]
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>
14 years agodrm/nouveau: Don't pass misaligned offsets to io_mapping_map_atomic_wc().
Francisco Jerez [Wed, 4 Aug 2010 03:10:57 +0000 (05:10 +0200)]
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>
14 years agodrm/nouveau: unwind on load errors
Dan Carpenter [Fri, 30 Jul 2010 15:04:32 +0000 (17:04 +0200)]
drm/nouveau: unwind on load errors

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

Signed-off-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nouveau: Fix AGP reset when AGP FW is already enabled on init.
Francisco Jerez [Fri, 30 Jul 2010 11:57:54 +0000 (13:57 +0200)]
drm/nouveau: Fix AGP reset when AGP FW is already enabled on init.

Previously nouveau_mem_reset_agp() was only disabling AGP fast writes
when coming back from suspend. However, the "locked out of the card
because of FW" problem can also be reproduced on init if you
unload/reload nouveau.ko several times. This patch makes the AGP code
reset FW on init.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nouveau: remove unused ttm bo list
Ben Skeggs [Mon, 2 Aug 2010 06:28:19 +0000 (16:28 +1000)]
drm/nouveau: remove unused ttm bo list

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nv50: use custom i2c algo for dp auxch
Ben Skeggs [Thu, 29 Jul 2010 11:01:45 +0000 (21:01 +1000)]
drm/nv50: use custom i2c algo for dp auxch

This makes it easier to see how this is working, and lets us transfer the
EDID in blocks of 16 bytes.

The primary reason for this change is because debug logs are rather hard
to read with the hundreds of single-byte auxch transactions that occur.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agoagp: intel-agp: do not use PCI resources before pci_enable_device()
Kulikov Vasiliy [Tue, 3 Aug 2010 15:42:34 +0000 (19:42 +0400)]
agp: intel-agp: do not use PCI resources before pci_enable_device()

IRQ and resource[] may not have correct values until
after PCI hotplug setup occurs at pci_enable_device() time.

The semantic match that finds this problem is as follows:

// <smpl>
@@
identifier x;
identifier request ~= "pci_request.*|pci_resource.*";
@@

(
* x->irq
|
* x->resource
|
* request(x, ...)
)
 ...
*pci_enable_device(x)
// </smpl>

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agoagp: efficeon-agp: do not use PCI resources before pci_enable_device()
Kulikov Vasiliy [Tue, 3 Aug 2010 15:42:30 +0000 (19:42 +0400)]
agp: efficeon-agp: do not use PCI resources before pci_enable_device()

IRQ and resource[] may not have correct values until
after PCI hotplug setup occurs at pci_enable_device() time.

The semantic match that finds this problem is as follows:

// <smpl>
@@
identifier x;
identifier request ~= "pci_request.*|pci_resource.*";
@@

(
* x->irq
|
* x->resource
|
* request(x, ...)
)
 ...
*pci_enable_device(x)
// </smpl>

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm: kill BKL from common code
Arnd Bergmann [Sat, 10 Jul 2010 21:51:39 +0000 (23:51 +0200)]
drm: kill BKL from common code

This restricts the use of the big kernel lock to the i830 and i810
device drivers. The three remaining users in common code (open, ioctl
and release) get converted to a new mutex, the drm_global_mutex,
making the locking stricter than the big kernel lock.

This may have a performance impact, but only in those cases that
currently don't use DRM_UNLOCKED flag in the ioctl list and would
benefit from that anyway.

The reason why i810 and i830 cannot use drm_global_mutex in their
mmap functions is a lock-order inversion problem between the current
use of the BKL and mmap_sem in these drivers. Since the BKL has
release-on-sleep semantics, it's harmless but it would cause trouble
if we replace the BKL with a mutex.

Instead, these drivers get their own ioctl wrappers that take the
BKL around every ioctl call and then set their own handlers as
DRM_UNLOCKED.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: David Airlie <airlied@linux.ie>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/kms: Simplify setup of the initial I2C encoder config.
Francisco Jerez [Thu, 22 Jul 2010 15:07:38 +0000 (17:07 +0200)]
drm/kms: Simplify setup of the initial I2C encoder config.

In most use cases the driver will be using the same static config all
the time: interpreting i2c_board_info::platform_data as the default
config we can can save the GPU driver a redundant set_config() call.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm,io-mapping: Specify slot to use for atomic mappings
Chris Wilson [Wed, 4 Aug 2010 13:34:24 +0000 (14:34 +0100)]
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>
14 years agodrm/radeon/kms: only expose underscan on avivo chips
Alex Deucher [Wed, 4 Aug 2010 07:45:04 +0000 (03:45 -0400)]
drm/radeon/kms: only expose underscan on avivo chips

R4xx also uses the atom add connector function, but underscan is only
supported on avivo chips.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon: add new pci ids
Alex Deucher [Wed, 4 Aug 2010 15:40:00 +0000 (11:40 -0400)]
drm/radeon: add new pci ids

New evergreen and r7xx ids.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm: Cleanup after failing to create master->unique and dev->name
Chris Wilson [Wed, 4 Aug 2010 10:09:42 +0000 (11:09 +0100)]
drm: Cleanup after failing to create master->unique and dev->name

v2: Userspace (notably xf86-video-{intel,ati}) became confused when
drmSetInterfaceVersion() started returning -EBUSY as they used a second
call (the first done in drmOpen()) to check their master credentials.
Since userspace wants to be able to repeatedly call
drmSetInterfaceVersion() allow them to do so.

v3: Rebase to drm-core-next.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon: tone down overchatty acpi debug messages.
Dave Airlie [Wed, 4 Aug 2010 01:16:56 +0000 (11:16 +1000)]
drm/radeon: tone down overchatty acpi debug messages.

On non laptop systems we'll see these the whole time, so make them
less important.

Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms: enable underscan option for digital connectors
Alex Deucher [Tue, 3 Aug 2010 23:59:20 +0000 (19:59 -0400)]
drm/radeon/kms: enable underscan option for digital connectors

This connector attribute allows you to enable or disable underscan
on a digital output to compensate for panels that automatically
overscan (e.g., many HDMI TVs).  Valid values for the attribute are:

off - forces underscan off
on - forces underscan on
auto - enables underscan if an HDMI TV is connected, off otherwise

default value is auto.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms: fix calculation of h/v scaling factors
Alex Deucher [Tue, 3 Aug 2010 23:58:49 +0000 (19:58 -0400)]
drm/radeon/kms: fix calculation of h/v scaling factors

Prior to this patch the code was dividing the src_v by the dst_h
and vice versa, rather than src_v/dst_v and src_h/dst_h.

This could lead to problems in the calculation of the display
watermarks.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agoMerge remote branch 'intel/drm-intel-next' of /ssd/git/drm-next into drm-core-next
Dave Airlie [Tue, 3 Aug 2010 23:51:27 +0000 (09:51 +1000)]
Merge remote branch 'intel/drm-intel-next' of /ssd/git/drm-next into drm-core-next

* 'intel/drm-intel-next' of /ssd/git/drm-next: (230 commits)
  drm/i915: Clear the Ironlake dithering flags when the pipe doesn't want it.
  drm/agp/i915: trim stolen space to 32M
  drm/i915: Unset cursor if out-of-bounds upon mode change (v4)
  drm/i915: Unreference object not handle on creation
  drm/i915: Attempt to uncouple object after catastrophic failure in unbind
  drm/i915: Repeat unbinding during free if interrupted (v6)
  drm/i915: Refactor i915_gem_retire_requests()
  drm/i915: Warn if we run out of FIFO space for a mode
  drm/i915: Round up the watermark entries (v3)
  drm/i915: Typo in (unused) register mask for overlay.
  drm/i915: Check overlay stride errata for i830 and i845
  drm/i915: Validate the mode for eDP by using fixed panel size
  drm/i915: Always use the fixed panel timing for eDP
  drm/i915: Enable panel fitting for eDP
  drm/i915: Add fixed panel mode parsed from EDID for eDP without fixed mode in VBT
  drm/i915/sdvo: Set sync polarity based on actual mode
  drm/i915/hdmi: Set sync polarity based on actual mode
  drm/i915/pch: Set transcoder sync polarity for DP based on actual mode
  drm/i915: Initialize LVDS and eDP outputs before anything else
  drm/i915/dp: Correctly report eDP in the core connector type
  ...

14 years agodrm/radeon/kms/igp: sideport is AMD only
Alex Deucher [Mon, 2 Aug 2010 23:39:15 +0000 (19:39 -0400)]
drm/radeon/kms/igp: sideport is AMD only

Intel variants don't support it.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms: handle the case of no active displays properly in the bandwidth code
Alex Deucher [Mon, 2 Aug 2010 16:13:46 +0000 (12:13 -0400)]
drm/radeon/kms: handle the case of no active displays properly in the bandwidth code

Logic was:
if (mode0 && mode1)
else if (mode0)
else

Should be:
if (mode0 && mode1)
else if (mode0)
else if (mode1)

Otherwise we may end up calculating the priority regs with
unitialized values.

Fixes:
https://bugzilla.kernel.org/show_bug.cgi?id=16492

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm: move ttm global code to core drm
Dave Airlie [Tue, 9 Mar 2010 00:56:52 +0000 (10:56 +1000)]
drm: move ttm global code to core drm

I wrote this for the prime sharing work, but I also noticed other external
non-upstream drivers from a large company carrying a similiar patch, so I
may as well ship it in master.

Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/i915: Clear the Ironlake dithering flags when the pipe doesn't want it.
Eric Anholt [Mon, 26 Jul 2010 21:49:07 +0000 (14:49 -0700)]
drm/i915: Clear the Ironlake dithering flags when the pipe doesn't want it.

My fine DisplayPort output was getting ST dithering forever after
having had the LVDS enabled at one point.

Signed-off-by: Eric Anholt <eric@anholt.net>
14 years agodrm/radeon/kms: make sure HPD is set to NONE on analog-only connectors
Alex Deucher [Tue, 20 Jul 2010 07:24:11 +0000 (03:24 -0400)]
drm/radeon/kms: make sure HPD is set to NONE on analog-only connectors

HPD is digital only.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/radeon/kms: make sure rio_mem is valid before unmapping it
Alex Deucher [Thu, 8 Jul 2010 16:24:52 +0000 (12:24 -0400)]
drm/radeon/kms: make sure rio_mem is valid before unmapping it

If we were not able to map the io bar in device init, don't attempt
to unmap it in device fini.  All radeons should have a io bar, so
I doubt this would ever trigger, but just to be on the safe side...

Pointed out by: Alberto Milone <alberto.milone@canonical.com>
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agodrm/agp/i915: trim stolen space to 32M
Jesse Barnes [Thu, 8 Jul 2010 16:22:46 +0000 (09:22 -0700)]
drm/agp/i915: trim stolen space to 32M

Some BIOSes will claim a large chunk of stolen space.  Unless we
reclaim it, our aperture for remapping buffer objects will be
constrained.  So clamp the stolen space to 32M and ignore the rest.

Fixes https://bugzilla.kernel.org/show_bug.cgi?id=15469 among others.

Adding the ignored stolen memory back into the general pool using the
memory hotplug code is left as an exercise for the reader.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: Simon Farnsworth <simon.farnsworth@onelan.com>
Tested-by: Artem S. Tashkinov <t.artem@mailcity.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
14 years agodrm/i915: Unset cursor if out-of-bounds upon mode change (v4)
Chris Wilson [Fri, 9 Jul 2010 07:45:04 +0000 (08:45 +0100)]
drm/i915: Unset cursor if out-of-bounds upon mode change (v4)

The docs warn that to position the cursor such that no part of it is
visible on the pipe is an undefined operation. Avoid such circumstances
upon changing the mode, or at any other time, by unsetting the cursor if
it moves out of bounds.

"For normal high resolution display modes, the cursor must have at least a
single pixel positioned over the active screen.” (p143, p148 of the hardware
registers docs).

Fixes:

  Bug 24748 - [965G] Graphics crashes when resolution is changed with KMS
              enabled
  https://bugs.freedesktop.org/show_bug.cgi?id=24748

v2: Only update the cursor registers if they change.
v3: Fix the unsigned comparision of x,y against width,height.
v4: Always set CUR.BASE or else the cursor may become corrupt.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reported-by: Christian Eggers <ceggers@gmx.de>
Cc: Christopher James Halse Rogers <chalserogers@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Eric Anholt <eric@anholt.net>
14 years agodrm/i915: Unreference object not handle on creation
Chris Wilson [Sat, 24 Jul 2010 20:03:49 +0000 (21:03 +0100)]
drm/i915: Unreference object not handle on creation

When creating an object, we create the handle by which it is known to
the process and which own the reference to the object. That reference to
the new handle is what we want to transfer to the process, not the lost
reference to the object; so free the local object reference *not* the
process's handle reference.

This brings i915_gem_object_create_ioctl() into line with
drm_gem_open_ioctl()

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
14 years agodrm/i915: Attempt to uncouple object after catastrophic failure in unbind
Chris Wilson [Fri, 23 Jul 2010 22:18:51 +0000 (23:18 +0100)]
drm/i915: Attempt to uncouple object after catastrophic failure in unbind

If we fail to flush outstanding GPU writes but return the memory to the
system, we risk corrupting memory should the GPU recovery and complete
those writes. On the other hand, if we bail early and free the object
then we have a definite use-after-free and real memory corruption.
Choose the lesser of two evils, since in order to recover from the hung
GPU we need to completely reset it, those pending writes should
never happen.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
14 years agodrm/i915: Repeat unbinding during free if interrupted (v6)
Chris Wilson [Fri, 23 Jul 2010 22:18:50 +0000 (23:18 +0100)]
drm/i915: Repeat unbinding during free if interrupted (v6)

If during the freeing of an object the unbind is interrupted by a system
call, which is quite possible if we have outstanding GPU writes that
must be flushed, the unbind is silently aborted. This still leaves the
AGP region and backing pages allocated, and perhaps more importantly,
the object remains upon the various lists exposing us to memory
corruption.

I think this is the cause behind the use-after-free, such as

  Bug 15664 - Graphics hang and kernel backtrace when starting Azureus
              with Compiz enabled
  https://bugzilla.kernel.org/show_bug.cgi?id=15664

v2: Daniel Vetter reminded me that kernel space programming is never easy.
We cannot simply spin to clear the pending signal and so must deferred
the freeing of the object until later.
v3: Run from the top level retire requests.
v4: Tested with P(return -ERESTARTSYS)=.5 from i915_gem_do_wait_request()
v5: Rebase against Eric's for-linus tree.
v6: Refactor, split and add a comment about avoiding unbounded recursion.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Eric Anholt <eric@anholt.net>
14 years agodrm/i915: Refactor i915_gem_retire_requests()
Chris Wilson [Fri, 23 Jul 2010 22:18:49 +0000 (23:18 +0100)]
drm/i915: Refactor i915_gem_retire_requests()

Combine the iteration over active render rings into a common function.
This is in preparation for reusing the idle function to also retire
deferred free requests.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
14 years agodrm/i915: Warn if we run out of FIFO space for a mode
Chris Wilson [Mon, 19 Jul 2010 20:46:08 +0000 (21:46 +0100)]
drm/i915: Warn if we run out of FIFO space for a mode

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
14 years agodrm/i915: Round up the watermark entries (v3)
Chris Wilson [Mon, 19 Jul 2010 18:59:52 +0000 (19:59 +0100)]
drm/i915: Round up the watermark entries (v3)

Even though "we have enough padding that it should be ok", round up the
watermark entries to the next unit to be on the safe side...

v2: Use the DIV_ROUND_UP macro
v3: Spotted a few more missing round-ups.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
14 years agodrm/i915: Typo in (unused) register mask for overlay.
Chris Wilson [Tue, 13 Jul 2010 12:52:17 +0000 (13:52 +0100)]
drm/i915: Typo in (unused) register mask for overlay.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
14 years agodrm/i915: Check overlay stride errata for i830 and i845
Chris Wilson [Mon, 12 Jul 2010 18:35:38 +0000 (19:35 +0100)]
drm/i915: Check overlay stride errata for i830 and i845

Apparently i830 and i845 cannot handle any stride that is not a multiple
of 256, unlike their brethren which do support 64 byte aligned strides.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
Signed-off-by: Eric Anholt <eric@anholt.net>
14 years agodrm/i915: Validate the mode for eDP by using fixed panel size
Zhao Yakui [Mon, 19 Jul 2010 08:43:14 +0000 (09:43 +0100)]
drm/i915: Validate the mode for eDP by using fixed panel size

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
Signed-off-by: Eric Anholt <eric@anholt.net>
14 years agodrm/i915: Always use the fixed panel timing for eDP
Zhao Yakui [Mon, 19 Jul 2010 08:43:13 +0000 (09:43 +0100)]
drm/i915: Always use the fixed panel timing for eDP

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
Signed-off-by: Eric Anholt <eric@anholt.net>
14 years agodrm/i915: Enable panel fitting for eDP
Zhao Yakui [Mon, 19 Jul 2010 08:43:12 +0000 (09:43 +0100)]
drm/i915: Enable panel fitting for eDP

When trying to set other display mode besides the fixed panel mode, the
panel fitting should be enabled. This is similar to LVDS.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
Signed-off-by: Eric Anholt <eric@anholt.net>
14 years agodrm/i915: Add fixed panel mode parsed from EDID for eDP without fixed mode in VBT
Zhao Yakui [Mon, 19 Jul 2010 08:43:11 +0000 (09:43 +0100)]
drm/i915: Add fixed panel mode parsed from EDID for eDP without fixed mode in VBT

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
Signed-off-by: Eric Anholt <eric@anholt.net>
14 years agodrm/i915/sdvo: Set sync polarity based on actual mode
Adam Jackson [Fri, 16 Jul 2010 18:46:32 +0000 (14:46 -0400)]
drm/i915/sdvo: Set sync polarity based on actual mode

Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
14 years agodrm/i915/hdmi: Set sync polarity based on actual mode
Adam Jackson [Fri, 16 Jul 2010 18:46:31 +0000 (14:46 -0400)]
drm/i915/hdmi: Set sync polarity based on actual mode

Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
14 years agodrm/i915/pch: Set transcoder sync polarity for DP based on actual mode
Adam Jackson [Fri, 16 Jul 2010 18:46:30 +0000 (14:46 -0400)]
drm/i915/pch: Set transcoder sync polarity for DP based on actual mode

Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
14 years agodrm/i915: Initialize LVDS and eDP outputs before anything else
Adam Jackson [Fri, 16 Jul 2010 18:46:29 +0000 (14:46 -0400)]
drm/i915: Initialize LVDS and eDP outputs before anything else

This makes them sort to the front in X, which makes them likely to be
the primary outputs if you haven't specified a preference in your DE,
which is likely to be what you want.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
14 years agodrm/i915/dp: Correctly report eDP in the core connector type
Adam Jackson [Fri, 16 Jul 2010 18:46:28 +0000 (14:46 -0400)]
drm/i915/dp: Correctly report eDP in the core connector type

Do this for both real eDP and for PCH_DP_D when used as the eDP
connection.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
14 years agodrm/i915/dp: Rename has_edp to is_pch_edp to reflect its real meaning
Adam Jackson [Fri, 16 Jul 2010 18:46:27 +0000 (14:46 -0400)]
drm/i915/dp: Rename has_edp to is_pch_edp to reflect its real meaning

Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
14 years agodrm/i915: Refactor panel fitting on the LVDS. (v2)
Chris Wilson [Sun, 18 Jul 2010 11:05:54 +0000 (12:05 +0100)]
drm/i915: Refactor panel fitting on the LVDS. (v2)

Move the common routines into separate functions to not only increase
readability, but also throwaway surplus code.

In doing so, we review the calculation of the aspect preserving scaling
and avoid the use of fixed-point until we need to calculate the accurate
scale factor.

v2: Improve comments as suggested by Jesse.

1 files changed, 105 insertions(+), 194 deletions(-)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
14 years agodrm/i915: Remove the redundant check for a fixed_panel_mode
Chris Wilson [Sat, 17 Jul 2010 12:38:43 +0000 (13:38 +0100)]
drm/i915: Remove the redundant check for a fixed_panel_mode

We already checked just a couple of lines above that we have found a
fixed_panel_mode for the LVDS, so remove the surplus check.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
14 years agodrm/i915: apply DP bandwidth workaround for PCH eDP as well
Jesse Barnes [Wed, 21 Jul 2010 20:57:47 +0000 (13:57 -0700)]
drm/i915: apply DP bandwidth workaround for PCH eDP as well

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=29141 though the
workaround itself is still a bit of a mystery.

Tested-by: Adam Hill <sidepipeuk@yahoo.co.uk>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
14 years agoagp/intel: Destroy the scatterlist on allocation failure
Chris Wilson [Sat, 24 Jul 2010 17:29:37 +0000 (18:29 +0100)]
agp/intel: Destroy the scatterlist on allocation failure

A side-effect of being able to use custom page allocations with the
sg_table is that it cannot reap the partially constructed scatterlist if
fails to allocate a page. So we need to call sg_free_table() ourselves
if sg_alloc_table() fails.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc Dave Airlie <airlied@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
14 years agoMerge remote branch 'origin/master' into drm-intel-next
Eric Anholt [Mon, 2 Aug 2010 02:23:53 +0000 (19:23 -0700)]
Merge remote branch 'origin/master' into drm-intel-next

This resolves the conflict in the EDP code, which has been rather
popular to hack on recently.

Conflicts:
drivers/gpu/drm/i915/intel_dp.c

14 years agoagp/intel: Add actual definitions of the Sandybridge PTE caching bits.
Zhenyu Wang [Fri, 9 Jul 2010 17:45:17 +0000 (10:45 -0700)]
agp/intel: Add actual definitions of the Sandybridge PTE caching bits.

14 years agoagp/intel: Support the extended physical addressing bits on Sandybridge.
Zhenyu Wang [Fri, 9 Jul 2010 17:40:58 +0000 (10:40 -0700)]
agp/intel: Support the extended physical addressing bits on Sandybridge.

Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
[anholt: Split this patch out of a larger patch for Sandybridge fixes]
Signed-off-by: Eric Anholt <eric@anholt.net>
14 years agodrm/i915: Include any alternate names by which the device is known.
Chris Wilson [Mon, 5 Jul 2010 17:01:47 +0000 (18:01 +0100)]
drm/i915: Include any alternate names by which the device is known.

When trying to keep track of features between the kernel, the 2D driver,
mesa and the specs, it helps to list any other name by which the device
is referred to.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
14 years agodrm/i915: Use 128k alignment for untiled display surface on i965 (v2)
Chris Wilson [Mon, 5 Jul 2010 17:01:46 +0000 (18:01 +0100)]
drm/i915: Use 128k alignment for untiled display surface on i965 (v2)

The original i965, including the revised G35 and Q35, requires an
alignment of 128K for the display surface with linear memory, so
increase the requirement from 64k for these chipsets. For the later
chipsets in the i965 family, only a 4k alignment is required. (So
long as we do not start performing asynchronous flips.)

Note the impact of this should be slight as on i965 we should be using a
tiled frontbuffer for anything up to a 4096x4096 display.

v2: compilation fixes and note that the docs do not exclude the G35 from
the extra alignment.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
14 years agodrm/i915/pch: Cosmetic fix to FDI link training
Adam Jackson [Fri, 25 Jun 2010 19:32:14 +0000 (15:32 -0400)]
drm/i915/pch: Cosmetic fix to FDI link training

Unmask the bits for link training reporting before starting link
training.  If stage 1 training finished before we unmask them, then we'd
spin around in a loop a few times until smashing on through.  Which is
harmless, since training _did_ succeed, it just looks ugly in dmesg.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
14 years agodrm/i915: cleanup: use ARRAY_SIZE()
Dan Carpenter [Wed, 23 Jun 2010 17:29:54 +0000 (19:29 +0200)]
drm/i915: cleanup: use ARRAY_SIZE()

NUM_TV_MODES is the same as ARRAY_SIZE(tv_modes).  In the end, I
decided it was cleaner to remove NUM_TV_MODES and just use
ARRAY_SIZE(tv_modes) through out.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
14 years agodrm/i915: Include instdone[1] in hangcheck
Chris Wilson [Sun, 6 Jun 2010 11:16:24 +0000 (12:16 +0100)]
drm/i915: Include instdone[1] in hangcheck

References:

  Bug 26691 - Spurious hangcheck whilst executing a long shader over a
              large vertex buffer
  https://bugs.freedesktop.org/show_bug.cgi?id=26691

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
14 years agodrm/i915: Remove the WARN when failing to set tiling.
Chris Wilson [Sun, 6 Jun 2010 12:21:26 +0000 (13:21 +0100)]
drm/i915: Remove the WARN when failing to set tiling.

We generally issue an error message at the point of failure, and so this
warning with a fairly pointless stacktrace is superfluous and ugly.
Needless to say, the common trigger for this WARN happens to be EIO
where this is pure noise.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
14 years agodrm/i915: fix FDI frequency check
Jesse Barnes [Wed, 7 Jul 2010 21:06:43 +0000 (14:06 -0700)]
drm/i915: fix FDI frequency check

Since mode->clock is in kHz we should be checking against 2700000
instead of just 27000.  This patch gets my x201s working again (well
working as well as it ever was anyway).

When looking for this I also noticed we set link_bw to 270000, but the
calculation is different.  Does it also need to use kHz or we using
10kHz internally?

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
14 years agodrm/i915: Sparse warning about invalid value for burst_ena in tv_modes
Chris Wilson [Sun, 6 Jun 2010 14:40:23 +0000 (15:40 +0100)]
drm/i915: Sparse warning about invalid value for burst_ena in tv_modes

drivers/gpu/drm/i915/intel_tv.c|479 col 16| warning: cast truncates bits
from constant value (8 becomes 0)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
14 years agodrm/i915: Sparse warns about the incorrect sign for storing bit17
Chris Wilson [Sun, 6 Jun 2010 14:40:22 +0000 (15:40 +0100)]
drm/i915: Sparse warns about the incorrect sign for storing bit17

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
14 years agodrm/i915: Silence sparse over non-static local structure.
Chris Wilson [Sun, 6 Jun 2010 14:40:20 +0000 (15:40 +0100)]
drm/i915: Silence sparse over non-static local structure.

drivers/gpu/drm/i915/i915_drv.c|485 col 25| warning: symbol 'i915_pm_ops' was not declared. Should it be static?

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>