]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
10 years agodrm/i915/skl: Sunrise Point PCH detection
Satheeshakrishna M [Wed, 9 Apr 2014 05:38:57 +0000 (11:08 +0530)]
drm/i915/skl: Sunrise Point PCH detection

This patch implements detection of SPT and SPT-LP PCH devices.

v2: Added HAS_PCH_SPT macro

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Satheeshakrishna M <satheeshakrishna.m@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agodrm/i915/skl: Adjust the display engine interrupts
Damien Lespiau [Thu, 20 Mar 2014 20:45:01 +0000 (20:45 +0000)]
drm/i915/skl: Adjust the display engine interrupts

To accomodate the extra planes, the bit definitions were shuffled around
a bit.

v2: Rebase on top of the for_each_pipe() change adding dev_priv as first
    argument.
v3: Rebase after yet another change int that area (done with wiggle)

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agodrm/i915/skl: Restore pipe B/C interrupts
Satheeshakrishna M [Tue, 8 Apr 2014 10:16:56 +0000 (15:46 +0530)]
drm/i915/skl: Restore pipe B/C interrupts

Extending BDW implementation to gen9. Pipe B/C interrupt
restoration after exiting LPSP.

v2: Fix minor rebasing conflict.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Satheeshakrishna M <satheeshakrishna.m@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agodrm/i915/skl: SKL backlight enabling
Satheeshakrishna M [Tue, 8 Apr 2014 10:16:55 +0000 (15:46 +0530)]
drm/i915/skl: SKL backlight enabling

Extending the BDW backlight implementation to SKL.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Satheeshakrishna M <satheeshakrishna.m@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agodrm/i915/skl: vfuncs for skl eld and global resource
Satheeshakrishna M [Tue, 8 Apr 2014 10:16:54 +0000 (15:46 +0530)]
drm/i915/skl: vfuncs for skl eld and global resource

Set gen 9 function pointers for eld write and global resource.
Implementation remains same as HSW.

v2: Rebase on top of Sonika's untangling of the if/else ladder (Damien)

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Satheeshakrishna M <satheeshakrishna.m@intel.com> (v1)
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agodrm/i915/skl: SKL pipe misc programming
Satheeshakrishna M [Tue, 8 Apr 2014 10:16:53 +0000 (15:46 +0530)]
drm/i915/skl: SKL pipe misc programming

Pipe misc programming in gen9 is similar to BDW. Extending the BDW
implementation to gen 9.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Satheeshakrishna M <satheeshakrishna.m@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agodrm/i915/skl: SKL shares the same underrun interrupt as BDW
Damien Lespiau [Wed, 4 Jun 2014 18:25:23 +0000 (19:25 +0100)]
drm/i915/skl: SKL shares the same underrun interrupt as BDW

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agodrm/i915/skl: Report the PDP regs as in gen8
Damien Lespiau [Thu, 3 Apr 2014 15:17:51 +0000 (16:17 +0100)]
drm/i915/skl: Report the PDP regs as in gen8

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agodrm/i915/skl: report the same INSTDONE registers as gen8
Damien Lespiau [Thu, 3 Apr 2014 15:13:29 +0000 (16:13 +0100)]
drm/i915/skl: report the same INSTDONE registers as gen8

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agodrm/i915/skl: Allow the reg_read ioctl to return RCS_TIMESTAMP
Damien Lespiau [Sun, 30 Mar 2014 15:28:23 +0000 (16:28 +0100)]
drm/i915/skl: Allow the reg_read ioctl to return RCS_TIMESTAMP

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agodrm/i915/skl: Initialize PPGTT like gen8
Damien Lespiau [Thu, 23 Jan 2014 13:59:49 +0000 (13:59 +0000)]
drm/i915/skl: Initialize PPGTT like gen8

gen9 uses very similar memory management to what gen8 has. Just follow
the flow.

v2: Fix trivial conflict (Damien)

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agodrm/i915/skl: Provide a get_aux_send_ctl() vfunc for skylake
Damien Lespiau [Mon, 20 Jan 2014 16:01:00 +0000 (16:01 +0000)]
drm/i915/skl: Provide a get_aux_send_ctl() vfunc for skylake

Skylake doesn't use the pre-charge field now, but, instead, we need to
specify the total number of SYNC pulses for the SYNC phase (pre-charge +
SYNC pattern pules). Let's use the default value (32) for that.

v3: increase DP AUX TX timeout as 400us is not to be used on SKL
    apparently (Jesse).

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agodrm/i915/skl: Implement the get_aux_clock_divider() DP vfunc
Damien Lespiau [Mon, 20 Jan 2014 16:00:59 +0000 (16:00 +0000)]
drm/i915/skl: Implement the get_aux_clock_divider() DP vfunc

We need to provide a vfunc that will make the code in intel_dp_aux_ch()
loop once to start the AUX transaction. The return value (clock divider)
is unused on SKL, so just return 1.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agodrm/i915/skl: gen9 uses the same bind_vma() vfuncs as gen6+
Damien Lespiau [Thu, 16 Jan 2014 16:42:32 +0000 (16:42 +0000)]
drm/i915/skl: gen9 uses the same bind_vma() vfuncs as gen6+

Temporary plug a BUG() while waiting for a better solution. See:

  http://lists.freedesktop.org/archives/intel-gfx/2014-January/038132.html

However Chris was looking at cleaning-up this as well, so went for the
easy intermediate solution instead.

Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agodrm/i915/skl: Add the additional graphics stolen sizes
Damien Lespiau [Thu, 9 Jan 2014 18:02:46 +0000 (18:02 +0000)]
drm/i915/skl: Add the additional graphics stolen sizes

Skylake introduces new stolen memory sizes starting at 0xf0 (4MB) and
growing by 4MB increments from there.

v2: Rebase on top of the early-quirk changes from Ville.

v3: Rebase on top of the PCI_IDS/IDS macro rename

Reviewed-by: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agodrm/i915/skl: Skylake moves AUX_CTL from PCH to CPU
Damien Lespiau [Tue, 3 Dec 2013 13:56:29 +0000 (13:56 +0000)]
drm/i915/skl: Skylake moves AUX_CTL from PCH to CPU

