]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
12 years agoMerge branch 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux...
Dave Airlie [Thu, 24 May 2012 09:17:16 +0000 (10:17 +0100)]
Merge branch 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-core-next

Ben was distracted:

"Apologies for being really late with this, feel free to bash me in the
future so I remember on time!

Overview:
- improvements to reclocking (especially memory) on nva3+
- kepler accel support (if you have blob ucode)
- better inter-channel synchronisation on nv84+
- async ttm buffer moves on nv84+ (earlier cards don't have a non-PGRAPH
engine that's useful)"

* 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6: (60 commits)
  drm/nouveau/nvd9: Fix GPIO initialisation sequence.
  drm/nouveau: Unregister switcheroo client on exit
  drm/nouveau: Check dsm on switcheroo unregister
  drm/nouveau: fix a minor annoyance in an output string
  drm/nouveau: turn a BUG into a WARN
  drm/nv50: decode PGRAPH DATA_ERROR = 0x24
  drm/nouveau/disp: fix dithering not being enabled on some eDP macbooks
  drm/nvd9/copy: initialise copy engine, seems to work like nvc0
  drm/nvc0/ttm: use copy engines for async buffer moves
  drm/nva3/ttm: use copy engine for async buffer moves
  drm/nv98/ttm: add in a (disabled) crypto engine buffer copy method
  drm/nv84/ttm: use crypto engine for async buffer copies
  drm/nouveau/ttm: untangle code to support accelerated buffer moves
  drm/nouveau/fbcon: use fence for sync, rather than notifier
  drm/nv98/crypt: non-stub implementation of the engine hooks
  drm/nouveau/fifo: turn all fifo modules into engine modules
  drm/nv50/graph: remove ability to do interrupt-driven context switching
  drm/nv50: remove manual context unload on context destruction
  drm/nv50: remove execution engine context saves on suspend
  drm/nv50/fifo: use hardware channel kickoff functionality
  ...

12 years agodrm/nouveau/nvd9: Fix GPIO initialisation sequence.
Marcin Kościelnicki [Mon, 21 May 2012 12:51:50 +0000 (14:51 +0200)]
drm/nouveau/nvd9: Fix GPIO initialisation sequence.

Signed-off-by: Marcin Kościelnicki <koriakin@0x04.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nouveau: Unregister switcheroo client on exit
Andreas Heider [Sun, 20 May 2012 23:14:51 +0000 (00:14 +0100)]
drm/nouveau: Unregister switcheroo client on exit

Currently nouveau only registers as a vga_switcheroo client, but never
unregisters. This patch adds the necessary unregister calls.

Signed-off-by: Andreas Heider <andreas@meetr.de>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nouveau: Check dsm on switcheroo unregister
Andreas Heider [Sun, 20 May 2012 23:14:50 +0000 (00:14 +0100)]
drm/nouveau: Check dsm on switcheroo unregister

Currently vga_switcheroo_unregister_handler is called unconditionally when
nouveau is unloaded, even when nouveau never registered a handler. This
interferes with other switcheroo handlers, as vga_switcheroo doesn't check who
called unregister_handler, but simply unregisters the current handler. This
patch adds a check so unregister is only called if a handler was registered by
nouveau before.

Signed-off-by: Andreas Heider <andreas@meetr.de>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nouveau: fix a minor annoyance in an output string
Ben Skeggs [Wed, 9 May 2012 10:17:07 +0000 (20:17 +1000)]
drm/nouveau: fix a minor annoyance in an output string

Bugs me every time I put in the TNT2..

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nouveau: turn a BUG into a WARN
Ben Skeggs [Wed, 9 May 2012 02:47:03 +0000 (12:47 +1000)]
drm/nouveau: turn a BUG into a WARN

This is very annoying sometimes..

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nv50: decode PGRAPH DATA_ERROR = 0x24
Marcin Slusarz [Sun, 6 May 2012 21:08:55 +0000 (23:08 +0200)]
drm/nv50: decode PGRAPH DATA_ERROR = 0x24

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nouveau/disp: fix dithering not being enabled on some eDP macbooks
Ben Skeggs [Fri, 4 May 2012 14:39:21 +0000 (00:39 +1000)]
drm/nouveau/disp: fix dithering not being enabled on some eDP macbooks

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nvd9/copy: initialise copy engine, seems to work like nvc0
Ben Skeggs [Fri, 4 May 2012 07:16:46 +0000 (17:16 +1000)]
drm/nvd9/copy: initialise copy engine, seems to work like nvc0

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nvc0/ttm: use copy engines for async buffer moves
Ben Skeggs [Fri, 4 May 2012 05:17:28 +0000 (15:17 +1000)]
drm/nvc0/ttm: use copy engines for async buffer moves

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nva3/ttm: use copy engine for async buffer moves
Ben Skeggs [Fri, 4 May 2012 05:15:12 +0000 (15:15 +1000)]
drm/nva3/ttm: use copy engine for async buffer moves

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nv98/ttm: add in a (disabled) crypto engine buffer copy method
Ben Skeggs [Fri, 4 May 2012 04:34:16 +0000 (14:34 +1000)]
drm/nv98/ttm: add in a (disabled) crypto engine buffer copy method

Disabled for the moment until some performance issues are sorted out, code
committed as a reference point.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nv84/ttm: use crypto engine for async buffer copies
Ben Skeggs [Fri, 4 May 2012 04:21:15 +0000 (14:21 +1000)]
drm/nv84/ttm: use crypto engine for async buffer copies

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nouveau/ttm: untangle code to support accelerated buffer moves
Ben Skeggs [Fri, 4 May 2012 04:01:52 +0000 (14:01 +1000)]
drm/nouveau/ttm: untangle code to support accelerated buffer moves

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nouveau/fbcon: use fence for sync, rather than notifier
Ben Skeggs [Fri, 4 May 2012 04:01:28 +0000 (14:01 +1000)]
drm/nouveau/fbcon: use fence for sync, rather than notifier

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nv98/crypt: non-stub implementation of the engine hooks
Ben Skeggs [Wed, 2 May 2012 11:00:20 +0000 (21:00 +1000)]
drm/nv98/crypt: non-stub implementation of the engine hooks

fuc is from pscnv driver.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nouveau/fifo: turn all fifo modules into engine modules
Ben Skeggs [Tue, 1 May 2012 10:48:08 +0000 (20:48 +1000)]
drm/nouveau/fifo: turn all fifo modules into engine modules

Been tested on each major revision that's relevant here, but I'm sure there
are still bugs waiting to be ironed out.

This is a *very* invasive change.

There's a couple of pieces left that I don't like much (eg. other engines
using fifo_priv for the channel count), but that's an artefact of there
being a master channel list still.  This is changing, slowly.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nv50/graph: remove ability to do interrupt-driven context switching
Ben Skeggs [Tue, 1 May 2012 06:48:50 +0000 (16:48 +1000)]
drm/nv50/graph: remove ability to do interrupt-driven context switching

We never turn this on, no point maintaining the code for it..

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nv50: remove manual context unload on context destruction
Ben Skeggs [Tue, 1 May 2012 06:46:28 +0000 (16:46 +1000)]
drm/nv50: remove manual context unload on context destruction

PFIFO context destruction triggers this automagically now.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nv50: remove execution engine context saves on suspend
Ben Skeggs [Tue, 1 May 2012 06:39:08 +0000 (16:39 +1000)]
drm/nv50: remove execution engine context saves on suspend

Now triggered automagically by the GPU on PFIFO takedown.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nv50/fifo: use hardware channel kickoff functionality
Ben Skeggs [Tue, 1 May 2012 06:33:37 +0000 (16:33 +1000)]
drm/nv50/fifo: use hardware channel kickoff functionality

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nv50/gr: make sure NEXT_TO_CURRENT is executed even if nothing done
Ben Skeggs [Tue, 1 May 2012 06:12:32 +0000 (16:12 +1000)]
drm/nv50/gr: make sure NEXT_TO_CURRENT is executed even if nothing done

PFIFO channel kickoff will hang sometimes otherwise.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nv50/fifo: construct playlist from hw context table state
Ben Skeggs [Tue, 1 May 2012 03:59:31 +0000 (13:59 +1000)]
drm/nv50/fifo: construct playlist from hw context table state

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nouveau/fifo: remove all the "special" engine hooks
Ben Skeggs [Tue, 1 May 2012 00:14:07 +0000 (10:14 +1000)]
drm/nouveau/fifo: remove all the "special" engine hooks

All the places this stuff is actually needed tends to be chipset-specific
anyway, so we're able to just inline the register bashing instead.

The parts of the common code that still directly touch PFIFO temporarily
have conditionals, these will be removed in subsequent commits that will
refactor the fifo modules into engine modules like graph/mpeg etc.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nouveau/fence: fix a race where fence->channel can disappear
Ben Skeggs [Fri, 4 May 2012 06:25:47 +0000 (16:25 +1000)]
drm/nouveau/fence: fix a race where fence->channel can disappear

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nouveau/bios: fix some shadowing issues, particularly acpi
Ben Skeggs [Fri, 4 May 2012 06:25:13 +0000 (16:25 +1000)]
drm/nouveau/bios: fix some shadowing issues, particularly acpi

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nouveau: fix engine context destructor ordering
Ben Skeggs [Thu, 3 May 2012 06:54:15 +0000 (16:54 +1000)]
drm/nouveau: fix engine context destructor ordering

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nouveau/fence: convert to exec engine, and improve channel sync
Ben Skeggs [Mon, 30 Apr 2012 03:55:29 +0000 (13:55 +1000)]
drm/nouveau/fence: convert to exec engine, and improve channel sync

Now have a somewhat simpler semaphore sync implementation for nv17:nv84,
and a switched to using semaphores as fences on nv84+ and making use of
the hardware's >= acquire operation.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nouveau/fence: minor api changes for an upcoming rework
Ben Skeggs [Mon, 30 Apr 2012 03:30:00 +0000 (13:30 +1000)]
drm/nouveau/fence: minor api changes for an upcoming rework

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nouveau/fence: make ttm interfaces wrap ours, not the other way around
Ben Skeggs [Mon, 30 Apr 2012 02:51:48 +0000 (12:51 +1000)]
drm/nouveau/fence: make ttm interfaces wrap ours, not the other way around

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nouveau: move flip-related channel setup to software engine
Ben Skeggs [Mon, 30 Apr 2012 16:34:10 +0000 (11:34 -0500)]
drm/nouveau: move flip-related channel setup to software engine

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nouveau: create real execution engine for software object class
Ben Skeggs [Mon, 30 Apr 2012 16:33:43 +0000 (11:33 -0500)]
drm/nouveau: create real execution engine for software object class

Just a cleanup more or less, and to remove the need for special handling of
software objects.

This removes a heap of documentation on dma/graph object formats.  The info
is very out of date with our current understanding, and is far better
documented in rnndb in envytools git.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nvd0/disp: remove unnecessary sync from flip_next
Ben Skeggs [Mon, 30 Apr 2012 00:56:09 +0000 (10:56 +1000)]
drm/nvd0/disp: remove unnecessary sync from flip_next

This shouldn't be necessary, I believe this is just a bit of missed debug
code that got left over somehow.

Causes flips to be always synced to vblank, regardless of swap interval,
which we don't want..

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nv04/disp: disable vblank interrupts when disabling display
Ben Skeggs [Tue, 22 Nov 2011 03:59:30 +0000 (13:59 +1000)]
drm/nv04/disp: disable vblank interrupts when disabling display

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nouveau: base fence timeout on time of emission
Marcin Slusarz [Wed, 25 Apr 2012 21:20:33 +0000 (23:20 +0200)]
drm/nouveau: base fence timeout on time of emission

Wait loop can be interrupted by signal, so if signals are raised
periodically (e.g. SIGALRM) this loop may never finish. Use
emission time as a base for fence timeout.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nv40-50/gr: restructure grctx/prog generation
Ben Skeggs [Fri, 20 Apr 2012 01:54:33 +0000 (11:54 +1000)]
drm/nv40-50/gr: restructure grctx/prog generation

The conditional definition of the generation helper functions apparently
confuses some IDEs....

Reported-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nv50/disp: fixup error paths in crtc object creation
Ben Skeggs [Fri, 20 Apr 2012 01:01:46 +0000 (11:01 +1000)]
drm/nv50/disp: fixup error paths in crtc object creation

Reported-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nouveau: cleanup after display init failure
Marcin Slusarz [Sun, 15 Apr 2012 12:36:08 +0000 (14:36 +0200)]
drm/nouveau: cleanup after display init failure

Depending on exact point of failure, not cleaning would lead to
BUG_ONs/oopses in various distant places.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nv50: fix ramin heap size for kernel channel too
Marcin Slusarz [Sun, 15 Apr 2012 12:36:07 +0000 (14:36 +0200)]
drm/nv50: fix ramin heap size for kernel channel too

Port change from "drm/nouveau: Keep RAMIN heap within the channel"
to kernel channel, which has its own ramin heap initialisation.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Younes Manton <younes.m@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nve0/graph: bump hub2gpc buffer size
Ben Skeggs [Wed, 4 Apr 2012 01:16:44 +0000 (11:16 +1000)]
drm/nve0/graph: bump hub2gpc buffer size

Reported-by: Christoph Bumiller <e0425955@student.tuwien.ac.at>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nouveau: use the same packet header macros as userspace
Ben Skeggs [Sun, 1 Apr 2012 11:09:13 +0000 (21:09 +1000)]
drm/nouveau: use the same packet header macros as userspace

Cosmetic cleanup only.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nouveau/bios: allow loading alternate vbios image as firmware
Ben Skeggs [Fri, 30 Mar 2012 03:14:45 +0000 (13:14 +1000)]
drm/nouveau/bios: allow loading alternate vbios image as firmware

Useful for debugging different VBIOS versions.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nve0/ttm: implement buffer moves with weirdo pcopy-on-pgraph methods
Ben Skeggs [Tue, 20 Mar 2012 04:36:04 +0000 (14:36 +1000)]
drm/nve0/ttm: implement buffer moves with weirdo pcopy-on-pgraph methods

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nv50-/fbcon: move 2d class to subchannel 3
Ben Skeggs [Tue, 20 Mar 2012 04:20:50 +0000 (14:20 +1000)]
drm/nv50-/fbcon: move 2d class to subchannel 3

Kepler GRAPH has (well, sorta) fixed subchannel<->class assignments, make
this match up to keep it happy without trapping.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nve0/gr: initial implementation
Ben Skeggs [Tue, 13 Mar 2012 03:05:13 +0000 (13:05 +1000)]
drm/nve0/gr: initial implementation

This may, perhaps, get re-merged with nvc0_graph.c at some point.  It's
still unclear as to how great an idea that'd be.  Stay tuned...

Completely dependent on firmware blobs from NVIDIA binary driver currently.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nve0/fifo: initial implementation
Ben Skeggs [Thu, 8 Mar 2012 00:41:45 +0000 (10:41 +1000)]
drm/nve0/fifo: initial implementation

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nouveau: give a slightly larger pci(e)gart aperture on all chipsets
Ben Skeggs [Tue, 27 Mar 2012 05:15:18 +0000 (15:15 +1000)]
drm/nouveau: give a slightly larger pci(e)gart aperture on all chipsets

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nouveau/pm: some more delays for ddr3 reclocking
Ben Skeggs [Mon, 6 Feb 2012 06:20:30 +0000 (16:20 +1000)]
drm/nouveau/pm: some more delays for ddr3 reclocking

These numbers from the binary driver's daemon scripts, and fix the transition
to perflvl 3 on my T510.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nvc0/pm: very initial mclk freq change
Ben Skeggs [Mon, 6 Feb 2012 03:51:30 +0000 (13:51 +1000)]
drm/nvc0/pm: very initial mclk freq change

Loads of magic missing, this will probably blow up if you try it.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nvd9/pm: oops, fix timing calc
Ben Skeggs [Mon, 6 Feb 2012 01:42:29 +0000 (11:42 +1000)]
drm/nvd9/pm: oops, fix timing calc

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nvc0/pm: enable mpll src pll, and calc mpll coefficients
Ben Skeggs [Mon, 6 Feb 2012 01:34:20 +0000 (11:34 +1000)]
drm/nvc0/pm: enable mpll src pll, and calc mpll coefficients

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nvc0/pm: start filling in memory reclocking stubs
Ben Skeggs [Tue, 31 Jan 2012 23:00:57 +0000 (09:00 +1000)]
drm/nvc0/pm: start filling in memory reclocking stubs

12 years agodrm/nva3/pm: another few magic regs, and slightly better 0x004018 handling
Ben Skeggs [Sun, 5 Feb 2012 23:58:09 +0000 (09:58 +1000)]
drm/nva3/pm: another few magic regs, and slightly better 0x004018 handling

Not entirely convinced 0x004018 transitions are correct yet, but, it's
an improvement.

The 750MHz value comes from fiddling with the binary driver + coolbits on
two different DDR3 NVA8 chipsets (T510 NVS3100M, and NVS300), not a clue
where this number comes from.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nva3/pm: initial attempt at handling 111100/111104
Ben Skeggs [Fri, 3 Feb 2012 00:34:33 +0000 (10:34 +1000)]
drm/nva3/pm: initial attempt at handling 111100/111104

Probably not quite right, but this is enough now to make NVS300 reclock
between all 3 of its perflvls correctly.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nva3/pm: make pll->pll mode work
Ben Skeggs [Fri, 3 Feb 2012 00:02:03 +0000 (10:02 +1000)]
drm/nva3/pm: make pll->pll mode work

This probably wants a cleanup, but I'm holding off until I know for sure
how the rest of the things that need doing fit together.

Tested on NVS300 by hacking up perflvl 1 to require PLL mode, and switching
between perflvl 3 and 1.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nva3/pm: attempt to bash a few 0x100200 bits correctly
Ben Skeggs [Thu, 2 Feb 2012 05:07:13 +0000 (15:07 +1000)]
drm/nva3/pm: attempt to bash a few 0x100200 bits correctly

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nva3/pm: begin to restructure memory clock changes + another magic
Ben Skeggs [Thu, 2 Feb 2012 01:43:31 +0000 (11:43 +1000)]
drm/nva3/pm: begin to restructure memory clock changes + another magic

The binary driver appears to do various bits and pieces of the memory
clock frequency change at different times, depending on the particular
transition that's occuring.  I've attempted to replicate this here
for div->pll, pll->div and div->div transitions.

With some additional (patches upcoming) magic regs being bashed, this
allows me to correctly transition between all 3 perflvls on NVS300.

pll->pll transitions will *not* work correctly at the moment, pending
me tricking the binary driver into doing one and seeing how to correctly
handle it.

This patch also handles (hopefully) 0x1110e0, which appears to need
changing depending on whether in PLL or divider mode.. Maybe.  We'll
see.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nva3/pm: more random unknown PFB regs
Ben Skeggs [Fri, 27 Jan 2012 03:26:52 +0000 (13:26 +1000)]
drm/nva3/pm: more random unknown PFB regs

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nva3/pm: initial attempt at more magic PFB regs
Ben Skeggs [Fri, 27 Jan 2012 00:53:17 +0000 (10:53 +1000)]
drm/nva3/pm: initial attempt at more magic PFB regs

The reg calculation may get moved elsewhere at some point, but lets
figure out what exactly we need to do first.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nva3/pm: hook up to ram reclocking helper
Ben Skeggs [Wed, 25 Jan 2012 06:02:58 +0000 (16:02 +1000)]
drm/nva3/pm: hook up to ram reclocking helper

This gets us a start on memory timings.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nva3/pm: introduce more paranoia
Ben Skeggs [Sat, 17 Dec 2011 04:02:51 +0000 (14:02 +1000)]
drm/nva3/pm: introduce more paranoia

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nouveau/radeon: add static const to the dma-buf ops.
Dave Airlie [Wed, 23 May 2012 13:10:27 +0000 (14:10 +0100)]
drm/nouveau/radeon: add static const to the dma-buf ops.

Reported-by: wfg@linux.intel.com
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm/i915: make some dmabuf things static
Dave Airlie [Wed, 23 May 2012 13:09:32 +0000 (14:09 +0100)]
drm/i915: make some dmabuf things static

these functions and the table can all be static/static const.

Reported-by: wfg@linux.intel.com
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm: update ast/cirrus/mgag200 for change in TTM api
Dave Airlie [Wed, 23 May 2012 13:08:41 +0000 (14:08 +0100)]
drm: update ast/cirrus/mgag200 for change in TTM api

New drivers merged after changes were done in prime TTM code.

Fix build.

Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agoMerge branch 'prime-merge' of ssh://people.freedesktop.org/~airlied/linux into drm...
Dave Airlie [Wed, 23 May 2012 09:46:24 +0000 (10:46 +0100)]
Merge branch 'prime-merge' of ssh://people.freedesktop.org/~airlied/linux into drm-core-next

* 'prime-merge' of ssh://people.freedesktop.org/~airlied/linux:
  drm/radeon: add PRIME support (v2)
  i915: add dmabuf/prime buffer sharing support.
  nouveau: add PRIME support
  ttm: add prime sharing support to TTM (v2)
  udl: add prime fd->handle support.
  drm/prime: add exported buffers to current fprivs imported buffer list (v2)
  drm/prime: introduce sg->pages/addr arrays helper

12 years agodrm/radeon: add PRIME support (v2)
Alex Deucher [Thu, 10 May 2012 22:33:13 +0000 (18:33 -0400)]
drm/radeon: add PRIME support (v2)

This adds prime->fd and fd->prime support to radeon.
It passes the sg object to ttm and then populates
the gart entries using it.

Compile tested only.

v2: stub kmap + use new helpers + add reimporting

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agoi915: add dmabuf/prime buffer sharing support.
Daniel Vetter [Thu, 10 May 2012 13:25:09 +0000 (15:25 +0200)]
i915: add dmabuf/prime buffer sharing support.

This adds handle->fd and fd->handle support to i915, this is to allow
for offloading of rendering in one direction and outputs in the other.

v2 from Daniel Vetter:
- fixup conflicts with the prepare/finish gtt prep work.
- implement ppgtt binding support.

Note that we have squat i-g-t testcoverage for any of the lifetime and
access rules dma_buf/prime support brings along. And there are quite a
few intricate situations here.

Also note that the integration with the existing code is a bit
hackish, especially around get_gtt_pages and put_gtt_pages. It imo
would be easier with the prep code from Chris Wilson's unbound series,
but that is for 3.6.

Also note that I didn't bother to put the new prepare/finish gtt hooks
to good use by moving the dma_buf_map/unmap_attachment calls in there
(like we've originally planned for).

Last but not least this patch is only compile-tested, but I've changed
very little compared to Dave Airlie's version. So there's a decent
chance v2 on drm-next works as well as v1 on 3.4-rc.

v3: Right when I've hit sent I've noticed that I've screwed up one
obj->sg_list (for dmar support) and obj->sg_table (for prime support)
disdinction. We should be able to merge these 2 paths, but that's
material for another patch.

v4: fix the error reporting bugs pointed out by ickle.

v5: fix another error, and stop non-gtt mmaps on shared objects
stop pread/pwrite on imported objects, add fake kmap

Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agonouveau: add PRIME support
Dave Airlie [Mon, 2 Apr 2012 10:53:06 +0000 (11:53 +0100)]
nouveau: add PRIME support

This adds prime->fd and fd->prime support to nouveau,
it passes the SG object to TTM, and then populates the
GART entries using it.

v2: add stubbed kmap + use new function to fill out pages array
for faulting + add reimport test.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agottm: add prime sharing support to TTM (v2)
Dave Airlie [Mon, 2 Apr 2012 10:46:06 +0000 (11:46 +0100)]
ttm: add prime sharing support to TTM (v2)

This adds the ability for ttm common code to take an SG table
and use it as the backing for a slave TTM object.

The drivers can then populate their GTT tables using the SG object.

v2: make sure to setup VM for sg bos as well.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agoudl: add prime fd->handle support.
Dave Airlie [Wed, 21 Dec 2011 11:23:44 +0000 (11:23 +0000)]
udl: add prime fd->handle support.

udl can only be used as an output offload so doesn't need to support
handle->fd direction.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm/prime: add exported buffers to current fprivs imported buffer list (v2)
Dave Airlie [Sun, 20 May 2012 16:31:16 +0000 (17:31 +0100)]
drm/prime: add exported buffers to current fprivs imported buffer list (v2)

If userspace attempts to import a buffer it exported on the same device,
we need to return the same GEM handle for it, not a new handle pointing
at the same GEM object.

v2: move removals into a single fn, no need to set to NULL. (Chris Wilson)

Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm/prime: introduce sg->pages/addr arrays helper
Dave Airlie [Fri, 18 May 2012 14:40:33 +0000 (15:40 +0100)]
drm/prime: introduce sg->pages/addr arrays helper

the ttm drivers need this currently, in order to get fault handling
working and efficient.

It also allows addrs to be NULL for devices like udl.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm: add plane properties
Rob Clark [Thu, 17 May 2012 08:23:27 +0000 (02:23 -0600)]
drm: add plane properties

The omapdrm driver uses this for setting per-overlay rotation.  It
is likely also useful for setting YUV->RGB colorspace conversion
matrix, etc.

Signed-off-by: Rob Clark <rob@ti.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm: add bitmask property type
Rob Clark [Thu, 17 May 2012 08:23:26 +0000 (02:23 -0600)]
drm: add bitmask property type

A bitmask property is similar to an enum.  The enum value is a bit
position (0-63), and valid property values consist of a mask of
zero or more of (1 << enum_val[n]).

[airlied: 1LL -> 1ULL]

Signed-off-by: Rob Clark <rob@ti.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agoMerge branch 'exynos-drm-next' of git://git.infradead.org/users/kmpark/linux-samsung...
Dave Airlie [Tue, 22 May 2012 09:39:57 +0000 (10:39 +0100)]
Merge branch 'exynos-drm-next' of git://git.infradead.org/users/kmpark/linux-samsung into drm-core-next

* 'exynos-drm-next' of git://git.infradead.org/users/kmpark/linux-samsung:
  drm/exynos: add G2D driver
  drm/exynos: added vp scaling feature for hdmi
  drm/exynos: added source size to overlay structure
  drm/exynos: add additional display mode for hdmi
  drm/exynos: enable dvi mode for dvi monitor
  drm/exynos: fixed wrong pageflip finish event for interlace mode
  drm/exynos: add PM functions for hdmi and mixer
  drm/exynos: add dpms for hdmi
  drm/exynos: use threaded irq for hdmi hotplug
  drm/exynos: use platform_get_irq_byname for hdmi
  drm/exynos: cleanup for hdmi platform data
  drm/exynos: added a feature to get gem buffer information.
  drm/exynos: added drm prime feature.
  drm/exynos: added cache attribute support for gem.
  vgaarb: Provide dummy default device functions

12 years agodrm: Make the CRTC gamma_set operation optional
Laurent Pinchart [Thu, 17 May 2012 11:27:24 +0000 (13:27 +0200)]
drm: Make the CRTC gamma_set operation optional

Drivers for hardware without gamma support should not be forced to
implement a no-op gamma set operation.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Rob Clark <rob.clark@linaro.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm: Constify drm_mode_config_funcs pointer
Laurent Pinchart [Thu, 17 May 2012 11:27:23 +0000 (13:27 +0200)]
drm: Constify drm_mode_config_funcs pointer

The DRM mode config functions structure declared by drivers and pointed
to by the drm_mode_config funcs field is never modified. Make it a const
pointer.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Inki Dae <inki.dae@samsung.com>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: Thomas Hellstrom <thellstrom@vmware.com>
Cc: Rob Clark <rob.clark@linaro.org>
Reviwed-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm: Constify gem_vm_ops pointer
Laurent Pinchart [Thu, 17 May 2012 11:27:22 +0000 (13:27 +0200)]
drm: Constify gem_vm_ops pointer

The GEM vm operations structure is passed to the VM core that stores it
in a const field. There vm operations structures can thus be const in
DRM as well.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Inki Dae <inki.dae@samsung.com>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Rob Clark <rob.clark@linaro.org>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm: Miscellaneous typo fixes and documentation updates
Laurent Pinchart [Thu, 17 May 2012 11:27:20 +0000 (13:27 +0200)]
drm: Miscellaneous typo fixes and documentation updates

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm: Don't initialize local ret variable when not needed
Laurent Pinchart [Thu, 17 May 2012 11:27:21 +0000 (13:27 +0200)]
drm: Don't initialize local ret variable when not needed

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm: Delete the vblank timer synchronously at cleanup time
Laurent Pinchart [Thu, 17 May 2012 11:27:19 +0000 (13:27 +0200)]
drm: Delete the vblank timer synchronously at cleanup time

A race condition exists in drm_vblank_cleanup() if the vblank disable
timer callback runs after freeing the memory that its callback function
tries to access. Fix this by deleting the timer synchronously.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm/backlight: initialize struct backlight_properties properly
Corentin Chary [Tue, 22 May 2012 09:29:46 +0000 (10:29 +0100)]
drm/backlight: initialize struct backlight_properties properly

The power field was never correctly initialized.

[airlied: just took the two drm specific bits]

Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm/nouveau/dp: Probe branch/sink OUIs (v2)
Adam Jackson [Mon, 14 May 2012 20:05:49 +0000 (16:05 -0400)]
drm/nouveau/dp: Probe branch/sink OUIs (v2)

(airlied: v2: fix missing struct - fixes compile)

Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm/radeon/dp: Probe branch/sink OUIs
Adam Jackson [Mon, 14 May 2012 20:05:48 +0000 (16:05 -0400)]
drm/radeon/dp: Probe branch/sink OUIs

Signed-off-by: Adam Jackson <ajax@redhat.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm/i915/dp: Probe branch/sink OUIs
Adam Jackson [Mon, 14 May 2012 20:05:47 +0000 (16:05 -0400)]
drm/i915/dp: Probe branch/sink OUIs

Signed-off-by: Adam Jackson <ajax@redhat.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm/dp: Add DPCD defines for register 0x007
Adam Jackson [Mon, 14 May 2012 20:05:46 +0000 (16:05 -0400)]
drm/dp: Add DPCD defines for register 0x007

Low four bits are downstream port count.  High bit indicates peer OUI
support.  OUI matching will allow us to do additional per-sink handling
for things like DP->VGA bandwidth limits or (hopefully) the iMac-as-
display hack.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm/dp: Add DPCD OUI register defines
Adam Jackson [Mon, 14 May 2012 20:05:45 +0000 (16:05 -0400)]
drm/dp: Add DPCD OUI register defines

DisplayPort has an escape hatch by which sources and sinks can identify
each other.  We would prefer not to notice this, but I suspect we're
going to need to.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agogma500: Fix Poulsbo suspend/resume crash on devices with SDVO ports
Alan Cox [Mon, 21 May 2012 14:27:44 +0000 (15:27 +0100)]
gma500: Fix Poulsbo suspend/resume crash on devices with SDVO ports

Reported-by: Guillaume Clément <guillaume@baobob.org>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agogma500: handle poulsbo cursor restriction
Patrik Jakobsson [Mon, 21 May 2012 14:27:30 +0000 (15:27 +0100)]
gma500: handle poulsbo cursor restriction

Poulsbo needs a physical address in the cursor base register. We allocate a
stolen memory buffer and copy the cursor image provided by userspace into it.
When/If we get our own userspace driver we can map this stolen memory directly.
The patch also adds a mark in chip ops so we can identify devices that has this
requirement.

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agogma500: Prevent endless loop in panel power up sequence
Alan Cox [Mon, 21 May 2012 14:27:10 +0000 (15:27 +0100)]
gma500: Prevent endless loop in panel power up sequence

Some devices don't have a panel connected to LVDS and thus will never power up.
This patch checks the power sequence progress bits in PP_STATUS to prevent an
endless loop on such devices.

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm/radeon/hdmi: compile audio status in 1 function
Rafał Miłecki [Mon, 14 May 2012 19:25:57 +0000 (21:25 +0200)]
drm/radeon/hdmi: compile audio status in 1 function

This optmizes calls, registers reads and assignments.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agonouveau: nouveau_set_bo_placement takes TTM flags
Dave Airlie [Fri, 18 May 2012 14:31:12 +0000 (15:31 +0100)]
nouveau: nouveau_set_bo_placement takes TTM flags

This seems to be wrong to me, spotted while thinking about dma-buf.

Reviewed-by: Ben Skeggs <bskeggs@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agoMerge tag 'drm-intel-next-2012-05-20' of git://people.freedesktop.org/~danvet/drm...
Dave Airlie [Mon, 21 May 2012 07:09:06 +0000 (08:09 +0100)]
Merge tag 'drm-intel-next-2012-05-20' of git://people.freedesktop.org/~danvet/drm-intel into drm-core-next

Daniel wrote:

The last pull I'd like to squeeze into 3.5, safe for the hsw stuff mostly
bugfixes:
- last few patches for basic hsw enabling (Eugeni, infoframe support by
 Paulo)
- Fix up infoframe support, we've hopefully squashed all the cargo-culting
 in there (Paulo). Among all the issues, this finally fixes some of the
 infoframe regressions seen on g4x and snb systems.
- Fixup sdvo infoframe support, this fixes a regression from 2.6.37.
- Correctly enable semaphores on snb, we've enabled it already for 3.5,
 but the dmar check was slightly wrong.
- gen6 irq fixlets from Chris.
- disable gmbus on i830, the hw seems to be simply broken.
- fix up the pch pll fallout (Chris & me).
- for_each_ring macro from Chris - I've figured I'll merge this now to
 avoid backport pain.
- complain when the rps state isn't what we expect (Chris). Note that this
 is shockingly easy to hit and hence pretty much will cause a regression
 report. But it only tells us that the gpu turbo state got out of whack,
 a problem we know off since a long time (it cause the gpu to get stuck a
 a fixed frequency, usually the lowest one). Chris is working on a fix,
 but we haven't yet found a magic formula that works perfectly (only
 patches that massively reduce the frequency of this happening).
- MAINTAINERS patch, I'm now officially the guy to beat up."

* tag 'drm-intel-next-2012-05-20' of git://people.freedesktop.org/~danvet/drm-intel: (57 commits)
  drm/i915: IBX has a fixed pch pll to pch pipe mapping
  drm/i915: implement hsw_write_infoframe
  drm/i915: small hdmi coding style cleanups
  drm/i915: fixup infoframe support for sdvo
  drm/i915: Enable the PCH PLL for all generations after link training
  drm/i915: Convert BUG_ON(!pll->active) and friends to a WARN
  drm/i915: don't clobber the pipe param in sanitize_modesetting
  drm/i915: disable gmbus on i830
  drm/i915: Replace the feature tests for BLT/BSD with ring init checks
  drm/i915: Check whether the ring is initialised prior to dispatch
  drm/i915: Introduce for_each_ring() macro
  drm/i915: Assert that the transcoder is indeed off before modifying it
  drm/i915: hook Haswell devices in place
  drm/i915: prepare HDMI link for Haswell
  drm/i915: move HDMI structs to shared location
  drm/i915: add WR PLL programming table
  drm/i915: add support for DDI-controlled digital outputs
  drm/i915: detect digital outputs on Haswell
  drm/i915: program iCLKIP on Lynx Point
  drm/i915: program WM_LINETIME on Haswell
  ...

12 years agodrm/i915: IBX has a fixed pch pll to pch pipe mapping
Daniel Vetter [Sun, 20 May 2012 18:00:25 +0000 (20:00 +0200)]
drm/i915: IBX has a fixed pch pll to pch pipe mapping

This should fix breakage introduced in

commit ee7b9f93fd96a72e5d09e2b44024c11880873c6b
Author: Jesse Barnes <jbarnes@virtuousgeek.org>
Date:   Fri Apr 20 17:11:53 2012 +0100

    drm/i915: manage PCH PLLs separately from pipes

v2: Add a DRM_DEBUG_KMS message to explain why a given pll was
selected, suggested by Chris Wilson.

v3: Actually run git add.

Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=49712
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agodrm/i915: implement hsw_write_infoframe
Paulo Zanoni [Mon, 14 May 2012 20:12:51 +0000 (17:12 -0300)]
drm/i915: implement hsw_write_infoframe

Both the control and data registers are completely different now.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agodrm/i915: small hdmi coding style cleanups
Paulo Zanoni [Mon, 14 May 2012 20:12:50 +0000 (17:12 -0300)]
drm/i915: small hdmi coding style cleanups

- Changed the coding style of auxiliary infoframe functions to make
  them smaller
- Fixed the column alignment of some function definitions
- Remove definition of "struct drm_crtc" in some places as they're
  used only to retrieve "struct intel_crtc"

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agodrm/i915: fixup infoframe support for sdvo
Daniel Vetter [Sat, 12 May 2012 18:22:00 +0000 (20:22 +0200)]
drm/i915: fixup infoframe support for sdvo

At least the worst offenders:
- SDVO specifies that the encoder should compute the ecc. Testing also
  shows that we must not send the ecc field, so copy the dip_infoframe
  struct to a temporay place and avoid the ecc field. This way the avi
  infoframe is exactly 17 bytes long, which agrees with what the spec
  mandates as a minimal storage capacity (with the ecc field it would
  be 18 bytes).
- Only 17 when sending the avi infoframe. The SDVO spec explicitly
  says that sending more data than what the device announces results
  in undefined behaviour.
- Add __attribute__((packed)) to the avi and spd infoframes, for
  otherwise they're wrongly aligned. Noticed because the avi infoframe
  ended up being 18 bytes large instead of 17. We haven't noticed this
  yet because we don't use the uint16_t fields yet (which are the only
  ones that would be wrongly aligned).

