summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau
AgeCommit message (Collapse)Author
2013-06-28drm/ttm: convert to the reservation apiMaarten Lankhorst
Now that the code is compatible in semantics, flip the switch. Use ww_mutex instead of the homegrown implementation. ww_mutex uses -EDEADLK to signal that the caller has to back off, and -EALREADY to indicate this buffer is already held by the caller. ttm used -EAGAIN and -EDEADLK for those, respectively. So some changes were needed to handle this correctly. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-06-28drm/nouveau: make flipping lockdep safeMaarten Lankhorst
cli->mutex was inverted with reservations, and multiple reservations were used without a ticket, fix both. This commit had to be done after the previous commit, because otherwise ttm_eu_* calls would use a different seqno counter.. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Acked-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-06-28drm/ttm: make ttm reservation calls behave like reservation callsMaarten Lankhorst
This commit converts the source of the val_seq counter to the ww_mutex api. The reservation objects are converted later, because there is still a lockdep splat in nouveau that has to resolved first. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-06-28drm/nouveau: always select ACPI_VIDEO if ACPI is enabled.Maarten Lankhorst
Having nouveau builtin would still allow ACPI_VIDEO to be used as external module if some of the deps for acpi_video have not been met, which would result in a linking failure. Solve this by selecting all dependencies as well. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Acked-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-06-28drm/nouveau: complain loudly if buffer is pinned during destructionMaarten Lankhorst
Shouldn't happen, and we invert the struct_mutex with reservation here, potentially leading to deadlocks. Once reservations become lockdep annotated, lockdep will go splat on this. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Acked-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-06-28drm/nouveau: fixup fbcon failure pathsMaarten Lankhorst
Add missing calls, and fix a leak from forgetting to call the unpin function. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Acked-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-06-28drm/nouveau: unpin notify object in chan_finiMaarten Lankhorst
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Acked-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-06-28drm/nouveau: implement prime helper unpin functionMaarten Lankhorst
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Acked-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-06-27Merge tag 'v3.10-rc7' into drm-nextDave Airlie
Linux 3.10-rc7 The sdvo lvds fix in this -fixes pull commit c3456fb3e4712d0448592af3c5d644c9472cd3c1 Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Mon Jun 10 09:47:58 2013 +0200 drm/i915: prefer VBT modes for SVDO-LVDS over EDID has a silent functional conflict with commit 990256aec2f10800595dddf4d1c3441fcd6b2616 Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Fri May 31 12:17:07 2013 +0000 drm: Add probed modes in probe order in drm-next. W simply need to add the vbt modes before edid modes, i.e. the other way round than now. Conflicts: drivers/gpu/drm/drm_prime.c drivers/gpu/drm/i915/intel_sdvo.c
2013-06-05Merge branch 'drm-nouveau-fixes-3.10' of ↵Dave Airlie
git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-fixes Multiple nouveau regression fixes, hdmi audio, s/r and dac load detection * 'drm-nouveau-fixes-3.10' of git://anongit.freedesktop.org/git/nouveau/linux-2.6: drm/nv50/kms: use dac loadval from vbios, where it's available drm/nv50/disp: force dac power state during load detect drm/nv50-nv84/fifo: fix resume regression introduced by playlist race fix drm/nv84/disp: Fix HDMI audio regression
2013-06-05drm/nv50/kms: use dac loadval from vbios, where it's availableBen Skeggs
Regression from merging the old nv50/nvd9 code together, and may be needed to fully fix fdo#64904. The value is ignored completely by the hardware starting from nva3. Reported-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-06-05drm/nv50/disp: force dac power state during load detectBen Skeggs
fdo#64904 Reported-by: Gerhard Bräunlich <wippbox@gmx.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-06-05drm/nv50-nv84/fifo: fix resume regression introduced by playlist race fixBen Skeggs
Reported-by: Maarten Maathuis <madman2003@gmail.com> Reported-by: Sven Joachim <svenjoac@gmx.de> Reported-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-06-05drm/nv84/disp: Fix HDMI audio regressionAlexander Stein
Code refactoring in commit 8e9e3d2deacc460fbb8a4691140318f6e85e6891 (drm/nv84/disp: move hdmi control into core) disabled HDMI audio on my nv84 by removing too much old code without adding it in the new one. This patch adds the missing code within the new code layout resulting in HDMI audio working again. It should work on any HDMI head, but due to lacking ahrdware I could only test the (1st) one. It also might be possible that similar code is needed for nva3, which I can't test. Signed-off-by: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-06-03drm/nouveau: use mdelay instead of large udelay constantsArnd Bergmann
ARM cannot handle udelay for more than 2 miliseconds, so we should use mdelay instead for those. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: David Airlie <airlied@linux.ie> Cc: Ben Skeggs <bskeggs@redhat.com> Cc: dri-devel@lists.freedesktop.org Signed-off-by: Dave Airlie <airlied@gmail.com>
2013-05-31drm (ast, cirrus, mgag200, nouveau, savage, vmwgfx): Remove drm_mtrr_{add, del}Andy Lutomirski
This replaces drm_mtrr_{add,del} with arch_phys_wc_{add,del}. The interface is simplified (because the base and size parameters to drm_mtrr_del never did anything), and it no longer adds MTRRs on systems that don't need them. Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Andy Lutomirski <luto@amacapital.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-05-24Merge remote-tracking branch 'pfdo/drm-fixes' into drm-nextDave Airlie
Pull the vblank event changes into a Linus master tree to make merging easier.
2013-05-21drm/nouveau: use drm_send_vblank_event() helperRob Clark
Signed-off-by: Rob Clark <rob@ti.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-05-21Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds
Pull DRM fixes from Dave Airlie: "This is just a set of nouveau and radeon fixes, the nouveau ones fix some suspend/resume regressions since use of copy engines and some fixes for Z compression on some newer chipsets." * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: drm/radeon/dce2: use 10khz units for audio dto calculation drm/radeon: Fix VRAM size calculation for VRAM >= 4GB drm/radeon: Remove superfluous variable drm/nouveau: ensure channels are stopped before saving fences for suspend drm/nv50/fifo: prevent races between clients updating playlists drm/nvc0/fifo: prevent CHAN_TABLE_ERROR:CHANNEL_PENDING on fifo fini drm/nvc0/fifo: prevent races between clients updating playlists drm/nve0/fifo: prevent races between clients updating playlists drm/nve0/ltcg: poke the partition count into yet another register drm/nvc0/ltcg: fix handling of disabled partitions drm/nvc0/ce: disable ce1 on a number of chipsets drm/nouveau/bios: fix thinko in ZM_MASK_ADD opcode drm/nouveau: fix build with nv50->nvc0
2013-05-20drm/nouveau: ensure channels are stopped before saving fences for suspendBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-05-20drm/nv50/fifo: prevent races between clients updating playlistsBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-05-20drm/nvc0/fifo: prevent CHAN_TABLE_ERROR:CHANNEL_PENDING on fifo finiBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-05-20drm/nvc0/fifo: prevent races between clients updating playlistsBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-05-20drm/nve0/fifo: prevent races between clients updating playlistsBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-05-20drm/nve0/ltcg: poke the partition count into yet another registerBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-05-20drm/nvc0/ltcg: fix handling of disabled partitionsBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-05-20drm/nvc0/ce: disable ce1 on a number of chipsetsBen Skeggs
The falcon is present, but the rest of the copy engine doesn't appear to be... PUNITS doesn't report disabled (maybe the bits for the copy engines got added later?), so we end up trying to use a non-functional CE1, and bust all sorts of things.. Most notably, suspend/resume.. Cc: stable@vger.kernel.org Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-05-20drm/nouveau/bios: fix thinko in ZM_MASK_ADD opcodeBen Skeggs
Cc: stable@vger.kernel.org Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-05-20drm/nouveau: fix build with nv50->nvc0Dave Airlie
Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-05-03Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds
Pull drm updates from Dave Airlie: "This is the main drm pull request for 3.10. Wierd bits: - OMAP drm changes required OMAP dss changes, in drivers/video, so I took them in here. - one more fbcon fix for font handover - VT switch avoidance in pm code - scatterlist helpers for gpu drivers - have acks from akpm Highlights: - qxl kms driver - driver for the spice qxl virtual GPU Nouveau: - fermi/kepler VRAM compression - GK110/nvf0 modesetting support. Tegra: - host1x core merged with 2D engine support i915: - vt switchless resume - more valleyview support - vblank fixes - modesetting pipe config rework radeon: - UVD engine support - SI chip tiling support - GPU registers initialisation from golden values. exynos: - device tree changes - fimc block support Otherwise: - bunches of fixes all over the place." * 'drm-next' of git://people.freedesktop.org/~airlied/linux: (513 commits) qxl: update to new idr interfaces. drm/nouveau: fix build with nv50->nvc0 drm/radeon: fix handling of v6 power tables drm/radeon: clarify family checks in pm table parsing drm/radeon: consolidate UVD clock programming drm/radeon: fix UPLL_REF_DIV_MASK definition radeon: add bo tracking debugfs drm/radeon: add new richland pci ids drm/radeon: add some new SI PCI ids drm/radeon: fix scratch reg handling for UVD fence drm/radeon: allocate SA bo in the requested domain drm/radeon: fix possible segfault when parsing pm tables drm/radeon: fix endian bugs in atom_allocate_fb_scratch() OMAPDSS: TFP410: return EPROBE_DEFER if the i2c adapter not found OMAPDSS: VENC: Add error handling for venc_probe_pdata OMAPDSS: HDMI: Add error handling for hdmi_probe_pdata OMAPDSS: RFBI: Add error handling for rfbi_probe_pdata OMAPDSS: DSI: Add error handling for dsi_probe_pdata OMAPDSS: SDI: Add error handling for sdi_probe_pdata OMAPDSS: DPI: Add error handling for dpi_probe_pdata ...
2013-05-02drm/nouveau: fix build with nv50->nvc0Dave Airlie
Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-05-02drm/nve0: recognise nvf0 as a kepler board (GK110)Ben Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-05-02drm/nouveau: force noaccel when no PFIFO support presentBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-05-02drm/nvf0/disp: expose display class 2.2Ben Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-04-26drm/nouveau/fifo: implement channel creation event generationBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-04-26drm/nouveau/core: allow non-maskable eventsBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-04-26drm/nouveau/timer: allow alarms to be cancelledBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-04-26drm/nouveau/device: tweak the device/subdev relationship a littleBen Skeggs
Fixes not-in-use engines not having their reset() method called on resume. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-04-26drm/nouveau/device: enable proper constructor/destructorBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-04-26drm/nouveau/device: have engine object initialised before creationBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-04-26drm/nouveau/device: convert to engine, rather than subdevBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-04-26drm/nv50-/disp: use self as parent for subobjectsBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-04-26drm/nv50-/fifo: use parent as self for subobjectsBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-04-26drm/nv20-nv30/gr: use parent as self for subobjectsBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-04-26drm/nvc0-/gr: use self as parent for subobjectsBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-04-26drm/nv04-nv40/instmem: use self as parent for subobjectsBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-04-26drm/nv04-nv40/vm: use self as parent for subobjectsBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-04-26drm/nv50-/bar: use self as parent for subobjectsBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-04-26drm/nv04-nv40/instmem: remove parent deref hackBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-04-26drm/nouveau/i2c: remove parent deref hackBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>