GitHub/moto-9609/android_kernel_motorola_exynos9610.git
9 years agodrm/exynos: IOMMU support should not be selectable by user
Marek Szyprowski [Tue, 20 Jan 2015 14:31:14 +0000 (15:31 +0100)]
drm/exynos: IOMMU support should not be selectable by user

If system provides IOMMU feature, Exynos DRM should use it by default,
because the Exynos DRM subdrivers don't work correctly when Exynos IOMMU
driver has been enabled and no IOMMU support has been compiled into Exynos
DRM driver.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agodrm/exynos: add support for 'hdmi' clock
Marek Szyprowski [Mon, 2 Feb 2015 13:20:28 +0000 (14:20 +0100)]
drm/exynos: add support for 'hdmi' clock

Mixed need to have hdmi clock enabled to properly perform power on/off
sequences, so add handling of this clock directly to the mixer driver.
Dependency between hdmi clock and mixer module has been observed on
Exynos4 based boards.

Suggested-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Tested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
9 years agoMerge tag 'drm-amdkfd-next-fixes-2015-02-03' of git://people.freedesktop.org/~gabbayo...
Dave Airlie [Thu, 5 Feb 2015 00:40:10 +0000 (10:40 +1000)]
Merge tag 'drm-amdkfd-next-fixes-2015-02-03' of git://people.freedesktop.org/~gabbayo/linux into drm-next

- Fixing accounting of active queues
- Preserving a register internal state

* tag 'drm-amdkfd-next-fixes-2015-02-03' of git://people.freedesktop.org/~gabbayo/linux:
  drm/amdkfd: Preserve CP_MQD_IQ_RPTR internal state
  drm/amdkfd: Fix dqm->queue_count tracking

9 years agoMerge branch 'drm-intel-next' of git://anongit.freedesktop.org/drm-intel into drm...
Dave Airlie [Thu, 5 Feb 2015 00:32:44 +0000 (10:32 +1000)]
Merge branch 'drm-intel-next' of git://anongit.freedesktop.org/drm-intel into drm-next

drm-intel-next-2015-01-30:
- chv rps improvements from Ville
- atomic state handling prep work from Ander
- execlist request tracking refactoring from Nick Hoath
- forcewake code consolidation from Chris&Mika
- fastboot plane config refactoring and skl support from Damien
- some more skl pm patches all over (Damien)
- refactor dsi code to use drm dsi helpers and drm_panel infrastructure (Jani)
- first cut at experimental atomic plane updates (Matt Roper)
- piles of smaller things all over, as usual

* 'drm-intel-next' of git://anongit.freedesktop.org/drm-intel: (102 commits)
  drm/i915: Remove bogus locking check in the hangcheck code
  drm/i915: Update DRIVER_DATE to 20150130
  drm/i915: Use pipe_config's cpu_transcoder for reading encoder hw state
  drm/i915: Fix a use-after-free in intel_execlists_retire_requests
  drm/i915: Split shared dpll setup out of __intel_set_mode()
  drm/i915: Don't do posting reads on getting forcewake
  drm/i915: Do uncore early sanitize after domain init
  drm/i915: Handle CHV in vlv_set_rps_idle()
  drm/i915: Remove nested work in gpu error handling
  drm/i915/documentation: Add intel_uncore.c to drm.tmpl
  drm/i915/dsi: remove intel_dsi_cmd.c and the unused functions therein
  drm/i915/dsi: move dpi_send_cmd() to intel_dsi.c and make it static
  drm/i915/dsi: remove old read/write functions in favor of new stuff
  drm/i915/dsi: make the vbt panel driver use mipi_dsi_device for transfers
  drm/i915/dsi: add drm mipi dsi host support
  drm/i915/dsi: switch to drm_panel interface
  drm/i915/skl: Enabling PSR on Skylake
  Revert "drm/i915: Fix mutex->owner inspection race under DEBUG_MUTEXES"
  drm/i915: Be consistent on printing seqnos
  drm/i915: Display current hangcheck status in debugfs
  ...

9 years agodrm/i915: Remove bogus locking check in the hangcheck code
Daniel Vetter [Tue, 3 Feb 2015 10:45:40 +0000 (11:45 +0100)]
drm/i915: Remove bogus locking check in the hangcheck code

You can _never_ assert that a lock is not held, except in some very
restricted corner cases where it's guranteed that your code is running
single-threade (e.g. driver load before you've published any pointers
leading to that lock).

In addition the early return breaks a bunch of testcases since with
highly concurrent hangcheck stress tests the reset fails to work and
the test doesn't recover and time out.

This regression has been introduced in

commit b8d24a06568368076ebd5a858a011699a97bfa42
Author: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Date:   Wed Jan 28 17:03:14 2015 +0200

    drm/i915: Remove nested work in gpu error handling

Aside: It is possible to check whether a given task doesn't hold a
lock, but only when lockdep is enabled, using the lockdep_assert_held
stuff.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88908
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
9 years agodrm/modes: Print the mode status in human readable form
Ville Syrjälä [Mon, 2 Feb 2015 17:13:57 +0000 (19:13 +0200)]
drm/modes: Print the mode status in human readable form

Currently when a mode is rejected the reason is printed as a raw number.
Having to manually decode that to a enum drm_mode_status value is
tiresome. Have the code do the decoding instead and print the result
in a human readable format.

Just having an array of strings indexed with the mode status doesn't
work since the enum includes negative values. So we offset the status
by +3 which makes all the indexes non-negative. Also add a bit of
paranoia into the code to catch out of bounds accesses in case
someone adds more enum values but forgets to update the code.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
9 years agodrm: Kconfig: Let all DRM_GEM_CMA_HELPER related macros depend on HAVE_DMA_ATTRS
Chen Gang S [Sun, 1 Feb 2015 14:08:33 +0000 (22:08 +0800)]
drm: Kconfig: Let all DRM_GEM_CMA_HELPER related macros depend on HAVE_DMA_ATTRS

DRM_GEM_CMA_HELPER is depend on HAVE_DMA_ATTRS, or it will break the
building. The related error (with allmodconfig under xtensa):

    CC [M]  drivers/gpu/drm/drm_gem_cma_helper.o
  drivers/gpu/drm/drm_gem_cma_helper.c: In function 'drm_gem_cma_create':
  drivers/gpu/drm/drm_gem_cma_helper.c:110:19: error: implicit declaration of function 'dma_alloc_writecombine' [-Werror=implicit-function-declaration]
    cma_obj->vaddr = dma_alloc_writecombine(drm->dev, size,
                     ^
  drivers/gpu/drm/drm_gem_cma_helper.c:110:17: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
    cma_obj->vaddr = dma_alloc_writecombine(drm->dev, size,
                   ^
  drivers/gpu/drm/drm_gem_cma_helper.c: In function 'drm_gem_cma_free_object':
  drivers/gpu/drm/drm_gem_cma_helper.c:193:3: error: implicit declaration of function 'dma_free_writecombine' [-Werror=implicit-function-declaration]
     dma_free_writecombine(gem_obj->dev->dev, cma_obj->base.size,
     ^
  drivers/gpu/drm/drm_gem_cma_helper.c: In function 'drm_gem_cma_mmap_obj':
  drivers/gpu/drm/drm_gem_cma_helper.c:330:8: error: implicit declaration of function 'dma_mmap_writecombine' [-Werror=implicit-function-declaration]
    ret = dma_mmap_writecombine(cma_obj->base.dev->dev, vma,
          ^

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
9 years agoMerge branch 'msm-next' of git://people.freedesktop.org/~robclark/linux into drm...
Dave Airlie [Mon, 2 Feb 2015 00:53:23 +0000 (10:53 +1000)]
Merge branch 'msm-next' of git://people.freedesktop.org/~robclark/linux into drm-next

Rebase of main pull for 3.20.  There was a mid-air collision between
the bridge changes and msm eDP support.  And atomic dpms support broke
msm somewhat, due to using prepare/commit hooks in a different way.
Compared to the initial pull req, this fixes up a memory leak caused
by the bridge changes, rebases the eDP support on the bridge changes,
and migrates to the atomic dpms hooks to fix the dpms breakage.

Highlights (from original pull req):

1) YUV support for mdp4 and mdp5
2) eDP support
3) hw cursor support for mdp5[*]
4) additional hdmi support for apq8084 (snapdragon 805)
5) few bug fixes

Note that I may have a later pull to enable hdmi hpd irqs.. but
(un)fortunately I seem to have a particularly troublesome monitor..  I
managed to figure out a workaround for spurious hpd disconnect irqs
that works with some of my boards but not others, so holding off on
that patch for now.  There are also patches for HDCP support, but
those are waiting on some scm patches outside of drm so I think
waiting until 3.21 at this point.

