openwrt/staging/blogic.git
10 years agodrm: Remove the now unused DRM_LOG* macros
Lespiau, Damien [Mon, 24 Mar 2014 15:53:14 +0000 (15:53 +0000)]
drm: Remove the now unused DRM_LOG* macros

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
10 years agostaging: imx-drm: Replace DRM_LOG_KMS() by DRM_DEBUG_KMS()
Lespiau, Damien [Mon, 24 Mar 2014 15:53:13 +0000 (15:53 +0000)]
staging: imx-drm: Replace DRM_LOG_KMS() by DRM_DEBUG_KMS()

There are only a few users of the DRM_LOG_KMS() macro. We can simplify
the DRM code a bit by replacing them by DRM_DEBUG_KMS().

Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
10 years agodrm/i915: Replace DRM_LOG_KMS() by DRM_DEBUG_KMS()
Lespiau, Damien [Mon, 24 Mar 2014 15:53:12 +0000 (15:53 +0000)]
drm/i915: Replace DRM_LOG_KMS() by DRM_DEBUG_KMS()

There are only a few users of the DRM_LOG_KMS() macro. We can simplify
the DRM code a bit by replacing them by DRM_DEBUG_KMS().

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
10 years agodrm/gma500: Replace DRM_LOG_KMS() by DRM_DEBUG_KMS()
Lespiau, Damien [Mon, 24 Mar 2014 15:53:11 +0000 (15:53 +0000)]
drm/gma500: Replace DRM_LOG_KMS() by DRM_DEBUG_KMS()

There are only a few users of the DRM_LOG_KMS() macro. We can simplify
the DRM code a bit by replacing them by DRM_DEBUG_KMS().

Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Acked-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
10 years agodrm/exynos: Replace DRM_LOG_KMS() by DRM_DEBUG_KMS()
Lespiau, Damien [Mon, 24 Mar 2014 15:53:10 +0000 (15:53 +0000)]
drm/exynos: Replace DRM_LOG_KMS() by DRM_DEBUG_KMS()

There are only a few users of the DRM_LOG_KMS() macro. We can simplify
the DRM code a bit by replacing them by DRM_DEBUG_KMS().

Cc: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
10 years agodrm: Remove the unused (and unusable) DRM_LOG_MODE()
Lespiau, Damien [Mon, 24 Mar 2014 15:53:09 +0000 (15:53 +0000)]
drm: Remove the unused (and unusable) DRM_LOG_MODE()

This macro was trying to use the non existing DRM_UT_MODE debug category
and looks like it should be covered by DRM_LOG_KMS().

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
10 years agodrm: Refresh the explanation of debug categories
Lespiau, Damien [Mon, 24 Mar 2014 15:53:08 +0000 (15:53 +0000)]
drm: Refresh the explanation of debug categories

That comment wasn't super-readable, so I tried to improve it:

- Put the comment before the values it's documenting
- Add a mention to PRIME
- Reword things a bit to be a lighter read
- Add a note about the option to set the debug value at run-time

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
10 years agodrm/bridge: PTN3460 needs DRM_KMS_HELPER
Arnd Bergmann [Tue, 25 Mar 2014 11:06:46 +0000 (12:06 +0100)]
drm/bridge: PTN3460 needs DRM_KMS_HELPER

The recently added PTN3460 device driver uses interfaces that
are provided by the KMS helper infrastructure, so we should
explicitly select that to avoid this linker error:

ERROR: "drm_helper_probe_single_connector_modes" [drivers/gpu/drm/bridge/ptn3460.ko] undefined!
ERROR: "drm_helper_connector_dpms" [drivers/gpu/drm/bridge/ptn3460.ko] undefined!

We have to drop the I2C dependency to avoid a circular dependency
chain, but that's ok because DRM already selects I2C.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
10 years agoMerge branch 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux...
Dave Airlie [Wed, 26 Mar 2014 04:34:16 +0000 (14:34 +1000)]
Merge branch 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-next

- first stage of (ongoing) gpu fault recovery work
- initial support for maxwell (binary driver fw needed)
- various random fixes across the board

