GitHub/LineageOS/android_kernel_motorola_exynos9610.git
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 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/bridge/ptn3460: fix modular build
Dave Airlie [Sun, 23 Mar 2014 23:21:15 +0000 (09:21 +1000)]
drm/bridge/ptn3460: fix modular build

This failed to build =m, quick fix.

Signed-off-by: Dave Airlie <airlied@redhat.com>
10 years agoMerge branch 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daein...
Dave Airlie [Sun, 23 Mar 2014 22:58:20 +0000 (08:58 +1000)]
Merge branch 'exynos-drm-next' of git://git./linux/kernel/git/daeinki/drm-exynos into drm-next

Highlights
----------

Re-factoring works over the exynos drm framework.
  - drm_crtc, drm_encoder/drm_connector are implemented by sub drivers
    directly.
  - Removing pm interfaces from each sub driver, and implementing them
    at top level of exynos drm.
Add DisplayPort Transmitter driver.
  - Just moving existing driver from drivers/vides/exynos into
    drivers/gpu/drm/exynos.
Add new LVDS bridge driver, PTN3460.
  - Placed in drivers/gpu/drm/bridge, and this device is used to transfer
    image signal from DP(DisplayPort) to LVDS Panel.
    So this driver will be used with DP driver moved into exynos drm.
Add parallel panel support
  - With the re-factoring patch series, existing parallel panel support was
    broken by moving exynos_drm_display ops into each real connector driver,
    DP. So this patch series adds a new parallel panel module,
    exynos_drm_dpi, for supporting parallel panel, and also adds relevant
    bindings.
Some fixups and cleanups.

* 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos: (45 commits)
  drm/exynos: fimd: remove unused variable
  ARM: dts: exynos4210-universal: add exynos/fimd node
  drm/exynos: restore parallel output interface support
  exynos/fimd: add parallel output related bindings
  drm/exynos: correct timing porch conversion
  drm/exynos: init kms poll after creation of connectors
  drm/exynos: delay fbdev initialization until an output is connected
  drm/exynos: fix unnecessary resource cleanup
  drm/exynos: hdmi: use i2c_adapter instead of i2c_client
  drm/exynos: hdmi: consider APB PHY
  drm/exynos: Remove the exynos_drm_connector shim
  drm/exynos: Implement lvds bridge discovery to DP driver
  drm/bridge: Add PTN3460 bridge driver
  drm/exynos: Implement drm_connector directly in vidi driver
  drm/exynos: Implement drm_connector directly in dp driver
  drm/exynos: Implement drm_connector in hdmi directly
  drm/exynos: Add create_connector callback
  drm/exynos: Consolidate suspend/resume in drm_drv
  drm/exynos: Clean up FIMD power on/off routines
  drm/exynos: Implement dpms display callback in DP
  ...

10 years agodrm/gma500: add locking to fixed panel edid probing
Daniel Vetter [Fri, 21 Mar 2014 22:22:36 +0000 (23:22 +0100)]
drm/gma500: add locking to fixed panel edid probing

With the recent addition of locking checks in

commit 62ff94a5492175759546f8bc61383189d6b49122
Author:     Daniel Vetter <daniel.vetter@ffwll.ch>
AuthorDate: Thu Jan 23 22:18:47 2014 +0100

    drm/crtc-helper: remove LOCKING from kerneldoc

drm_add_edid_modes started to WARN about the mode_config.mutex not
being held in the lvds and dp initialization code.

Now since this is init code locking is fairly redudant if it wouldn't
be for the drm core registering sysfs files a bit early. And the
locking WARNINGs nicely enforce that indeed all access to the mode
lists are properly protected. And a full audit shows that only i915
and gma500 touch the modes lists at init time.

Hence I've opted to wrap up this entire mode detection sequence for
fixed panels with the mode_config mutex for both lvds and edp outputs.

Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
10 years agodrm/i915: add locking to fixed panel edid probing
Daniel Vetter [Fri, 21 Mar 2014 22:22:35 +0000 (23:22 +0100)]
drm/i915: add locking to fixed panel edid probing

With the recent addition of locking checks in

commit 62ff94a5492175759546f8bc61383189d6b49122
Author:     Daniel Vetter <daniel.vetter@ffwll.ch>
AuthorDate: Thu Jan 23 22:18:47 2014 +0100

    drm/crtc-helper: remove LOCKING from kerneldoc

drm_add_edid_modes started to WARN about the mode_config.mutex not
being held in the lvds and dp initialization code.

Now since this is init code locking is fairly redudant if it wouldn't
be for the drm core registering sysfs files a bit early. And the
locking WARNINGs nicely enforce that indeed all access to the mode
lists are properly protected. And a full audit shows that only i915
and gma500 touch the modes lists at init time.