* 'msm-next' of git://people.freedesktop.org/~robclark/linux: (22 commits)
  drm/msm: add moduleparam to disable fbdev
  drm/msm: fix build error with W=1
  drm/msm/mdp5: Fix negative SMP block allocation
  drm/msm/hdmi: disallow interlaced
  drm/msm/atomic: fix issue with gnome-shell wayland
  drm/msm/mdp5: Add hardware cursor support
  drm/msm/hdmi: rework hdmi configurations, using dt_match[]
  drm/msm/hdmi: Add HDMI platform config for apq8084
  drm/msm/hdmi: use dynamic allocation for hdmi resources
  drm/msm/mdp5: fix parameter type for mdp5_ctl_set_intf()
  drm/msm/dp: use link power helpers
  drm/msm: Add the eDP connector in msm drm driver (V2)
  drm/msm: Initial add eDP support in msm drm driver (v5)
  drm/msm/mdp4: add YUV format support
  drm/msm/mdp5: add NV12 support for MDP5
  drm/msm/mdp: add common YUV information for MDP4/MDP5
  drm/msm: update generated headers
  drm/msm: Do not BUG_ON(!spin_is_locked()) on UP
  drm/msm/hdmi: fix memory leak after bridge changes
  drm/msm: fix fallout of atomic dpms changes
  ...

9 years agodrm/msm: add moduleparam to disable fbdev
Rob Clark [Fri, 30 Jan 2015 22:05:41 +0000 (17:05 -0500)]
drm/msm: add moduleparam to disable fbdev

Useful to avoid recompiling to disable fbdev.  Useful because otherwise
the first modeset happens under console_lock (ie. debugging sadness).

Signed-off-by: Rob Clark <robdclark@gmail.com>
9 years agodrm/msm: fix build error with W=1
Rob Clark [Tue, 20 Jan 2015 18:04:12 +0000 (13:04 -0500)]
drm/msm: fix build error with W=1

Combining -Werror with all the extra warning flags that W=1 adds doesn't
go so well.  Especially because some of the warnings triggered are from
included headers.  So just drop -Werror.

Signed-off-by: Rob Clark <robdclark@gmail.com>
9 years agodrm/msm/mdp5: Fix negative SMP block allocation
Stephane Viau [Fri, 16 Jan 2015 18:22:14 +0000 (13:22 -0500)]
drm/msm/mdp5: Fix negative SMP block allocation

In case we request a number of SMP blocks which is lower than
the already reserved blocks, we should not try to allocate a
negative number, but 0 blocks instead.

Signed-off-by: Stephane Viau <sviau@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
9 years agodrm/msm/hdmi: disallow interlaced
Rob Clark [Wed, 14 Jan 2015 16:16:32 +0000 (11:16 -0500)]
drm/msm/hdmi: disallow interlaced

So after clarification from qcom, it seems mdp4 and mdp5 support
*de*interlacing but not generating an interlaced signal.  Which would
explain why interlaced modes never worked properly.

So disable in the one connector which was claiming to support
interlaced.

Signed-off-by: Rob Clark <robdclark@gmail.com>
9 years agodrm/msm/atomic: fix issue with gnome-shell wayland
Rob Clark [Mon, 12 Jan 2015 21:11:16 +0000 (16:11 -0500)]
drm/msm/atomic: fix issue with gnome-shell wayland

The gnome-shell wayland compositor triggers a setcrtc with an fb that is
still being rendered, triggering the call to _wait_fence_interruptable().
But a NULL timeout means "don't wait, return -EBUSY if not ready", which
in turn causes the setcrtc to fail.

Signed-off-by: Rob Clark <robdclark@gmail.com>
9 years agodrm/msm/mdp5: Add hardware cursor support
Beeresh Gopal [Tue, 13 Jan 2015 22:18:04 +0000 (17:18 -0500)]
drm/msm/mdp5: Add hardware cursor support

This patch implements the hardware accelarated cursor
support for MDP5 platforms.

Signed-off-by: Beeresh Gopal <gbeeresh@codeaurora.org>
Signed-off-by: Wentao Xu <wentaox@codeaurora.org>
Signed-off-by: Stephane Viau <sviau@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
9 years agodrm/msm/hdmi: rework hdmi configurations, using dt_match[]
Stephane Viau [Wed, 7 Jan 2015 21:27:27 +0000 (16:27 -0500)]
drm/msm/hdmi: rework hdmi configurations, using dt_match[]

In the same idea mdp5_cfg was added, this change allows us to quickly
add new instances, such as apq8084's HDMI in this case.

Signed-off-by: Stephane Viau <sviau@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
9 years agodrm/msm/hdmi: Add HDMI platform config for apq8084
Stephane Viau [Wed, 7 Jan 2015 21:27:26 +0000 (16:27 -0500)]
drm/msm/hdmi: Add HDMI platform config for apq8084

This change add the regulator/clock configuration for MDP5 v1.3.
This config is close to the one already existing for 8x74, except
that one more regulator is needed (hpd-5v-en).

Signed-off-by: Stephane Viau <sviau@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
9 years agodrm/msm/hdmi: use dynamic allocation for hdmi resources
Stephane Viau [Tue, 13 Jan 2015 19:33:40 +0000 (14:33 -0500)]
drm/msm/hdmi: use dynamic allocation for hdmi resources

Instead of reporting BUG_ON when resources arrays are not
dimensioned correctly, this patch does a dynamic allocation of
these arrays. This is needed for the following patches that add a
regulator for a new target.

Signed-off-by: Stephane Viau <sviau@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
9 years agodrm/msm/mdp5: fix parameter type for mdp5_ctl_set_intf()
Stephane Viau [Wed, 7 Jan 2015 21:31:42 +0000 (16:31 -0500)]
drm/msm/mdp5: fix parameter type for mdp5_ctl_set_intf()

mdp5_ctl_set_intf()'s second argument should be "int", not "enum mdp5_intf".
The passed in value is "intf", not "intf_id".

Signed-off-by: Stephane Viau <sviau@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
9 years agodrm/msm/dp: use link power helpers
Rob Clark [Tue, 2 Dec 2014 15:50:30 +0000 (10:50 -0500)]
drm/msm/dp: use link power helpers

Now that we have a helper for drm_dp_link_power_down(), use dp helpers
instead of rolling our own.

Signed-off-by: Rob Clark <robdclark@gmail.com>
9 years agodrm/msm: Add the eDP connector in msm drm driver (V2)
Hai Li [Fri, 12 Dec 2014 19:41:17 +0000 (14:41 -0500)]
drm/msm: Add the eDP connector in msm drm driver (V2)

Modified the hard-coded hdmi connector/encoder implementations in msm drm
driver to support both edp and hdmi.

V1: Initial change

V2: Address Thierry's change

Signed-off-by: Hai Li <hali@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
9 years agodrm/msm: Initial add eDP support in msm drm driver (v5)
Hai Li [Wed, 7 Jan 2015 23:47:44 +0000 (18:47 -0500)]
drm/msm: Initial add eDP support in msm drm driver (v5)

This change adds a new eDP connector in msm drm driver. With this
change, eDP panel can work with msm platform under drm framework.

v1: Initial change

v2: Address Rob's comments
    Use generated header file for register definitions
    Change to devm_* APIs

v3: Address Thierry's comments and rebase on top of atomic changes
    Remove edp_bridge_mode_fixup
    Remove backlight control code and rely on pwm-backlight
    Remove continuous splash screen support for now
    Change to gpiod_* APIs

v4: Fix kbuild test issue

Signed-off-by: Hai Li <hali@codeaurora.org>
[robclark: v5: rebase on drm_bridge changes in drm-next]
Signed-off-by: Rob Clark <robdclark@gmail.com>
9 years agodrm/msm/mdp4: add YUV format support
Beeresh Gopal [Mon, 8 Dec 2014 15:48:59 +0000 (10:48 -0500)]
drm/msm/mdp4: add YUV format support

The patch add support for YUV frame format
for MDP4 platform.

Signed-off-by: Beeresh Gopal <gbeeresh@codeaurora.org>
Signed-off-by: Stephane Viau <sviau@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
9 years agodrm/msm/mdp5: add NV12 support for MDP5
Stephane Viau [Mon, 8 Dec 2014 15:48:58 +0000 (10:48 -0500)]
drm/msm/mdp5: add NV12 support for MDP5

This change adds the NV12 format support for public planes.