So we can apply the old aux_ctl = dp_ctl + 0x10 rule again.

Reviewed-by: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agodrm/i915/skl: Add support for DP voltage swings and pre-emphasis
Damien Lespiau [Tue, 3 Dec 2013 13:56:26 +0000 (13:56 +0000)]
drm/i915/skl: Add support for DP voltage swings and pre-emphasis

They are similar to Haswell.

v2: Rebased on top of drm-intel-nightly
v3: Rebased on top of Sonika's DP train defines renaming

Reviewed-by: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agodrm/i915/skl: Program the DDI buffer translation tables
Damien Lespiau [Tue, 3 Dec 2013 13:56:25 +0000 (13:56 +0000)]
drm/i915/skl: Program the DDI buffer translation tables

A couple of things have changed compared to Broadwell:
  - Entry 9 is used for eDP
  - No more FDI

v2: Update the translation values to latest specs.
v3: Rebase on top of the BDW HDMI translation patch
v4: Remove the low voltage edp tables,
    Rebase on top of the patch not writing the HDMI entry on eDP/FDI
    DDIs (Satheesh, Paulo).
v5: Apply the / 2 fix for the number of HDMI entries (Satheesh)
v6: Rebase on top of Jani's clean up for the DDI_BUF_TRANS tables
v7: Restore the commit message that was mangled by error

Reviewed-by: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agodrm/i915/skl: Don't try to read out the PCH transcoder state if not present
Damien Lespiau [Tue, 3 Dec 2013 13:56:24 +0000 (13:56 +0000)]
drm/i915/skl: Don't try to read out the PCH transcoder state if not present

When the platform doesn't have a FDI link, don't try to read out the
state of a potential PCH transcoder.

Reviewed-by: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
[danvet: Don't open-code HAS_FDI if there's only one place that needs
it. Acked by Damien on irc.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agodrm/i915/skl: Don't create a VGA connector on Skylake
Damien Lespiau [Tue, 3 Dec 2013 13:56:23 +0000 (13:56 +0000)]
drm/i915/skl: Don't create a VGA connector on Skylake

v2: Rebase on top of the intel_crt_present() addition
v3: Fix rebase error (we were patching the wrong function)

Reviewed-by: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agodrm/i915/skl: Implement the new update_plane() for primary planes
Damien Lespiau [Wed, 3 Jul 2013 20:06:04 +0000 (21:06 +0100)]
drm/i915/skl: Implement the new update_plane() for primary planes

Skylake makes primary planes the same as sprite planes and call the
result "universal planes".

This commit emulates a primary plane with plane 0, taking the
opportunity to redefine primary and sprite registers to be identical now
that the underlying hardware is. It also makes sense as plenty of fields
have changed.

v2: Rebase on top of the vma code.

v3: Follow upstream evolution:
- Drop return values.
- Remove pipe checks since redudant and BUG instead.
- Remove tiling checks and BUG instead.
- Drop commented out DISP_MODIFY usage.

v4: s/plane/primary_plane/

v5: Misc fixes:
- Fix the fields we need to clear up
- Disable trickle feed
- Correctly use PLANE_OFFSET for the panning

v6: (Jesse)
Use pipe src size when programming plane size. This makes cloned configs
work correctly w/o the use of a panel fitter.

v7: Rebase on top of Ville's rmw elimination series

v8: Remove clearing the trickle feed bit now that we don't do a RMW (Rodrigo,
    Damien)
    Add a comment about the stride unit (Rodrigo)

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> (v1,5,6,7)
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> (v2,3)
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agodrm/i915/skl: i915_swizzle_info gen9 fix
Robert Beckett [Thu, 23 Jan 2014 14:23:14 +0000 (14:23 +0000)]
drm/i915/skl: i915_swizzle_info gen9 fix

Fix ARB_MODE register read for gen >= 8 in i915_swizzle_info

Reviewed-by: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Robert Beckett <robert.beckett@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agodrm/i915/skl: Framebuffers need to be aligned to 256KB on Skylake
Damien Lespiau [Wed, 3 Jul 2013 20:06:02 +0000 (21:06 +0100)]
drm/i915/skl: Framebuffers need to be aligned to 256KB on Skylake

v2: Also align X tiled fbs to 256KB (Thomas)

Reviewed-by: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agodrm/i915/skl: don't set the AsyncFlip performance mode for Gen9+
Imre Deak [Wed, 13 Feb 2013 15:27:34 +0000 (15:27 +0000)]
drm/i915/skl: don't set the AsyncFlip performance mode for Gen9+

The following sets the AsyncFlip performance mode for everything above
Gen6:

commit 4790cb36b3eede8fb0cca529dc1d31b9936fa24b
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sun Jan 20 16:11:20 2013 +0000

    drm/i915: Disable AsyncFlip performance optimisations

Starting from Gen9 the MI_MODE register layout changes and doesn't
include the above bit.

Reviewed-by: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agodrm/i915/skl: Skylake shares the interrupt logic with Broadwell
Damien Lespiau [Mon, 8 Apr 2013 13:42:02 +0000 (15:42 +0200)]
drm/i915/skl: Skylake shares the interrupt logic with Broadwell

Reviewed-by: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agodrm/i915/skl: Provide a placeholder for init_clock_gating()
Damien Lespiau [Wed, 13 Feb 2013 15:27:27 +0000 (15:27 +0000)]
drm/i915/skl: Provide a placeholder for init_clock_gating()

v2: Rebase on top of the broadwell_init_clock_gating() name change

Reviewed-by: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agodrm/i915/skl: Fence registers on SKL are the same as SNB
Damien Lespiau [Wed, 13 Feb 2013 15:27:25 +0000 (15:27 +0000)]
drm/i915/skl: Fence registers on SKL are the same as SNB

v2: Rebased on top of the i915_gpu_error.c extraction.

Reviewed-by: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agodrm/i915/skl: SKL FBC enablement
Daisy Sun [Thu, 24 Apr 2014 00:13:09 +0000 (17:13 -0700)]
drm/i915/skl: SKL FBC enablement

Enable FBC feature on Skylake

