GitHub/moto-9609/android_kernel_motorola_exynos9610.git
11 years agodrm/radeon/sumo: disable PG when changing UVD clocks
Alex Deucher [Wed, 3 Jul 2013 19:07:28 +0000 (15:07 -0400)]
drm/radeon/sumo: disable PG when changing UVD clocks

Causes hangs for some people.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
11 years agodrm/radeon/aruba: disable additional rlc features
Alex Deucher [Wed, 3 Jul 2013 16:02:10 +0000 (12:02 -0400)]
drm/radeon/aruba: disable additional rlc features

They cause problems with dynamic clocking.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
11 years agodrm/radeon: fix endian bug in radeon_atom_get_mclk_range_table()
Alex Deucher [Wed, 3 Jul 2013 15:18:08 +0000 (11:18 -0400)]
drm/radeon: fix endian bug in radeon_atom_get_mclk_range_table()

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
11 years agodrm/radeon/dpm: fix compilation with certain versions of gcc
Mike Lothian [Tue, 2 Jul 2013 21:38:11 +0000 (17:38 -0400)]
drm/radeon/dpm: fix compilation with certain versions of gcc

Add #include <linux/seq_file.h> to *_dpm.c files

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
11 years agodrm/radeon/dpm: clarify debugfs warning
Alex Deucher [Tue, 2 Jul 2013 13:11:39 +0000 (09:11 -0400)]
drm/radeon/dpm: clarify debugfs warning

For chips without debugfs dpm support say that it's not
implemented rather than not supported to avoid confusion
about DPM support in general.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
11 years agodrm/radeon/dpm: add debugfs support for SI
Alex Deucher [Fri, 28 Jun 2013 22:02:19 +0000 (18:02 -0400)]
drm/radeon/dpm: add debugfs support for SI

This allows you to look at the current DPM state via
debugfs.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
11 years agodrm/radeon/dpm: add debugfs support for cayman
Alex Deucher [Fri, 28 Jun 2013 21:49:02 +0000 (17:49 -0400)]
drm/radeon/dpm: add debugfs support for cayman

This allows you to look at the current DPM state via
debugfs.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
11 years agodrm/radeon/dpm: add debugfs support for TN
Alex Deucher [Fri, 28 Jun 2013 16:01:38 +0000 (12:01 -0400)]
drm/radeon/dpm: add debugfs support for TN

This allows you to look at the current DPM state via
debugfs.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
11 years agodrm/radeon/dpm: add debugfs support for ON/LN
Alex Deucher [Fri, 28 Jun 2013 14:47:56 +0000 (10:47 -0400)]
drm/radeon/dpm: add debugfs support for ON/LN

This allows you to look at the current DPM state via
debugfs.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
11 years agodrm/radeon/dpm: add debugfs support for 7xx/evergreen/btc
Alex Deucher [Fri, 28 Jun 2013 14:06:26 +0000 (10:06 -0400)]
drm/radeon/dpm: add debugfs support for 7xx/evergreen/btc

This allows you to look at the current DPM state via
debugfs.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
11 years agodrm/radeon/dpm: add debugfs support for rv6xx
Alex Deucher [Fri, 28 Jun 2013 18:20:53 +0000 (14:20 -0400)]
drm/radeon/dpm: add debugfs support for rv6xx

This allows you to look at the current DPM state via
debugfs.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
11 years agodrm/radeon/dpm: add infrastructure to support debugfs info
Alex Deucher [Fri, 28 Jun 2013 13:28:39 +0000 (09:28 -0400)]
drm/radeon/dpm: add infrastructure to support debugfs info

This lays the frameworks to report realtime power level
feedback.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
11 years agodrm/radeon/dpm: re-enable state transitions for Cayman
Alex Deucher [Mon, 1 Jul 2013 20:07:18 +0000 (16:07 -0400)]
drm/radeon/dpm: re-enable state transitions for Cayman

Was disabled due to stability issues on certain boards
caused by the a bug in the parsing of the atom mc reg tables.
That's fixed now so re-enable.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
11 years agodrm/radeon/dpm: re-enable state transitions for BTC
Alex Deucher [Mon, 1 Jul 2013 20:04:02 +0000 (16:04 -0400)]
drm/radeon/dpm: re-enable state transitions for BTC

Was disabled due to stability issues on certain boards
caused by the a bug in the parsing of the atom mc reg tables.
That's fixed now so re-enable.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
11 years agodrm/radeon: fix typo in radeon_atom_init_mc_reg_table()
Alex Deucher [Mon, 1 Jul 2013 17:33:53 +0000 (13:33 -0400)]
drm/radeon: fix typo in radeon_atom_init_mc_reg_table()

