summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau
Commit message (Collapse)AuthorAgeFilesLines
* drm/gem: Warn on illegal use of the dumb buffer interface v2Thomas Hellstrom2014-11-212-0/+12
| | | | | | | | | | | | | | | | | | | It happens on occasion that developers of generic user-space applications abuse the dumb buffer API to get hold of drm buffers that they can both mmap() and use for GPU acceleration, using the assumptions that dumb buffers and buffers available for GPU are a) The same type and can be aribtrarily type-casted. b) fully coherent. This patch makes the most widely used drivers warn nicely when that happens, the next step will be to fail. v2: Move drmP.h changes to drm_gem.h. Fix Radeon dumb mmap breakage. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.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>
* drm: Move drm_crtc_init from drm_crtc.h to drm_plane_helper.hDaniel Vetter2014-11-052-0/+2
| | | | | | | | | | | | | | | | | | | Just a bit of OCD cleanup on headers - this function isn't the core interface any more but just a helper for drivers who haven't yet transitioned to universal planes. Put the declaration at the right spot and sprinkle necessary #includes over all drivers. Maybe this helps to encourage driver maintainers to do the switch. v2: Fix #include ordering for tegra, reported by 0-day builder. v3: Include required headers, reported by Thierry. Cc: Matt Roper <matthew.d.roper@intel.com> Cc: Thierry Reding <treding@nvidia.com> Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
* Merge branch 'linux-3.18' of ↵Dave Airlie2014-10-202-5/+17
|\ | | | | | | | | | | | | | | | | | | git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-fixes two nouveau fixes. * 'linux-3.18' of git://anongit.freedesktop.org/git/nouveau/linux-2.6: drm/nouveau: fix regression on agp boards drm/gt215/gr: fix initialisation on gddr5 boards
| * drm/nouveau: fix regression on agp boardsBen Skeggs2014-10-201-3/+9
| | | | | | | | | | | | | | | | | | Extends the fix in f2f9a2cbaf019481feefe231f996d3602612fa99 to also workaround permission issues noticed by people using AGP systems. Cc: stable@vger.kernel.org # 3.16: f2f9a2c: drm/nouveau: fix regression Cc: stable@vger.kernel.org # 3.16+ Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/gt215/gr: fix initialisation on gddr5 boardsBen Skeggs2014-10-201-2/+8
| | | | | | | | | | | | | | | | | | | | | | The binary driver modifies the default context to have this value, rather than 0x3d0040, *after* it's filled the buffer with the usual golden data. We don't really have anything in place to locate the correct offset to do these type of modifications outside of the generation function, so this will have to do. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds2014-10-14147-2889/+6264
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull drm updates from Dave Airlie: "This is the main git pull for the drm, I pretty much froze major pulls at -rc5/6 time, and haven't had much fallout, so will probably continue doing that. Lots of changes all over, big internal header cleanup to make it clear drm features are legacy things and what are things that modern KMS drivers should be using. Also big move to use the new generic fences in all the TTM drivers. core: atomic prep work, vblank rework changes, allows immediate vblank disables major header reworking and cleanups to better delinate legacy interfaces from what KMS drivers should be using. cursor planes locking fixes ttm: move to generic fences (affects all TTM drivers) ppc64 caching fixes radeon: userptr support, uvd for old asics, reset rework for fence changes better buffer placement changes, dpm feature enablement hdmi audio support fixes intel: Cherryview work, 180 degree rotation, skylake prep work, execlist command submission full ppgtt prep work cursor improvements edid caching, vdd handling improvements nouveau: fence reworking kepler memory clock work gt21x clock work fan control improvements hdmi infoframe fixes DP audio ast: ppc64 fixes caching fix rcar: rcar-du DT support ipuv3: prep work for capture support msm: LVDS support for mdp4, new panel, gpu refactoring exynos: exynos3250 SoC support, drop bad mmap interface, mipi dsi changes, and component match support" * 'drm-next' of git://people.freedesktop.org/~airlied/linux: (640 commits) drm/mst: rework payload table allocation to conform better. drm/ast: Fix HW cursor image drm/radeon/kv: add uvd/vce info to dpm debugfs output drm/radeon/ci: add uvd/vce info to dpm debugfs output drm/radeon: export reservation_object from dmabuf to ttm drm/radeon: cope with foreign fences inside the reservation object drm/radeon: cope with foreign fences inside display drm/core: use helper to check driver features drm/radeon/cik: write gfx ucode version to ucode addr reg drm/radeon/si: print full CS when we hit a packet 0 drm/radeon: remove unecessary includes drm/radeon/combios: declare legacy_connector_convert as static drm/radeon/atombios: declare connector convert tables as static drm/radeon: drop btc_get_max_clock_from_voltage_dependency_table drm/radeon/dpm: drop clk/voltage dependency filters for BTC drm/radeon/dpm: drop clk/voltage dependency filters for CI drm/radeon/dpm: drop clk/voltage dependency filters for SI drm/radeon/dpm: drop clk/voltage dependency filters for NI drm/radeon: disable audio when we disable hdmi (v2) drm/radeon: split audio enable between eg and r600 (v2) ...
| * Merge branch 'for-airlied-next' of ↵Dave Airlie2014-10-0117-36/+79
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://people.freedesktop.org/~mlankhorst/linux into drm-next fixups for nouveau and fencing * 'for-airlied-next' of git://people.freedesktop.org/~mlankhorst/linux: drm/nouveau: export reservation_object from dmabuf to ttm drm/ttm: add reservation_object as argument to ttm_bo_init drm: Pass dma-buf as argument to gem_prime_import_sg_table drm/nouveau: assign fence_chan->name correctly drm/nouveau: specify if interruptible wait is desired in nouveau_fence_sync drm/nouveau: bump driver patchlevel to 1.2.1
| | * drm/nouveau: export reservation_object from dmabuf to ttmMaarten Lankhorst2014-10-0111-14/+22
| | | | | | | | | | | | | | | | | | Adds an extra argument to nouveau_bo_new, which is only used in nouveau_prime.c. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
| | * drm/ttm: add reservation_object as argument to ttm_bo_initMaarten Lankhorst2014-09-301-1/+1
| | | | | | | | | | | | | | | | | | This allows importing reservation objects from dma-bufs. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
| | * drm: Pass dma-buf as argument to gem_prime_import_sg_tableMaarten Lankhorst2014-09-302-3/+4
| | | | | | | | | | | | | | | | | | Allows importing dma_reservation_objects from a dma-buf. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
| | * drm/nouveau: assign fence_chan->name correctlyMaarten Lankhorst2014-09-305-5/+39
| | | | | | | | | | | | | | | | | | | | | Make nouveau_fence_chan refcounted, to make trace_fence_destroy always return the correct name without a race condition. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
| | * drm/nouveau: specify if interruptible wait is desired in nouveau_fence_syncMaarten Lankhorst2014-09-305-13/+11
| | | | | | | | | | | | Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
| | * drm/nouveau: bump driver patchlevel to 1.2.1Maarten Lankhorst2014-09-301-1/+3
| | | | | | | | | | | | | | | | | | Allows userspace to detect shared fences are supported. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
| * | Merge tag 'topic/core-stuff-2014-09-29' of ↵Dave Airlie2014-10-012-6/+12
| |\ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://anongit.freedesktop.org/drm-intel into drm-next Ok, here's the update core-stuff pull request with the locking fixup patch fixed up with another patch. * tag 'topic/core-stuff-2014-09-29' of git://anongit.freedesktop.org/drm-intel: drm: Drop grab fpriv->fbs_lock in drm_fb_release drm/udl: use container_of to resolve udl_fbdev from drm_fb_helper drm/ast: use container_of to resolve ast_fbdev from drm_fb_helper drm/gma500: use container_of to resolve psb_fbdev from drm_fb_helper drm/qxl: use container_of to resolve qxl_fbdev from drm_fb_helper drm/nouveau: use container_of to resolve nouveau_plane from drm_plane drm/nouveau: use container_of to resolve nouveau_fbdev from drm_fb_helper drm/radeon: use container_of to resolve radeon_fbdev from drm_fb_helper drm/mgag200: use container_of to resolve mga_fbdev from drm_fb_helper drm/cirrus: use container_of to resolve cirrus_fbdev from drm_fb_helper drm: Improve debug output for drm_wait_one_vblank drm: Fixup locking for universal cursor planes drm: Don't update vblank timestamp when the counter didn't change
| | * drm/nouveau: use container_of to resolve nouveau_plane from drm_planeFabian Frederick2014-09-241-5/+10
| | | | | | | | | | | | | | | | | | | | | Use container_of instead of casting first structure member. Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
| | * drm/nouveau: use container_of to resolve nouveau_fbdev from drm_fb_helperFabian Frederick2014-09-241-1/+2
| | | | | | | | | | | | | | | | | | | | | Use container_of instead of casting first structure member. Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
| * | drm/nouveau: nv84+: fix fence context seqno'sMaarten Lankhorst2014-09-301-2/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a regression introduced by "drm/nouveau: rework to new fence interface" (commit 29ba89b2371d466). The fence sequence should not be reset after creation, the old value is used instead. On destruction the final value is written, to prevent another source of accidental wraparound in case of a channel being destroyed after a hang, and unblocking any other channel that may wait on the about-to-be-deleted channel to signal. I'm nothing if not optimistic about any hope of recovery from that. ;-) Reported-by: Ted Percival <ted@tedp.id.au> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Tested-by: Ted Percival <ted@tedp.id.au> Acked-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm: Extract <drm/drm_gem.h>Daniel Vetter2014-09-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | v2: Don't forget git add, noticed by David. Cc: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Acked-by: David Herrmann <dh.herrmann@gmail.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/<ttm-based-drivers>: Don't call drm_mmapDaniel Vetter2014-09-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Really, the legacy buffer api should be dead, especially for all these newfangled drivers. I suspect this is copypasta from the transitioning days, which probably originated in radeon. Cc: "Christian König" <christian.koenig@amd.com> Cc: David Herrmann <dh.herrmann@gmail.com> Cc: Rashika <rashika.kheria@gmail.com> Cc: Josh Triplett <josh@joshtriplett.org> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Fabian Frederick <fabf@skynet.be> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Alexandre Courbot <acourbot@nvidia.com> Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: Christian Engelmayer <cengelma@gmx.at> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Acked-by: Ben Skeggs <bskeggs@redhat.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm: backmerge tag 'v3.17-rc5' into drm-nextDave Airlie2014-09-161-2/+2
| |\ | | | | | | | | | | | | | | | | | | This is requested to get the fixes for intel and radeon into the same tree for future development work. i915_display.c: fix missing dev_priv conflict.
| * | drm/gt214-/disp: enable dp audioBen Skeggs2014-09-155-22/+30
| | | | | | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * | drm/gt214-/kms: fix hda eld regressionBen Skeggs2014-09-151-8/+10
| | | | | | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * | drm/g94-/disp: calculate some dp audio constantsBen Skeggs2014-09-152-22/+49
| | | | | | | | | | | | | | | | | | | | | NVIDIA appear to have tweaked the algorithm from GF110, this implements the previous algorithm for them still. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * | drm/gt214-/kms: perform hda codec setup on displayport tooBen Skeggs2014-09-151-2/+2
| | | | | | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * | drm/gk104-/disp: infoframe registers moved yet again on keplerBen Skeggs2014-09-156-3/+91
| | | | | | | | | | | | | | | | | | | | | Thanks to Vincent Pelletier for pointing this out and providing a proof of concept patch on the list. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * | drm/nouveau/bios: parse older ramcfg/timing data like we do newer onesBen Skeggs2014-09-157-132/+184
| | | | | | | | | | | | | | | | | | Done after discussion with Roy. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * | drm/nva3/fb/ram: Per-partition regsRoy Spliet2014-09-151-4/+4
| | | | | | | | | | | | | | | Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * | drm/nouveau/fb/ram: Support strided regsRoy Spliet2014-09-152-9/+38
| | | | | | | | | | | | | | | Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * | drm/nv50/fb/ram: Store the number of partitions in the designated fieldsRoy Spliet2014-09-152-10/+9
| | | | | | | | | | | | | | | Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * | drm/nv50/kms: Set VBLANK time in modeset scriptRoy Spliet2014-09-151-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | Solves blinking on reclocking memory. The value set is an underestimate, but with non-reduced vblanking this should give us plenty of time Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * | drm/nouveau/bios: Add rammap support for version 1.0Roy Spliet2014-09-151-0/+4
| | | | | | | | | | | | | | | Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * | drm/gf100-/pwr/memx: block host and fifo around reclockBen Skeggs2014-09-154-474/+632
| | | | | | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * | drm/nouveau/pwr/memx: fix command ordering around block/unblockBen Skeggs2014-09-157-462/+461
| | | | | | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * | drm/nouveau/pwr/memx: rename fb off/on to block/unblockBen Skeggs2014-09-156-22/+22
| | | | | | | | | | | | | | | | | | | | | | | | 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). Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * | drm/nva3/clk: Pause the GPU before reclockingRoy Spliet2014-09-153-26/+66
| | | | | | | | | | | | | | | | | | | | | V2: always call post correctly even if pre fails V3: move function prototype to nva3.h Signed-off-by: Roy Spliet <rspliet@eclipso.eu>
| * | drm/nouveau/gpio: rename g92 class to g94Emil Velikov2014-09-157-30/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 commit 9d0f5ec9ee0fd5dc5fc1cc2cf559286431e406e3 Author: Ben Skeggs <bskeggs@redhat.com> Date: Mon May 12 15:22:42 2014 +1000 gpio: split g92 class from nv50 Reported-by: estece on #nouveau Cc: stable@vger.kernel.org # 3.16+ Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * | drm/gk104-/fb/ram: move fb enable/disable to same place as nvidiaBen Skeggs2014-09-151-5/+4
| | | | | | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * | drm/gk104/fb/ram: twiddle some more bits when reclockingBen Skeggs2014-09-151-1/+98
| | | | | | | | | | | | | | | | | | | | | *when* this is done is only a rough approximation of what the binary driver does.. need to investigate more to see if it matters Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * | drm/nouveau/bios: parse another large chunk of random memory config dataBen Skeggs2014-09-152-1/+24
| | | | | | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * | drm/gk104-/fb/ram: perform certain steps only when bios data differsBen Skeggs2014-09-151-19/+34
| | | | | | | | | | | | | | | | | | | | | Awful, awful. But, on the GK106 I have, some upcoming patches show that this is actually necessary after all. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * | drm/gk104-/fb/ram: parse ramcfg data for all frequencies up-frontBen Skeggs2014-09-152-48/+89
| | | | | | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * | drm/gk104-/fb/ram: use parsed timing data in mr routinesBen Skeggs2014-09-152-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | 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. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * | drm/nouveau/bios: parse freq ranges and timing id into ramcfg structBen Skeggs2014-09-157-26/+47
| | | | | | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * | drm/nouveau/bios: memset dcb struct to zero before parsingBen Skeggs2014-09-151-0/+1
| | | | | | | | | | | | | | | | | | | | | Fixes type/mask calculation being based on uninitialised data for VGA outputs. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * | drm/gk104/fb/ram: make use of training data provided by vbiosBen Skeggs2014-09-151-43/+138
| | | | | | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * | drm/nouveau/bios: add support for parsing table at BIT 'M' v2 + 0x09Ben Skeggs2014-09-153-0/+168
| | | | | | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * | drm/nouveau/bios: add support for parsing table at BIT 'M' v2 + 0x05Ben Skeggs2014-09-153-1/+170
| | | | | | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * | drm/gk104/fb/ram: fix register for second set of training dataBen Skeggs2014-09-151-1/+1
| | | | | | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * | drm/gk104/fb/ram: more random magic in fb initBen Skeggs2014-09-151-0/+2
| | | | | | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * | drm/gk104/fb/ram: skip table entry for mode we're already inBen Skeggs2014-09-151-11/+12
| | | | | | | | | | | | | | | | | | | | | NVIDIA binary driver appears to, not sure if it's for a good reason, but grasping at straws for some GDDR5 reclocking issues here. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>