Issue: VIZ-3788
Reviewed-by: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Daisy Sun <daisy.sun@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agodrm/i915/skl: Add an IS_SKYLAKE macro
Satheeshakrishna M [Wed, 2 Apr 2014 05:54:50 +0000 (11:24 +0530)]
drm/i915/skl: Add an IS_SKYLAKE macro

Adding new macro IS_SKYLAKE for skylake specific implementation.

Reviewed-by: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Satheeshakrishna M <satheeshakrishna.m@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agodrm/i915/skl: Add an IS_GEN9() define
Damien Lespiau [Wed, 13 Feb 2013 15:27:24 +0000 (15:27 +0000)]
drm/i915/skl: Add an IS_GEN9() define

Reviewed-by: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agodrm/i915/skl: Add the Skylake PCI ids
Damien Lespiau [Wed, 13 Feb 2013 15:27:37 +0000 (15:27 +0000)]
drm/i915/skl: Add the Skylake PCI ids

v2: Squash in 2nd patch from Damien for more ids (Daniel)
v3: info->has*ring -> info->ring_mask conversion. Also add VEBOX support.
v4: Fold in update from Damien
v5: Rebase and add GEN_DEFAULT_PIPEOFFSETS
v6: Add more PCI ID (Vandana)
v7: Rebase and add IVB_CURSOR_OFFSETS
v8: Renamed the macro from _PCI_IDS to _IDS for consistency

Reviewed-by: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Vandana Kannan <vandana.kannan@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agodrm/doc: Fixup drm_irq kerneldoc includes.
Daniel Vetter [Tue, 23 Sep 2014 13:46:54 +0000 (15:46 +0200)]
drm/doc: Fixup drm_irq kerneldoc includes.

Only !P can be used together with a function list.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
10 years agodrm: Extract <drm/drm_gem.h>
Daniel Vetter [Tue, 23 Sep 2014 13:46:53 +0000 (15:46 +0200)]
drm: Extract <drm/drm_gem.h>

v2: Don't forget git add, noticed by David.

Cc: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Acked-by: David Herrmann <dh.herrmann@gmail.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
10 years agodrm: Move internal debugfs functions to drm_internal.h
Daniel Vetter [Tue, 23 Sep 2014 13:46:52 +0000 (15:46 +0200)]
drm: Move internal debugfs functions to drm_internal.h

In my header cleanup I've missed the debugfs functions completely.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
10 years agodrm: Move leftover ioctl declarations to drm_internal.h
Daniel Vetter [Tue, 23 Sep 2014 13:46:51 +0000 (15:46 +0200)]
drm: Move leftover ioctl declarations to drm_internal.h

Somehow I've missed these three, fix this up asap. Plus move
drm_master_create since while at it.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
10 years agodrm: Move drm_vm_open_locked into drm_internal.h
Daniel Vetter [Tue, 23 Sep 2014 13:46:50 +0000 (15:46 +0200)]
drm: Move drm_vm_open_locked into drm_internal.h

Leftover from my previous header cleanup.

This depends upon the patch to rework exynos mmap support, otherwise
it'll break exynos.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
10 years agodrm: move drm_mmap to <drm/drm_legacy.h>
Daniel Vetter [Tue, 23 Sep 2014 13:46:49 +0000 (15:46 +0200)]
drm: move drm_mmap to <drm/drm_legacy.h>

Now that we've removed the copypasted users in gem/ttm we can
relegate the legacy buffer mapping support to where it belongs.
Also give it the proper drm_legacy_ prefix.

While at it statify drm_mmap_locked, somehow I've missed that in my
previous header rework.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
10 years agodrm/gem: Don't call drm_mmap from drm_gem_mmap
Daniel Vetter [Tue, 23 Sep 2014 13:46:48 +0000 (15:46 +0200)]
drm/gem: Don't call drm_mmap from drm_gem_mmap

The only user I could dig out was i915 back when ums+gem was still a
thing. But we've just very much killed that, and even when someone
screams about that we should resurrect that with a special hack
(wrapping drm_gem_mmap) in i915, not in the core code.

So good riddance to another entry point of the legacy buffer mapping
code.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
10 years agodrm/<ttm-based-drivers>: Don't call drm_mmap
Daniel Vetter [Tue, 23 Sep 2014 13:46:47 +0000 (15:46 +0200)]
drm/<ttm-based-drivers>: Don't call drm_mmap

Really, the legacy buffer api should be dead, especially for all these
newfangled drivers. I suspect this is copypasta from the transitioning
days, which probably originated in radeon.

Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Herrmann <dh.herrmann@gmail.com>
Cc: Rashika <rashika.kheria@gmail.com>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Fabian Frederick <fabf@skynet.be>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Alexandre Courbot <acourbot@nvidia.com>
Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Cc: Christian Engelmayer <cengelma@gmx.at>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Acked-by: Ben Skeggs <bskeggs@redhat.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
10 years agodrm: change drm_err return type to void
Joe Perches [Mon, 22 Sep 2014 16:30:11 +0000 (09:30 -0700)]
drm: change drm_err return type to void

The return value is not used by callers of this function
nor by uses of the DRM_ERROR macro so change the function
to return void.

Signed-off-by: Joe Perches <joe@perches.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
10 years agodrm/ttm: Clean usage of ttm_io_prot() with TTM_PL_FLAG_CACHED
Benjamin Herrenschmidt [Thu, 4 Sep 2014 07:47:23 +0000 (17:47 +1000)]
drm/ttm: Clean usage of ttm_io_prot() with TTM_PL_FLAG_CACHED

Today, most callers of ttm_io_prot() check TTM_PL_FLAG_CACHED before
calling it since on some archs it will unconditionally create non-cached
mappings.

But not all callers do which is incorrect as far as I can tell.

Instead, move that check inside ttm_io_port() itself for all archs
and make powerpc use the same implementation as ia64 and arm

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
10 years agodrm: powerpc can use a simpler drm_io_prot()
Benjamin Herrenschmidt [Thu, 4 Sep 2014 07:46:45 +0000 (17:46 +1000)]
drm: powerpc can use a simpler drm_io_prot()