Bad pointer math.  Fixes hangs in state transitions with
BTC+ asics.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
11 years agodrm/radeon/atom: fix endian bug in radeon_atom_init_mc_reg_table()
Alex Deucher [Mon, 1 Jul 2013 17:32:49 +0000 (13:32 -0400)]
drm/radeon/atom: fix endian bug in radeon_atom_init_mc_reg_table()

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
11 years agodrm/radeon: remove sumo dpm/uvd bringup leftovers
Alex Deucher [Fri, 28 Jun 2013 16:55:48 +0000 (12:55 -0400)]
drm/radeon: remove sumo dpm/uvd bringup leftovers

Function doesn't do anything useful.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
11 years agoMerge branch 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux...
Dave Airlie [Mon, 1 Jul 2013 04:10:20 +0000 (14:10 +1000)]
Merge branch 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-next

- Various fixes that make surviving concurrent piglit more possible.
- Buffer object deletion no longer synchronous
- Context/register initialisation updates that have been reported to
solve some stability issues (particularly on some problematic GF119
chips)
- Kernel side support for VP2 video decoding engines

* 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6: (44 commits)
  drm/nvd0-/disp: handle case where display engine is missing/disabled
  drm/gr/nvc0-: merge nvc0/nve0 ucode, and use cpp instead of m4
  drm/nouveau/bsp/nv84: initial vp2 engine implementation
  drm/nouveau/vp/nv84: initial vp2 engine implementation
  drm/nouveau/core: xtensa engine base class implementation
  drm/nouveau/vdec: fork vp3 implementations from vp2
  drm/nouveau/core: move falcon class to engine/
  drm/nouveau/kms: don't fail if there's no dcb table entries
  drm/nouveau: remove limit on gart
  drm/nouveau/vm: perform a bar flush when flushing vm
  drm/nvc0/gr: cleanup register lists, and add nvce/nvcf to switches
  drm/nvc8/gr: update initial register/context values
  drm/nvc4/gr: update initial register/context values
  drm/nvc1/gr: update initial register/context values
  drm/nvc3/gr: update initial register/context values
  drm/nvc0/gr: update initial register/context values
  drm/nvd9/gr: update initial register/context values
  drm/nve4/gr: update initial register/context values
  drm/nvc0-/gr: bump maximum gpc/tpc limits
  drm/nvf0/gr: initial register/context setup
  ...

11 years agodrm/nvd0-/disp: handle case where display engine is missing/disabled
Maarten Lankhorst [Thu, 27 Jun 2013 07:35:53 +0000 (17:35 +1000)]
drm/nvd0-/disp: handle case where display engine is missing/disabled

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/gr/nvc0-: merge nvc0/nve0 ucode, and use cpp instead of m4
Ben Skeggs [Wed, 5 Jun 2013 00:28:12 +0000 (10:28 +1000)]
drm/gr/nvc0-: merge nvc0/nve0 ucode, and use cpp instead of m4

No code changes, proven by envyas producing identical binaries.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/bsp/nv84: initial vp2 engine implementation
Ilia Mirkin [Thu, 27 Jun 2013 04:14:01 +0000 (14:14 +1000)]
drm/nouveau/bsp/nv84: initial vp2 engine implementation

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/vp/nv84: initial vp2 engine implementation
Ilia Mirkin [Thu, 27 Jun 2013 04:12:46 +0000 (14:12 +1000)]
drm/nouveau/vp/nv84: initial vp2 engine implementation

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/core: xtensa engine base class implementation
Ilia Mirkin [Thu, 27 Jun 2013 04:08:22 +0000 (14:08 +1000)]
drm/nouveau/core: xtensa engine base class implementation

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/vdec: fork vp3 implementations from vp2
Ilia Mirkin [Thu, 27 Jun 2013 04:04:20 +0000 (14:04 +1000)]
drm/nouveau/vdec: fork vp3 implementations from vp2

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/core: move falcon class to engine/
Ben Skeggs [Thu, 27 Jun 2013 03:59:01 +0000 (13:59 +1000)]
drm/nouveau/core: move falcon class to engine/

Not really "core" per-se.  About to merge Ilia's work adding another
similar class for the VP2 xtensa engines, so, seems like a good time to
move all these to engine/.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/kms: don't fail if there's no dcb table entries
Ben Skeggs [Tue, 25 Jun 2013 02:26:42 +0000 (12:26 +1000)]
drm/nouveau/kms: don't fail if there's no dcb table entries