Signed-off-by: Stephane Viau <sviau@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
9 years agodrm/msm/mdp: add common YUV information for MDP4/MDP5
Stephane Viau [Mon, 8 Dec 2014 15:48:57 +0000 (10:48 -0500)]
drm/msm/mdp: add common YUV information for MDP4/MDP5

Both MDP4 and MDP5 share some code as far as YUV support is
concerned. This change adds this information and will be followed
by the actual MDP4 and MDP5 YUV support patches.

Signed-off-by: Stephane Viau <sviau@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
9 years agodrm/msm: update generated headers
Rob Clark [Mon, 8 Dec 2014 16:30:02 +0000 (11:30 -0500)]
drm/msm: update generated headers

Resync from rnndb database, to pull in register defines for:
 * eDP
 * HDMI/HDCP
 * mdp4/mdp5 YUV support
 * mdp5 hw cursor support

Signed-off-by: Rob Clark <robdclark@gmail.com>
9 years agodrm/msm: Do not BUG_ON(!spin_is_locked()) on UP
Bruno Prémont [Sun, 21 Dec 2014 16:43:44 +0000 (17:43 +0100)]
drm/msm: Do not BUG_ON(!spin_is_locked()) on UP

On !SMP systems spinlocks do not exist. Thus checking of they
are active will always fail.

Use
  assert_spin_locked(lock);
instead of
  BUG_ON(!spin_is_locked(lock));
to not BUG() on all UP systems.

Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
[robclark: drop stray ')']
Signed-off-by: Rob Clark <robdclark@gmail.com>
9 years agodrm/msm/hdmi: fix memory leak after bridge changes
Rob Clark [Sat, 31 Jan 2015 16:45:09 +0000 (11:45 -0500)]
drm/msm/hdmi: fix memory leak after bridge changes

