dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

7086 Commits

Author SHA1 Message Date
Dave Airlie c4c7f3149b radeon: make radeon_cs_update_pages static.
Just move its only caller into the same file as it and make it static.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-29 11:01:45 +01:00
Daniel Vetter ef12dab779 drm/i915: tune down the noise of the RP irq limit fail
We still don't understand why this fails exactly, but if fails way
too often for a simple debug information. Furthermore the current
ducttape should prevent the gpu from getting stuck at low frequencies.

Hence tune down the dmesg noise.

Note that the known failure case is that the register read returns 0
when the gpu gets confused.

v2: Add comments about the known failure case.

Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-05-25 10:29:15 +02:00
Chris Wilson 31d8d651eb drm/i915: Remove the error message for unbinding pinned buffers
This is now used intentionally to prevent proliferation of is-pinned
checks upon the inactive list following:

commit 1b50247a8d
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Apr 24 15:47:30 2012 +0100

    drm/i915: Remove the list of pinned inactive objects

Reported-and-tested-by: guang.a.yang@intel.com
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50075
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-05-25 10:10:40 +02:00
Chris Wilson bed1ea95a3 drm/i915: Limit page allocations to lowmem (dma32) for i965
Broadwater and Crestline share a limitation that prevent it from
relocating general surface state above 4GiB. The only recourse we have
since any buffer object may be used as a relocation target is then to
limit all object allocations on 965g[m] to DMA32.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-05-25 10:07:06 +02:00
Linus Torvalds f2fde3a65e Merge branch 'drm-core-next' of git://people.freedesktop.org/~airlied/linux
Pull main drm updates from Dave Airlie:
 "This is the main merge window request for the drm.

  It's big, but jam packed will lots of features and of course 0
  regressions.  (okay maybe there'll be one).

  Highlights:

   - new KMS drivers for server GPU chipsets: ast, mgag200 and cirrus
     (qemu only).  These drivers use the generic modesetting drivers.

   - initial prime/dma-buf support for i915, nouveau, radeon, udl and
     exynos

   - switcheroo audio support: so GPUs with HDMI can turn off the sound
     driver without crashing stuff.

   - There are some patches drifting outside drivers/gpu into x86 and
     EFI for better handling of multiple video adapters in Apple Macs,
     they've got correct acks except one trivial fixup.

   - Core:
	edid parser has better DMT and reduced blanking support,
	crtc properties,
	plane properties,

   - Drivers:
	exynos: add 2D core accel support, prime support, hdmi features
	intel: more Haswell support, initial Valleyview support, more
	    hdmi infoframe fixes, update MAINTAINERS for Daniel, lots of
	    cleanups and fixes
	radeon: more HDMI audio support, improved GPU lockup recovery
	    support, remove nested mutexes, less memory copying on PCIE, fix
	    bus master enable race (kexec), improved fence handling
	gma500: cleanups, 1080p support, acpi fixes
	nouveau: better nva3 memory reclocking, kepler accel (needs
	    external firmware rip), async buffer moves on nv84+ hw.

  I've some more dma-buf patches that rely on the dma-buf merge for vmap
  stuff, and I've a few fixes building up, but I'd decided I'd better
  get rid of the main pull sooner rather than later, so the audio guys
  are also unblocked."

Fix up trivial conflict due to some duplicated changes in
drivers/gpu/drm/i915/intel_ringbuffer.c

* 'drm-core-next' of git://people.freedesktop.org/~airlied/linux: (605 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
  ...
2012-05-24 12:42:54 -07:00
Jesse Barnes 89ba829e38 drm/i915: always use RPNSWREQ for turbo change requests
Media turbo requests can either use RPVSWREQ or RPNSWREQ to indicate
what the interrupt handler should do.  Since we only deal with the
latter in our turbo code, make the media engine use that for turbo
requests.

Cc: stable@vger.kernel.org.
Tested-by: Joe Bloggsian <joebloggsian@gmail.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-05-24 17:54:15 +02:00
Daniel Vetter 0af78a2bb4 drm/i915: reject doubleclocked cea modes on dp
These are ultra-low-res modes used to upscale SDTV content and we
don't know how to support these on dp on intel hw:
- It's unclear whether we can send avi infoframes over dp ports.
- And the pixel repeat setting that work for hdmi/sdvo explicitly
  don't work for dp.

So don't bother and just reject these modes. These modes have been
introduced in

commit 54ac76f851
Author: Christian Schmidt <schmidt@digadd.de>
Date:   Mon Dec 19 14:53:16 2011 +0000

    drm/edid: support CEA video modes.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45729
Tested-by: Yuang Guang <guang.a.yang@intel.com>
Cc: stable@vger.kernel.org
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Tested-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-05-24 17:54:14 +02:00
Rodrigo Vivi 9589919fb3 drm/i915: Adding TV Out Missing modes.
These 2 modes were removed by mistake during a clean up.
So, now it is time to add them back. For further info about
supported mode and standard timing table please check:
VOL_3_display_registers_updated.pdf at intellinuxgraphics.org.

Note that this regression has been introduce in

commit 55a6713b3f
Author: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Date:   Thu Dec 15 14:47:33 2011 -0200

    drm/i915: Removing TV Out modes.

and this commit partially reverts it by re-adding the wrongly removed
modes.

Reported-by: Robert Lowery <rglowery@exemail.com.au>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
[danvet: Pimped commit message to cite the commit that introduced this
regression.]
Cc: stable@vger.kernel.org
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-05-24 17:54:08 +02:00
Daniel Vetter bf2125e2f7 drm/i915: wait for a vblank to pass after tv detect
Otherwise the hw will get confused and result in a black screen.

This regression has been most likely introduce in

commit 974b93315b
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sun Sep 5 00:44:20 2010 +0100

    drm/i915/tv: Poll for DAC state change

That commit replace the first msleep(20) with a busy-loop, but failed
to keep the 2nd msleep around. Later on we've replaced all these
msleep(20) by proper vblanks.

For reference also see the commit in xf86-video-intel:

commit 1142be53eb8d2ee8a9b60ace5d49f0ba27332275
Author: Jesse Barnes <jbarnes@hobbes.lan>
Date:   Mon Jun 9 08:52:59 2008 -0700

    Fix TV programming:  add vblank wait after TV_CTL writes

    Fxies FDO bug #14000; we need to wait for vblank after
    writing TV_CTL or following "DPMS on" calls may not actually enable the output.

v2: As suggested by Chris Wilson, add a small comment to ensure that
no one accidentally removes this vblank wait again - there really
seems to be no sane explanation for why we need it, but it is
required.

Launchpad: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/763688
Reported-and-Tested-by: Robert Lowery <rglowery@exemail.com.au>
Cc: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Cc: stable@vger.kernel.org
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-05-24 17:54:07 +02:00
Jan-Benedict Glaw 3347111999 drm/i915: no lvds quirk for HP t5740e Thin Client
This box has DisplayPort and VGA, but no LVDS. Product specs are at
http://h10010.www1.hp.com/wwpc/us/en/sm/WF25a/12454-12454-321959-338927-3640406-4282707.html?dnr=1
and dmidecode output can be found at http://www.getslash.de/bug_attachments/dmidecode-t5740e.txt

Signed-off-by: Jan-Benedict Glaw <jbglaw@getslash.de>
Cc: stable@vger.kernel.org
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-05-24 17:54:01 +02:00
Daniel Vetter 6cb49835da drm/i915: enable vdd when switching off the eDP panel
We have one bug report from a validation team that we get the eDP
panel sequencing still somewhat wrong: We need to enable VDD while
switching off the panel and backlight. Unfortunately that reporter
seems to have fallen off the earth :(

For another reporter this actually fixes a black panel issue because
without this the backlight/panel gets confused and doesn't light up
again.

v2: I've forgotten to remove the vdd_off call in panel_off which is
now bogus. This essentially reverts

commit 17038de5f1
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Apr 16 22:43:42 2012 +0100

    drm/i915/dp: Flush any outstanding work to turn the VDD off

v3: the current panel_off code forces off the vdd power, too. Which is
bogus and resulted in some funny warnings later on when we've tried to
do aux channel communications with just the vdd forced on. Fix this,
too.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=46312
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=43163
Tested-by: Vincent Frentzel <zcecc22@gmail.com>
Cc: stable@kernel.org
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-05-24 17:54:01 +02:00
Chris Wilson 92b27b088c drm/i915: Fix PCH PLL assertions to not assume CRTC:PLL relationship
The existing assertions were written under the assumption that we wanted
to test the related PLL to a CRTC. With the split of PLL into a
separately managed entity which may be shared amongst CRTCs, we need to
pass in both the CRTC and the PLL to the assertion routine.
Occassionally, this means passing NULL for the CRTC as we wish to check
the status of the PLL irrespective of the current CRTC.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-05-24 17:54:00 +02:00
Chris Wilson 7b9e0ae6da drm/i915: Always update RPS interrupts thresholds along with frequency
In order to avoid missed down-interrupts when coming out of RC6, it is
advised that we always reset the down-threshold upon a PM event. This is
due to that the PM unit goes through a little dance when coming out of
RC6, it first brings the GPU up at the lowest frequency then a short
time later it restores the thresholds. During that interval, the
down-interval may expire and the interrupt be suppressed.

Now aware of the dance taking place within the GPU when coming out of
RC6, one wonders what other writes need to be queued in the fifo buffer
in order to be properly sequenced; setting the RP state appears to be
one.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44006
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-05-24 17:54:00 +02:00
Daniel Vetter 59d92bfa5f drm/i915: properly handle interlaced bit for sdvo dtd conversion
We've simply ignored this, which isn't too great. With this, interlaced
1080i works on my HDMI screen connected through sdvo. For no apparent
reason anything else still doesn't work as it should.

While at it, give these magic numbers in the dtd proper names and
add a comment that they match with EDID detailed timings.

v2: Actually use the right bit for interlaced.

Tested-by: Peter Ross <pross@xvid.org>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: stable@vger.kernel.org
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-05-24 17:53:52 +02:00
Marcin Kościelnicki af3289e963 drm/nouveau/nvd9: Fix GPIO initialisation sequence.
Signed-off-by: Marcin Kościelnicki <koriakin@0x04.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24 16:56:37 +10:00
Andreas Heider 5c5ed6e2cd 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>
2012-05-24 16:56:36 +10:00
Andreas Heider 2f3787aa43 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>
2012-05-24 16:56:34 +10:00
Ben Skeggs 42eddbd7b2 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>
2012-05-24 16:56:32 +10:00
Ben Skeggs 6e5a429bcb drm/nouveau: turn a BUG into a WARN
This is very annoying sometimes..

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24 16:56:29 +10:00
Marcin Slusarz 547e6c7fc8 drm/nv50: decode PGRAPH DATA_ERROR = 0x24
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24 16:56:27 +10:00
Ben Skeggs a6a17859f1 drm/nouveau/disp: fix dithering not being enabled on some eDP macbooks
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24 16:56:26 +10:00
Ben Skeggs 0c75f332e5 drm/nvd9/copy: initialise copy engine, seems to work like nvc0
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24 16:56:24 +10:00
Ben Skeggs 1a46098e91 drm/nvc0/ttm: use copy engines for async buffer moves
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24 16:56:23 +10:00
Ben Skeggs fdf53241c1 drm/nva3/ttm: use copy engine for async buffer moves
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24 16:56:21 +10:00
Ben Skeggs 5490e5dfb9 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>
2012-05-24 16:56:19 +10:00
Ben Skeggs 4c193d254e drm/nv84/ttm: use crypto engine for async buffer copies
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24 16:56:18 +10:00
Ben Skeggs d1b167e168 drm/nouveau/ttm: untangle code to support accelerated buffer moves
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24 16:56:16 +10:00
Ben Skeggs 78df3a1c58 drm/nouveau/fbcon: use fence for sync, rather than notifier
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24 16:56:15 +10:00
Ben Skeggs b355096992 drm/nv98/crypt: non-stub implementation of the engine hooks
fuc is from pscnv driver.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24 16:56:13 +10:00
Ben Skeggs c420b2dc8d 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>
2012-05-24 16:56:11 +10:00
Ben Skeggs a226c32a38 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>
2012-05-24 16:56:10 +10:00
Ben Skeggs 5511d490da drm/nv50: remove manual context unload on context destruction
PFIFO context destruction triggers this automagically now.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24 16:56:08 +10:00
Ben Skeggs 7f2062e9de 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>
2012-05-24 16:56:07 +10:00
Ben Skeggs 03bd6efa14 drm/nv50/fifo: use hardware channel kickoff functionality
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24 16:56:05 +10:00
Ben Skeggs 71af5e62db 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>
2012-05-24 16:56:03 +10:00
Ben Skeggs 694931d20f drm/nv50/fifo: construct playlist from hw context table state
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24 16:56:02 +10:00
Ben Skeggs 67b342efc7 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>
2012-05-24 16:56:00 +10:00
Ben Skeggs 906c033e27 drm/nouveau/fence: fix a race where fence->channel can disappear
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24 16:55:58 +10:00
Ben Skeggs 299bee10fb drm/nouveau/bios: fix some shadowing issues, particularly acpi
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24 16:55:56 +10:00
Ben Skeggs f51ee65c75 drm/nouveau: fix engine context destructor ordering
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24 16:55:55 +10:00
Ben Skeggs 5e120f6e4b 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>
2012-05-24 16:55:53 +10:00
Ben Skeggs d375e7d56d drm/nouveau/fence: minor api changes for an upcoming rework
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24 16:55:46 +10:00
Ben Skeggs 875ac34aad drm/nouveau/fence: make ttm interfaces wrap ours, not the other way around
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24 16:55:44 +10:00
Ben Skeggs 35bcf5d555 drm/nouveau: move flip-related channel setup to software engine
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24 16:55:43 +10:00
Ben Skeggs 20abd1634a 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>
2012-05-24 16:55:41 +10:00
Ben Skeggs 2cda7f4c5e 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>
2012-05-24 16:32:03 +10:00
Ben Skeggs afada5e0bb drm/nv04/disp: disable vblank interrupts when disabling display
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24 16:32:01 +10:00
Marcin Slusarz 695b95b810 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>
2012-05-24 16:31:59 +10:00
Ben Skeggs d58086deaa 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>
2012-05-24 16:31:58 +10:00
Ben Skeggs a8f81837c5 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>
2012-05-24 16:31:56 +10:00
Marcin Slusarz 5ace2c9d6f 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>
2012-05-24 16:31:54 +10:00
Marcin Slusarz d37f60c87f 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>
2012-05-24 16:31:52 +10:00
Ben Skeggs d8b6624549 drm/nve0/graph: bump hub2gpc buffer size
Reported-by: Christoph Bumiller <e0425955@student.tuwien.ac.at>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24 16:31:50 +10:00
Ben Skeggs 6d59702775 drm/nouveau: use the same packet header macros as userspace
Cosmetic cleanup only.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24 16:31:49 +10:00
Ben Skeggs 78339fb75c drm/nouveau/bios: allow loading alternate vbios image as firmware
Useful for debugging different VBIOS versions.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24 16:31:47 +10:00
Ben Skeggs c6b7e89582 drm/nve0/ttm: implement buffer moves with weirdo pcopy-on-pgraph methods
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24 16:31:45 +10:00
Ben Skeggs f1c65e7c7f 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>
2012-05-24 16:31:43 +10:00
Ben Skeggs ab394543dd 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>
2012-05-24 16:31:41 +10:00
Ben Skeggs 5132f37700 drm/nve0/fifo: initial implementation
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24 16:31:39 +10:00
Ben Skeggs d0f3c7e41d drm/nouveau: give a slightly larger pci(e)gart aperture on all chipsets
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24 16:31:38 +10:00
Ben Skeggs 78c2018658 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>
2012-05-24 16:31:36 +10:00
Ben Skeggs 9d6ba0b58c 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>
2012-05-24 16:31:34 +10:00
Ben Skeggs a94ba1fcac drm/nvd9/pm: oops, fix timing calc
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24 16:31:32 +10:00
Ben Skeggs 6b91d6b056 drm/nvc0/pm: enable mpll src pll, and calc mpll coefficients
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24 16:31:30 +10:00
Ben Skeggs a1da205f42 drm/nvc0/pm: start filling in memory reclocking stubs 2012-05-24 16:31:29 +10:00
Ben Skeggs 19a1e47799 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>
2012-05-24 16:31:27 +10:00
Ben Skeggs 2b20fd0ab4 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>
2012-05-24 16:31:25 +10:00
Ben Skeggs 5f54d29ee9 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>
2012-05-24 16:31:23 +10:00
Ben Skeggs 001a3990f6 drm/nva3/pm: attempt to bash a few 0x100200 bits correctly
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24 16:31:21 +10:00
Ben Skeggs 4719b55be5 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>
2012-05-24 16:31:20 +10:00
Ben Skeggs 30e533900e drm/nva3/pm: more random unknown PFB regs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24 16:31:18 +10:00
Ben Skeggs 27740383dd 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>
2012-05-24 16:31:16 +10:00
Ben Skeggs 65115bb05a 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>
2012-05-24 16:31:14 +10:00
Ben Skeggs 074e747a6d drm/nva3/pm: introduce more paranoia
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-05-24 16:31:12 +10:00
Dave Airlie 41ceeeb25d 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>
2012-05-23 14:10:27 +01:00
Dave Airlie 6a101cb209 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>
2012-05-23 14:09:32 +01:00
Dave Airlie 5288b7b205 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>
2012-05-23 14:08:41 +01:00
Alex Deucher 40f5cf9969 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>
2012-05-23 10:47:11 +01:00
Daniel Vetter 1286ff7397 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>
2012-05-23 10:47:10 +01:00
Dave Airlie 22b33e8ed0 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>
2012-05-23 10:46:55 +01:00
Dave Airlie 129b78bfca 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>
2012-05-23 10:46:27 +01:00
Dave Airlie 96503f592f 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>
2012-05-23 10:46:05 +01:00
Dave Airlie 0ff926c7d4 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>
2012-05-23 10:46:03 +01:00
Dave Airlie 51ab7ba267 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>
2012-05-23 10:45:57 +01:00
Linus Torvalds e8650a0823 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
Pull trivial updates from Jiri Kosina:
 "As usual, it's mostly typo fixes, redundant code elimination and some
  documentation updates."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (57 commits)
  edac, mips: don't change code that has been removed in edac/mips tree
  xtensa: Change mail addresses of Hannes Weiner and Oskar Schirmer
  lib: Change mail address of Oskar Schirmer
  net: Change mail address of Oskar Schirmer
  arm/m68k: Change mail address of Sebastian Hess
  i2c: Change mail address of Oskar Schirmer
  net: Fix tcp_build_and_update_options comment in struct tcp_sock
  atomic64_32.h: fix parameter naming mismatch
  Kconfig: replace "--- help ---" with "---help---"
  c2port: fix bogus Kconfig "default no"
  edac: Fix spelling errors.
  qla1280: Remove redundant NULL check before release_firmware() call
  remoteproc: remove redundant NULL check before release_firmware()
  qla2xxx: Remove redundant NULL check before release_firmware() call.
  aic94xx: Get rid of redundant NULL check before release_firmware() call
  tehuti: delete redundant NULL check before release_firmware()
  qlogic: get rid of a redundant test for NULL before call to release_firmware()
  bna: remove redundant NULL test before release_firmware()
  tg3: remove redundant NULL test before release_firmware() call
  typhoon: get rid of redundant conditional before all to release_firmware()
  ...
2012-05-22 19:22:50 -07:00
Rob Clark 4d93914ae3 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>
2012-05-22 10:54:30 +01:00
Rob Clark 49e2754578 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>
2012-05-22 10:54:16 +01:00
Dave Airlie 345f3b9035 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
2012-05-22 10:39:57 +01:00
Laurent Pinchart ebe0f2442c 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>
2012-05-22 10:35:15 +01:00
Laurent Pinchart e6ecefaadf 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>
2012-05-22 10:35:07 +01:00
Laurent Pinchart 78b68556a9 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>
2012-05-22 10:34:53 +01:00
Laurent Pinchart 3b02ab8893 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>
2012-05-22 10:34:33 +01:00
Laurent Pinchart 4a1b071427 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>
2012-05-22 10:32:58 +01:00
Laurent Pinchart 7eb3b2c83d 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>
2012-05-22 10:30:58 +01:00
Corentin Chary af437cfd35 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>
2012-05-22 10:29:46 +01:00
Adam Jackson 6225ee05ea 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>
2012-05-22 10:29:02 +01:00
Adam Jackson 40c5d87647 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>
2012-05-22 10:19:03 +01:00
Adam Jackson 0d19832853 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>
2012-05-22 10:18:47 +01:00
Alan Cox 7beff62ee3 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>
2012-05-22 10:15:45 +01:00
Patrik Jakobsson bc79482914 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>
2012-05-22 10:15:34 +01:00