This regression has been introduce by

3c17fe4b8f40a112a85758a9ab2aebf772bdd647 is the first bad commit
commit 3c17fe4b8f40a112a85758a9ab2aebf772bdd647
Author: David Härdeman <david@hardeman.nu>
Date:   Fri Sep 24 21:44:32 2010 +0200

    i915: enable AVI infoframe for intel_hdmi.c [v4]

Patch tested on my g33 with a sdvo hdmi adaptor.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=25732
Tested-by: Peter Ross <pross@xvid.org> (G35 SDVO-HDMI)
Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agodrm/kms: fix Kconfig for new drivers.
Dave Airlie [Sun, 20 May 2012 09:09:25 +0000 (10:09 +0100)]
drm/kms: fix Kconfig for new drivers.

Reported-by: Jiri Slaby <jslaby@suse.cz>
Reported-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm/i915: Enable the PCH PLL for all generations after link training
Chris Wilson [Sun, 13 May 2012 08:54:09 +0000 (09:54 +0100)]
drm/i915: Enable the PCH PLL for all generations after link training

Hidden away within one chipset specific path was the necessary logic to
turn on the PLL. This needs to be done everywhere in order for us to
drive any display! As such as soon as we tested on a non-CougarPoint
chipset, we failed to bring up any DisplayPorts and generated a nice set
of assertion failures in the process. At least one part of our logic is
working, the part that assumes that we have no idea what we are doing.

Reported-by: guang.a.yang@intel.com
References: https://bugs.freedesktop.org/show_bug.cgi?id=49712
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agodrm/i915: Convert BUG_ON(!pll->active) and friends to a WARN
Chris Wilson [Sun, 13 May 2012 19:16:12 +0000 (20:16 +0100)]
drm/i915: Convert BUG_ON(!pll->active) and friends to a WARN

Turn a fatal lockup into a merely blank display with lots of shouty
messages.

v2: Whilst in the area, convert the other BUG_ON into less fatal errors.
In particular, note that we may be called on a PCH platform not using
PLLs, such as Haswell, and so we do not always want to BUG_ON(!pll)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>