* 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6: (87 commits)
  drm/nouveau: fix missing newline
  drm/nouveau/bios: fetch the vbios from PROM using only aligned 32-bit accesses
  drm/nouveau/therm: let the vbios decide on the automatic fan management mode
  drm/nvd7/therm: handle another kind of PWM fans
  drm/nouveau/pm/fan: drop the fan lock in fan_update() before rescheduling
  drm/nouveau: fix small thinko in vblank timestamping.
  drm/nouveau/therm: check for sensor presence with requested mode, not current
  drm/nouveau/disp/dp: allow 540MHz data rate
  drm/nouveau: recognise higher link rate for available dp bw calculations
  drm/nouveau/disp: limit dp capabilities as per dcb
  drm/nva3/fbram: restrict training pattern setup to GT218
  drm/nva3/devinit: restrict script access to some PFB regs
  drm/nouveau/devinit: add interface to check if a mmio access by scripts is ok
  drm/nouveau/bios: have strap reads show on devinit spam debug level
  drm/nv50/gpio: fixup reset for gpios >= 16
  drm/nv50/gpio: exclude sense value from mask when changing registers
  drm/gk104/gr: therm magic needed on some kepler boards
  drm/gm107/gr: initial support
  drm/gf100-/gf: fix a stupid typo, waiting on wrong signal for mmctx
  drm/nouveau/bios: parsing of some random table needed to bring up gr
  ...

10 years agodrm/nouveau: fix missing newline
Alexandre Courbot [Mon, 24 Mar 2014 08:42:23 +0000 (17:42 +0900)]
drm/nouveau: fix missing newline

Add a missing newline at the end of a DRM_INFO message.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nouveau/bios: fetch the vbios from PROM using only aligned 32-bit accesses
Martin Peres [Tue, 25 Mar 2014 21:23:23 +0000 (22:23 +0100)]
drm/nouveau/bios: fetch the vbios from PROM using only aligned 32-bit accesses

Other kind of accesses are unreliable on Kepler cards. As advised by NVIDIA,
let's only use 32-bit accesses to fetch the vbios from PROM.

This fixes vbios fetching on my nve7 which failed in certain specific
conditions.

I suggest we Cc stable, for all kernels they still maintain after the big
rewrite.

Suggested-by: Christian Zander <czander@nvidia.com>
Signed-off-by: Martin Peres <martin.peres@free.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nouveau/therm: let the vbios decide on the automatic fan management mode
Martin Peres [Wed, 19 Feb 2014 00:04:56 +0000 (01:04 +0100)]
drm/nouveau/therm: let the vbios decide on the automatic fan management mode

This should fix automatic fan management on fermi cards who do not have
0x46 entries in the thermal table.

On my nve6, the blob sets the default linear range from 40°C to 100°C
but my nvcf's default values are 40°C to 85°C. Let's keep 85 as a default
for everyone.

Signed-off-by: Martin Peres <martin.peres@labri.fr>
Tested-by: Timothée Ravier <tim@siosm.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nvd7/therm: handle another kind of PWM fans
Martin Peres [Tue, 18 Feb 2014 02:56:11 +0000 (03:56 +0100)]
drm/nvd7/therm: handle another kind of PWM fans

This should fix fan management on many nvd7+ chipsets.

Signed-off-by: Martin Peres <martin.peres@labri.fr>
Tested-by: Timothée Ravier <tim@siosm.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nouveau/pm/fan: drop the fan lock in fan_update() before rescheduling
Martin Peres [Thu, 13 Mar 2014 23:26:52 +0000 (00:26 +0100)]
drm/nouveau/pm/fan: drop the fan lock in fan_update() before rescheduling

This should fix a deadlock that has been reported to us where fan_update()
would hold the fan lock and try to grab the alarm_program_lock to reschedule
an update. On an other CPU, the alarm_program_lock would have been taken
before calling fan_update(), leading to a deadlock.

We should Cc: <stable@vger.kernel.org> # 3.9+