What the code does is equivalent to the x86 code, so let's use
it as well

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
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 [Mon, 22 Sep 2014 00:07:25 +0000 (10:07 +1000)]
Merge branch 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next

   Sorry for late. This pull request includes some enhancements
   for Exynos drm, new feature supports, cleanups and fixups
   like below,

   - Consider low power transmission for drm mipi dsi module,
     and also add non-continuous clock mode support for Exynos
     mipi dsi driver.
   - Add Exynos3250 SoC support.
   - Enhance and clean up ipp framework and fimc driver.
   - Update to use component match support and fix up
     de-initialization order.
   - Remove a direct mmap interface and relevant stuff specific to
     Exynos drm, use drm generic mmap interface instead.
     And we will remove the specific interface from userspace
     library, libdrm soon.
   - Use universal plane which allows to replace fake primary plane
     with the real one.
   - Some code cleanups and fixups.

* 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos: (40 commits)
  drm/exynos: switch to universal plane API
  drm/exynos: use drm generic mmap interface
  drm/exynos: remove DRM_EXYNOS_GEM_MAP_OFFSET ioctl
  drm/exynos: factor out initial setting of each driver
  drm/exynos/hdmi: unregister connector on removal
  drm/exynos/dp: unregister connector on removal
  drm/exynos/dpi: unregister connector and panel on removal
  drm/exynos/dsi: unregister connector on removal
  drm/exynos/fb: free exynos framebuffer on error
  drm/exynos/fbdev: fix fbdev gem object cleanup
  drm/exynos: fix drm driver de-initialization order
  drm/exynos/ipp: traverse ipp drivers list safely
  drm/exynos: update to use component match support
  drm/exynos/ipp: add file checks for ioctls
  drm/exynos/ipp: remove file argument from node related functions
  drm/exynos/fimc: fix source buffer registers
  drm/exynos/fimc: simplify buffer queuing
  drm/exynos/fimc: do not enable fimc twice
  drm/exynos/fimc: avoid clearing overflow bits
  drm/exynos/ipp: remove events during command cleaning
  ...

10 years agodrm/exynos: switch to universal plane API
Andrzej Hajda [Fri, 19 Sep 2014 12:58:53 +0000 (14:58 +0200)]
drm/exynos: switch to universal plane API

The patch replaces legacy functions
drm_plane_init() / drm_crtc_init() with
drm_universal_plane_init() and drm_crtc_init_with_planes().
It allows to replace fake primary plane with the real one.
Additionally the patch leaves cleanup of crtcs to core,
this way planes and crtcs are cleaned in correct order.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: use drm generic mmap interface
Inki Dae [Thu, 18 Sep 2014 05:19:01 +0000 (14:19 +0900)]
drm/exynos: use drm generic mmap interface

This patch removes DRM_EXYNOS_GEM_MMAP ictrl feature specific
to Exynos drm and instead uses drm generic mmap.

We had used the interface specific to Exynos drm to do mmap directly,
not to use demand paging which maps each page with physical memory
at page fault handler. We don't need the specific mmap interface
because the drm generic mmap which uses vm offset manager stuff can
also do mmap directly.

This patch makes a userspace region to be mapped with whole physical
memory region allocated by userspace request when mmap system call is
requested.

Changelog v2:
- do not set VM_IO, VM_DONTEXPEND and VM_DONTDUMP. These flags were already
  set by drm_gem_mmap
- do not include <linux/anon_inodes.h>, which isn't needed anymore.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: remove DRM_EXYNOS_GEM_MAP_OFFSET ioctl
Inki Dae [Wed, 17 Sep 2014 13:48:45 +0000 (22:48 +0900)]
drm/exynos: remove DRM_EXYNOS_GEM_MAP_OFFSET ioctl

This interface and relevant codes aren't used anymore.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: factor out initial setting of each driver
Joonyoung Shim [Thu, 18 Sep 2014 08:50:35 +0000 (17:50 +0900)]
drm/exynos: factor out initial setting of each driver

From fimd driver and vidi driver, dev->irq_enabled and
dev->vblank_disable_allowed are set and also mixer needs them even if
missed. It's duplicated so set them when loads drm driver.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos/hdmi: unregister connector on removal
Andrzej Hajda [Tue, 9 Sep 2014 13:16:13 +0000 (15:16 +0200)]
drm/exynos/hdmi: unregister connector on removal

During component removal driver should unregister connector.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos/dp: unregister connector on removal
Andrzej Hajda [Tue, 9 Sep 2014 13:16:12 +0000 (15:16 +0200)]
drm/exynos/dp: unregister connector on removal

During component removal driver should unregister connector.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos/dpi: unregister connector and panel on removal
Andrzej Hajda [Tue, 9 Sep 2014 13:16:11 +0000 (15:16 +0200)]
drm/exynos/dpi: unregister connector and panel on removal

During component removal it should unregister connector
and optionally detach the panel.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos/dsi: unregister connector on removal
Andrzej Hajda [Tue, 9 Sep 2014 13:16:10 +0000 (15:16 +0200)]
drm/exynos/dsi: unregister connector on removal

During component unbind connector should be unregistered.
Also DSI host should be unregistered after KMS cleanup.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos/fb: free exynos framebuffer on error
Andrzej Hajda [Tue, 9 Sep 2014 13:16:08 +0000 (15:16 +0200)]
drm/exynos/fb: free exynos framebuffer on error

In case drm_framebuffer_init fails exynos_fb should be freed
before returning an error.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos/fbdev: fix fbdev gem object cleanup
Andrzej Hajda [Tue, 9 Sep 2014 13:16:07 +0000 (15:16 +0200)]
drm/exynos/fbdev: fix fbdev gem object cleanup

exynos_gem_obj is used by exynos_drm_fbdev_destroy so it cannot be destroyed
before calling the latter. exynos_gem_obj will be destroyed anyway by
exynos_drm_fbdev_destroy->...->exynos_drm_fb_destroy.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: fix drm driver de-initialization order
Andrzej Hajda [Tue, 9 Sep 2014 13:16:06 +0000 (15:16 +0200)]
drm/exynos: fix drm driver de-initialization order