3d3f8b1f8b ("drm/bridge: make bridge registration independent of drm
flow") resulted that the hdmi bridge object would be leaked at teardown.
Just switch over to devm_kzalloc() as the easy way to solve this.

Signed-off-by: Rob Clark <robdclark@gmail.com>
9 years agodrm/msm: fix fallout of atomic dpms changes
Rob Clark [Fri, 30 Jan 2015 22:04:45 +0000 (17:04 -0500)]
drm/msm: fix fallout of atomic dpms changes

As a result of atomic DPMS support, the various prepare/commit hooks get
called in a way that msm dislikes.  We were expecting prepare/commit to
bracket a modeset, which is no longer the case.  This was needed to hold
various extra clk's (such as interface clks) on while we are touching
registers, and in the case of mdp4 holding vblank enabled.

The most straightforward way to deal with this, since we already have
our own atomic_commit(), is to just handle prepare/commit internally to
the driver (with some additional vfuncs for mdp4 vs mdp5), and switch
everything over to instead use the new enable/disable hooks.  It doesn't
really change too much, despite the code motion.  What used to be in the
encoder/crtc dpms() fxns is split out into enable/disable.

We should be able to drop our own enable-state tracking, as the atomic
helpers should do this for us.  But keeping that for the short term for
extra debugging as atomic stablizes.

Signed-off-by: Rob Clark <robdclark@gmail.com>
9 years agodrm/msm: Remove CRTC .mode_set and .mode_set_base helpers
Laurent Pinchart [Sun, 25 Jan 2015 20:13:56 +0000 (22:13 +0200)]
drm/msm: Remove CRTC .mode_set and .mode_set_base helpers

Only the legacy helpers use these entry points.  Don't populate them
with transitional helpers, since that just makes things more confusing.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
[robclark: reword commit msg]
Signed-off-by: Rob Clark <robdclark@gmail.com>
9 years agodrm/dp: add drm_dp_link_power_down() helper
Rob Clark [Tue, 2 Dec 2014 15:43:07 +0000 (10:43 -0500)]
drm/dp: add drm_dp_link_power_down() helper

We had _power_up(), but drivers also need to be able to power down.

Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
9 years agodrm: atmel-hlcdc: Add dependency on ARM
Boris Brezillon [Fri, 23 Jan 2015 20:03:02 +0000 (21:03 +0100)]
drm: atmel-hlcdc: Add dependency on ARM

The atmel-hlcdc driver selects DRM_GEM_CMA_HELPER which makes use of
symbols only available when HAVE_DMA_ATTRS is selected.
Add a dependency on the ARM architecture which select this option.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Dave Airlie <airlied@gmail.com>
9 years agodrm: msm: add missing dependencies on OF and COMMON_CLK
Arnd Bergmann [Wed, 28 Jan 2015 13:48:09 +0000 (14:48 +0100)]
drm: msm: add missing dependencies on OF and COMMON_CLK

The msm gpu drivers depend on both the DT mechanism and the
common clk handling code, if they are not enabled, we get
a number of build errors:

In file included from drivers/gpu/drm/msm/hdmi/hdmi.h:27:0,
                 from drivers/gpu/drm/msm/hdmi/hdmi_bridge.c:18:
drivers/gpu/drm/msm/msm_drv.h:45:24: fatal error: mach/board.h: No such file or directory
 #include <mach/board.h>
                        ^

drivers/gpu/drm/msm/hdmi/hdmi_phy_8960.c:503:2: error: implicit declaration of function 'devm_clk_register' [-Werror=implicit-function-declaration]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Dave Airlie <airlied@gmail.com>
9 years agodrm/udl: properly set active_16 flag in udl_crtc_page_flip(). (v2)
Haixia Shi [Fri, 30 Jan 2015 18:57:27 +0000 (10:57 -0800)]
drm/udl: properly set active_16 flag in udl_crtc_page_flip(). (v2)

When page flipping, we need to mark the new fb as active and unmark the active
flag for the old fb (if different).

Signed-off-by: Haixia Shi <hshi@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Signed-off-by: Dave Airlie <airlied@gmail.com>
9 years agodrm: shmobile: fix Kconfig dependencies
Arnd Bergmann [Thu, 29 Jan 2015 16:16:38 +0000 (17:16 +0100)]
drm: shmobile: fix Kconfig dependencies

The shmobile drm driver selects BACKLIGHT_CLASS_DEVICE
as of 0a5a5499ad88 "drm: shmobile: Add dependency on
BACKLIGHT_CLASS_DEVICE", but that option in turn depends
on BACKLIGHT_LCD_SUPPORT, so we actually have to select
both, or alternatively use 'depends on BACKLIGHT_CLASS_DEVICE'.

Further, the driver uses FB_SH_MOBILE_MERAM if that is
enabled, but this breaks if MERAM is a module while
the DRM driver is built-in. To solve this, add a dependency
on "FB_SH_MOBILE_MERAM || !FB_SH_MOBILE_MERAM", which forces
DRM_SHMOBILE to be a module if FB_SH_MOBILE_MERAM set to 'm'.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Dave Airlie <airlied@gmail.com>
9 years agodrm: sti: add panel dependency
Arnd Bergmann [Wed, 28 Jan 2015 13:48:08 +0000 (14:48 +0100)]
drm: sti: add panel dependency

The newly added sti driver requires the drm_panel helpers,
and we get a link error if they are not enabled

ERROR: "drm_panel_attach" [drivers/gpu/drm/sti/stidvo.ko] undefined!
ERROR: "of_drm_find_panel" [drivers/gpu/drm/sti/stidvo.ko] undefined!

This adds a 'select' statement as we have for the other drivers.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Dave Airlie <airlied@gmail.com>
9 years agodrm: rockchip: add reset controller dependency
Arnd Bergmann [Wed, 28 Jan 2015 13:48:07 +0000 (14:48 +0100)]
drm: rockchip: add reset controller dependency

When the reset controller subsystem is disabled, this driver
fails to build:

drivers/gpu/drm/rockchip/rockchip_drm_vop.c: In function 'vop_initial':
drivers/gpu/drm/rockchip/rockchip_drm_vop.c:1267:2: error: implicit declaration of function 'devm_reset_control_get' [-Werror=implicit-function-declaration]

The easiest solution is to add a dependency in Kconfig to avoid
that case.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Dave Airlie <airlied@gmail.com>
9 years agodrm: panel/simple: add backlight dependency
Arnd Bergmann [Wed, 28 Jan 2015 13:48:06 +0000 (14:48 +0100)]
drm: panel/simple: add backlight dependency

The simple panel code uses the backlight interface to
find a device, which fails when backlight is disabled:

drivers/built-in.o: In function `panel_simple_platform_probe':
:(.text+0xd3c48): undefined reference to `of_find_backlight_by_node'

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Dave Airlie <airlied@gmail.com>
9 years agodrm: panel/sharp: add backlight dependency
Arnd Bergmann [Wed, 28 Jan 2015 13:48:05 +0000 (14:48 +0100)]
drm: panel/sharp: add backlight dependency

The sharp panel code uses the backlight interface to
find a device, which fails when backlight is disabled:

drivers/built-in.o: In function `sharp_panel_probe':
:(.text+0x5ceac): undefined reference to `of_find_backlight_by_node'

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Dave Airlie <airlied@gmail.com>
9 years agodrm/udl: optimize udl_compress_hline16 (v2)
Haixia Shi [Fri, 30 Jan 2015 18:51:14 +0000 (10:51 -0800)]
drm/udl: optimize udl_compress_hline16 (v2)

The run-length encoding algorithm should compare 16-bit encoded pixel
values instead of comparing raw pixel values. It allows pixels
with similar but different colors to be encoded as repeat pixels, and
thus potentially save USB bandwidth.

Signed-off-by: Haixia Shi <hshi@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Haixia Shi <hshi@chromium.org>
Signed-off-by: Dave Airlie <airlied@gmail.com>
9 years agodrm/i915: Update DRIVER_DATE to 20150130
Daniel Vetter [Fri, 30 Jan 2015 21:37:54 +0000 (22:37 +0100)]
drm/i915: Update DRIVER_DATE to 20150130

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Use pipe_config's cpu_transcoder for reading encoder hw state
Ander Conselvan de Oliveira [Fri, 30 Jan 2015 10:17:23 +0000 (12:17 +0200)]
drm/i915: Use pipe_config's cpu_transcoder for reading encoder hw state

The get_config() functions for ddi and dp_mst, used to read the value
of cpu_transcoder from the crtc->config instead of the state passed as
an argument. On the hardware state readout path, that happens to work
since the proper value is written to it before encoder->get_config() is
called. However, in the check_crtc() path, the state will be read from
the cpu_transcoder in the software tracking, instead of the one just
read out from hw. Using the field in the supplied intel_crtc_state
should do the right thing in both cases.

v2: Fix intel_ddi_get_config() too. (Ander)

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Fix a use-after-free in intel_execlists_retire_requests
Nick Hoath [Thu, 29 Jan 2015 16:55:07 +0000 (16:55 +0000)]
drm/i915: Fix a use-after-free in intel_execlists_retire_requests

Remove request from list before unreferencing it, in case it's actually
the only reference. (Found by Tvrtko Ursulin)

This issue has been most likely introduced in

commit 6d3d8274bc45de4babb62d64562d92af984dd238
Author: Nick Hoath <nicholas.hoath@intel.com>
Date:   Thu Jan 15 13:10:39 2015 +0000

    drm/i915: Subsume intel_ctx_submit_request in to drm_i915_gem_request

Signed-off-by: Nick Hoath <nicholas.hoath@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Split shared dpll setup out of __intel_set_mode()
Ander Conselvan de Oliveira [Thu, 29 Jan 2015 14:55:08 +0000 (16:55 +0200)]
drm/i915: Split shared dpll setup out of __intel_set_mode()

This simplifies __intel_set_mode() a little.

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Don't do posting reads on getting forcewake
Mika Kuoppala [Wed, 28 Jan 2015 13:25:05 +0000 (15:25 +0200)]
drm/i915: Don't do posting reads on getting forcewake

The checking for ack and also any subsequent mmio access
will serialize with setting the forcewake bit. Drop the
posting read as superfluous.

Note that in the put side we still want to keep the posting read
as it will ensure that the hw sees our forcewake release in a
timely manner and doesn't keep the hw powered up.

Comment from Chris:

On Wed, Jan 28, 2015 at 05:54:14PM +0200, Mika Kuoppala wrote:
> Ville Syrjälä <ville.syrjala@linux.intel.com> writes:
> > IIRC the posting read from same cache line actually fixed real bugs. So
> > I'm a bit worried about dropping them. But I suppose it's possible only
> > the _put side was important for those bugs.
>
> I found these:
>
> commit 6af2d180f82151cf3d58952e35a4f96e45bc453a
> Author: Daniel Vetter <daniel.vetter@ffwll.ch>
> Date:   Thu Jul 26 16:24:50 2012 +0200
>
>     drm/i915: fix forcewake related hangs on snb
>
> commit 8dee3eea3ccd3b6c00a8d3a08dd715d6adf737dd
> Author: Ben Widawsky <ben@bwidawsk.net>
> Date:   Sat Sep 1 22:59:50 2012 -0700
>
>     drm/i915: Never read FORCEWAKE
>
> https://bugs.freedesktop.org/show_bug.cgi?id=51738
> https://bugs.freedesktop.org/show_bug.cgi?id=52424
>
> The snb here seems to survive gem_dummy_reloc_loop and
> gem_ring_sync_loop in here with the get side posting removed.

Note that we kept the once associated with #52424, but judging by my
comments in #51738 the posting read is just a band aid anyway as a full
mb() itself was not adequate.

Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
[danvet: paste relevant review discussion in.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Do uncore early sanitize after domain init
Mika Kuoppala [Wed, 28 Jan 2015 12:43:24 +0000 (14:43 +0200)]
drm/i915: Do uncore early sanitize after domain init

intel_uncore_early_sanitize() will reset the forcewake registers. When
forcewake domains were introduced, the domain init was done after the
sanitization of the forcewake registers. And as the resetting of
registers use the domain accessors, we tried to reset the forcewake
registers with unitialized forcewake domains and failed.

Fix this by sanitizing after all the domains have been initialized. Do
per domain clearing of forcewake register on domain init so that
IVB can do early access to ECOBUS do determine the final configuration.

This regression was introduced in

commit 05a2fb157e44a53c79133805d30eaada43911941
Author: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Date:   Mon Jan 19 16:20:43 2015 +0200

    drm/i915: Consolidate forcewake code

v2: Carve out ellc detect, fw_domain_reset for ivb/ecobus (Chris)

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88805
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reported-by: Olof Johansson <olof@lixom.net>
Tested-by: Darren Hart <dvhart@linux.intel.com> (v1)
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Handle CHV in vlv_set_rps_idle()
Ville Syrjälä [Tue, 27 Jan 2015 14:36:15 +0000 (16:36 +0200)]
drm/i915: Handle CHV in vlv_set_rps_idle()

Move the CHV check into vlv_set_rps_idle() to simplify the caller a bit.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Remove nested work in gpu error handling
Mika Kuoppala [Wed, 28 Jan 2015 15:03:14 +0000 (17:03 +0200)]
drm/i915: Remove nested work in gpu error handling

Now when we declare gpu errors only through our own dedicated
hangcheck workqueue there is no need to have a separate workqueue
for handling the resetting and waking up the clients as the deadlock
concerns are no more.

The only exception is i915_debugfs::i915_set_wedged, which triggers
error handling through process context. However as this is only used through
test harness it is responsibility for test harness not to introduce hangs
through both debug interface and through hangcheck mechanism at the same time.

Remove gpu_error.work and let the hangcheck work do the tasks it used to.

v2: Add a big warning sign into i915_debugfs::i915_set_wedged (Chris)

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915/documentation: Add intel_uncore.c to drm.tmpl
Mika Kuoppala [Wed, 28 Jan 2015 15:47:58 +0000 (17:47 +0200)]
drm/i915/documentation: Add intel_uncore.c to drm.tmpl

Include intel_uncore.c in template for it to include d
documentation for intel_uncore_forcewake_get and *_put.

Cc: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915/dsi: remove intel_dsi_cmd.c and the unused functions therein
Jani Nikula [Fri, 16 Jan 2015 12:27:27 +0000 (14:27 +0200)]
drm/i915/dsi: remove intel_dsi_cmd.c and the unused functions therein

The removed functions can be resurrected in intel_dsi.c as need arises.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-By: Shobhit Kumar <shobhit.kumar@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915/dsi: move dpi_send_cmd() to intel_dsi.c and make it static
Jani Nikula [Fri, 16 Jan 2015 12:27:26 +0000 (14:27 +0200)]
drm/i915/dsi: move dpi_send_cmd() to intel_dsi.c and make it static

No functional changes.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-By: Shobhit Kumar <shobhit.kumar@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915/dsi: remove old read/write functions in favor of new stuff
Jani Nikula [Fri, 16 Jan 2015 12:27:25 +0000 (14:27 +0200)]
drm/i915/dsi: remove old read/write functions in favor of new stuff

All of these are replaced by the drm core mipi dsi functions.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-By: Shobhit Kumar <shobhit.kumar@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915/dsi: make the vbt panel driver use mipi_dsi_device for transfers
Jani Nikula [Fri, 16 Jan 2015 12:27:24 +0000 (14:27 +0200)]
drm/i915/dsi: make the vbt panel driver use mipi_dsi_device for transfers

Use the drm core interfaces in preparation of removing our homebrew.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-By: Shobhit Kumar <shobhit.kumar@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915/dsi: add drm mipi dsi host support
Jani Nikula [Fri, 16 Jan 2015 12:27:23 +0000 (14:27 +0200)]
drm/i915/dsi: add drm mipi dsi host support

Add basic support for using the drm mipi dsi framework for DSI. We don't
use device tree which is pretty much required by mipi_dsi_host_register
and friends, and we don't have the kind of device model the functions
expect either. So we cheat and use it as a library to abstract what we
need: a nice, clean interface for DSI transfers. This means we will have
to be careful with what functions we call, as the driver model devices
in mipi_dsi_host and mipi_dsi_device will *not* be initialized.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-By: Shobhit Kumar <shobhit.kumar@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915/dsi: switch to drm_panel interface
Jani Nikula [Fri, 23 Jan 2015 13:30:56 +0000 (15:30 +0200)]
drm/i915/dsi: switch to drm_panel interface

Replace intel_dsi_device and intel_dsi_dev_ops with drm_panel and
drm_panel_funcs. They are adequate for what we have now, and if we end
up needing more than this we should improve drm_panel. This will keep us
better aligned with the drm core infrastructure.

The panel driver initialization changes a bit. It still remains hideous,
but fixing that is beyond the scope here.

v2: extend mode config mutex to cover drm_panel_get_modes (Shobhit)
    vbt_panel->intel_dsi = intel_dsi in vbt panel init (Shobhit)

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-By: Shobhit Kumar <shobhit.kumar@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agoagp: change agp_free_page_array to use kvfree
Wang, Yalin [Wed, 28 Jan 2015 05:57:34 +0000 (13:57 +0800)]
agp: change agp_free_page_array to use kvfree

Change agp_free_page_array to use kvfree function,
remove the duplicated code.

Signed-off-by: Yalin Wang <yalin.wang@sonymobile.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
9 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux...
Dave Airlie [Thu, 29 Jan 2015 01:45:31 +0000 (11:45 +1000)]
Merge branch 'master' of git://git./linux/kernel/git/torvalds/linux into drm-next

This backmerges drm-fixes into drm-next mainly for the amdkfd
stuff, I'm not 100% confident, but it builds and the amdkfd
folks can fix anything up.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Conflicts:
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h

9 years agoMerge tag 'drm/panel/for-3.20-rc1' of git://anongit.freedesktop.org/tegra/linux into...
Dave Airlie [Thu, 29 Jan 2015 01:29:35 +0000 (11:29 +1000)]
Merge tag 'drm/panel/for-3.20-rc1' of git://anongit.freedesktop.org/tegra/linux into drm-next

drm/panel: Changes for v3.20-rc1

This contains the long-awaited drm_bridge series that makes Chromebooks
work for people. I had thought this would've been perfect by now, but
then I go and build test it and the first thing it does is yell about a
recursive dependency. I fixed that up because I was feeling bad for not
getting around to look at this earlier.

Biseds that there is new support for two more panels, a couple of fixup
patches to the Sharp LQ101R1SX01 dual-channel DSI panel driver and a
potential NULL pointer dereference fix.

* tag 'drm/panel/for-3.20-rc1' of git://anongit.freedesktop.org/tegra/linux: (23 commits)
  drm/bridge: dw-hdmi: Adapt to bridge API change
  drm/sti: fixup for bridge interface
  drm/bridge: dw-hdmi: Fix return error path
  drm: Check the right variable when setting formats
  Documentation: bridge: Add documentation for ps8622 DT properties
  Documentation: devicetree: Add vendor prefix for parade
  Documentation: drm: bridge: move to video/bridge
  drm/bridge: ptn3460: use gpiod interface
  drm/bridge: ptn3460: probe connector at the end of bridge attach
  drm/bridge: ptn3460: support drm_panel
  drm/exynos: dp: support drm_bridge
  drm/bridge: ptn3460: Convert to I2C driver model
  drm/bridge: make bridge registration independent of drm flow
  drm/bridge: do not pass drm_bridge_funcs to drm_bridge_init
  drm/bridge: ptn3460: Few trivial cleanups
  drm/panel: simple: Add AVIC TM070DDH03 panel support
  of: Add vendor prefix for Shanghai AVIC Optoelectronics Co., Ltd.
  drm/panel: sharp: lq101r1sx01: Remove unneeded include
  drm/panel: sharp: lq101r1sx01: Respect power timings
  drm/panel: sharp: lq101r1sx01: Add delay after display on
  ...

9 years agodrm/i915/skl: Enabling PSR on Skylake
Sonika Jindal [Thu, 22 Jan 2015 09:00:54 +0000 (14:30 +0530)]
drm/i915/skl: Enabling PSR on Skylake

Mainly taking care of some register offsets, otherwise things are similar to
hsw. Also, programming ddi aux to use hardcoded values for psr data select.

v2: introduce  EDP_PSR_AUX_BASE macro (Chris)
v3: Moving to HW tracking for SKL+ platforms, so activating source psr during
psr_enabling and then avoiding psr entries and exits for each frontbuffer
updates.
v4: Using SKL DDI AUX regs instead of changing PSR_AUX regs definition (Rodrigo)

Signed-off-by: Sonika Jindal <sonika.jindal@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
[danvet: Drop the hunks to short-circuit sw tracking: We'd need to
push this down one level, and I don't fully trust the test coverage
yet to do so. So much prefer we pick a whitelist approach for the
cases we know work correctly.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agoRevert "drm/i915: Fix mutex->owner inspection race under DEBUG_MUTEXES"
Chris Wilson [Mon, 26 Jan 2015 12:43:22 +0000 (04:43 -0800)]
Revert "drm/i915: Fix mutex->owner inspection race under DEBUG_MUTEXES"

The core fix was applied in

commit a63b03e2d2477586440741677ecac45bcf28d7b1
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Jan 6 10:29:35 2015 +0000

    mutex: Always clear owner field upon mutex_unlock()

(note the absence of stable@ tag)

so we can now revert our band-aid commit 226e5ae9e5f910 for -next.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Be consistent on printing seqnos
Mika Kuoppala [Mon, 26 Jan 2015 16:03:06 +0000 (18:03 +0200)]
drm/i915: Be consistent on printing seqnos

We have had %x and %u intermixed. Bring everything in line and
use %x

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Display current hangcheck status in debugfs
Chris Wilson [Mon, 26 Jan 2015 16:03:04 +0000 (18:03 +0200)]
drm/i915: Display current hangcheck status in debugfs

For example,

/sys/kernel/debug/dri/0/i915_hangcheck_info:

Hangcheck active, fires in 15887800ms
render ring:
        seqno = -4059 [current -583]
        action = 2
        score = 0
        ACTHD = 1ee8 [current 21f980]
        max ACTHD = 0

v2: Include expiration ETA. Can anyone spot a problem?
v3: Convert for workqueued hangcheck (Mika)
v4: Print seqnos as unsigned ints (Ville)
v5: Print seqnos as hex (Chris)

Tested-By: PRC QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com) (v2)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (v2)
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/i915: Convert hangcheck from a timer into a delayed work item
Chris Wilson [Mon, 26 Jan 2015 16:03:03 +0000 (18:03 +0200)]
drm/i915: Convert hangcheck from a timer into a delayed work item

When run as a timer, i915_hangcheck_elapsed() must adhere to all the
rules of running in a softirq context. This is advantageous to us as we
want to minimise the risk that a driver bug will prevent us from
detecting a hung GPU. However, that is irrelevant if the driver bug
prevents us from resetting and recovering. Still it is prudent not to
rely on mutexes inside the checker, but given the coarseness of
dev->struct_mutex doing so is extremely hard.

Give in and run from a work queue, i.e. outside of softirq.

v2: Use own workqueue to avoid deadlocks (Daniel)
    Cleanup commit msg and add comment to i915_queue_hangcheck() (Chris)

Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Daniel Vetter <dnaiel.vetter@ffwll.chm>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (v1)
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
[danvet: Remove accidental kerneldoc comment starter, to appease the 0
day builder.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agoagp/intel: Serialise after GTT updates
Chris Wilson [Mon, 26 Jan 2015 10:47:10 +0000 (10:47 +0000)]
agp/intel: Serialise after GTT updates

An interesting bug occurs on Pineview through which the root cause is
that the writes of the PTE values into the GTT is not serialised with
subsequent memory access through the GTT (when using WC updates of the
PTE values). This is despite there being a posting read after the GTT
update. However, by changing the address of the posting read, the memory
access is indeed serialised correctly.

Whilst we are manipulating the memory barriers, we can remove the
compiler :memory restraint on the intermediate PTE writes knowing that
we explicitly perform a posting read afterwards.

v2: Replace posting reads with explicit write memory barriers - in
particular this is advantages in case of single page objects. Update
comments to mention this issue is only with WC writes.

Testcase: igt/gem_exec_big #pnv
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88191
Tested-by: huax.lu@intel.com (v1)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/bridge: dw-hdmi: Adapt to bridge API change
Fabio Estevam [Tue, 27 Jan 2015 12:21:49 +0000 (10:21 -0200)]
drm/bridge: dw-hdmi: Adapt to bridge API change

Commit fbc4572e9c48e45b ("drm/bridge: make bridge registration independent of
drm flow") introduced some drm/bridge API modifications. Make the necessary
changes so that we can avoid the build breakage:

drivers/gpu/drm/bridge/dw_hdmi.c: In function 'dw_hdmi_bridge_destroy':
drivers/gpu/drm/bridge/dw_hdmi.c:1378:2: error: implicit declaration of function 'drm_bridge_cleanup' [-Werror=implicit-function-declaration]
drivers/gpu/drm/bridge/dw_hdmi.c: At top level:
drivers/gpu/drm/bridge/dw_hdmi.c:1471:2: error: unknown field 'destroy' specified in initializer
drivers/gpu/drm/bridge/dw_hdmi.c: In function 'dw_hdmi_register':
drivers/gpu/drm/bridge/dw_hdmi.c:1535:2: error: implicit declaration of function 'drm_bridge_init' [-Werror=implicit-function-declaration]

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
9 years agodrm/sti: fixup for bridge interface
Dave Airlie [Mon, 26 Jan 2015 23:37:03 +0000 (09:37 +1000)]
drm/sti: fixup for bridge interface

So sti doesn't build because the bridge interfaces changes didn't
catch up to its new DVO driver.

Now I might just carry this patch, but I might just push the
bridge pull into a side-pull until someone resolves it.

So this might not be the right solution to the problem, so
please figure it out and let me know ASAP.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
9 years agodrm/bridge: dw-hdmi: Fix return error path
Fabio Estevam [Tue, 27 Jan 2015 12:54:12 +0000 (10:54 -0200)]
drm/bridge: dw-hdmi: Fix return error path

If devm_request_threaded_irq() fails we should jump to 'err_iahb' label that
will disable the clocks that were previously enabled.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Thierry Reding <treding@nvidia.com>
9 years agodrm: Check the right variable when setting formats
Dan Carpenter [Wed, 28 Jan 2015 06:43:35 +0000 (09:43 +0300)]
drm: Check the right variable when setting formats

When setting the video bus supported formats for a display device using
drm_display_info_set_bus_formats(), check for the proper variable after
duplicating memory.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
9 years agoDocumentation: bridge: Add documentation for ps8622 DT properties
Ajay Kumar [Tue, 20 Jan 2015 16:38:52 +0000 (22:08 +0530)]
Documentation: bridge: Add documentation for ps8622 DT properties

Add documentation for DT properties supported by ps8622/ps8625
eDP-LVDS converter.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
Tested-by: Rahul Sharma <rahul.sharma@samsung.com>
Tested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Tested-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Tested-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Signed-off-by: Thierry Reding <treding@nvidia.com>
9 years agoDocumentation: devicetree: Add vendor prefix for parade
Ajay Kumar [Tue, 20 Jan 2015 16:38:51 +0000 (22:08 +0530)]
Documentation: devicetree: Add vendor prefix for parade

ps8622 eDP-LVDS converter bridge chip is from parade technologies

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
Tested-by: Rahul Sharma <rahul.sharma@samsung.com>
Tested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Tested-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Tested-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Signed-off-by: Thierry Reding <treding@nvidia.com>
9 years agoDocumentation: drm: bridge: move to video/bridge
Ajay Kumar [Tue, 20 Jan 2015 16:38:50 +0000 (22:08 +0530)]
Documentation: drm: bridge: move to video/bridge

Move drm/bridge documentation to video/bridge.
Also, add proper documentation for gpios used by ptn3460.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
Tested-by: Rahul Sharma <rahul.sharma@samsung.com>
Tested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Tested-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Tested-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Signed-off-by: Thierry Reding <treding@nvidia.com>
9 years agodrm/bridge: ptn3460: use gpiod interface
Ajay Kumar [Tue, 20 Jan 2015 16:38:49 +0000 (22:08 +0530)]
drm/bridge: ptn3460: use gpiod interface

Modify driver to support gpiod interface.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
Tested-by: Rahul Sharma <rahul.sharma@samsung.com>
Tested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Tested-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Tested-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Signed-off-by: Thierry Reding <treding@nvidia.com>
9 years agodrm/bridge: ptn3460: probe connector at the end of bridge attach
Ajay Kumar [Tue, 20 Jan 2015 16:38:48 +0000 (22:08 +0530)]
drm/bridge: ptn3460: probe connector at the end of bridge attach

Force bridge connector detection at the end of the bridge attach.
This is needed to detect the bridge connector early.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
Tested-by: Rahul Sharma <rahul.sharma@samsung.com>
Tested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Tested-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Tested-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Signed-off-by: Thierry Reding <treding@nvidia.com>
9 years agodrm/bridge: ptn3460: support drm_panel
Ajay Kumar [Tue, 20 Jan 2015 16:38:47 +0000 (22:08 +0530)]
drm/bridge: ptn3460: support drm_panel

Add drm_panel calls to the driver to make the panel and
bridge work together in tandem.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
Tested-by: Rahul Sharma <rahul.sharma@samsung.com>
Tested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Tested-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Tested-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Signed-off-by: Thierry Reding <treding@nvidia.com>
9 years agodrm/exynos: dp: support drm_bridge
Ajay Kumar [Tue, 20 Jan 2015 16:38:46 +0000 (22:08 +0530)]
drm/exynos: dp: support drm_bridge

Modify driver to support drm_bridge.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Tested-by: Rahul Sharma <rahul.sharma@samsung.com>
Tested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Tested-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Tested-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Signed-off-by: Thierry Reding <treding@nvidia.com>
9 years agodrm/bridge: ptn3460: Convert to I2C driver model
Ajay Kumar [Tue, 20 Jan 2015 16:38:45 +0000 (22:08 +0530)]
drm/bridge: ptn3460: Convert to I2C driver model

Use drm_bridge helpers to modify the driver to support I2C driver model.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
Tested-by: Rahul Sharma <rahul.sharma@samsung.com>
Tested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Tested-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Tested-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
[treding@nvidia.com: remove recursive dependency on I2C]
Signed-off-by: Thierry Reding <treding@nvidia.com>
9 years agodrm/bridge: make bridge registration independent of drm flow
Ajay Kumar [Tue, 20 Jan 2015 16:38:44 +0000 (22:08 +0530)]
drm/bridge: make bridge registration independent of drm flow

Currently, third party bridge drivers(ptn3460) are dependent
on the corresponding encoder driver init, since bridge driver
needs a drm_device pointer to finish drm initializations.
The encoder driver passes the drm_device pointer to the
bridge driver. Because of this dependency, third party drivers
like ptn3460 doesn't adhere to the driver model.

In this patch, we reframe the bridge registration framework
so that bridge initialization is split into 2 steps, and
bridge registration happens independent of drm flow:
--Step 1: gather all the bridge settings independent of drm and
  add the bridge onto a global list of bridges.
--Step 2: when the encoder driver is probed, call drm_bridge_attach
  for the corresponding bridge so that the bridge receives
  drm_device pointer and continues with connector and other
  drm initializations.

The old set of bridge helpers are removed, and a set of new helpers
are added to accomplish the 2 step initialization.

The bridge devices register themselves onto global list of bridges
when they get probed by calling "drm_bridge_add".

The parent encoder driver waits till the bridge is available
in the lookup table(by calling "of_drm_find_bridge") and then
continues with its initialization.

The encoder driver should also call "drm_bridge_attach" to pass
on the drm_device to the bridge object.

drm_bridge_attach inturn calls "bridge->funcs->attach" so that
bridge can continue with drm related initializations.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
Tested-by: Rahul Sharma <rahul.sharma@samsung.com>
Tested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Tested-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Tested-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Signed-off-by: Thierry Reding <treding@nvidia.com>
9 years agodrm/bridge: do not pass drm_bridge_funcs to drm_bridge_init
Ajay Kumar [Tue, 20 Jan 2015 16:38:43 +0000 (22:08 +0530)]
drm/bridge: do not pass drm_bridge_funcs to drm_bridge_init

Assign the pointer to bridge ops structure(drm_bridge_funcs) in
the bridge driver itself, instead of passing it to drm_bridge_init.

This will allow bridge driver developer to pack bridge private
information inside the bridge object and pass only the drm-relevant
information to drm_bridge_init.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
Tested-by: Rahul Sharma <rahul.sharma@samsung.com>
Tested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Tested-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Tested-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Signed-off-by: Thierry Reding <treding@nvidia.com>
9 years agodrm/bridge: ptn3460: Few trivial cleanups
Ajay Kumar [Tue, 20 Jan 2015 16:38:42 +0000 (22:08 +0530)]
drm/bridge: ptn3460: Few trivial cleanups

This patch does the following changes:
-- Use usleep_range instead of udelay.
-- Remove driver_private member from ptn3460 structure.
-- Make all possible functions and structures static.
-- Use dev_err for non-DRM errors.
-- Arrange header files alphabetically.
-- s/edid/EDID in all error messages.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
Tested-by: Rahul Sharma <rahul.sharma@samsung.com>
Tested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Tested-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Tested-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Signed-off-by: Thierry Reding <treding@nvidia.com>
9 years agodrm/panel: simple: Add AVIC TM070DDH03 panel support
Philipp Zabel [Thu, 18 Dec 2014 15:43:43 +0000 (16:43 +0100)]
drm/panel: simple: Add AVIC TM070DDH03 panel support

The Shanghai AVIC Optoelectronics TM070DDH03 is a 7" 1024x600 TFT LCD
panel connecting to a 24-bit RGB LVDS interface.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Thierry Reding <treding@nvidia.com>
9 years agoof: Add vendor prefix for Shanghai AVIC Optoelectronics Co., Ltd.
Philipp Zabel [Thu, 18 Dec 2014 15:43:42 +0000 (16:43 +0100)]
of: Add vendor prefix for Shanghai AVIC Optoelectronics Co., Ltd.

Shanghai AVIC Optoelectronics Co., Ltd. is a subsidiary of Tianma
Microelectronics Co., Ltd. and designs and manufactures TFT LCDs.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
9 years agodrm/panel: sharp: lq101r1sx01: Remove unneeded include
Thierry Reding [Thu, 18 Dec 2014 16:11:47 +0000 (17:11 +0100)]
drm/panel: sharp: lq101r1sx01: Remove unneeded include

Nothing in the file needs symbols from include/linux/host1x.h, so remove
the include.

Signed-off-by: Thierry Reding <treding@nvidia.com>
9 years agodrm/panel: sharp: lq101r1sx01: Respect power timings
Thierry Reding [Mon, 8 Dec 2014 14:38:17 +0000 (15:38 +0100)]
drm/panel: sharp: lq101r1sx01: Respect power timings

Before shutting down the display using the DCS display_off command, wait
for 4 frames according to the datasheet.

Furthermore, after enabling the power supply, the supply voltage needs
around 10 ms to settle. After that, another 120 ms is required before a
DCS exit_sleep_mode command can be sent.

While at it, no longer send the DCS soft_reset command. This is totally
unnecessary because we've just powered up the display, hence it will be
in a reset state already.

Signed-off-by: Thierry Reding <treding@nvidia.com>
9 years agodrm/panel: sharp: lq101r1sx01: Add delay after display on
Thierry Reding [Mon, 8 Dec 2014 14:05:48 +0000 (15:05 +0100)]
drm/panel: sharp: lq101r1sx01: Add delay after display on

After switching the display on (using the DCS display_on command), wait
for 6 frames (100ms at 60 Hz) to give the display more time to prepare.
Failing to do this results in the panel not initializing properly in a
large number of cases.

Signed-off-by: Thierry Reding <treding@nvidia.com>
9 years agodrm/panel: simple: Add support for Giantplus GPG482739QS5
Philipp Zabel [Wed, 19 Nov 2014 09:29:55 +0000 (10:29 +0100)]
drm/panel: simple: Add support for Giantplus GPG482739QS5

This patch adds support for the GiantPlus GPG48273QS5 4.3" WQVGA TFT LCD
panel to the simple-panel driver.

This panel is connected via a parallel bus and uses both HSYNC and
VSYNC, whose lengths are unfortunately not clearly defined. The
datasheet only specifies the front- and backporch length, but the timing
diagram suggests that both sync signals should be asserted for exactly
one clock cycle.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Thierry Reding <treding@nvidia.com>
9 years agoof: Add vendor prefix for Giantplus Technology Co., Ltd.
Philipp Zabel [Wed, 19 Nov 2014 09:29:54 +0000 (10:29 +0100)]
of: Add vendor prefix for Giantplus Technology Co., Ltd.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
9 years agodrm/mipi-dsi: Avoid potential NULL pointer dereference
Thierry Reding [Fri, 5 Dec 2014 10:46:56 +0000 (11:46 +0100)]
drm/mipi-dsi: Avoid potential NULL pointer dereference

The mipi_dsi_packet_create() function dereferences the msg pointer
before checking that it's valid. Move the dereference down to where it
is required to avoid potentially dereferencing a NULL pointer.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
9 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Wed, 28 Jan 2015 03:12:38 +0000 (19:12 -0800)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes from Dave Airlie:
 "This feels larger than I'd like but its for three reasons.

   a) amdkfd finalising the API more, this is a new feature introduced
      last merge window, and I'd prefer to make the tweaks to the API
      before it first gets into a stable release.

   b) radeon regression required splitting an internal API to fix
      properly, so it just changed a few more lines

   c) vmwgfx fix changes a lock from a mutex->spin lock, this is fallout
      from the new sleep checking.

  Otherwise there is just some tda998x fixes"

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/radeon: Remove rdev->gart.pages_addr array
  drm/radeon: Restore GART table contents after pinning it in VRAM v3
  drm/radeon: Split off gart_get_page_entry ASIC hook from set_page_entry
  drm/amdkfd: Fix bug in call to init_pipelines()
  drm/amdkfd: Fix bug in pipelines initialization
  drm/radeon: Don't increment pipe_id in kgd_init_pipeline
  drm/i2c: tda998x: set the CEC I2C address based on the slave I2C address
  drm/vmwgfx: Replace the hw mutex with a hw spinlock
  drm/amdkfd: Allow user to limit only queues per device
  drm/amdkfd: PQM handle queue creation fault
  drm: tda998x: Fix EDID read timeout on HDMI connect
  drm: tda998x: Protect the page register

9 years agoMerge tag 'topic/atomic-core-2015-01-27' of git://anongit.freedesktop.org/drm-intel...
Dave Airlie [Tue, 27 Jan 2015 23:34:27 +0000 (09:34 +1000)]
Merge tag 'topic/atomic-core-2015-01-27' of git://anongit.freedesktop.org/drm-intel into drm-next

* tag 'topic/atomic-core-2015-01-27' of git://anongit.freedesktop.org/drm-intel:
  drm/atomic: Fix potential use of state after free
  drm/atomic-helper: debug output for modesets
  drm/atomic-helpers: Saner encoder/crtc callbacks
  drm/atomic-helpers: Recover full cursor plane behaviour
  drm/atomic-helper: add connector->dpms() implementation
  drm/atomic: Add drm_crtc_state->active
  drm: Add standardized boolean props
  drm/plane-helper: Fix transitional helper kerneldocs
  drm/plane-helper: Skip prepare_fb/cleanup_fb when newfb==oldfb

Conflicts:
include/drm/drm_crtc_helper.h

9 years agoMerge tag 'drm/tegra/for-3.20-rc1' of git://anongit.freedesktop.org/tegra/linux into...
Dave Airlie [Tue, 27 Jan 2015 23:27:29 +0000 (09:27 +1000)]
Merge tag 'drm/tegra/for-3.20-rc1' of git://anongit.freedesktop.org/tegra/linux into drm-next

drm/tegra: Changes for v3.20-rc1

The biggest part of these changes is the conversion to atomic mode-
setting. A lot of cleanup and demidlayering was required before the
conversion, with the result being a whole lot of changes.

Besides the atomic mode-setting support, the host1x bus now has the
proper infrastructure to support suspend/resume for child devices.

Finally, a couple of smaller cleanup patches round things off.

* tag 'drm/tegra/for-3.20-rc1' of git://anongit.freedesktop.org/tegra/linux: (54 commits)
  drm/tegra: Use correct relocation target offsets
  drm/tegra: Add minimal power management
  drm/tegra: dc: Unify enabling the display controller
  drm/tegra: Track tiling and format in plane state
  drm/tegra: Track active planes in CRTC state
  drm/tegra: Remove unused ->mode_fixup() callbacks
  drm/tegra: Atomic conversion, phase 3, step 3
  drm/tegra: Atomic conversion, phase 3, step 2
  drm/tegra: dc: Use atomic clock state in modeset
  drm/tegra: sor: Implement ->atomic_check()
  drm/tegra: hdmi: Implement ->atomic_check()
  drm/tegra: dsi: Implement ->atomic_check()
  drm/tegra: rgb: Implement ->atomic_check()
  drm/tegra: dc: Store clock setup in atomic state
  drm/tegra: Atomic conversion, phase 3, step 1
  drm/tegra: Atomic conversion, phase 2
  drm/tegra: Atomic conversion, phase 1
  drm/tegra: dc: Do not needlessly deassert reset
  drm/tegra: Output cleanup functions cannot fail
  drm/tegra: Remove remnants of the output midlayer
  ...

9 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Tue, 27 Jan 2015 21:55:36 +0000 (13:55 -0800)]
Merge git://git./linux/kernel/git/davem/net