Reported-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Tested-by: Timothée Ravier <tim@siosm.fr>
Tested-by: Boris Fersing (IRC nick fersingb, no public email address)
Signed-off-by: Martin Peres <martin.peres@free.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nouveau: fix small thinko in vblank timestamping.
Mario Kleiner [Wed, 19 Mar 2014 09:02:11 +0000 (10:02 +0100)]
drm/nouveau: fix small thinko in vblank timestamping.

*hpos horizontal scanout position doesn't need to be corrected
to count the pixels between hactive end and htotal negative.
That is only needed for *vpos to count lines until end of
vblank for the vblank timestamping.

Use hpos as is without correction.

Removes occassional spikes in timestamps of up to 1 scanline
duration, thereby improves accuracy to about +/- 2 usecs instead
of +/- 12 usecs, wrt. true onset time as measured with high
precision equipment on NV-A5.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nouveau/therm: check for sensor presence with requested mode, not current
Ben Skeggs [Mon, 24 Mar 2014 03:34:47 +0000 (13:34 +1000)]
drm/nouveau/therm: check for sensor presence with requested mode, not current

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nouveau/disp/dp: allow 540MHz data rate
Ilia Mirkin [Wed, 19 Mar 2014 14:45:55 +0000 (10:45 -0400)]
drm/nouveau/disp/dp: allow 540MHz data rate

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76319
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nouveau: recognise higher link rate for available dp bw calculations
Ben Skeggs [Wed, 19 Mar 2014 23:32:01 +0000 (09:32 +1000)]
drm/nouveau: recognise higher link rate for available dp bw calculations

I should resurrect/merge that cleanup branch to remove the weird
duplication.. One day.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nouveau/disp: limit dp capabilities as per dcb
Ben Skeggs [Wed, 19 Mar 2014 23:28:00 +0000 (09:28 +1000)]
drm/nouveau/disp: limit dp capabilities as per dcb

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nva3/fbram: restrict training pattern setup to GT218
Ben Skeggs [Tue, 18 Mar 2014 19:23:10 +0000 (05:23 +1000)]
drm/nva3/fbram: restrict training pattern setup to GT218

It doesn't look like the others have the registers.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nva3/devinit: restrict script access to some PFB regs
Ben Skeggs [Tue, 18 Mar 2014 17:08:21 +0000 (03:08 +1000)]
drm/nva3/devinit: restrict script access to some PFB regs

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nouveau/devinit: add interface to check if a mmio access by scripts is ok
Ben Skeggs [Tue, 18 Mar 2014 16:56:29 +0000 (02:56 +1000)]
drm/nouveau/devinit: add interface to check if a mmio access by scripts is ok

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nouveau/bios: have strap reads show on devinit spam debug level
Ben Skeggs [Tue, 18 Mar 2014 14:55:02 +0000 (00:55 +1000)]
drm/nouveau/bios: have strap reads show on devinit spam debug level

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nv50/gpio: fixup reset for gpios >= 16
Ben Skeggs [Tue, 18 Mar 2014 14:46:47 +0000 (00:46 +1000)]
drm/nv50/gpio: fixup reset for gpios >= 16

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nv50/gpio: exclude sense value from mask when changing registers
Ben Skeggs [Tue, 18 Mar 2014 14:35:44 +0000 (00:35 +1000)]
drm/nv50/gpio: exclude sense value from mask when changing registers

Shouldn't effect anything, was just momentarily confusing while looking
at traces.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/gk104/gr: therm magic needed on some kepler boards
Ben Skeggs [Wed, 5 Mar 2014 04:46:48 +0000 (14:46 +1000)]
drm/gk104/gr: therm magic needed on some kepler boards

Not needed everywhere, and potentially not safe to do depending on how
the rest of PTHERM is configured...

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/gm107/gr: initial support
Ben Skeggs [Tue, 4 Mar 2014 01:00:41 +0000 (11:00 +1000)]
drm/gm107/gr: initial support