Hence I've opted to wrap up this entire mode detection sequence for
fixed panels with the mode_config mutex for both lvds and edp outputs.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
10 years agodrm/exynos: fimd: remove unused variable
Andrzej Hajda [Thu, 20 Mar 2014 08:09:00 +0000 (17:09 +0900)]
drm/exynos: fimd: remove unused variable

The patch removes unused vidcon0 field from fimd_context structure.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agoARM: dts: exynos4210-universal: add exynos/fimd node
Andrzej Hajda [Mon, 17 Mar 2014 10:27:22 +0000 (11:27 +0100)]
ARM: dts: exynos4210-universal: add exynos/fimd node

The patch adds fimd node with display timings for exynos4210-universal device.
It also makes LCD regulators always on. This allow to re-use panel initialized
by boot loader.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: restore parallel output interface support
Andrzej Hajda [Mon, 17 Mar 2014 12:03:56 +0000 (13:03 +0100)]
drm/exynos: restore parallel output interface support

The patch adds parallel output interface to FIMD device driver.
It also restores support for panels initialized by boot loader,
but without proper kernel driver.
Driver uses video interface bindings to find connected panel.
It uses drm_panel interface to interact with the panel.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agoexynos/fimd: add parallel output related bindings
Andrzej Hajda [Mon, 17 Mar 2014 10:27:20 +0000 (11:27 +0100)]
exynos/fimd: add parallel output related bindings

The patch adds bindings required to add support
for parallel output.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: correct timing porch conversion
Andrzej Hajda [Mon, 17 Mar 2014 10:27:19 +0000 (11:27 +0100)]
drm/exynos: correct timing porch conversion

The patch corrects porch calculation. It should
be calculated as a difference between adjacent
respective fields of drm_display_mode.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: init kms poll after creation of connectors
Andrzej Hajda [Mon, 17 Mar 2014 10:27:18 +0000 (11:27 +0100)]
drm/exynos: init kms poll after creation of connectors

KMS poll init helper should be run when connectors are created,
otherwise it will not schedule connection detector.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: delay fbdev initialization until an output is connected
Andrzej Hajda [Mon, 17 Mar 2014 10:27:17 +0000 (11:27 +0100)]
drm/exynos: delay fbdev initialization until an output is connected

In case fbdev is initialized before any output is connected,
fb resolution defaults to 1024x768. After that any output with
bigger resolution is ignored and fbdev is not displayed.
The patch postpones fbdev initialization to avoid such situation.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: fix unnecessary resource cleanup
Inki Dae [Fri, 28 Feb 2014 09:37:02 +0000 (18:37 +0900)]
drm/exynos: fix unnecessary resource cleanup

This patch removes unnecessary drm_mode_config_cleanup call.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
10 years agodrm/exynos: hdmi: use i2c_adapter instead of i2c_client
Inki Dae [Thu, 13 Mar 2014 07:38:31 +0000 (16:38 +0900)]
drm/exynos: hdmi: use i2c_adapter instead of i2c_client

This patch changes i2c_client for ddc to i2c_adapter
because ddc needs only i2c_adapter.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
10 years agodrm/exynos: hdmi: consider APB PHY
Inki Dae [Thu, 6 Mar 2014 05:18:17 +0000 (14:18 +0900)]
drm/exynos: hdmi: consider APB PHY

This patch returns error in case of using APB PHY.

Exynos5420 SoC and maybe later would use APB PHY instead of
I2C PHY so such case should be considered.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
10 years agodrm/exynos: Remove the exynos_drm_connector shim
Sean Paul [Mon, 24 Feb 2014 10:25:42 +0000 (19:25 +0900)]
drm/exynos: Remove the exynos_drm_connector shim

This path removes the exynos_drm_connector code since it was just
passing hooks through display_ops. The individual device drivers are now
responsible for implementing drm_connector directly.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: Implement lvds bridge discovery to DP driver
Sean Paul [Mon, 24 Feb 2014 10:20:15 +0000 (19:20 +0900)]
drm/exynos: Implement lvds bridge discovery to DP driver

This patch implements the lvds bridge discovery and connector pre-emption
code to the dp driver.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/bridge: Add PTN3460 bridge driver
Sean Paul [Mon, 24 Feb 2014 10:31:24 +0000 (19:31 +0900)]
drm/bridge: Add PTN3460 bridge driver

This patch adds a drm_bridge driver for the PTN3460 DisplayPort to LVDS
bridge chip.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: Implement drm_connector directly in vidi driver
Sean Paul [Thu, 30 Jan 2014 21:38:07 +0000 (16:38 -0500)]
drm/exynos: Implement drm_connector directly in vidi driver

This patch implements drm_connector directly in the vidi
driver, this will allow us to move away from the exynos_drm_connector
layer.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: Implement drm_connector directly in dp driver
Sean Paul [Thu, 30 Jan 2014 21:19:30 +0000 (16:19 -0500)]
drm/exynos: Implement drm_connector directly in dp driver