Pull networking fixes from David Miller:

 1) Don't OOPS on socket AIO, from Christoph Hellwig.

 2) Scheduled scans should be aborted upon RFKILL, from Emmanuel
    Grumbach.

 3) Fix sleep in atomic context in kvaser_usb, from Ahmed S Darwish.

 4) Fix RCU locking across copy_to_user() in bpf code, from Alexei
    Starovoitov.

 5) Lots of crash, memory leak, short TX packet et al bug fixes in
    sh_eth from Ben Hutchings.

 6) Fix memory corruption in SCTP wrt.  INIT collitions, from Daniel
    Borkmann.

 7) Fix return value logic for poll handlers in netxen, enic, and bnx2x.
    From Eric Dumazet and Govindarajulu Varadarajan.

 8) Header length calculation fix in mac80211 from Fred Chou.

 9) mv643xx_eth doesn't handle highmem correctly in non-TSO code paths.
    From Ezequiel Garcia.

10) udp_diag has bogus logic in it's hash chain skipping, copy same fix
    tcp diag used.  From Herbert Xu.

11) amd-xgbe programs wrong rx flow control register, from Thomas
    Lendacky.

12) Fix race leading to use after free in ping receive path, from Subash
    Abhinov Kasiviswanathan.

13) Cache redirect routes otherwise we can get a heavy backlog of rcu
    jobs liberating DST_NOCACHE entries.  From Hannes Frederic Sowa.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (48 commits)
  net: don't OOPS on socket aio
  stmmac: prevent probe drivers to crash kernel
  bnx2x: fix napi poll return value for repoll
  ipv6: replacing a rt6_info needs to purge possible propagated rt6_infos too
  sh_eth: Fix DMA-API usage for RX buffers
  sh_eth: Check for DMA mapping errors on transmit
  sh_eth: Ensure DMA engines are stopped before freeing buffers
  sh_eth: Remove RX overflow log messages
  ping: Fix race in free in receive path
  udp_diag: Fix socket skipping within chain
  can: kvaser_usb: Fix state handling upon BUS_ERROR events
  can: kvaser_usb: Retry the first bulk transfer on -ETIMEDOUT
  can: kvaser_usb: Send correct context to URB completion
  can: kvaser_usb: Do not sleep in atomic context
  ipv4: try to cache dst_entries which would cause a redirect
  samples: bpf: relax test_maps check
  bpf: rcu lock must not be held when calling copy_to_user()
  net: sctp: fix slab corruption from use after free on INIT collisions
  net: mv643xx_eth: Fix highmem support in non-TSO egress path
  sh_eth: Fix serialisation of interrupt disable with interrupt & NAPI handlers
  ...