Our ucode only partially works at this point, so requiring binary fw
image for now.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/gf100-/gf: fix a stupid typo, waiting on wrong signal for mmctx
Ben Skeggs [Fri, 7 Mar 2014 02:33:56 +0000 (12:33 +1000)]
drm/gf100-/gf: fix a stupid typo, waiting on wrong signal for mmctx

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nouveau/bios: parsing of some random table needed to bring up gr
Ben Skeggs [Tue, 4 Mar 2014 10:57:50 +0000 (20:57 +1000)]
drm/nouveau/bios: parsing of some random table needed to bring up gr

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nv50/bar: fix plymouth issues on certain efi macbooks
Ben Skeggs [Tue, 4 Mar 2014 05:45:35 +0000 (15:45 +1000)]
drm/nv50/bar: fix plymouth issues on certain efi macbooks

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nouveau: fix fbcon not being accelerated after suspend
Ben Skeggs [Mon, 3 Mar 2014 06:18:56 +0000 (16:18 +1000)]
drm/nouveau: fix fbcon not being accelerated after suspend

This does *not* (and is not intended to) fix the issue reported by
Christoph Rudorff on the nouveau mailinglist.

The patch proposed (which is similar to this one, but also reorders
whether we disable accel or call fb_set_suspend first), papers over
another problem entirely by avoiding touching the framebuffer.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/gf100-/gr: split ppc state into its subunits
Ben Skeggs [Mon, 3 Mar 2014 06:18:56 +0000 (16:18 +1000)]
drm/gf100-/gr: split ppc state into its subunits

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/gf100-/gf: split tpc state into its subunits
Ben Skeggs [Mon, 3 Mar 2014 06:18:56 +0000 (16:18 +1000)]
drm/gf100-/gf: split tpc state into its subunits

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/gf100-/gr: split gpc state into its subunits
Ben Skeggs [Mon, 3 Mar 2014 06:18:56 +0000 (16:18 +1000)]
drm/gf100-/gr: split gpc state into its subunits

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/gf100-/gr: tidy reg/ctx initval lists, mostly by giving them names
Ben Skeggs [Mon, 3 Mar 2014 06:18:55 +0000 (16:18 +1000)]
drm/gf100-/gr: tidy reg/ctx initval lists, mostly by giving them names

Unit names come from the Android GK20A driver.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/gk110/gr: minor adjustment to some random initval
Ben Skeggs [Mon, 3 Mar 2014 06:18:55 +0000 (16:18 +1000)]
drm/gk110/gr: minor adjustment to some random initval

Change from traces of a newer binary driver version.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/gk104/gr: minor adjustment to some random initval
Ben Skeggs [Mon, 3 Mar 2014 06:18:55 +0000 (16:18 +1000)]
drm/gk104/gr: minor adjustment to some random initval

Change from traces of a newer binary driver version.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/gf119/gr: fix bug in some random initval
Ben Skeggs [Mon, 3 Mar 2014 06:18:55 +0000 (16:18 +1000)]
drm/gf119/gr: fix bug in some random initval

Bug noticed vs traces.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/gf110/gr: fixup gpc/tpc initvals lists
Ben Skeggs [Mon, 3 Mar 2014 06:18:55 +0000 (16:18 +1000)]
drm/gf110/gr: fixup gpc/tpc initvals lists

Differences noted vs traces.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/gk208/gr: minor adjustment to some random initval
Ben Skeggs [Mon, 3 Mar 2014 06:18:55 +0000 (16:18 +1000)]
drm/gk208/gr: minor adjustment to some random initval

Change from traces of a newer binary driver version.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/gf108/gr: minor adjustment to some random initval
Ben Skeggs [Mon, 3 Mar 2014 06:18:55 +0000 (16:18 +1000)]
drm/gf108/gr: minor adjustment to some random initval

Bug noticed vs traces.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/gf104/gr: rename gf104 (nvc4), it came before gf106 (nvc3)
Ben Skeggs [Mon, 3 Mar 2014 06:18:55 +0000 (16:18 +1000)]
drm/gf104/gr: rename gf104 (nvc4), it came before gf106 (nvc3)

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nvc0-/graph: fix gpccs fuc stack setup
Ben Skeggs [Wed, 26 Feb 2014 02:02:08 +0000 (12:02 +1000)]
drm/nvc0-/graph: fix gpccs fuc stack setup

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nouveau/bios: add more checks to PRAMIN image fetching
Ben Skeggs [Wed, 26 Feb 2014 00:14:15 +0000 (10:14 +1000)]
drm/nouveau/bios: add more checks to PRAMIN image fetching

