Commit graph

10163 commits

Author SHA1 Message Date
Maarten Lankhorst 79442c3af0 drm/nouveau: remove limit on gart
Most graphics cards nowadays have a multiple of this limit as their vram,
so limiting GART doesn't seem to make much sense.

Signed-off-by: Maarten >Lnkhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-07-01 13:50:43 +10:00
Maarten Lankhorst 36798b61ed drm/nouveau/vm: perform a bar flush when flushing vm
Appears to fix the regression from "drm/nvc0/vm: handle bar tlb flushes
internally".

nvidia always seems to do this flush after writing values.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-07-01 13:50:42 +10:00
Ben Skeggs 57f0ec159b drm/nvc0/gr: cleanup register lists, and add nvce/nvcf to switches
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-07-01 13:50:41 +10:00
Ben Skeggs eb12f57be6 drm/nvc8/gr: update initial register/context values
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-07-01 13:50:41 +10:00
Ben Skeggs dba50728fd drm/nvc4/gr: update initial register/context values
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-07-01 13:50:40 +10:00
Ben Skeggs 58ef23056a drm/nvc1/gr: update initial register/context values
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-07-01 13:50:40 +10:00
Ben Skeggs 8b637ae3a3 drm/nvc3/gr: update initial register/context values
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-07-01 13:50:39 +10:00
Ben Skeggs d8b02dbbc3 drm/nvc0/gr: update initial register/context values
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-07-01 13:50:39 +10:00
Ben Skeggs 37c3afd07c drm/nvd9/gr: update initial register/context values
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-07-01 13:50:38 +10:00
Ben Skeggs 1dd44acfab drm/nve4/gr: update initial register/context values
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-07-01 13:50:37 +10:00
Ben Skeggs a8004a9edd drm/nvc0-/gr: bump maximum gpc/tpc limits
Needed for GK110, separate commit to catch any unexpected breaks to
other parts of the code.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-07-01 13:50:37 +10:00
Ben Skeggs cb1e06e0e3 drm/nvf0/gr: initial register/context setup
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-07-01 13:50:36 +10:00
Ben Skeggs 507cd5b553 drm/nve7/gr: update initial register/context values
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-07-01 13:50:36 +10:00
Ben Skeggs 99bd5537bd drm/nve6/gr: update initial register/context values
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-07-01 13:50:35 +10:00
Ben Skeggs c4c7044ffc drm/nouveau: delay busy bo vma removal until fence signals
As opposed to an explicit wait.  Allows userspace to not stall waiting
on buffer deletion.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-07-01 13:50:31 +10:00
Ben Skeggs 780194b1b9 drm/nouveau/vm: make each vma take a reference on its parent vm
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-07-01 13:45:09 +10:00
Ben Skeggs 51a506c012 drm/nouveau/core: remove nouveau_mm.mutex, no more users
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-07-01 13:45:05 +10:00
Ben Skeggs 4e67bee8e1 drm/nouveau/vm: take subdev mutex, not the mm, protects against race with vm/nvc0
nvc0_vm_flush() accesses the pgd list, which will soon be able to race
with vm_unlink() during channel destruction.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-07-01 13:45:03 +10:00
Ben Skeggs 15cace5917 drm/nvc0/vm: handle bar tlb flushes internally
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-07-01 13:44:57 +10:00
Ben Skeggs ca97a36698 drm/nv50-/vm: take mutex rather than irqsave spinlock
These operations can take quite some time, and we really don't want to
have to hold a spinlock for too long.