Since components have their own cleanup routines calling
drm_mode_config_cleanup before component_unbind_all causes errors
due to double free of KMS objects. The patch fixes it by changing
de-initialization order. Now it is exactly opposite to init order.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos/ipp: traverse ipp drivers list safely
Andrzej Hajda [Tue, 9 Sep 2014 13:16:05 +0000 (15:16 +0200)]
drm/exynos/ipp: traverse ipp drivers list safely

On ipp subsystem removal list of ipp drivers is traversed
and their members are deleted. To do it properly safe version
of list_for_each* should be used.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: update to use component match support
Inki Dae [Thu, 11 Sep 2014 08:04:03 +0000 (17:04 +0900)]
drm/exynos: update to use component match support

Update Exynos's DRM driver to use component match support rater than
add_components.

Changelog v2:
- release devices and drivers if failed.
- change compare_of to compare_dev.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Tested-by: Andrzej Hajda <a.hajda@samsung.com>
10 years agodrm/exynos/ipp: add file checks for ioctls
Andrzej Hajda [Tue, 2 Sep 2014 12:56:21 +0000 (14:56 +0200)]
drm/exynos/ipp: add file checks for ioctls

Process should not have access to ipp nodes created by another
process. The patch adds necessary checks.
It also simplifies lookup for command node.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos/ipp: remove file argument from node related functions
Andrzej Hajda [Tue, 2 Sep 2014 12:55:06 +0000 (14:55 +0200)]
drm/exynos/ipp: remove file argument from node related functions

Since file pointer is preserved in c_node passing it
as argument in node functions is redundant.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos/fimc: fix source buffer registers
Andrzej Hajda [Thu, 28 Aug 2014 09:07:39 +0000 (11:07 +0200)]
drm/exynos/fimc: fix source buffer registers

FIMC in default mode of operation uses only one input buffer,
but the driver used also second buffer, as a result only the
first frame was processed correctly. The patch fixes it.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos/fimc: simplify buffer queuing
Andrzej Hajda [Thu, 28 Aug 2014 09:07:38 +0000 (11:07 +0200)]
drm/exynos/fimc: simplify buffer queuing

The patch removes redundant checks, redundant HW reads
and simplifies code.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos/fimc: do not enable fimc twice
Andrzej Hajda [Thu, 28 Aug 2014 09:07:37 +0000 (11:07 +0200)]
drm/exynos/fimc: do not enable fimc twice

The patch removes redundant H/W activation.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos/fimc: avoid clearing overflow bits
Andrzej Hajda [Thu, 28 Aug 2014 09:07:36 +0000 (11:07 +0200)]
drm/exynos/fimc: avoid clearing overflow bits

Overflow bits shall be cleared by H/W.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos/ipp: remove events during command cleaning
Andrzej Hajda [Thu, 28 Aug 2014 09:07:35 +0000 (11:07 +0200)]
drm/exynos/ipp: remove events during command cleaning

Events were removed only during stop command, as a result
there were memory leaks if program prematurely exited.
This patch fixes it.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos/ipp: stop hardware before freeing memory
Andrzej Hajda [Thu, 28 Aug 2014 09:07:34 +0000 (11:07 +0200)]
drm/exynos/ipp: stop hardware before freeing memory

Memory shouldn't be freed when hardware is still running.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos/ipp: replace work_struct casting with better constructs
Andrzej Hajda [Thu, 28 Aug 2014 09:07:33 +0000 (11:07 +0200)]
drm/exynos/ipp: replace work_struct casting with better constructs

Type casting should be avoided if possible. In case of
work_struct it can be simply replaced by reference to member field.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos/ipp: clean memory nodes on command node cleaning
Andrzej Hajda [Thu, 28 Aug 2014 09:07:32 +0000 (11:07 +0200)]
drm/exynos/ipp: clean memory nodes on command node cleaning

The nodes should be removed before removing command node.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos/ipp: move nodes cleaning to separate function
Andrzej Hajda [Thu, 28 Aug 2014 09:07:31 +0000 (11:07 +0200)]
drm/exynos/ipp: move nodes cleaning to separate function

The patch introduces ipp_clean_mem_nodes function which replaces
redundant code. Additionally memory node function definitions
are moved up to increase its visibility.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos/ipp: free partially allocated resources on error
Andrzej Hajda [Thu, 28 Aug 2014 09:07:30 +0000 (11:07 +0200)]
drm/exynos/ipp: free partially allocated resources on error

In case of allocation errors some already allocated buffers
were not freed. The patch fixes it.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos/ipp: remove unused field in command node
Andrzej Hajda [Thu, 28 Aug 2014 09:07:29 +0000 (11:07 +0200)]
drm/exynos/ipp: remove unused field in command node

Since command node have file pointer dev field became useless.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos/ipp: remove only related commands on file close
Andrzej Hajda [Thu, 28 Aug 2014 09:07:28 +0000 (11:07 +0200)]
drm/exynos/ipp: remove only related commands on file close

On file close driver should remove only command nodes created
via this file.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos/ipp: move file reference from memory to command node
Andrzej Hajda [Thu, 28 Aug 2014 09:07:27 +0000 (11:07 +0200)]
drm/exynos/ipp: move file reference from memory to command node

Command node should contain file reference to distinguish commands
created by different processes.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos/ipp: cancel works before command node clean
Andrzej Hajda [Thu, 28 Aug 2014 09:07:26 +0000 (11:07 +0200)]
drm/exynos/ipp: cancel works before command node clean

All pending works should be canceled prior to its removal.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos/ipp: remove fake pm callbacks
Andrzej Hajda [Thu, 28 Aug 2014 09:07:25 +0000 (11:07 +0200)]
drm/exynos/ipp: remove fake pm callbacks

PM callbacks in ipp core do nothing, so the patch removes it.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: fimd: fix window clear code
Marek Szyprowski [Mon, 1 Sep 2014 13:27:10 +0000 (22:27 +0900)]
drm/exynos: fimd: fix window clear code

To correctly disable hardware window during driver init, both enable bits
(WINCONx_ENWIN in WINCON and SHADOWCON_CHx_ENABLE in SHADOWCON) must be
cleared, otherwise hardware fails to re-enable such window later.