Prevents an attempt to access VRAM on an un-posted board, which, on a
particular system with a GRID K1 installed, causes a MCE and chokes
the entire system.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agosupport for platform devices
Alexandre Courbot [Mon, 17 Feb 2014 06:17:26 +0000 (15:17 +0900)]
support for platform devices

Upcoming mobile Kepler GPUs (such as GK20A) use the platform bus instead
of PCI to which Nouveau is tightly dependent. This patch allows Nouveau
to handle platform devices by:

- abstracting PCI-dependent functions that were typically used for
  resource querying and page mapping,
- introducing a nv_device_is_pci() function that allows to make
  PCI-dependent code conditional,
- providing a nouveau_drm_platform_probe() function that takes a GPU
  platform device to be probed.

Core code as well as engine/subdev drivers are updated wherever possible
to make use of these functions. Some older drivers are too dependent on
PCI to be properly updated, but all newer code on which future chips may
depend should at least be runnable with platform devices.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nouveau: support modesetting on GM107
Ben Skeggs [Mon, 24 Feb 2014 04:29:55 +0000 (14:29 +1000)]
drm/nouveau: support modesetting on GM107

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/gm100/device: recognise GM107
Ben Skeggs [Mon, 24 Feb 2014 01:28:37 +0000 (11:28 +1000)]
drm/gm100/device: recognise GM107

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/gm107/disp: initial implementation
Ben Skeggs [Mon, 24 Feb 2014 04:26:44 +0000 (14:26 +1000)]
drm/gm107/disp: initial implementation

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/gm107/ltcg: initial implementation
Ben Skeggs [Mon, 24 Feb 2014 04:17:49 +0000 (14:17 +1000)]
drm/gm107/ltcg: initial implementation

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nouveau/bios: add HDMI-C (mini) connector type
Ben Skeggs [Mon, 24 Feb 2014 03:41:08 +0000 (13:41 +1000)]
drm/nouveau/bios: add HDMI-C (mini) connector type

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/gm107/fb: initial implementation
Ben Skeggs [Mon, 24 Feb 2014 03:28:33 +0000 (13:28 +1000)]
drm/gm107/fb: initial implementation

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/gk20a/timer: initial implementation
Ben Skeggs [Mon, 24 Feb 2014 02:41:57 +0000 (12:41 +1000)]
drm/gk20a/timer: initial implementation

A bit different from NVIDIA's RFC patch, but I want this now for GM107.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/gm100/bios: hw disable register has moved
Ben Skeggs [Mon, 24 Feb 2014 02:30:06 +0000 (12:30 +1000)]
drm/gm100/bios: hw disable register has moved

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/gm107/devinit: initial implementation
Ben Skeggs [Mon, 24 Feb 2014 02:28:37 +0000 (12:28 +1000)]
drm/gm107/devinit: initial implementation

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nve0/fifo: bind intr
Ben Skeggs [Mon, 24 Feb 2014 05:33:27 +0000 (15:33 +1000)]
drm/nve0/fifo: bind intr

Error code names from Android GK20A driver.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nve0/fifo: attempt to recover from engine ctxsw timeouts
Ben Skeggs [Sun, 23 Feb 2014 13:50:50 +0000 (23:50 +1000)]
drm/nve0/fifo: attempt to recover from engine ctxsw timeouts

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agoMerge branch 'drm-next-3.15' of git://people.freedesktop.org/~deathsimple/linux into...
Dave Airlie [Wed, 26 Mar 2014 04:00:53 +0000 (14:00 +1000)]
Merge branch 'drm-next-3.15' of git://people.freedesktop.org/~deathsimple/linux into drm-next

this is the third pull request for 3.15 radeon changes. Highlights this time:
- More DP work from Alex, especially making use of the new DP aux helpers
- Marek's 1D and linear tiling fixes for CIK