Fixes module not loading on Tesla K20.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau: remove limit on gart
Maarten Lankhorst [Mon, 17 Jun 2013 13:09:09 +0000 (15:09 +0200)]
drm/nouveau: remove limit on gart

Most graphics cards nowadays have a multiple of this limit as their vram,
so limiting GART doesn't seem to make much sense.

Signed-off-by: Maarten >Lnkhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/vm: perform a bar flush when flushing vm
Maarten Lankhorst [Tue, 11 Jun 2013 12:17:25 +0000 (14:17 +0200)]
drm/nouveau/vm: perform a bar flush when flushing vm

Appears to fix the regression from "drm/nvc0/vm: handle bar tlb flushes
internally".

nvidia always seems to do this flush after writing values.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nvc0/gr: cleanup register lists, and add nvce/nvcf to switches
Ben Skeggs [Tue, 14 May 2013 03:09:28 +0000 (13:09 +1000)]
drm/nvc0/gr: cleanup register lists, and add nvce/nvcf to switches

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nvc8/gr: update initial register/context values
Ben Skeggs [Tue, 14 May 2013 00:54:32 +0000 (10:54 +1000)]
drm/nvc8/gr: update initial register/context values

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nvc4/gr: update initial register/context values
Ben Skeggs [Mon, 13 May 2013 23:23:52 +0000 (09:23 +1000)]
drm/nvc4/gr: update initial register/context values

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nvc1/gr: update initial register/context values
Ben Skeggs [Mon, 13 May 2013 08:29:02 +0000 (18:29 +1000)]
drm/nvc1/gr: update initial register/context values

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nvc3/gr: update initial register/context values
Ben Skeggs [Mon, 13 May 2013 04:45:56 +0000 (14:45 +1000)]
drm/nvc3/gr: update initial register/context values

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nvc0/gr: update initial register/context values
Ben Skeggs [Mon, 13 May 2013 02:57:10 +0000 (12:57 +1000)]
drm/nvc0/gr: update initial register/context values

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nvd9/gr: update initial register/context values
Ben Skeggs [Sun, 12 May 2013 22:33:52 +0000 (08:33 +1000)]
drm/nvd9/gr: update initial register/context values

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nve4/gr: update initial register/context values
Ben Skeggs [Tue, 7 May 2013 04:30:52 +0000 (14:30 +1000)]
drm/nve4/gr: update initial register/context values

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nvc0-/gr: bump maximum gpc/tpc limits
Ben Skeggs [Mon, 6 May 2013 06:44:17 +0000 (16:44 +1000)]
drm/nvc0-/gr: bump maximum gpc/tpc limits

Needed for GK110, separate commit to catch any unexpected breaks to
other parts of the code.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nvf0/gr: initial register/context setup
Ben Skeggs [Mon, 6 May 2013 06:00:20 +0000 (16:00 +1000)]
drm/nvf0/gr: initial register/context setup

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nve7/gr: update initial register/context values
Ben Skeggs [Mon, 6 May 2013 05:27:44 +0000 (15:27 +1000)]
drm/nve7/gr: update initial register/context values

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nve6/gr: update initial register/context values
Ben Skeggs [Mon, 6 May 2013 01:35:37 +0000 (11:35 +1000)]
drm/nve6/gr: update initial register/context values

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau: delay busy bo vma removal until fence signals
Ben Skeggs [Mon, 6 May 2013 23:48:30 +0000 (09:48 +1000)]
drm/nouveau: delay busy bo vma removal until fence signals

As opposed to an explicit wait.  Allows userspace to not stall waiting
on buffer deletion.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/vm: make each vma take a reference on its parent vm
Ben Skeggs [Mon, 6 May 2013 22:36:33 +0000 (08:36 +1000)]
drm/nouveau/vm: make each vma take a reference on its parent vm

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/core: remove nouveau_mm.mutex, no more users
Ben Skeggs [Mon, 13 May 2013 12:30:56 +0000 (22:30 +1000)]
drm/nouveau/core: remove nouveau_mm.mutex, no more users

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/vm: take subdev mutex, not the mm, protects against race with vm/nvc0
Ben Skeggs [Mon, 13 May 2013 12:26:26 +0000 (22:26 +1000)]
drm/nouveau/vm: take subdev mutex, not the mm, protects against race with vm/nvc0

nvc0_vm_flush() accesses the pgd list, which will soon be able to race
with vm_unlink() during channel destruction.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nvc0/vm: handle bar tlb flushes internally
Ben Skeggs [Mon, 13 May 2013 12:07:16 +0000 (22:07 +1000)]
drm/nvc0/vm: handle bar tlb flushes internally

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nv50-/vm: take mutex rather than irqsave spinlock
Ben Skeggs [Mon, 13 May 2013 11:13:15 +0000 (21:13 +1000)]
drm/nv50-/vm: take mutex rather than irqsave spinlock