While touching this function, also temporarily disable ctx->suspended flag
to let fimd_wait_for_vblank function really to do its job.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos/fbdev: set smem_len for fbdev
Daniel Kurtz [Mon, 1 Sep 2014 12:28:00 +0000 (21:28 +0900)]
drm/exynos/fbdev: set smem_len for fbdev

Commit [0] stopped setting fix.smem_start and fix.smem_len when creating
the fbdev.

[0] 2f1eab8d8ab59e799f7d51d62410b398607a7bc3
  drm/exynos/fbdev: don't set fix.smem/mmio_{start,len}

However, smem_len is used by some userland applications to calculate the
size for mmap.  In particular, it is used by xf86-video-fbdev:

http://cgit.freedesktop.org/xorg/xserver/tree/hw/xfree86/fbdevhw/fbdevhw.c?id=xorg-server-1.15.99.903#n571

So, let's restore setting the smem_len to unbreak things for these users.

Note: we are still leaving smem_start set to 0.

Reported-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Reported-by: Gunther Noack <me@guenthernoack.de>
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agoARM: dts: add mipi dsi device node to exynos3250.dtsi
Inki Dae [Wed, 13 Aug 2014 11:53:47 +0000 (20:53 +0900)]
ARM: dts: add mipi dsi device node to exynos3250.dtsi

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
10 years agoARM: dts: add mipi_phy device node to exynos3250.dtsi
Inki Dae [Wed, 13 Aug 2014 11:46:12 +0000 (20:46 +0900)]
ARM: dts: add mipi_phy device node to exynos3250.dtsi

This patch adds mipi_phy device node to reset, disable and enable
DSIM and CSIS PHY.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
10 years agoARM: dts: add fimd device node to exynos3250.dsti
Inki Dae [Wed, 13 Aug 2014 11:37:53 +0000 (20:37 +0900)]
ARM: dts: add fimd device node to exynos3250.dsti

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
10 years agodrm/exynos: fimd: add Exynos3 SoC support
Inki Dae [Mon, 18 Aug 2014 07:53:19 +0000 (16:53 +0900)]
drm/exynos: fimd: add Exynos3 SoC support

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
10 years agodrm/exynos: mipi-dsi: add Exynos3 SoC support
Inki Dae [Wed, 13 Aug 2014 08:09:12 +0000 (17:09 +0900)]
drm/exynos: mipi-dsi: add Exynos3 SoC support

This patch adds Exynos3250/3472 SoCs support.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
10 years agodrm/exynos: mipi-dsi: consider non-continuous clock mode
Inki Dae [Wed, 13 Aug 2014 08:03:12 +0000 (17:03 +0900)]
drm/exynos: mipi-dsi: consider non-continuous clock mode

This patch adds non-continuous clock mode support

Clock mode on Clock Lane is continuous clock by default.
So if we want to transmit data in non-continuous clock mode
to reduce power consumption, then host driver should set
DSIM_CLKLANE_STOP bit. In this case, host controller turns off
HS clock between high speed transmissions.

For this, this patch adds a new bit, DSIM_CLKLANE_STOP, and makes
the host driver sets this bit only in case that dsi->mode_flags has
MIPI_DSI_CLOCK_NON_CONTINUOUS flag.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
10 years agodrm/mipi-dsi: consider low power transmission
Inki Dae [Wed, 13 Aug 2014 07:38:23 +0000 (16:38 +0900)]
drm/mipi-dsi: consider low power transmission

This patch adds a new flag, MIPI_DSI-MODE_LPM, to transmit data
in low power. With this flag, msg.flags has MIPI_DSI_MSG_USE_LPM
so that host driver of each SoC can clear or set relevant register
bit for low power transmission.

All host drivers shall support continuous clock behavior on the
Clock Lane, and optionally may support non-continuous clock behavior.
Both of them can transmit data in high speed of low power.

With each clock behavior, non-continuous or continuous clock mode,
host controller will transmit data in high speed by default so if
peripheral wants to receive data in low power, the peripheral driver
should set MIPI_DSI_MODE_LPM flag.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agodrm/exynos: dsi: fix exynos_dsi_set_pll() wrong return value
YoungJun Cho [Thu, 14 Aug 2014 02:22:36 +0000 (11:22 +0900)]
drm/exynos: dsi: fix exynos_dsi_set_pll() wrong return value

The type of this function is unsigned long, and it is expected
to return proper fout value or zero if something is wrong.
So this patch fixes wrong return value for error cases.

Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
10 years agoMerge branch 'drm-next-3.18' of git://people.freedesktop.org/~agd5f/linux into drm...
Dave Airlie [Fri, 19 Sep 2014 00:41:12 +0000 (10:41 +1000)]
Merge branch 'drm-next-3.18' of git://people.freedesktop.org/~agd5f/linux into drm-next

single AGP fix

* 'drm-next-3.18' of git://people.freedesktop.org/~agd5f/linux:
  drm/radeon: fix AGP userptr handling

10 years agodrm/radeon: fix AGP userptr handling
Christian König [Wed, 17 Sep 2014 10:00:05 +0000 (04:00 -0600)]
drm/radeon: fix AGP userptr handling

AGP mappings are not cache coherent, so userptr support
won't work. Additional to that the AGP implementation uses
a different ttm_tt container structure so we run into
problems if we cast the pointer without checking if it's
the right type.

Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
10 years agoMerge branch 'drm/next/du' of git://linuxtv.org/pinchartl/fbdev into drm-next
Dave Airlie [Wed, 17 Sep 2014 09:55:19 +0000 (19:55 +1000)]
Merge branch 'drm/next/du' of git://linuxtv.org/pinchartl/fbdev into drm-next

Commit "drm/rcar-du: Use struct videomode in platform data" touches board code
in arch/arm/mach-shmobile. There is, to the best of my knowledge, no risk of
conflict for v3.18. Simon, are you fine with getting those changes merged
through Dave's tree (and could you confirm that no conflict should occur) ?