* 'drm-next-3.15' of git://people.freedesktop.org/~deathsimple/linux:
  drm/radeon: set PIPE_CONFIG for 1D and linear tiling modes on CIK
  drm/radeon: use drm_dp_dpcd_read_link_status()
  drm/radeon: use the new drm helpers for dp aux
  drm/dp: make aux retries less chatty
  drm/radeon: clarify special handling in i2c over aux
  drm/radeon/atom: rework encoder enable/disable sequence
  drm/radeon/dp: move sink power control to a separate function
  drm/radeon/dp: use i2c_get_adapdata rather than casting

10 years agodrm/nve0/fifo: attempt to recover engines from mmu faults
Ben Skeggs [Sun, 23 Feb 2014 13:30:11 +0000 (23:30 +1000)]
drm/nve0/fifo: attempt to recover engines from mmu faults

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nve0/fifo: allow copy engine channel to be looked up by instance
Ben Skeggs [Mon, 13 Jan 2014 23:38:50 +0000 (09:38 +1000)]
drm/nve0/fifo: allow copy engine channel to be looked up by instance

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nve0/fifo: use runlist event instead of polling
Ben Skeggs [Sun, 23 Feb 2014 13:27:25 +0000 (23:27 +1000)]
drm/nve0/fifo: use runlist event instead of polling

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nve0/fifo: allow channels to be marked as unrunnable
Ben Skeggs [Sun, 23 Feb 2014 13:24:25 +0000 (23:24 +1000)]
drm/nve0/fifo: allow channels to be marked as unrunnable

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nve0/fifo: single printk for sched error data
Ben Skeggs [Sun, 23 Feb 2014 13:20:46 +0000 (23:20 +1000)]
drm/nve0/fifo: single printk for sched error data

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nve0/fifo: single printk for mmu fault data
Ben Skeggs [Sun, 23 Feb 2014 13:19:45 +0000 (23:19 +1000)]
drm/nve0/fifo: single printk for mmu fault data

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nve0/fifo: ack pb intr individually after handling each unit
Ben Skeggs [Sun, 23 Feb 2014 13:15:22 +0000 (23:15 +1000)]
drm/nve0/fifo: ack pb intr individually after handling each unit

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nve0/fifo: runlist intr
Ben Skeggs [Sun, 23 Feb 2014 13:12:37 +0000 (23:12 +1000)]
drm/nve0/fifo: runlist intr

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nve0/fifo: engine intr
Ben Skeggs [Sun, 23 Feb 2014 13:08:00 +0000 (23:08 +1000)]
drm/nve0/fifo: engine intr

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nve0/fifo: mask unhandled intr bits when seen, rather than all intrs
Ben Skeggs [Sun, 23 Feb 2014 13:06:22 +0000 (23:06 +1000)]
drm/nve0/fifo: mask unhandled intr bits when seen, rather than all intrs

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nvc0/fifo: attempt to recover from engine ctxsw timeouts
Ben Skeggs [Sat, 22 Feb 2014 02:44:23 +0000 (12:44 +1000)]
drm/nvc0/fifo: attempt to recover from engine ctxsw timeouts

My test cases don't seem to trigger this on all Fermi boards, not sure
if they're broken tests or it didn't work until later versions.