These operations can take quite some time, and we really don't want to
have to hold a spinlock for too long.

Now that the lock ordering for vm and the gr/nv84 hw bug workaround has
been reversed, it's possible to use a mutex here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nv50/vm: remove explicit vm knowledge from engines
Ben Skeggs [Mon, 13 May 2013 10:55:46 +0000 (20:55 +1000)]
drm/nv50/vm: remove explicit vm knowledge from engines

This reverses the lock ordering between VM and gr/nv84:nvc0.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nv50/vm: handle bar tlb flushes internally
Ben Skeggs [Mon, 13 May 2013 10:41:18 +0000 (20:41 +1000)]
drm/nv50/vm: handle bar tlb flushes internally

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nvc0/gr: port mp trap handling from calim's kepler code
Ben Skeggs [Mon, 13 May 2013 01:54:05 +0000 (11:54 +1000)]
drm/nvc0/gr: port mp trap handling from calim's kepler code

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nve0/gr: attempt to resume after sm traps
Ben Skeggs [Tue, 7 May 2013 03:13:41 +0000 (13:13 +1000)]
drm/nve0/gr: attempt to resume after sm traps

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nve0/gr: s/tp/tpc/
Ben Skeggs [Tue, 7 May 2013 03:04:18 +0000 (13:04 +1000)]
drm/nve0/gr: s/tp/tpc/

NVIDIA's name...

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nve0/fifo: create our playlists up-front, at startup
Ben Skeggs [Mon, 6 May 2013 23:09:46 +0000 (09:09 +1000)]
drm/nve0/fifo: create our playlists up-front, at startup

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nva3/clk: minor improvements to fractional N calculation
Ben Skeggs [Thu, 24 Jan 2013 02:15:45 +0000 (12:15 +1000)]
drm/nva3/clk: minor improvements to fractional N calculation

Helps us to get identical numbers to the binary driver for (at least)
Kepler memory PLLs, and fixes a rounding error.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/fb: initialise vram controller as pfb sub-object
Ben Skeggs [Mon, 4 Mar 2013 03:01:21 +0000 (13:01 +1000)]
drm/nouveau/fb: initialise vram controller as pfb sub-object

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/clk: change init ordering, no longer needed by devinit
Ben Skeggs [Tue, 5 Mar 2013 02:32:06 +0000 (12:32 +1000)]
drm/nouveau/clk: change init ordering, no longer needed by devinit

And, will depend on FB/VOLT/DAEMON being ready when it gets initialised
so that it can set/restore clocks.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau/devinit: move simple pll setting routines to devinit
Ben Skeggs [Tue, 5 Mar 2013 00:53:54 +0000 (10:53 +1000)]
drm/nouveau/devinit: move simple pll setting routines to devinit

These are pretty much useless for reclocking purposes.  Lets make it
clearer what they're for and move them to DEVINIT to signify they're
for the very simple PLL setting requirements of running the init
tables.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau: pass generic subdev to calculation routines
Ben Skeggs [Tue, 5 Mar 2013 02:10:24 +0000 (12:10 +1000)]
drm/nouveau: pass generic subdev to calculation routines

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nve0/ce: stub interrupt handler
Ben Skeggs [Sun, 28 Apr 2013 23:44:33 +0000 (09:44 +1000)]
drm/nve0/ce: stub interrupt handler

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nve0/ce: link ce2 to its engine, rather than from graphics
Ben Skeggs [Sun, 28 Apr 2013 23:36:42 +0000 (09:36 +1000)]
drm/nve0/ce: link ce2 to its engine, rather than from graphics

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nve0/fifo: copy engine context stored in ramfc, not externally
Ben Skeggs [Sun, 28 Apr 2013 23:35:28 +0000 (09:35 +1000)]
drm/nve0/fifo: copy engine context stored in ramfc, not externally

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nve0/ce: create engine object for ce2
Ben Skeggs [Sun, 28 Apr 2013 23:31:05 +0000 (09:31 +1000)]
drm/nve0/ce: create engine object for ce2

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agodrm/nouveau: pull in latest ucode builds from external tree
Ben Skeggs [Tue, 14 May 2013 06:34:54 +0000 (16:34 +1000)]
drm/nouveau: pull in latest ucode builds from external tree

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
11 years agoMerge branch 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daein...
Dave Airlie [Mon, 1 Jul 2013 00:08:45 +0000 (10:08 +1000)]
Merge branch 'exynos-drm-next' of git://git./linux/kernel/git/daeinki/drm-exynos into drm-next