Simon acked the merge:
Acked-by: Simon Horman <horms+renesas@verge.net.au>
* 'drm/next/du' of git://linuxtv.org/pinchartl/fbdev:
  drm/rcar-du: Add OF support
  drm/rcar-du: Use struct videomode in platform data
  video: Add DT bindings for the R-Car Display Unit
  video: Add THC63LVDM83D DT bindings documentation
  video: Add ADV7123 DT bindings documentation
  video: Add DT binding documentation for VGA connector
  devicetree: Add vendor prefix "thine" to vendor-prefixes.txt
  devicetree: Add vendor prefix "mitsubishi" to vendor-prefixes.txt
  drm/shmob: Update copyright notice
  drm/rcar-du: Update copyright notice

10 years agodrm/ttm: make sure format string cannot leak in
Kees Cook [Thu, 11 Sep 2014 20:53:54 +0000 (13:53 -0700)]
drm/ttm: make sure format string cannot leak in

While zone->name is currently hard coded, the call to kobject_init_and_add()
should follow the more defensive argument list usage (as already done in
other places in ttm_memory.c) where "%s" is used instead of directly passing
in a variable as a format string.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
10 years agodrm/tilcdc: panel: Add support for enable GPIO
Ezequiel Garcia [Tue, 2 Sep 2014 12:51:22 +0000 (09:51 -0300)]
drm/tilcdc: panel: Add support for enable GPIO

In order to support the "enable GPIO" available in many panel devices,
this commit adds a proper devicetree binding.

By providing an enable GPIO in the devicetree, the driver can now turn
off and on the panel device, and/or the backlight device. Both the
backlight and the GPIO are optional properties.

Tested-by: Darren Etheridge <detheridge@ti.com>
Tested-by: Johannes Pointner <johannes.pointner@br-automation.com>
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Dave Airlie <airlied@redhat.com>
10 years agodrm/tilcdc: panel: Set return value explicitly
Ezequiel Garcia [Tue, 2 Sep 2014 12:51:21 +0000 (09:51 -0300)]
drm/tilcdc: panel: Set return value explicitly

Instead of setting an initial value for the return code, set it explicitly
on each error path. This is just a cosmetic cleanup, as preparation for the
enable GPIO support.

Tested-by: Darren Etheridge <detheridge@ti.com>
Tested-by: Johannes Pointner <johannes.pointner@br-automation.com>
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Dave Airlie <airlied@redhat.com>
10 years agodrm/tilcdc: panel: Fix backlight devicetree support
Ezequiel Garcia [Tue, 2 Sep 2014 12:51:20 +0000 (09:51 -0300)]
drm/tilcdc: panel: Fix backlight devicetree support

The current backlight support is broken; the driver expects a backlight-class
in the panel devicetree node. Fix this by implementing it properly, getting
an optional backlight from a phandle.

This shouldn't cause any backward-compatibility DT issue because the current
implementation doesn't work and is not even documented.

Tested-by: Darren Etheridge <detheridge@ti.com>
Tested-by: Johannes Pointner <johannes.pointner@br-automation.com>
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Dave Airlie <airlied@redhat.com>
10 years agodrm/tilcdc: panel: Use devm_kzalloc to simplify the error path
Ezequiel Garcia [Tue, 2 Sep 2014 12:51:19 +0000 (09:51 -0300)]
drm/tilcdc: panel: Use devm_kzalloc to simplify the error path

Using the managed variant to allocate the resource makes the code simpler
and less error-prone.

Tested-by: Darren Etheridge <detheridge@ti.com>
Tested-by: Johannes Pointner <johannes.pointner@br-automation.com>
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Dave Airlie <airlied@redhat.com>
10 years agodrm/tilcdc: panel: Spurious whitespace removal
Ezequiel Garcia [Tue, 2 Sep 2014 12:51:18 +0000 (09:51 -0300)]
drm/tilcdc: panel: Spurious whitespace removal

Just a cosmetic cleanup.

Tested-by: Darren Etheridge <detheridge@ti.com>
Tested-by: Johannes Pointner <johannes.pointner@br-automation.com>
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Dave Airlie <airlied@redhat.com>
10 years agodrm/tilcdc: panel: Remove unused variable
Ezequiel Garcia [Tue, 2 Sep 2014 12:51:17 +0000 (09:51 -0300)]
drm/tilcdc: panel: Remove unused variable

Just a trivial cleanup to remove the variable.

Tested-by: Darren Etheridge <detheridge@ti.com>
Tested-by: Johannes Pointner <johannes.pointner@br-automation.com>
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Dave Airlie <airlied@redhat.com>
10 years agodrm/tilcdc: panel: Add missing of_node_put
Ezequiel Garcia [Tue, 2 Sep 2014 12:51:16 +0000 (09:51 -0300)]
drm/tilcdc: panel: Add missing of_node_put

This commit adds the missing calls to of_node_put to release the node
that's currently held by the of_get_child_by_name() call in the panel
info parsing code.

Tested-by: Darren Etheridge <detheridge@ti.com>
Tested-by: Johannes Pointner <johannes.pointner@br-automation.com>
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Dave Airlie <airlied@redhat.com>
10 years agodrm/tilcdc: Fix the error path in tilcdc_load()
Ezequiel Garcia [Tue, 2 Sep 2014 12:51:15 +0000 (09:51 -0300)]
drm/tilcdc: Fix the error path in tilcdc_load()

The current error path calls tilcdc_unload() in case of an error to release
the resources. However, this is wrong because not all resources have been
allocated by the time an error occurs in tilcdc_load().

To fix it, this commit adds proper labels to bail out at the different
stages in the load function, and release only the resources actually allocated.

Tested-by: Darren Etheridge <detheridge@ti.com>
Tested-by: Johannes Pointner <johannes.pointner@br-automation.com>
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Dave Airlie <airlied@redhat.com>
10 years agoMerge tag 'drm-intel-next-2014-09-05' of git://anongit.freedesktop.org/drm-intel...
Dave Airlie [Tue, 16 Sep 2014 06:02:09 +0000 (16:02 +1000)]
Merge tag 'drm-intel-next-2014-09-05' of git://anongit.freedesktop.org/drm-intel into drm-next

