Dave Airlie [Mon, 15 Sep 2014 20:20:53 +0000 (06:20 +1000)]
Merge branch 'linux-3.18' of git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-next
This is the main merge request for Nouveau 3.18, overview:
- various bits of roy's gt21x clock work
- various bits of kepler memory clock work (don't get too excited, there's at least one more major bit left that's busting higher freqs)
- misc fan control improvements
- kepler hdmi infoframe fixes
- dp audio
- l2 cache + cbc improvements
* 'linux-3.18' of git://anongit.freedesktop.org/git/nouveau/linux-2.6: (68 commits)
drm/gt214-/disp: enable dp audio
drm/gt214-/kms: fix hda eld regression
drm/g94-/disp: calculate some dp audio constants
drm/gt214-/kms: perform hda codec setup on displayport too
drm/gk104-/disp: infoframe registers moved yet again on kepler
drm/nouveau/bios: parse older ramcfg/timing data like we do newer ones
drm/nva3/fb/ram: Per-partition regs
drm/nouveau/fb/ram: Support strided regs
drm/nv50/fb/ram: Store the number of partitions in the designated fields
drm/nv50/kms: Set VBLANK time in modeset script
drm/nouveau/bios: Add rammap support for version 1.0
drm/gf100-/pwr/memx: block host and fifo around reclock
drm/nouveau/pwr/memx: fix command ordering around block/unblock
drm/nouveau/pwr/memx: rename fb off/on to block/unblock
drm/nva3/clk: Pause the GPU before reclocking
drm/nouveau/gpio: rename g92 class to g94
drm/gk104-/fb/ram: move fb enable/disable to same place as nvidia
drm/gk104/fb/ram: twiddle some more bits when reclocking
drm/nouveau/bios: parse another large chunk of random memory config data
drm/gk104-/fb/ram: perform certain steps only when bios data differs
...
Ben Skeggs [Thu, 11 Sep 2014 12:59:13 +0000 (22:59 +1000)]
drm/nouveau/pwr/memx: rename fb off/on to block/unblock
More accurate as to the function of the opcodes. Not only is FB disabled,
but the host is prevented from touching the GPU. An upcoming patch for
Kepler will also halt PFIFO (as NVIDIA does).
Emil Velikov [Mon, 8 Sep 2014 19:27:57 +0000 (20:27 +0100)]
drm/nouveau/gpio: rename g92 class to g94
nv92 hardware has only 16 interrupt lines, while nv94 and later
has 32. Accessing 0xe0c{0,4} registers on nv92 can lead to incorrect
PDISP setup. This is a regression introduced with
Ben Skeggs [Mon, 8 Sep 2014 03:38:02 +0000 (13:38 +1000)]
drm/gk104-/fb/ram: use parsed timing data in mr routines
All the other chipsets should be moved over to this too. It's not needed
yet for the upcoming commits, so left this step as it'll conflict badly
with Roy's GT21x reclocking work.
Pierre Moreau [Mon, 18 Aug 2014 20:43:24 +0000 (22:43 +0200)]
drm/nouveau: Display Nouveau boot options at launch
It can help to remove any ambiguity about which options were passed to Nouveau,
especially in case the user had some options set in /etc/modprobe.d/*.conf that
he forgot about, as they won't appear in a dmesg.
Signed-off-by: Pierre Moreau <pierre.morrow@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Martin Peres [Sun, 17 Aug 2014 15:33:10 +0000 (17:33 +0200)]
drm/nouveau/pwr: fix the timers implementation with concurent processes
The problem with the current implementation is that adding a timer improperly
checked which process would time up first by not taking into account how much
time elapsed since their timer got scheduled. Rework the re-scheduling
decision t fix this.
The catch with this fix is that we are limited to scheduling timers of up to
2^31 ticks to avoid any potential overflow. Since we are unlikely to need to
wait for more than a second, this won't be a problem :)
Another possible fix would be to decrement the timeouts of all processes but
it would duplicate a lot of code and dealing with edge cases wasn't pretty
last time I checked.
Signed-off-by: Martin Peres <martin.peres@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Tue, 12 Aug 2014 03:54:37 +0000 (13:54 +1000)]
drm/nouveau/core/mm: fill in holes with "allocated" nodes
The allocation algorithm doesn't expect there to be holes in the mm, which
causes its alignment/cutoff calculations to choke (and go negative) when
encountering the last chunk of a block before a hole.
The least expensive solution is to simply fill in any holes with nodes
that are pre-marked as being allocated.
Dave Airlie [Mon, 15 Sep 2014 09:55:55 +0000 (19:55 +1000)]
Merge tag 'topic/core-stuff-2014-09-15' of git://anongit.freedesktop.org/drm-intel into drm-next
Here's the updated topic/core-stuff pull request with the two patches
already merged into drm-fixes dropped.
* tag 'topic/core-stuff-2014-09-15' of git://anongit.freedesktop.org/drm-intel:
drm: Drop modeset locking from crtc init function
drm/i915/hdmi: Enable pipe pixel replication for SD interlaced modes
drm/edid: Reduce horizontal timings for pixel replicated modes
drm: Include task->name and master status in debugfs clients info
drm/gem: Fix kerneldoc typo
drm: use c99 initializers in structures
drm: fix drm_modeset_lock.h kernel-doc notation
Daniel Vetter [Mon, 8 Sep 2014 07:02:49 +0000 (09:02 +0200)]
drm: Drop modeset locking from crtc init function
At driver init no one can access modeset objects and we're
single-threaded. So locking is just cargo-culting here. Worse, with
the new ww mutexes and ww mutex slowpath debugging the mutex_lock
might actually fail, and we don't have the full-blown ww recovery
dance.
Which then leads to fireworks when we try to unlock the not-locked
crtc lock.
An audit of all the functions called from here shows that none of them
contain locking checks, so there's also no reason to keep the locking
around just for consistency of caller contexts. Besides that I have
the rule (at least in i915) that such places where we take locks just
to simplify locking checks and not for correctness always require a
comment.
drm: convert crtc and connection_mutex to ww_mutex (v5)
v2: Don't drop the lock_init call, spotted by the 0day builder.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=83341 Cc: Rob Clark <robdclark@gmail.com> Cc: thellstrom@vmware.com Cc: maarten.lankhorst@canonical.com Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Clint Taylor [Wed, 3 Sep 2014 00:03:36 +0000 (17:03 -0700)]
drm/i915/hdmi: Enable pipe pixel replication for SD interlaced modes
Enable 2x pixel replication for modes the mode flag DBLCLK to double
horizontal timings and pixel clock across TMDS.
Signed-off-by: Clint Taylor <clinton.a.taylor@intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Clint Taylor [Wed, 3 Sep 2014 00:03:35 +0000 (17:03 -0700)]
drm/edid: Reduce horizontal timings for pixel replicated modes
Pixel replicated modes should be non-2x horizontal timings and pixel
replicated by the HW across the HDMI cable at 2X pixel clock. Current
horizontal resolution of 1440 does not allow pixel duplication to
occur and scaling artifacts occur on the TV. HDMI certification
7-26 currently fails for all pixel replicated modes. This change will
allow HDMI certification with 480i/576i modes once pixel replication
is turned on.
Signed-off-by: Clint Taylor <clinton.a.taylor@intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Chris Wilson [Tue, 2 Sep 2014 07:03:22 +0000 (08:03 +0100)]
drm: Include task->name and master status in debugfs clients info
Showing who is the current master is useful for trying to decypher
errors when trying to acquire master (e.g. a race with X taking over
from plymouth). By including the process name as well as the pid
simplifies the task of grabbing enough information remotely at the point
of error.
v2: Add the command column header and flesh out a couple of comments.
(David Herrmann)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: David Herrmann <dh.herrmann@gmail.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Dave Airlie [Fri, 12 Sep 2014 21:01:49 +0000 (07:01 +1000)]
Merge tag 'topic/drm-header-rework-2014-09-12' of git://anongit.freedesktop.org/drm-intel into drm-next
So here's the header cleanup, rebased on top of drm-next. Two new header
files are created here:
- drivers/gpu/drm/drm_internal.h for non-legacy drm.ko private
declarations.
- include/drm/drm_legacy.h for legacy interfaces used by non-kms drivers.
And of course lots fo stuff gets shuffled into the already existing
drivers/gpu/drm/drm_legacy.h for drm.ko internal stuff.
topic branch smoke-tested in drm-intel-nightly for a bit. And the 0day
tester also worked through it (and found a few places I didn't add a
static to functions).
* tag 'topic/drm-header-rework-2014-09-12' of git://anongit.freedesktop.org/drm-intel:
drm: Move DRM_MAGIC_HASH_ORDER into drm_drv.c
drm: Move drm_class to drm_internal.h
drm: Move LOCK_TEST_WITH_RETURN to <drm/drm_legacy.h>
drm: Move legacy buffer structures to <drm/drm_legacy.h>
drm: Move drm_memory.c map support declarations to <drm/drm_legacy.h>
drm: Purge ioctl forward declarations from drmP.h
drm: unexport drm_global_mutex
drm: Move piles of functions from drmP.h to drm_internal.h
drm: Move vblank related module options into drm_irq.c
drm: Drop drm_sysfs_class from drmP.h
drm: Move __drm_pci_free to drm_legacy.h
drm: Create drm legacy driver header
drm: Move drm_legacy_vma_flush into drm_legacy.h
drm: Move sg functions into drm_legacy.h
drm: Move dma functions into drm_legacy.h
Julia Lawall [Sat, 23 Aug 2014 16:09:56 +0000 (18:09 +0200)]
drm: use c99 initializers in structures
Use c99 initializers for structures.
Drop 0 initializers in drivers/gpu/drm/sti/sti_vtac.c. A 0x0 initializer
is left in vtac_mode_aux in drivers/gpu/drm/sti/sti_vtac.c to highlight the
relation to vtac_mode_main.
A simplified version of the semantic match that finds the first problem is
as follows: (http://coccinelle.lip6.fr/)
// <smpl>
@decl@
identifier i1,fld;
type T;
field list[n] fs;
@@
Daniel Vetter [Wed, 10 Sep 2014 10:43:58 +0000 (12:43 +0200)]
drm: Move LOCK_TEST_WITH_RETURN to <drm/drm_legacy.h>
Unfortunately we can't move struct drm_lock_data easily since
it's embedded into struct drm_master. And figuring out where exactly
this struct should be allocated isn't that simple ...
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Thu, 11 Sep 2014 05:43:25 +0000 (07:43 +0200)]
drm: Move legacy buffer structures to <drm/drm_legacy.h>
A few odd cases:
- mgag200 someho had a totally unused drm_dma_handle_t. Remove it.
- i915 still uses the legacy pci dma alloc api, so grows an include.
Everything else fairly standard.
v2: Include "drm_legacy.h" in drm.ko source files for consistency.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Wed, 10 Sep 2014 06:16:10 +0000 (08:16 +0200)]
drm: Move vblank related module options into drm_irq.c
This allows us to drop 2 header declarations from drmP.h. The 3rd one
is also used in drm_ioctl.c, so for that create a new drm_internal.h
header for non-legacy non-kms (since we have internal headers for
those parts already) declarations private to drm.ko.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Wed, 10 Sep 2014 10:43:52 +0000 (12:43 +0200)]
drm: Drop drm_sysfs_class from drmP.h
No user at all.
My guess is that this is a leftover from ttm before it used
the more abstract helpers to register/unregister its sysfs
objects (see drm_sysfs.h). At least in the existing history
it was never used.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Dave Airlie [Fri, 12 Sep 2014 09:04:53 +0000 (19:04 +1000)]
Merge tag 'topic/vblank-rework-2014-09-12' of git://anongit.freedesktop.org/drm-intel into drm-next
So updated vblank-rework pull request, now with the polish that Mario
requested applied (and reviewed by him). Also with backmerge like you've
requested for easier merging.
The neat thing this finally allows is to immediately disable the vblank
interrupt on the last drm_vblank_put if the hardware has perfectly
accurate vblank counter and timestamp readout support. On i915 that
required piles of small adjustements from Ville since depending upon the
platform and port the vblank happens at different scanout lines.
Of course this is fully opt-in and per-device (we need that since gen2
doesn't have a hw vblank counter).
* tag 'topic/vblank-rework-2014-09-12' of git://anongit.freedesktop.org/drm-intel: (22 commits)
drm: Clarify vblank ts/scanoutpos sampling #defines
drm: Simplify return value of drm_get_last_vbltimestamp
drm: Only update final vblank count when precise ts is available
drm: Really never disable vblank irqs for offdelay==0
drm: Use vblank_disable_and_save in drm_vblank_cleanup()
drm: Remove drm_vblank_cleanup from drm_vblank_init error path.
drm: Store the vblank timestamp when adjusting the counter during disable
drm: Fix confusing debug message in drm_update_vblank_count()
drm/i915: Update scanline_offset only for active crtcs
drm: Kick start vblank interrupts at drm_vblank_on()
drm/i915: Opt out of vblank disable timer on >gen2
drm: Add dev->vblank_disable_immediate flag
drm: Disable vblank interrupt immediately when drm_vblank_offdelay<0
drm: Fix race between drm_vblank_off() and drm_queue_vblank_event()
drm: Fix deadlock between event_lock and vbl_lock/vblank_time_lock
drm: Reduce the amount of dev->vblank[crtc] in the code
drm: Avoid random vblank counter jumps if the hardware counter has been reset
drm: Have the vblank counter account for the time between vblank irq disable and drm_vblank_off()
drm: Move drm_update_vblank_count()
drm: Don't clear vblank timestamps when vblank interrupt is disabled
...
Dave Airlie [Fri, 12 Sep 2014 04:32:40 +0000 (14:32 +1000)]
drm/ast: switch to using CACHED by default for sysram
This fixes problems on ppc64 platforms, where we could end up using
a WC mapping for migrating BOs with memcpy, when really we want to
use cached memory.
Tested-by: Ben Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Wed, 10 Sep 2014 08:23:07 +0000 (18:23 +1000)]
drm: split ati_pcigart.h out of drmP.h
Just move this into a separate header file, and make the
two users use it.
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Fri, 12 Sep 2014 03:58:27 +0000 (13:58 +1000)]
Merge branch 'drm-next-3.18' of git://people.freedesktop.org/~agd5f/linux into drm-next
concurrent buffer reads.
* 'drm-next-3.18' of git://people.freedesktop.org/~agd5f/linux:
drm/radeon: allow concurrent buffer reads
drm/radeon: add the infrastructure for concurrent buffer access
drm/ttm: allow fence to be added as shared
The userspace drm.h include doesn't prefix the drm directory. This can lead
to compile failures as /usr/include/drm/ isn't in the standard gcc include
paths. Fix it to be <drm/drm.h>, which matches the rest of the driver drm
header files that get installed into /usr/include/drm.
Red Hat Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1138759