Feature summary:
Add S3C64XX SoC series support - S3C64XX SoC series are previous version
chips of Exynos SoC series. With this patch set, KMS driver of Exynos drm
supports those chips also.

Update device tree support - This patch set corrects compatible strings,
and adds Exynos5420 SoC support for hdmi subsystem.

Consider CCF (Common Clock Framework) support - With reference to CCF
support, it uses clock_prepare_enable/clock_disable_unprepare instead of
clk_enable/clk_disable for hdmi subsystem.

Big cleanups - This patch just removes unnecessary all debug logs.

* 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos: (22 commits)
  ARM: dts: change compatible strings for EXYNOS5250 hdmi subsystem
  drm/exynos: add support for exynos5420 mixer
  drm/exynos: add new compatible strings for hdmi subsystem
  drm/exynos: fix interlace resolutions for exynos5420
  drm/exynos: use of_get_named_gpio to get hdmi hpd gpio
  drm/exynos: make sure to handle an error case to vm_mmap call
  drm/exynos: exynos_drm_ipp: Remove redundant break statement
  drm/exynos: add mout_hdmi clock in hdmi driver to change parent
  drm/exynos: Prepare/Unprepare HDMI subsystem clocks
  drm/exynos: Clean up logs for DRM_ERROR / DRM_DEBUG_KMS
  drm/exynos: Remove tracking log functions
  drm/exynos: hdmi: use drm_display_mode to check the supported modes
  drm/exynos: fimd: Add support for S3C64xx SoCs
  drm/exynos: fimd: Add support for FIMD variants with clock selection
  drm/exynos: fimd: Add support for FIMD versions without SHADOWCON register
  drm/exynos: fimd: Hold pointer to driver data in context struct
  drm/exynos: do not use mode_set_base function directly
  drm/exynos: Remove redundant use of of_match_ptr macro
  drm/exynos: remove ignoring return value warning in hdmi
  drm/exynos: fix WINDOWS_NR checking to vidi driver
  ...

11 years agoARM: dts: change compatible strings for EXYNOS5250 hdmi subsystem
Rahul Sharma [Wed, 19 Jun 2013 12:51:09 +0000 (18:21 +0530)]
ARM: dts: change compatible strings for EXYNOS5250 hdmi subsystem

This patch renames the combatible strings for hdmi, mixer, ddc
and hdmiphy. It follows the convention of using compatible string
which represent the SoC in which the IP was added for the first
time.

Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
11 years agodrm/exynos: add support for exynos5420 mixer
Rahul Sharma [Wed, 19 Jun 2013 12:51:08 +0000 (18:21 +0530)]
drm/exynos: add support for exynos5420 mixer

Add support for exynos5420 mixer IP in the drm mixer driver.

Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com>
Acked-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
11 years agodrm/exynos: add new compatible strings for hdmi subsystem
Rahul Sharma [Wed, 19 Jun 2013 12:51:07 +0000 (18:21 +0530)]
drm/exynos: add new compatible strings for hdmi subsystem

This patch adds new combatible strings for hdmi, mixer, ddc
and hdmiphy. It follows the convention of using compatible string
which represent the SoC in which the IP was added for the first
time.

Drivers continue to support the previous compatible strings
but further addition of these compatible strings in device tree
is deprecated.

Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
11 years agodrm/exynos: fix interlace resolutions for exynos5420
Rahul Sharma [Tue, 18 Jun 2013 12:49:37 +0000 (18:19 +0530)]
drm/exynos: fix interlace resolutions for exynos5420

Modified code for calculating hdmi IP register values from drm timing
values. The modification is based on the inputs from hw team and specifically
proposed for 1440x576i and 1440x480i. But same changes holds good for other
interlaced resolutions also.

Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com>
Acked-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
11 years agodrm/exynos: use of_get_named_gpio to get hdmi hpd gpio
Rahul Sharma [Tue, 11 Jun 2013 14:11:29 +0000 (19:41 +0530)]
drm/exynos: use of_get_named_gpio to get hdmi hpd gpio

Cleanup by removing flags variable from drm_hdmi_dt_parse_pdata
which is not used anywhere. Swtiching to of_get_named_gpio instead
of of_get_named_gpio_flags solved this.

Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com>
Acked-by: Seung-Woo Kim <sw0312@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
11 years agodrm/exynos: make sure to handle an error case to vm_mmap call
Inki Dae [Fri, 14 Jun 2013 08:54:27 +0000 (17:54 +0900)]
drm/exynos: make sure to handle an error case to vm_mmap call

