Commit graph

1879 commits

Author SHA1 Message Date
Dave Airlie 0e32fde96b Merge branch 'drm-nouveau-fixes-3.10' of 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-05 14:35:08 +10:00
Ben Skeggs d40ee48acd drm/nv50/kms: use dac loadval from vbios, where it's available
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-05 14:03:08 +10:00
Ben Skeggs ea9197cc32 drm/nv50/disp: force dac power state during load detect
fdo#64904

Reported-by: Gerhard Bräunlich <wippbox@gmx.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-06-05 14:03:01 +10:00
Ben Skeggs 89e033a4bc drm/nv50-nv84/fifo: fix resume regression introduced by playlist race fix
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-05 14:02:53 +10:00
Alexander Stein beba44b17d drm/nv84/disp: Fix HDMI audio regression
Code refactoring in commit 8e9e3d2dea
(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-05 14:02:40 +10:00
Arnd Bergmann b06f6a9d06 drm/nouveau: use mdelay instead of large udelay constants
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-06-03 19:20:56 +10:00
Dave Airlie c313d56754 Merge remote-tracking branch 'pfdo/drm-fixes' into drm-next
Pull the vblank event changes into a Linus master tree to make merging
easier.
2013-05-24 10:12:22 +10:00
Rob Clark 95d38d144a drm/nouveau: use drm_send_vblank_event() helper
Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-05-22 09:13:40 +10:00
Linus Torvalds 007b703b3e Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
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-21 08:50:09 -07:00
Ben Skeggs 81dff21b64 drm/nouveau: ensure channels are stopped before saving fences for suspend
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-05-20 13:24:09 +10:00
Ben Skeggs b5096566f6 drm/nv50/fifo: prevent races between clients updating playlists
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-05-20 13:24:09 +10:00
Ben Skeggs 9426eedb26 drm/nvc0/fifo: prevent CHAN_TABLE_ERROR:CHANNEL_PENDING on fifo fini
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-05-20 13:24:08 +10:00
Ben Skeggs fadb171902 drm/nvc0/fifo: prevent races between clients updating playlists
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-05-20 13:24:07 +10:00
Ben Skeggs c2e3259b7b drm/nve0/fifo: prevent races between clients updating playlists
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-05-20 13:24:07 +10:00
Ben Skeggs fe6fc096b8 drm/nve0/ltcg: poke the partition count into yet another register
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-05-20 13:24:06 +10:00
Ben Skeggs 49debbe454 drm/nvc0/ltcg: fix handling of disabled partitions
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-05-20 13:24:06 +10:00
Ben Skeggs 6d5f83834d drm/nvc0/ce: disable ce1 on a number of chipsets
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-20 13:23:58 +10:00
Ben Skeggs 46b47b8a7d drm/nouveau/bios: fix thinko in ZM_MASK_ADD opcode
Cc: stable@vger.kernel.org
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-05-20 13:23:42 +10:00
Dave Airlie c5e624f843 drm/nouveau: fix build with nv50->nvc0
Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-05-20 13:23:41 +10:00
Linus Torvalds 20a2078ce7 Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux
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-02 19:40:34 -07:00
Dave Airlie f49e7259a4 drm/nouveau: fix build with nv50->nvc0
Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-05-03 06:40:37 +10:00
Ben Skeggs 7b4f638b3a drm/nve0: recognise nvf0 as a kepler board (GK110)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-05-02 16:23:29 +10:00
Ben Skeggs 9fe72f9e83 drm/nouveau: force noaccel when no PFIFO support present
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-05-02 16:23:24 +10:00
Ben Skeggs e5398b23a5 drm/nvf0/disp: expose display class 2.2
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-05-02 16:23:13 +10:00
Ben Skeggs 893e90c554 drm/nouveau/fifo: implement channel creation event generation
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-04-26 15:38:17 +10:00
Ben Skeggs 10eeaf123d drm/nouveau/core: allow non-maskable events
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-04-26 15:38:16 +10:00
Ben Skeggs 6d1d1cc97b drm/nouveau/timer: allow alarms to be cancelled
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-04-26 15:38:15 +10:00
Ben Skeggs 10caad339c drm/nouveau/device: tweak the device/subdev relationship a little
Fixes not-in-use engines not having their reset() method called on
resume.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-04-26 15:38:14 +10:00
Ben Skeggs 066a5d0938 drm/nouveau/device: enable proper constructor/destructor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-04-26 15:38:12 +10:00
Ben Skeggs 9aecbada75 drm/nouveau/device: have engine object initialised before creation
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-04-26 15:38:11 +10:00
Ben Skeggs dded35dee3 drm/nouveau/device: convert to engine, rather than subdev
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-04-26 15:38:10 +10:00
Ben Skeggs 2ecda48b36 drm/nv50-/disp: use self as parent for subobjects
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-04-26 15:38:08 +10:00
Ben Skeggs f50c805488 drm/nv50-/fifo: use parent as self for subobjects
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-04-26 15:38:07 +10:00
Ben Skeggs a3e6789a54 drm/nv20-nv30/gr: use parent as self for subobjects
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-04-26 15:38:06 +10:00
Ben Skeggs 617a6cbd7c drm/nvc0-/gr: use self as parent for subobjects
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-04-26 15:38:05 +10:00
Ben Skeggs 1409d90f24 drm/nv04-nv40/instmem: use self as parent for subobjects
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-04-26 15:38:03 +10:00
Ben Skeggs be1e8e16ec drm/nv04-nv40/vm: use self as parent for subobjects
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-04-26 15:38:02 +10:00
Ben Skeggs f83145ecd7 drm/nv50-/bar: use self as parent for subobjects
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-04-26 15:38:01 +10:00
Ben Skeggs b5795c77e5 drm/nv04-nv40/instmem: remove parent deref hack
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-04-26 15:38:00 +10:00
Ben Skeggs d395f1e4c5 drm/nouveau/i2c: remove parent deref hack
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-04-26 15:37:58 +10:00
Ben Skeggs db91d68c9b drm/nouveau/core: rebase object ref/use counts after ctor/init/fini events
This is intended to support named (with a handle, etc) objects having
children that don't have an outside reference.

This will replace the various hacks around the place where subdev
objects have children, and have to manually drop the self-refs so
that they can be destroyed etc when all the outside refs have gone.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-04-26 15:37:57 +10:00
Ben Skeggs 43e6e51c03 drm/nv50/disp: inform core when we're not creating a new context
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-04-26 15:37:56 +10:00
Ben Skeggs bdd4e843fa drm/nouveau/therm: send some messages to debug level
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-04-26 15:37:55 +10:00
Christoph Bumiller bf3d8165e4 drm/nve0/gr: add handling for a bunch of PGRAPH traps
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-04-26 15:37:53 +10:00
Ben Skeggs 0fa9061ae8 drm/nouveau/mc: handle irq-related setup ourselves
We need to be able to process interrupts before the DRM code is able to
actually enable them, set it up ourselves.  Also, it's less convoluted
to *not* use the DRM wrappers it appears...

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-04-26 15:37:52 +10:00
Ben Skeggs 1a64634255 drm/nv04/disp: hide all the cruft away in its own little hole
It'd be pretty awesome if someone would care enough to port this all
properly to a class interface, perhaps submitting a command stream to
the core via a sw object on PFIFO (emulating how EVO works basically,
and also what nvidia have done forever..)..

But, this seems unlikely given how old this hardware is now, so, lets
just hide it away.

There's a heap of other bits and pieces laying around that are still
tangled.  I'll (re)move them in pieces.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-04-26 15:37:51 +10:00
Ben Skeggs b9a3140ce8 drm/nouveau/bios: add missing newline on IO*_OR opcode debugging
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-04-26 15:37:50 +10:00
Ben Skeggs 28ec70f7fb drm/nouveau/bios: suppress some parser errors when dry-running scripts
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-04-26 15:37:48 +10:00
Ben Skeggs 3f196a045e drm/nve0: magic up some support for GF117
Seen in the wild, don't have the hardware but this hacks things up to
treat it the same as GF119 for now.

Should be relatively safe, I'd be very surprised if anything major
changed outside of PGRAPH.  PGRAPH (3D etc) is disabled by default
however until it's confirmed working.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-04-26 15:37:47 +10:00
Roy Spliet 8cb303a85b drm/nvc0-/ltcg: Fix build on 32-bit platforms (v2)
v2: read, don't assume.. *puts on brown paper bag*

Signed-off-by: Roy Spliet <r.spliet@student.tudelft.nl>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-04-26 15:37:46 +10:00