GF119 definitely works.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nvc0/fifo: attempt to recover engines from mmu faults
Ben Skeggs [Wed, 5 Feb 2014 01:18:38 +0000 (11:18 +1000)]
drm/nvc0/fifo: attempt to recover engines from mmu faults

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nvc0/fifo: use subdev identifiers for bar/ifb fault recovery cases
Ben Skeggs [Fri, 21 Feb 2014 15:29:26 +0000 (01:29 +1000)]
drm/nvc0/fifo: use subdev identifiers for bar/ifb fault recovery cases

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nvc0/fifo: use runlist event instead of polling
Ben Skeggs [Fri, 21 Feb 2014 15:05:01 +0000 (01:05 +1000)]
drm/nvc0/fifo: use runlist event instead of polling

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nvc0/fifo: allow channels to be marked as unrunnable
Ben Skeggs [Fri, 21 Feb 2014 14:52:45 +0000 (00:52 +1000)]
drm/nvc0/fifo: allow channels to be marked as unrunnable

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nvc0/fifo: sched intr
Ben Skeggs [Fri, 21 Feb 2014 15:18:46 +0000 (01:18 +1000)]
drm/nvc0/fifo: sched intr

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nvc0/fifo: single printk for mmu fault data
Ben Skeggs [Fri, 21 Feb 2014 14:39:36 +0000 (00:39 +1000)]
drm/nvc0/fifo: single printk for mmu fault data

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nvc0/fifo: ack pb intr individually after handling each unit
Ben Skeggs [Fri, 21 Feb 2014 14:31:29 +0000 (00:31 +1000)]
drm/nvc0/fifo: ack pb intr individually after handling each unit

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nvc0/fifo: runlist intr
Ben Skeggs [Fri, 21 Feb 2014 14:28:47 +0000 (00:28 +1000)]
drm/nvc0/fifo: runlist intr

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nvc0/fifo: engine intr
Ben Skeggs [Fri, 21 Feb 2014 14:18:17 +0000 (00:18 +1000)]
drm/nvc0/fifo: engine intr

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nvc0/fifo: mask unhandled intr bits when seen, rather than all intrs
Ben Skeggs [Fri, 21 Feb 2014 14:19:19 +0000 (00:19 +1000)]
drm/nvc0/fifo: mask unhandled intr bits when seen, rather than all intrs

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nvc0/fifo: rename a couple of units
Ben Skeggs [Tue, 28 Jan 2014 01:47:46 +0000 (11:47 +1000)]
drm/nvc0/fifo: rename a couple of units

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nvd0/disp: add debugging to show which supervisor actions are taken
Ben Skeggs [Fri, 21 Feb 2014 06:01:40 +0000 (16:01 +1000)]
drm/nvd0/disp: add debugging to show which supervisor actions are taken

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nv50-/disp: dump channel state when update method fails
Ben Skeggs [Thu, 20 Feb 2014 13:26:18 +0000 (23:26 +1000)]
drm/nv50-/disp: dump channel state when update method fails

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nv50-/disp: allow dumping core channel state at first supervisor intr
Ben Skeggs [Thu, 20 Feb 2014 13:19:58 +0000 (23:19 +1000)]
drm/nv50-/disp: allow dumping core channel state at first supervisor intr

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nv50-/disp: add method descriptions for debugging
Ben Skeggs [Thu, 20 Feb 2014 05:14:10 +0000 (15:14 +1000)]
drm/nv50-/disp: add method descriptions for debugging

Lists of known methods for the DMA channel classes, and mappings to
their priv register addresses (where known).

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nv50/disp: decode the known error codes to human readable form
Ben Skeggs [Fri, 21 Feb 2014 01:06:40 +0000 (11:06 +1000)]
drm/nv50/disp: decode the known error codes to human readable form

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nv50/disp: preparation for storing static class data
Ben Skeggs [Thu, 20 Feb 2014 11:33:34 +0000 (21:33 +1000)]
drm/nv50/disp: preparation for storing static class data

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nouveau/core: extend width of engine mask for namedb
Ben Skeggs [Wed, 5 Feb 2014 01:18:38 +0000 (11:18 +1000)]
drm/nouveau/core: extend width of engine mask for namedb

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nouveau/bios: fix INDEX_ADDRESS_LATCHED trace printout
Ilia Mirkin [Sun, 16 Feb 2014 08:53:55 +0000 (03:53 -0500)]
drm/nouveau/bios: fix INDEX_ADDRESS_LATCHED trace printout

Having a \n in the middle of a format string means that the next line
doesn't get the prefixes unlike every other line printed by the trace.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nv50/gr: decode texture trap status code
Ilia Mirkin [Fri, 14 Feb 2014 19:28:36 +0000 (14:28 -0500)]
drm/nv50/gr: decode texture trap status code

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nouveau: use nv_debug for NV_DEBUG, make DRM a separate subflag
Ilia Mirkin [Fri, 14 Feb 2014 02:35:14 +0000 (21:35 -0500)]
drm/nouveau: use nv_debug for NV_DEBUG, make DRM a separate subflag