vm_mmap function returns unsigned long so addr type should be unsigned long.
a pointer or address variable is required to use unsigned long or uint64_t
type for 64bits address support.

So this patch makes sure that addr has unsigned long type and also
exynos_drm_gem_mmap_ioctl returns correct error type.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
11 years agodrm/exynos: exynos_drm_ipp: Remove redundant break statement
Sachin Kamat [Tue, 11 Jun 2013 06:56:51 +0000 (12:26 +0530)]
drm/exynos: exynos_drm_ipp: Remove redundant break statement

'break' after goto statement is redundant. Silences the following
message:
drivers/gpu/drm/exynos/exynos_drm_ipp.c:1067 exynos_drm_ipp_check_valid()
info: ignoring unreachable code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
11 years agodrm/exynos: add mout_hdmi clock in hdmi driver to change parent
Rahul Sharma [Tue, 11 Jun 2013 06:54:03 +0000 (12:24 +0530)]
drm/exynos: add mout_hdmi clock in hdmi driver to change parent

HDMI driver needs to configure the mout_hdmi mux clock to change
the parent between sclk_hdmiphy and sclk_pixel.

Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
11 years agodrm/exynos: Prepare/Unprepare HDMI subsystem clocks
Sean Paul [Tue, 11 Jun 2013 06:54:02 +0000 (12:24 +0530)]
drm/exynos: Prepare/Unprepare HDMI subsystem clocks

Change the clk_enable/clk_disable calls in mixer and hdmi drivers into
clk_prepare_enable/clk_disable_unprepare, respectively.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
11 years agodrm/exynos: Clean up logs for DRM_ERROR / DRM_DEBUG_KMS
YoungJun Cho [Wed, 12 Jun 2013 01:44:40 +0000 (10:44 +0900)]
drm/exynos: Clean up logs for DRM_ERROR / DRM_DEBUG_KMS

This patch cleans up logs for DRM_ERROR / DRM_DEBUG_KMS to avoid
logging duplicated function name because the macros already contain
 __func__.

Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
11 years agodrm/exynos: Remove tracking log functions
YoungJun Cho [Wed, 12 Jun 2013 01:40:52 +0000 (10:40 +0900)]
drm/exynos: Remove tracking log functions

This patch removes tracking log functions which were used to debug
in the early development stage and are not so important as were.
So remove them for code clean up.

Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
11 years agodrm/exynos: hdmi: use drm_display_mode to check the supported modes
Rahul Sharma [Mon, 10 Jun 2013 09:20:00 +0000 (14:50 +0530)]
drm/exynos: hdmi: use drm_display_mode to check the supported modes

This patch renames check_timing to check_mode and removes the
unnecessary conversion of drm_display_mode to/from fb_videomode in
the hdmi driver.

v4:
1) Changed the commit message to add information related to renaming
the callbacks to check_mode.
2) Changed debug message to print 1/0 for interlace mode.

v3:
1) Replaced check_timing callbacks with check_mode.
2) Change the type of second parameter of check_mode callback from void
pointer paramenter to struct drm_display_mode pointer.

v2:
1) Removed convert_to_video_timing().
2) Corrected DRM_DEBUG_KMS to print the resolution properly.

Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
11 years agodrm/exynos: fimd: Add support for S3C64xx SoCs
Tomasz Figa [Wed, 1 May 2013 19:02:29 +0000 (21:02 +0200)]
drm/exynos: fimd: Add support for S3C64xx SoCs

The FIMD block present on S3C6400/S3C6410 SoCs is compatible with this
driver, so it can be supported by it as well.

This patch adds appropriate device IDs and driver data to enable this
driver for S3C64xx SoCs.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
Acked-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
11 years agodrm/exynos: fimd: Add support for FIMD variants with clock selection
Tomasz Figa [Wed, 1 May 2013 19:02:28 +0000 (21:02 +0200)]
drm/exynos: fimd: Add support for FIMD variants with clock selection

Some platforms that can be supported this driver has additional clock
source selection bits in VIDCON0 register that allows to select which
clock should be used to drive the pixel clock: bus clock or special
clock.

Since this driver assumes that special clock always drives the pixel
clock, this patch sets the selection bitfield to use the special clock.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
Acked-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
11 years agodrm/exynos: fimd: Add support for FIMD versions without SHADOWCON register
Tomasz Figa [Wed, 1 May 2013 19:02:27 +0000 (21:02 +0200)]
drm/exynos: fimd: Add support for FIMD versions without SHADOWCON register

Some platforms that can be supported with this driver have PRTCON
register instead of SHADOWCON, which requires slightly different
handling.