9 years agonet: don't OOPS on socket aio
Christoph Hellwig [Tue, 27 Jan 2015 20:25:33 +0000 (12:25 -0800)]
net: don't OOPS on socket aio

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agostmmac: prevent probe drivers to crash kernel
Andy Shevchenko [Tue, 27 Jan 2015 16:38:03 +0000 (18:38 +0200)]
stmmac: prevent probe drivers to crash kernel

In the case when alloc_netdev fails we return NULL to a caller. But there is no
check for NULL in the probe drivers. This patch changes NULL to an error
pointer. The function description is amended to reflect what we may get
returned.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoMerge tag 'powerpc-3.19-5' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux
Linus Torvalds [Tue, 27 Jan 2015 18:04:38 +0000 (10:04 -0800)]
Merge tag 'powerpc-3.19-5' of git://git./linux/kernel/git/mpe/linux

Pull powerpc fixes from Michael Ellerman:
 "Two powerpc fixes"

* tag 'powerpc-3.19-5' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux:
  powerpc/powernv: Restore LPCR with LPCR_PECE1 cleared
  powerpc/xmon: Fix another endiannes issue in RTAS call from xmon

9 years agoMerge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty...
Linus Torvalds [Tue, 27 Jan 2015 17:02:09 +0000 (09:02 -0800)]
Merge tag 'fixes-for-linus' of git://git./linux/kernel/git/rusty/linux