This patch implements drm_connector directly in the dp driver, this will
allow us to move away from the exynos_drm_connector layer.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: Implement drm_connector in hdmi directly
Sean Paul [Thu, 30 Jan 2014 21:19:29 +0000 (16:19 -0500)]
drm/exynos: Implement drm_connector in hdmi directly

This patch implements drm_connector in the hdmi driver directly, instead
of using exynos_drm_connector.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: Add create_connector callback
Sean Paul [Mon, 24 Feb 2014 10:15:38 +0000 (19:15 +0900)]
drm/exynos: Add create_connector callback

This creates a new display hook called create_connector. The purpose is
to allow the display driver to create its own drm_connector instead of
using the exynos_drm_connector. This moves things closer to completely
removing the exynos_drm_connector abstraction.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: Consolidate suspend/resume in drm_drv
Sean Paul [Thu, 30 Jan 2014 21:19:27 +0000 (16:19 -0500)]
drm/exynos: Consolidate suspend/resume in drm_drv

This patch removes all of the suspend/resume logic from the individual
drivers and consolidates it in drm_drv. This consolidation reduces the
number of functions which enable/disable the hardware to just one -- the
dpms callback. This ensures that we always power up/down in a consistent
manner.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: Clean up FIMD power on/off routines
Sean Paul [Thu, 30 Jan 2014 21:19:26 +0000 (16:19 -0500)]
drm/exynos: Clean up FIMD power on/off routines

This patch separates the fimd_activate function into poweron/poweroff
functions to be more consistent with the other drivers in exynos drm. It
also properly cleans up after failures in poweron. The functions have
also been shuffled around such that they are all in the same
spot in the file and poweron/poweroff can be called from the dpms function.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: Implement dpms display callback in DP
Sean Paul [Thu, 30 Jan 2014 21:19:25 +0000 (16:19 -0500)]
drm/exynos: Implement dpms display callback in DP

This patch implements the dpms display callback for the DP driver.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: Move display implementation into dp
Sean Paul [Thu, 30 Jan 2014 21:19:23 +0000 (16:19 -0500)]
drm/exynos: Move display implementation into dp

This patch moves the exynos_drm_display implementation from fimd into
the dp driver. This will allow for tighter integration of the dp driver
into the exynos drm driver.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: Move dp driver from video/ to drm/
Sean Paul [Thu, 30 Jan 2014 21:19:22 +0000 (16:19 -0500)]
drm/exynos: Move dp driver from video/ to drm/

This patch moves the code from video/ to drm/. This is required the DP
driver needs to power on/off in the correct order in relation to fimd.
This will also allow the DP driver to participate in drm modeset as well
as provide accurate connection detection and edid.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: Remove unused/useless fimd_context members
Sean Paul [Thu, 30 Jan 2014 21:19:21 +0000 (16:19 -0500)]
drm/exynos: Remove unused/useless fimd_context members

This patch removes a few fimd_context members which are either entirely
unused or unneeded.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: Use mode_set to configure fimd
Sean Paul [Thu, 30 Jan 2014 21:19:20 +0000 (16:19 -0500)]
drm/exynos: Use mode_set to configure fimd

This patch uses the mode passed into mode_set to configure fimd instead
of directly using the panel from context. This will allow us to move
the exynos_drm_display implementation out of fimd, where it doesn't
belong.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: Implement mode_fixup manager operation
Sean Paul [Thu, 30 Jan 2014 21:19:19 +0000 (16:19 -0500)]
drm/exynos: Implement mode_fixup manager operation

This patch adds a new manager callback for mode_fixup and pipes it
through exynos_drm_crtc. This will allow the manager drivers to
alter the mode during modeset.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: Add mode_set manager operation
Sean Paul [Thu, 30 Jan 2014 21:19:18 +0000 (16:19 -0500)]
drm/exynos: Add mode_set manager operation

This patch adds a mode_set callback to the manager operations which
sets the crtc's current mode to the manager driver. This will allow the
fimd  driver to set its mode using values from drm, instead of the dt.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: Disable unused crtc planes from crtc
Sean Paul [Thu, 30 Jan 2014 21:19:17 +0000 (16:19 -0500)]
drm/exynos: Disable unused crtc planes from crtc

This patch moves the code which disables unused crtc planes from the
encoder to the crtc. Since there is a 1:1 encoder/crtc mapping in
exynos, the only valid crtc change the pre-existing code could catch is
disconnecting an active crtc from the encoder. Thus it is functionally
equivalent to just disable all planes attached to a crtc when the crtc
is disabled.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: Use drm_mode_copy to copy modes
Sean Paul [Thu, 30 Jan 2014 21:19:16 +0000 (16:19 -0500)]
drm/exynos: Use drm_mode_copy to copy modes

This patch changes the manual copying of mode to adjusted_mode in
mode_fixup to use drm_mode_copy instead of handling things manually.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>