This patch factors out all register shadow control code from the driver
and adds a function to control register shadowing appropriately,
depending on driver data.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
Acked-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
11 years agodrm/exynos: fimd: Hold pointer to driver data in context struct
Tomasz Figa [Wed, 1 May 2013 19:02:26 +0000 (21:02 +0200)]
drm/exynos: fimd: Hold pointer to driver data in context struct

This patch adds pointer to driver data to fimd_context structure, to
remove the need to call drm_fimd_get_driver_data() each time access to
driver data is necessary.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
Acked-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
11 years agodrm/exynos: do not use mode_set_base function directly
Inki Dae [Sun, 12 May 2013 07:09:33 +0000 (16:09 +0900)]
drm/exynos: do not use mode_set_base function directly

This patch adds exynos_drm_crtc_mode_set_commit function
to update mode data and it makes page flip call this function
instead of calling exynos_drm_crtc_mode_set_base function directly.

exynos_drm_crtc_mode_set_base function is called by drm subsystem
as a callback so we don't have to call this function directly.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
11 years agodrm/exynos: Remove redundant use of of_match_ptr macro
Sachin Kamat [Wed, 5 Jun 2013 07:00:23 +0000 (16:00 +0900)]
drm/exynos: Remove redundant use of of_match_ptr macro

'mixer_match_types' is always compiled in. Hence of_match_ptr is not
necessary.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
11 years agodrm/exynos: remove ignoring return value warning in hdmi
Seung-Woo Kim [Wed, 5 Jun 2013 05:34:38 +0000 (14:34 +0900)]
drm/exynos: remove ignoring return value warning in hdmi

The definition of regulator_bulk_enable is fixed with __must_check
and this causes following build warning.
warning: ignoring return value of 'regulator_bulk_enable',
declared with attribute warn_unused_result
This patch fixes to check return value of the function.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
11 years agodrm/exynos: fix WINDOWS_NR checking to vidi driver
Inki Dae [Tue, 28 May 2013 07:01:21 +0000 (16:01 +0900)]
drm/exynos: fix WINDOWS_NR checking to vidi driver

This patch just checks if win_data array range is valid
or not correctly.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
11 years agodrm/exynos: fix tests for valid FIMD window number
Krzysztof Kozlowski [Mon, 27 May 2013 09:56:26 +0000 (11:56 +0200)]
drm/exynos: fix tests for valid FIMD window number

Valid values for FIMD windows are from 0 to WINDOWS_NR-1
inclusive (5 windows in total). The WINDOWS_NR is also
a size of fimd_context.win_data array.
However, early-return tests for wrong values of windows
accepted a value of WINDOWS_NR which is out of bound
for fimd_context.win_data.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
11 years agodrm/exynos: fix checks for valid mixer window
Krzysztof Kozlowski [Mon, 27 May 2013 06:00:43 +0000 (15:00 +0900)]
drm/exynos: fix checks for valid mixer window

Valid values for mixer window are from 0 to MIXER_WIN_NR-1 inclusive.
Arrays in structures (e.g. mixer_context.win_data) have size of
MIXER_WIN_NR so checks for wrong mixer window must be greater-equal.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Hyunhee Kim <hyunhee.kim@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
11 years agoRevert "drm: kms_helper: don't lose hotplug event"
Dave Airlie [Fri, 28 Jun 2013 10:31:34 +0000 (20:31 +1000)]
Revert "drm: kms_helper: don't lose hotplug event"

This reverts commit 160954b7bca43da7cd3cfbce310e6df919a8216e.

This was rearming the workqueue with a 0 timeout, causing
a WARN_ON, and possible loop.

Daniel writes:
"I've looked a bit into this and I think we need to have a separate
work struct for recovering these lost hotplug events since the
continuous self-rearming case is a real risk (e.g. if a connector
flip-flops all the time). At least I don't see a sane way to block out
re-arming with the current code in a simple way. So reverting the
offender seems like the right thing and I'll go back to the drawing
board for 3.12."

Signed-off-by: Dave Airlie <airlied@redhat.com>
11 years agodrm/doc: Document the KMS property API
Laurent Pinchart [Sat, 22 Jun 2013 14:10:30 +0000 (16:10 +0200)]
drm/doc: Document the KMS property API

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
11 years agodrm/doc: Remove outdated note about i915 driver not behaving properly
Laurent Pinchart [Sat, 22 Jun 2013 14:10:29 +0000 (16:10 +0200)]
drm/doc: Remove outdated note about i915 driver not behaving properly