Pull one more module fix from Rusty Russell:
 "SCSI was using module_refcount() to figure out when the module was
  unloading: this broke with new atomic refcounting.  The code is still
  suspicious, but this solves the WARN_ON()"

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
  scsi: always increment reference count

9 years agodrivers: gpu: drm: i915: intel_fifo_underrun.c: Fix a typo in comment
Kumar Amit Mehta [Mon, 26 Jan 2015 16:47:32 +0000 (17:47 +0100)]
drivers: gpu: drm: i915: intel_fifo_underrun.c: Fix a typo in comment

The comment for intel_cpu_fifo_underrun_irq_handler() is not consistent
with the code and the rest of the comment for this routine. This patch
fixes this typo in comment.

Signed-off-by: Kumar Amit Mehta <gmate.amit@gmail.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
9 years agodrm/tegra: Use correct relocation target offsets
David Ung [Wed, 21 Jan 2015 02:37:35 +0000 (18:37 -0800)]
drm/tegra: Use correct relocation target offsets

When copying a relocation from userspace, copy the correct target
offset.

Signed-off-by: David Ung <davidu@nvidia.com>
Fixes: 961e3beae3b2 ("drm/tegra: Make job submission 64-bit safe")
Cc: stable@vger.kernel.org
[treding@nvidia.com: provide a better commit message]
Signed-off-by: Thierry Reding <treding@nvidia.com>
9 years agodrm/tegra: Add minimal power management
Thierry Reding [Thu, 18 Dec 2014 16:15:25 +0000 (17:15 +0100)]
drm/tegra: Add minimal power management