- final bits (again) for the rotation support (Sonika Jindal)
- support bl_power in the intel backlight (Jani)
- vdd handling improvements from Ville
- i830M fixes from Ville
- piles of prep work all over to make skl enabling just plug in (Damien, Sonika)
- rename DP training defines to reflect latest edp standards, this touches all
  drm drivers supporting DP (Sonika Jindal)
- cache edids during single detect cycle to avoid re-reading it for e.g. audio,
  from Chris
- move w/a for registers which are stored in the hw context to the context init
  code (Arun&Damien)
- edp panel power sequencer fixes, helps chv a lot (Ville)
- piles of other chv fixes all over
- much more paranoid pageflip handling with stall detection and better recovery
  from Chris
- small things all over, as usual

* tag 'drm-intel-next-2014-09-05' of git://anongit.freedesktop.org/drm-intel: (114 commits)
  drm/i915: Update DRIVER_DATE to 20140905
  drm/i915: Decouple the stuck pageflip on modeset
  drm/i915: Check for a stalled page flip after each vblank
  drm/i915: Introduce a for_each_plane() macro
  drm/i915: Rewrite ABS_DIFF() in a safer manner
  drm/i915: Add comments explaining the vdd on/off functions
  drm/i915: Move DP port disable to post_disable for pch platforms
  drm/i915: Enable DP port earlier
  drm/i915: Turn on panel power before doing aux transfers
  drm/i915: Be more careful when picking the initial power sequencer pipe
  drm/i915: Reset power sequencer pipe tracking when disp2d is off
  drm/i915: Track which port is using which pipe's power sequencer
  drm/i915: Fix edp vdd locking
  drm/i915: Reset the HEAD pointer for the ring after writing START
  drm/i915: Fix unsafe vma iteration in i915_drop_caches
  drm/i915: init sprites with univeral plane init function
  drm/i915: Check of !HAS_PCH_SPLIT() in PCH transcoder funcs
  drm/i915: Use HAS_GMCH_DISPLAY un underrun reporting code
  drm/i915: Use IS_BROADWELL() instead of IS_GEN8() in forcewake code
  drm/i915: Don't call gen8_fbc_sw_flush() on chv
  ...

10 years agoMerge branch 'drm-next-ast-fixes' of ssh://people.freedesktop.org/~/linux into drm...
Dave Airlie [Tue, 16 Sep 2014 04:59:16 +0000 (14:59 +1000)]
Merge branch 'drm-next-ast-fixes' of ssh://people.freedesktop.org/~/linux into drm-next

Pull in first set of changes from Ben for ast on ppc.

I've done a quick boot test on x86 and it still seems to boot.

* 'drm-next-ast-fixes' of ssh://people.freedesktop.org/~/linux:
  drm/ast: Cleanup analog init code path
  drm/ast: Don't assume DVO enabled means SIL164 on uninitialized chips
  drm/ast: Properly initialize P2A base before using it in ast_init_3rdtx()
  drm/ast: POST chip at probe time if VGA not enabled
  drm/ast: Try to use MMIO registers when PIO isn't supported

10 years agodrm/ast: Add reduced blanking modes for wide screen mode
Y.C. Chen [Thu, 28 Aug 2014 09:11:04 +0000 (17:11 +0800)]
drm/ast: Add reduced blanking modes for wide screen mode

Signed-off-by: Egbert Eich <eich@suse.com>
Tested-by: Steven You2 Liang <liangyou2@lenovo.com>
Signed-off-by: Y.C. Chen <yc_chen@aspeedtech.com>
v3: based on [PATCH 1/2] drm/ast: Add missing entry to dclk_table[].
    Add reduced blanking modes, improve mode matching to
    identify these modes by thier sync polarities.

[airlied: argh whitespace damage]
Signed-off-by: Dave Airlie <airlied@redhat.com>
10 years agodrm: backmerge tag 'v3.17-rc5' into drm-next
Dave Airlie [Tue, 16 Sep 2014 01:28:52 +0000 (11:28 +1000)]
drm: backmerge tag 'v3.17-rc5' into drm-next

This is requested to get the fixes for intel and radeon into the
same tree for future development work.

i915_display.c: fix missing dev_priv conflict.

10 years agoMerge branch 'linux-3.18' of git://anongit.freedesktop.org/git/nouveau/linux-2.6...
Dave Airlie [Mon, 15 Sep 2014 20:20:53 +0000 (06:20 +1000)]
Merge branch 'linux-3.18' of git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-next

This is the main merge request for Nouveau 3.18, overview:
- various bits of roy's gt21x clock work
- various bits of kepler memory clock work (don't get too excited, there's at least one more major bit left that's busting higher freqs)
- misc fan control improvements
- kepler hdmi infoframe fixes
- dp audio
- l2 cache + cbc improvements

* 'linux-3.18' of git://anongit.freedesktop.org/git/nouveau/linux-2.6: (68 commits)
  drm/gt214-/disp: enable dp audio
  drm/gt214-/kms: fix hda eld regression
  drm/g94-/disp: calculate some dp audio constants
  drm/gt214-/kms: perform hda codec setup on displayport too
  drm/gk104-/disp: infoframe registers moved yet again on kepler
  drm/nouveau/bios: parse older ramcfg/timing data like we do newer ones
  drm/nva3/fb/ram: Per-partition regs
  drm/nouveau/fb/ram: Support strided regs
  drm/nv50/fb/ram: Store the number of partitions in the designated fields
  drm/nv50/kms: Set VBLANK time in modeset script
  drm/nouveau/bios: Add rammap support for version 1.0
  drm/gf100-/pwr/memx: block host and fifo around reclock
  drm/nouveau/pwr/memx: fix command ordering around block/unblock
  drm/nouveau/pwr/memx: rename fb off/on to block/unblock
  drm/nva3/clk: Pause the GPU before reclocking
  drm/nouveau/gpio: rename g92 class to g94
  drm/gk104-/fb/ram: move fb enable/disable to same place as nvidia
  drm/gk104/fb/ram: twiddle some more bits when reclocking
  drm/nouveau/bios: parse another large chunk of random memory config data
  drm/gk104-/fb/ram: perform certain steps only when bios data differs
  ...