Now that the lock ordering for vm and the gr/nv84 hw bug workaround has
been reversed, it's possible to use a mutex here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-07-01 13:44:50 +10:00
Ben Skeggs 464d636bd0 drm/nv50/vm: remove explicit vm knowledge from engines
This reverses the lock ordering between VM and gr/nv84:nvc0.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-07-01 13:44:44 +10:00
Ben Skeggs c3032adb5c drm/nv50/vm: handle bar tlb flushes internally
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-07-01 13:44:37 +10:00
Ben Skeggs fec43a722a drm/nvc0/gr: port mp trap handling from calim's kepler code
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-07-01 13:44:32 +10:00
Ben Skeggs 16b133df33 drm/nve0/gr: attempt to resume after sm traps
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-07-01 13:44:26 +10:00
Ben Skeggs 3d8a6ed247 drm/nve0/gr: s/tp/tpc/
NVIDIA's name...

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-07-01 13:44:20 +10:00
Ben Skeggs 8d6f585d00 drm/nve0/fifo: create our playlists up-front, at startup
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-07-01 13:44:12 +10:00
Ben Skeggs da746d4ec9 drm/nva3/clk: minor improvements to fractional N calculation
Helps us to get identical numbers to the binary driver for (at least)
Kepler memory PLLs, and fixes a rounding error.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-07-01 13:44:06 +10:00
Ben Skeggs dceef5d87c drm/nouveau/fb: initialise vram controller as pfb sub-object
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-07-01 13:44:04 +10:00
Ben Skeggs 54ecff3e1a drm/nouveau/clk: change init ordering, no longer needed by devinit
And, will depend on FB/VOLT/DAEMON being ready when it gets initialised
so that it can set/restore clocks.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-07-01 13:44:01 +10:00
Ben Skeggs 88524bc069 drm/nouveau/devinit: move simple pll setting routines to devinit
These are pretty much useless for reclocking purposes.  Lets make it
clearer what they're for and move them to DEVINIT to signify they're
for the very simple PLL setting requirements of running the init
tables.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-07-01 13:43:54 +10:00
Ben Skeggs 7ada785f18 drm/nouveau: pass generic subdev to calculation routines
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-07-01 13:43:47 +10:00
Ben Skeggs aca78e9158 drm/nve0/ce: stub interrupt handler
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-07-01 13:43:42 +10:00
Ben Skeggs 48506d17d5 drm/nve0/ce: link ce2 to its engine, rather than from graphics
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-07-01 13:43:36 +10:00
Ben Skeggs 01672ef454 drm/nve0/fifo: copy engine context stored in ramfc, not externally
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-07-01 13:43:30 +10:00
Ben Skeggs b0bc5304fe drm/nve0/ce: create engine object for ce2
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-07-01 13:43:23 +10:00
Ben Skeggs d53635a980 drm/nouveau: pull in latest ucode builds from external tree
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-07-01 13:43:21 +10:00
Dave Airlie 9aa36876dd Merge branch 'drm-fixes-3.10' of git://people.freedesktop.org/~agd5f/linux into drm-fixes
One user visible fix to stop misreport GPU hangs and subsequent resets.
* 'drm-fixes-3.10' of git://people.freedesktop.org/~agd5f/linux:
  drm/radeon: update lockup tracking when scheduling in empty ring
2013-06-21 08:52:19 +10:00
Jerome Glisse 8444d5c695 drm/radeon: update lockup tracking when scheduling in empty ring
There might be issue with lockup detection when scheduling on an
empty ring that have been sitting idle for a while. Thus update
the lockup tracking data when scheduling new work in an empty ring.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Tested-by: Andy Lutomirski <luto@amacapital.net>
Cc: stable@vger.kernel.org
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-20 14:45:08 -04:00
Dave Airlie 784a4d5539 Merge branch 'drm-fixes-3.10' of git://people.freedesktop.org/~agd5f/linux into drm-fixes
Alex writes:
Remove some harmless but confusing VM related error messages
fix a regression with suspend and UVD,
fix UVD on big endian.

* 'drm-fixes-3.10' of git://people.freedesktop.org/~agd5f/linux:
  drm/radeon: fix UVD on big endian
  drm/radeon: fix write back suspend regression with uvd v2
  drm/radeon: do not try to uselessly update virtual memory pagetable
2013-06-19 11:48:36 +10:00
Laurent Pinchart ebc0bad4a0 drm/prime: Honor requested file flags when exporting a buffer
The DRM PRIME API passes file flags to the driver for the exported
buffer. Honor them instead of hardcoding 0600.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-06-19 11:34:54 +10:00
Alex Deucher c139b1ee4e drm/radeon: fix UVD on big endian
This fixes the kernel side so that the ring should come
up and ring and IB tests should work.  The userspace
UVD drivers will also need big endian fixes.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-14 17:05:57 -04:00
Jerome Glisse 089920f21d drm/radeon: fix write back suspend regression with uvd v2
UVD ring can't use scratch thus it does need writeback buffer to keep
a valid address or radeon_ring_backup will trigger a kernel fault.

It's ok to not unpin the write back buffer on suspend as it leave in
gtt and thus does not need eviction.

v2: Fix the uvd case.

Reported and tracked by Wojtek <wojtask9@wp.pl>

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-12 08:16:29 -04:00
Jerome Glisse 3813f5ca9a drm/radeon: do not try to uselessly update virtual memory pagetable
If a buffer is never bound to a virtual memory pagetable than don't try
to unbind it. Only drawback is that we don't update the pagetable when
unbinding the ib pool buffer which is fine because it only happens at
suspend or module unload/shutdown.

Fixes spurious messages about buffers without VM mappings. E.g.:
radeon 0000:01:00.0: bo ffff88020afac400 don't has a mapping in vm ffff88021ca2b900

Cc: stable@kernel.org
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-06-12 08:16:28 -04:00
Dave Airlie df63d3ecbc Merge tag 'drm-intel-fixes-2013-06-11' of git://people.freedesktop.org/~danvet/drm-intel into drm-fixes
Daniel writes:
Just tiny regression fixes here:
- Two fixes to fix sdvo hotplug which broke in the hpd storm detection
  work.
- One fix to patch-up the sdvo lvds regression fixer from the last pull -
  we need to prefer the vbt mode over edid modes.