For now only disable the KMS hotplug polling helper logic upon suspend
and re-enable it on resume.

Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Mark Zhang <markz@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
9 years agodrm/tegra: dc: Unify enabling the display controller
Thierry Reding [Mon, 8 Dec 2014 15:32:47 +0000 (16:32 +0100)]
drm/tegra: dc: Unify enabling the display controller

Previously output drivers would enable continuous display mode and power
up the display controller at various points during the initialization.
This is suboptimal because it accesses display controller registers in
output drivers and duplicates a bit of code.

Move this code into the display controller driver and enable the display
controller as the final step of the ->mode_set_nofb() implementation.

Signed-off-by: Thierry Reding <treding@nvidia.com>
9 years agodrm/tegra: Track tiling and format in plane state
Thierry Reding [Fri, 28 Nov 2014 12:14:55 +0000 (13:14 +0100)]
drm/tegra: Track tiling and format in plane state

Tracking these in the plane state allows them to be computed in the
->atomic_check() callback and reused when applying the configuration in
->atomic_update().

Signed-off-by: Thierry Reding <treding@nvidia.com>
9 years agodrm/tegra: Track active planes in CRTC state
Thierry Reding [Wed, 26 Nov 2014 11:28:39 +0000 (12:28 +0100)]
drm/tegra: Track active planes in CRTC state

Wrap struct drm_crtc_state in a driver-specific structure and add the
planes field which keeps track of which planes are updated or disabled
during a modeset. This allows atomic updates of the the display engine
at ->atomic_flush() time.

v2: open-code getting the state of the CRTC that the plane is being
    attached to (Daniel Vetter)

Signed-off-by: Thierry Reding <treding@nvidia.com>