The i915 driver has been fixed not to modify the mode argument of the
encoder mode_fixup operation. Remove the related comment from the
documentation.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
11 years agodrm: Improve manual IRQ installation documentation
Laurent Pinchart [Sat, 22 Jun 2013 12:10:59 +0000 (14:10 +0200)]
drm: Improve manual IRQ installation documentation

Define the rules for using irqs from drm drivers.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
11 years agodrm/prime: add return check for dma_buf_fd
YoungJun Cho [Wed, 26 Jun 2013 01:21:42 +0000 (10:21 +0900)]
drm/prime: add return check for dma_buf_fd

The dma_buf_fd() can return error when it fails to prepare fd,
so the dma_buf needs to be put.

Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
11 years agodrm/prime: reorder drm_prime_add_buf_handle and remove prototype
Seung-Woo Kim [Wed, 26 Jun 2013 01:21:41 +0000 (10:21 +0900)]
drm/prime: reorder drm_prime_add_buf_handle and remove prototype

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
11 years agodrm/prime: fix to put an exported dma_buf for adding handle failure
YoungJun Cho [Wed, 26 Jun 2013 01:21:40 +0000 (10:21 +0900)]
drm/prime: fix to put an exported dma_buf for adding handle failure

When drm_prime_add_buf_handle() returns failure for an exported
dma_buf, the dma_buf was already allocated and its refcount was
increased, so it needs to be put.

Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
11 years agodrm/prime: support to cache mapping
Joonyoung Shim [Wed, 19 Jun 2013 06:03:05 +0000 (15:03 +0900)]
drm/prime: support to cache mapping

The drm prime also can support it like GEM CMA supports to cache
mapping. It doesn't allow multiple mappings for one attachment.

[airlied: rebased on top of other prime changes]
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
11 years agodrm/prime: replace NULL with error value in drm_prime_pages_to_sg
YoungJun Cho [Mon, 24 Jun 2013 07:40:53 +0000 (16:40 +0900)]
drm/prime: replace NULL with error value in drm_prime_pages_to_sg

Instead of NULL, error value is casted with ERR_PTR() for
drm_prime_pages_to_sg() and IS_ERR_OR_NULL() macro is replaced
with IS_ERR() macro for drm_gem_map_dma_buf().

Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
11 years agodrm/prime: fix to check return of dma_map_sg in prime helper
YoungJun Cho [Mon, 24 Jun 2013 06:34:21 +0000 (15:34 +0900)]
drm/prime: fix to check return of dma_map_sg in prime helper

The dma_map_sg(), in map_dma_buf callback operation of prime helper,
can return 0 when it fails to map, so it needs to release related
resources.

Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
11 years agodrm/gem: fix not to assign error value to gem name
YoungJun Cho [Wed, 26 Jun 2013 23:58:33 +0000 (08:58 +0900)]
drm/gem: fix not to assign error value to gem name

If idr_alloc() is failed, obj->name can be error value. Also
it cleans up duplicated flink processing code.

This regression has been introduced in

commit 2e928815c1886fe628ed54623aa98d0889cf5509
Author: Tejun Heo <tj@kernel.org>
Date:   Wed Feb 27 17:04:08 2013 -0800

    drm: convert to idr_alloc()

Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: stable@vger.kernel.org
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Dave Airlie <airlied@redhat.com>
11 years agodrm/gem: add mutex lock when using drm_gem_mmap_obj
YoungJun Cho [Wed, 26 Jun 2013 23:39:58 +0000 (08:39 +0900)]
drm/gem: add mutex lock when using drm_gem_mmap_obj

The drm_gem_mmap_obj() has to be protected with dev->struct_mutex,
but some caller functions do not. So it adds mutex lock to missing
callers and adds assertion to check whether drm_gem_mmap_obj() is
called with mutex lock or not.

Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
11 years agodrm/omap: drop the !FB_OMAP2 dep
Dave Airlie [Fri, 28 Jun 2013 02:08:10 +0000 (12:08 +1000)]
drm/omap: drop the !FB_OMAP2 dep

This ends up causing circularity and really let people shoot themselves
in the foot.

Acked-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
11 years agodrm/ttm: get rid of ttm_bo_is_reserved
Maarten Lankhorst [Thu, 27 Jun 2013 11:48:28 +0000 (13:48 +0200)]
drm/ttm: get rid of ttm_bo_is_reserved

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
11 years agodrm/vmwgfx: get rid of ttm_bo_is_reserved usage
Maarten Lankhorst [Thu, 27 Jun 2013 11:48:27 +0000 (13:48 +0200)]
drm/vmwgfx: get rid of ttm_bo_is_reserved usage

Use lockdep_assert_held instead.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>