* tag 'drm-intel-fixes-2013-06-11' of git://people.freedesktop.org/~danvet/drm-intel:
  drm/i915: prefer VBT modes for SVDO-LVDS over EDID
  drm/i915: Enable hotplug interrupts after querying hw capabilities.
  drm/i915: Fix hotplug interrupt enabling for SDVOC
2013-06-11 19:38:27 +10:00
Dave Airlie e6eea1536e Merge branch 'gma500-fixes' of git://github.com/patjak/drm-gma500 into drm-fixes
Patrik writes:
Two fixes for memory leaks split into Cedarview and Poulsbo versions,
and a fix for properly setting the pipe base when using fbdev. It's on
my todo-list to start unifying the chips since they are very similar,
but until then I'd like to split them up in case there are side-effects
on Cedarview that I cannot currently test.

airled: Verified pull from github matches what I expected.
* 'gma500-fixes' of git://github.com/patjak/drm-gma500:
  drm/gma500/cdv: Fix cursor gem obj referencing on cdv
  drm/gma500/psb: Fix cursor gem obj referencing on psb
  drm/gma500/cdv: Unpin framebuffer on crtc disable
  drm/gma500/psb: Unpin framebuffer on crtc disable
  drm/gma500: Add fb gtt offset to fb base
2013-06-11 08:16:10 +10:00
Daniel Vetter c3456fb3e4 drm/i915: prefer VBT modes for SVDO-LVDS over EDID
In

commit 53d3b4d777
Author: Egbert Eich <eich@suse.de>
Date:   Tue Jun 4 17:13:21 2013 +0200

    drm/i915/sdvo: Use &intel_sdvo->ddc instead of intel_sdvo->i2c for DDC

Egbert Eich fixed a long-standing bug where we simply used a
non-working i2c controller to read the EDID for SDVO-LVDS panels.
Unfortunately some machines seem to not be able to cope with the mode
provided in the EDID. Specifically they seem to not be able to cope
with a 4x pixel mutliplier instead of a 2x one, which seems to have
been worked around by slightly changing the panels native mode in the
VBT so that the dotclock is just barely above 50MHz.

Since it took forever to notice the breakage it's fairly safe to
assume that at least for SDVO-LVDS panels the VBT contains fairly sane
data. So just switch around the order and use VBT modes first.

v2: Also add EDID modes just in case, and spell Egbert correctly.

v3: Elaborate a bit more about what's going on on Chris' machine.

Cc: Egbert Eich <eich@suse.de>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65524
Cc: stable@vger.kernel.org
Reported-and-tested-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-06-10 10:13:34 +02:00
Chris Wilson 7ba220cec0 drm/i915: Enable hotplug interrupts after querying hw capabilities.
sdvo->hotplug_active is initialised during intel_sdvo_setup_outputs(),
and so we never enabled the hotplug interrupts on SDVO as we were
checking too early.

This regression has been introduced somewhere in the hpd rework for
the storm detection and handling starting with

commit 1d843f9de4
Author: Egbert Eich <eich@suse.de>
Date:   Mon Feb 25 12:06:49 2013 -0500

    DRM/I915: Add enum hpd_pin to intel_encoder.

and the follow-up patches to use the new encoder->hpd_pin variable for
the different irq setup functions.

The problem is that encoder->hpd_pin was set up _before_ the output
setup was done and so before we could assess the hotplug capabilities
of the outputs on an sdvo encoder.

Reported-by: Alex Fiestas <afiestas@kde.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=58405
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
[danvet: Add regression note.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-06-10 09:59:26 +02:00
Chris Wilson 7ee2aff373 drm/i915: Fix hotplug interrupt enabling for SDVOC
A broken conditional would lead to SDVOC waiting upon hotplug events on
SDVOB - and so miss all activity on its SDVO port.

This regression has been introduced in

commit 1d843f9de4
Author: Egbert Eich <eich@suse.de>
Date:   Mon Feb 25 12:06:49 2013 -0500

    DRM/I915: Add enum hpd_pin to intel_encoder.

References: https://bugs.freedesktop.org/show_bug.cgi?id=58405
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
[danvet: Add regression note.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-06-10 09:58:18 +02:00
Patrik Jakobsson 70b1304eee drm/gma500/cdv: Fix cursor gem obj referencing on cdv
The internal crtc cursor gem object pointer was never set/updated since
it was required to be set in the first place.

Fixing this will make the pin/unpin count match and prevent cursor
objects from leaking when userspace drops all references to it. Also
make sure we drop the gem obj reference on failure.

This patch only affects Cedarview chips.

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-06-09 18:03:57 +02:00
Patrik Jakobsson 3463cf1aad drm/gma500/psb: Fix cursor gem obj referencing on psb
The internal crtc cursor gem object pointer was never set/updated since
it was required to be set in the first place.

Fixing this will make the pin/unpin count match and prevent cursor
objects from leaking when userspace drops all references to it. Also
make sure we drop the gem obj reference on failure.

This patch only affects Poulsbo chips.

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
2013-06-09 18:03:32 +02:00