It's really confusing for NV_DEBUG's printing to be controlled via
drm.debug while everything else is controlled via nouveau.debug. These
messages can be turned on with nouveau.debug=DRM=debug.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nouveau: make hdmi device finding failure prints debug level
Ilia Mirkin [Thu, 13 Feb 2014 08:39:50 +0000 (03:39 -0500)]
drm/nouveau: make hdmi device finding failure prints debug level

The hdmi device is required for runtime pm. However it is not available
on many esp older devices, which were all seeing these error messages.
Take this opportunity to also convert to nv_debug instead of the DRM_*
messages, like the rest of nouveau does.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nve0/fifo: allocate usermem as needed
Alexandre Courbot [Mon, 10 Feb 2014 05:57:01 +0000 (14:57 +0900)]
drm/nve0/fifo: allocate usermem as needed

Memory was always allocated for 4096 channels. Change this to allocate
what we actually need according to the number of channels we use.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nouveau: handle -EACCES runtime PM return code
Alexandre Courbot [Wed, 12 Feb 2014 05:00:59 +0000 (14:00 +0900)]
drm/nouveau: handle -EACCES runtime PM return code

pm_runtime_get*() may return -EACCES to indicate a device does not have
runtime PM enabled. This is currently the case with platform devices
on Nouveau, and is not an error in that context. Handle this case
without failure.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nouveau/abi16: fix handles past the 32nd one
Ilia Mirkin [Sun, 9 Feb 2014 20:51:25 +0000 (15:51 -0500)]
drm/nouveau/abi16: fix handles past the 32nd one

abi16->handles is a u64, so make sure to use 1ULL << val when modifying.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nouveau: replace ffsll with __ffs64
Ilia Mirkin [Sun, 9 Feb 2014 20:51:24 +0000 (15:51 -0500)]
drm/nouveau: replace ffsll with __ffs64

The ffsll function is a lot slower than the __ffs64 built-in which
compiles to a single instruction on 64-bit. It's also nice to avoid
custom versions of standard functions. Note that __ffs == ffs - 1.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nouveau/hwmon: replace strict_strtol() with kstrtol()
Jingoo Han [Wed, 5 Feb 2014 02:02:59 +0000 (11:02 +0900)]
drm/nouveau/hwmon: replace strict_strtol() with kstrtol()

The usage of strict_strtol() is not preferred, because
strict_strtol() is obsolete. Thus, kstrtol() should be
used.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nouveau/hwmon: remove some redundant checks
Dan Carpenter [Thu, 6 Feb 2014 09:29:43 +0000 (12:29 +0300)]
drm/nouveau/hwmon: remove some redundant checks

No need to check "ret" twice in a row.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nv50/graph: update status enum names
Ilia Mirkin [Wed, 5 Feb 2014 01:38:17 +0000 (20:38 -0500)]
drm/nv50/graph: update status enum names

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/radeon: set PIPE_CONFIG for 1D and linear tiling modes on CIK
Marek Olšák [Sat, 22 Mar 2014 15:20:43 +0000 (16:20 +0100)]
drm/radeon: set PIPE_CONFIG for 1D and linear tiling modes on CIK

This fixes fast color clear with 1D-tiled single-sample surfaces
and Hyper-Z corruption with 1D-tiled depth surfaces.

Even though it seems it is not needed for 1D tiling, CMASK and HTILE are
always 2D-tiled, thus the hw needs to know the actual pipe configuration
for CMASK and HTILE addressing no matter what the tiling mode of the surface
is.

Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
10 years agodrm/radeon: use drm_dp_dpcd_read_link_status()
Alex Deucher [Fri, 21 Mar 2014 14:34:08 +0000 (10:34 -0400)]
drm/radeon: use drm_dp_dpcd_read_link_status()

Replace the radeon specific version with the generic version.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
10 years agodrm/radeon: use the new drm helpers for dp aux
Alex Deucher [Fri, 21 Mar 2014 14:34:07 +0000 (10:34 -0400)]
drm/radeon: use the new drm helpers for dp aux

Switch to the new dp helpers.  The main difference is
that the DP helpers don't allow an adjustable delay in
the aux transaction, but I don't know that this is
necessary.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>