GitHub/LineageOS/android_kernel_motorola_exynos9610.git
8 years agodrm/nouveau/perf: change pcie speed on pstate change
Karol Herbst [Tue, 15 Sep 2015 16:49:32 +0000 (18:49 +0200)]
drm/nouveau/perf: change pcie speed on pstate change

v2: remove error and only set link for pcie devices
v6: remove check for pcie device

Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
8 years agodrm/nouveau/perf: add fields for pci speed and width and use it for the pstates
Karol Herbst [Tue, 15 Sep 2015 16:49:08 +0000 (18:49 +0200)]
drm/nouveau/perf: add fields for pci speed and width and use it for the pstates

Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
8 years agodrm/nouveau/bios/perf: parse the pci speed from the bios for tesla and newer cards
Karol Herbst [Tue, 15 Sep 2015 16:47:12 +0000 (18:47 +0200)]
drm/nouveau/bios/perf: parse the pci speed from the bios for tesla and newer cards

Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
8 years agodrm/nouveau/pci: implement pcie speed change for kepler+
Karol Herbst [Tue, 5 Jan 2016 20:44:52 +0000 (21:44 +0100)]
drm/nouveau/pci: implement pcie speed change for kepler+

v2: rename functions
v3: remove pcie2 accessors
v6: fix alignement and line width, also remove useless code

Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
8 years agodrm/nouveau/pci: implement pcie speed change for Fermi
Karol Herbst [Tue, 5 Jan 2016 20:44:39 +0000 (21:44 +0100)]
drm/nouveau/pci: implement pcie speed change for Fermi

v5: don't set kepler func pointers
v6: fix alignment and line length

8 years agodrm/nouveau/pci: implement pcie speed change for tesla
Karol Herbst [Tue, 5 Jan 2016 20:44:18 +0000 (21:44 +0100)]
drm/nouveau/pci: implement pcie speed change for tesla

v5: don't set fermi or kepler func pointers
v6: fix alignment

8 years agodrm/nouveau/pci: implement generic code for pcie speed change
Karol Herbst [Tue, 15 Sep 2015 16:48:37 +0000 (18:48 +0200)]
drm/nouveau/pci: implement generic code for pcie speed change

v2: rename and group functions
v4: change copyright information
    move printing of pcie speeds into oneinit,
    rename all pcie functions to nvkm_pcie_*
    don't try to raise the pcie version when no higher one is supported
v5: revert Copyright changes and rename nvkm_pcie_raise_version to nvkm_pcie_set_version
v6: remove some useless pci_is_pcie checks and rework messages

Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
8 years agodrm/nouveau/pci: add gk104 variant
Karol Herbst [Sun, 30 Aug 2015 18:06:16 +0000 (20:06 +0200)]
drm/nouveau/pci: add gk104 variant

v2: change email used in header
v4: change Copyright information
v5: revert Copyright changes

Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
8 years agodrm/nouveau/pci: add gf106 variant
Karol Herbst [Sun, 27 Sep 2015 00:41:34 +0000 (02:41 +0200)]
drm/nouveau/pci: add gf106 variant

v2: change email used in header
v4: change Copyright information
v5: revert Copyright changes

Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
8 years agodrm/nouveau/kms: take mode_config mutex in connector hotplug path
Ben Skeggs [Thu, 7 Jan 2016 22:56:51 +0000 (08:56 +1000)]
drm/nouveau/kms: take mode_config mutex in connector hotplug path

fdo#93634

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Cc: stable@vger.kernel.org
8 years agodrm/nouveau/nouveau/perfmon: add interface files for current core voltage
Karol Herbst [Sun, 20 Sep 2015 12:40:27 +0000 (14:40 +0200)]
drm/nouveau/nouveau/perfmon: add interface files for current core voltage

Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8 years agodrm/nouveau/sysfs: remove pstate interface
Karol Herbst [Thu, 30 Jul 2015 09:56:20 +0000 (11:56 +0200)]
drm/nouveau/sysfs: remove pstate interface

Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8 years agodrm/nouveau/debugfs: add copy of sysfs pstate interface ported to debugfs
Karol Herbst [Thu, 30 Jul 2015 09:53:31 +0000 (11:53 +0200)]
drm/nouveau/debugfs: add copy of sysfs pstate interface ported to debugfs

Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8 years agodrm/nouveau/debugfs: we need a ctrl object for debugfs
Karol Herbst [Thu, 30 Jul 2015 09:52:23 +0000 (11:52 +0200)]
drm/nouveau/debugfs: we need a ctrl object for debugfs

Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8 years agodrm/nouveau/debugfs: rename functions to indicate they are used inside drm
Karol Herbst [Thu, 30 Jul 2015 22:35:42 +0000 (00:35 +0200)]
drm/nouveau/debugfs: rename functions to indicate they are used inside drm

We will need our own debugfs_init and cleanup functions, because
nouveau_drm isn't ready while the DRM ones are called by DRM.

Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8 years agodrm/nouveau/debugfs: add infrastructure to add files with other fops than only read
Karol Herbst [Wed, 29 Jul 2015 11:44:21 +0000 (13:44 +0200)]
drm/nouveau/debugfs: add infrastructure to add files with other fops than only read

v2: use the same object for private data as with the drm debugfs functions

Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8 years agodrm/nouveau/fifo/gf100: remove references to "daemon"
Ben Skeggs [Mon, 4 Jan 2016 02:24:46 +0000 (12:24 +1000)]
drm/nouveau/fifo/gf100: remove references to "daemon"

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8 years agodrm/nouveau/fb/nv50: remove references to "daemon"
Ben Skeggs [Mon, 4 Jan 2016 02:22:54 +0000 (12:22 +1000)]
drm/nouveau/fb/nv50: remove references to "daemon"

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8 years agodrm/nouveau/clk: remove references to "daemon"
Ben Skeggs [Mon, 4 Jan 2016 02:17:52 +0000 (12:17 +1000)]
drm/nouveau/clk: remove references to "daemon"

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8 years agodrm/nouveau/gr/gf100: provide a bit more info for various errors
Ilia Mirkin [Sat, 2 Jan 2016 22:54:51 +0000 (17:54 -0500)]
drm/nouveau/gr/gf100: provide a bit more info for various errors

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8 years agodrm/nouveau/bios: parse 8.1 Gbps DP link rate
Ben Skeggs [Sun, 20 Dec 2015 23:27:49 +0000 (09:27 +1000)]
drm/nouveau/bios: parse 8.1 Gbps DP link rate

From DCB 4.1 spec.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8 years agodrm/nouveau/ltc/gm204: split implementation from gm107
Ben Skeggs [Sat, 19 Dec 2015 06:48:34 +0000 (16:48 +1000)]
drm/nouveau/ltc/gm204: split implementation from gm107

Differences from GM10x:
- GM20x LTC count detection differs from GM10x
- GM20x init doesn't require large page size setting

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8 years agodrm/nouveau/ltc/gm107: use nvkm_mask to set cbc_ctrl1
Ben Skeggs [Sat, 19 Dec 2015 06:42:22 +0000 (16:42 +1000)]
drm/nouveau/ltc/gm107: use nvkm_mask to set cbc_ctrl1

resman and nvgpu both do this, presumably for good reason.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8 years agodrm/nouveau/ibus/gm204: split implementation from gk104
Ben Skeggs [Sat, 19 Dec 2015 06:24:10 +0000 (16:24 +1000)]
drm/nouveau/ibus/gm204: split implementation from gk104

GM20x doesn't require the priv ring timeout bumps that GK/GM10x have.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8 years agodrm/nouveau/gr/gf100-: subclass nvkm_object to store channel pointer
Ben Skeggs [Tue, 15 Dec 2015 09:22:49 +0000 (19:22 +1000)]
drm/nouveau/gr/gf100-: subclass nvkm_object to store channel pointer

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8 years agodrm/nouveau/nvif: modify nvif_unvers/nvif_unpack macros to be more obvious
Ben Skeggs [Sun, 8 Nov 2015 23:21:27 +0000 (09:21 +1000)]
drm/nouveau/nvif: modify nvif_unvers/nvif_unpack macros to be more obvious

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8 years agodrm/nouveau/nvif: split out client interface definitions
Ben Skeggs [Sun, 8 Nov 2015 02:26:01 +0000 (12:26 +1000)]
drm/nouveau/nvif: split out client interface definitions

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8 years agodrm/nouveau/nvif: split out device interface definitions
Ben Skeggs [Sun, 8 Nov 2015 02:23:16 +0000 (12:23 +1000)]
drm/nouveau/nvif: split out device interface definitions

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8 years agodrm/nouveau/nvif: split out ctxdma interface definitions
Ben Skeggs [Sun, 8 Nov 2015 02:16:40 +0000 (12:16 +1000)]
drm/nouveau/nvif: split out ctxdma interface definitions

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8 years agodrm/nouveau/nvif: split out perfmon interface definitions
Ben Skeggs [Sun, 8 Nov 2015 02:12:15 +0000 (12:12 +1000)]
drm/nouveau/nvif: split out perfmon interface definitions

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8 years agodrm/nouveau/nvif: split out device control interface definitions
Ben Skeggs [Sun, 8 Nov 2015 01:56:00 +0000 (11:56 +1000)]
drm/nouveau/nvif: split out device control interface definitions

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8 years agodrm/nouveau/nvif: split out fifo interface definitions
Ben Skeggs [Sun, 8 Nov 2015 01:28:26 +0000 (11:28 +1000)]
drm/nouveau/nvif: split out fifo interface definitions

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8 years agodrm/nouveau/nvif: split out display interface definitions
Ben Skeggs [Sun, 8 Nov 2015 00:44:19 +0000 (10:44 +1000)]
drm/nouveau/nvif: split out display interface definitions

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8 years agodrm/nouveau/nvif: split out nvsw interface definitons
Ben Skeggs [Sun, 8 Nov 2015 00:34:50 +0000 (10:34 +1000)]
drm/nouveau/nvif: split out nvsw interface definitons

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8 years agodrm/nouveau/nvif: split out fermi interface definitions
Ben Skeggs [Sun, 8 Nov 2015 00:15:09 +0000 (10:15 +1000)]
drm/nouveau/nvif: split out fermi interface definitions

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8 years agodrm/nouveau/nvif: move internal class identifiers to class.h
Ben Skeggs [Sun, 8 Nov 2015 00:18:19 +0000 (10:18 +1000)]
drm/nouveau/nvif: move internal class identifiers to class.h

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8 years agodrm/nouveau/gr/gm107-: make use of gpc_addr() macro for tpc ramchain setup
Ben Skeggs [Sun, 22 Nov 2015 19:28:52 +0000 (05:28 +1000)]
drm/nouveau/gr/gm107-: make use of gpc_addr() macro for tpc ramchain setup

Should be no functional change here.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8 years agodrm/nouveau/instmem/gk20a: use DMA API CPU mapping
Alexandre Courbot [Wed, 11 Nov 2015 08:07:51 +0000 (17:07 +0900)]
drm/nouveau/instmem/gk20a: use DMA API CPU mapping

Commit 69c4938249fb ("drm/nouveau/instmem/gk20a: use direct CPU access")
tried to be smart while using the DMA-API by managing the CPU mappings of
buffers allocated with the DMA-API by itself. In doing so, it relied
on dma_to_phys() which is an architecture-private function not
available everywhere. This broke the build on several architectures.

Since there is no reliable and portable way to obtain the physical
address of a DMA-API buffer, stop trying to be smart and just use the
CPU mapping that the DMA-API can provide. This means that buffers will
be CPU-mapped for all their life as opposed to when we need them, but
anyway using the DMA-API here is a fallback for when no IOMMU is
available so we should not expect optimal behavior.

This makes the IOMMU and DMA-API implementations of instmem diverge
enough that we should maybe put them into separate files...

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8 years agodrm/nouveau/instmem/gk20a: fix race conditions
Alexandre Courbot [Mon, 9 Nov 2015 07:37:53 +0000 (16:37 +0900)]
drm/nouveau/instmem/gk20a: fix race conditions

The LRU list used for recycling CPU mappings was handling concurrency
very poorly. For instance, if an instobj was acquired twice before being
released once, it would end up into the LRU list even though there is
still a client accessing it.

This patch fixes this by properly counting how many clients are
currently using a given instobj.

While at it, we also raise errors when inconsistencies are detected, and
factorize some code.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8 years agodrm/nouveau/gk20a: Add MODULE_FIRMWARE for gk20a
Nicolas Chauvet [Mon, 28 Sep 2015 15:08:13 +0000 (17:08 +0200)]
drm/nouveau/gk20a: Add MODULE_FIRMWARE for gk20a

This patch is needed by initramfs tools to detect
the required firmware files for the module.

This patch tests for either TEGRA_124_SOC or TEGRA_132_SOC
for the firmwares related to the Tegra K1 generation.

v2: move the MODULE_FIRMWARE to the nvidia_platform.c file.
 This will avoid to test for NOUVEAU_PLATFORM_DRIVER

Signed-off-by: Nicolas Chauvet <kwizart@gmail.com>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8 years agodrm/nouveau/fifo/gk104: fix engine status register offset
Vince Hsu [Mon, 16 Nov 2015 07:38:30 +0000 (15:38 +0800)]
drm/nouveau/fifo/gk104: fix engine status register offset

The offset should be 8 on Kepler and later.

Signed-off-by: Vince Hsu <vinceh@nvidia.com>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8 years agodrm/nouveau/ce/gk104: attempt at better handling of LAUNCHERR
Ben Skeggs [Wed, 11 Nov 2015 03:06:10 +0000 (13:06 +1000)]
drm/nouveau/ce/gk104: attempt at better handling of LAUNCHERR

Very rough, no idea how correct it is at this point, but it prevents
getteximage-depth from piglit from hanging the GPU.

v2: updated with NV_PCE_FE_LAUNCHERR_REPORT values provided by NVIDIA

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8 years agodrm/nouveau/fifo/gf100: fix race condition when updating engine runlists
Ben Skeggs [Wed, 11 Nov 2015 00:07:22 +0000 (10:07 +1000)]
drm/nouveau/fifo/gf100: fix race condition when updating engine runlists

Similar in spirit to the gk104 fix with a similar title.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8 years agodrm/nouveau/fifo/gk104: fix race condition when updating engine runlists
Ben Skeggs [Tue, 10 Nov 2015 23:37:05 +0000 (09:37 +1000)]
drm/nouveau/fifo/gk104: fix race condition when updating engine runlists

The CPU-side tracking of engine runlists was not protected by a lock,
leading to list corruption, eventually causing runlist_update() to
overrun the GPU-side runlist, triggering an OOPS.

Fixes some of the issues noticed during parallel piglit runs.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8 years agodrm/nouveau/nvkm: add/remove 0's to make 7 (or 9)-nibble constants use 8 nibbles
Ilia Mirkin [Thu, 5 Nov 2015 07:33:40 +0000 (02:33 -0500)]
drm/nouveau/nvkm: add/remove 0's to make 7 (or 9)-nibble constants use 8 nibbles

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8 years agodrm/nouveau/kms: no need to check for empty edid before drm_detect_hdmi_monitor
Ilia Mirkin [Wed, 4 Nov 2015 02:14:26 +0000 (21:14 -0500)]
drm/nouveau/kms: no need to check for empty edid before drm_detect_hdmi_monitor

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8 years agodrm/nouveau/core: fix return in error path of device probe
Alexandre Courbot [Mon, 26 Oct 2015 05:55:37 +0000 (14:55 +0900)]
drm/nouveau/core: fix return in error path of device probe

We want to unlock nv_devices_mutex in this error path as well.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8 years agodrm/nouveau/kms: allow 225/297MHz pixel clocks for HDMI on Fermi/Kepler
Ilia Mirkin [Wed, 4 Nov 2015 02:00:11 +0000 (21:00 -0500)]
drm/nouveau/kms: allow 225/297MHz pixel clocks for HDMI on Fermi/Kepler

Some Fermi's apparently alow allow 297MHz clocks, so create a parameter
which allows end-users to set it themselves until we have a reliable way
to determine the board's maximum pixel clocks.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8 years agodrm/nouveau/disp: activate dual link TMDS links only when possible
Hauke Mehrtens [Wed, 4 Nov 2015 02:00:10 +0000 (21:00 -0500)]
drm/nouveau/disp: activate dual link TMDS links only when possible

Without this patch a pixel clock rate above 165 MHz on a TMDS link is
assumed to be dual link. This is true for DVI, but not for HDMI. HDMI
supports no dual link, but it supports pixel clock rates above 165 MHz.
Only activate Dual Link mode when it is actually possible and requested.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
[imirkin: check for hdmi monitor for computing proto, use sor ctrl to
 enable extra config bit]
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
8 years agoMerge tag 'omapdrm-4.5-resolved' of git://git.kernel.org/pub/scm/linux/kernel/git...
Dave Airlie [Thu, 31 Dec 2015 21:41:52 +0000 (07:41 +1000)]
Merge tag 'omapdrm-4.5-resolved' of git://git./linux/kernel/git/tomba/linux into drm-next

omapdrm changes for v4.5

* enable DRIVER_ATOMIC
* improved TILER performance
* cleanups preparing for DMAbuf import
* fbdev emulation is now optional
* minor fixes

* tag 'omapdrm-4.5-resolved' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux:
  drm/omap: remove obsolete manager assignment
  drm/omap: set DRIVER_ATOMIC for omapdrm
  drm/omap: remove unused plugin defines
  drm/omap: Use bitmaps for TILER placement
  drm: omapdrm: gem: Remove check for impossible condition
  drm: omapdrm: gem: Simplify error handling when creating GEM object
  drm: omapdrm: gem: Don't free mmap offset twice
  drm: omapdrm: gem: Fix GEM object destroy in error path
  drm: omapdrm: gem: Free the correct memory object
  drm: omapdrm: gem: Mask out private flags passed from userspace
  drm: omapdrm: gem: Move global usergart variable to omap_drm_private
  drm: omapdrm: gem: Group functions by purpose
  drm: omapdrm: gem: Remove forward declarations
  drm: omapdrm: gem: Remove unused function prototypes
  drm: omapdrm: Make fbdev emulation optional
  drm: omapdrm: Fix plane state free in plane reset handler
  drm: omapdrm: move omap_plane_reset()
  drm/omap: Use platform_register/unregister_drivers()
  drm: omapdrm: tiler: Remove unneded module alias for tiler

8 years agodrm/omap: remove obsolete manager assignment
Tomi Valkeinen [Wed, 4 Nov 2015 15:10:59 +0000 (17:10 +0200)]
drm/omap: remove obsolete manager assignment

omap_encoder_update() assigns an overlay manager to
dssdev->src->manager. This assignment is not needed, as the connections
in the display chain have already been made at connect step.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
8 years agodrm/omap: set DRIVER_ATOMIC for omapdrm
Tomi Valkeinen [Fri, 2 Oct 2015 08:10:41 +0000 (11:10 +0300)]
drm/omap: set DRIVER_ATOMIC for omapdrm

omapdrm supports atomic modesetting, and it seems to work ok. So let's
set the flag to enable the atomic modesetting API support.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agodrm/omap: remove unused plugin defines
Tomi Valkeinen [Fri, 28 Aug 2015 08:23:03 +0000 (11:23 +0300)]
drm/omap: remove unused plugin defines

Remove unused defines related to SGX plugin which are not used.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
8 years agodrm/omap: Use bitmaps for TILER placement
Andy Gross [Wed, 12 Aug 2015 08:24:38 +0000 (11:24 +0300)]
drm/omap: Use bitmaps for TILER placement

Modified Tiler placement to utilize bitmaps for bookkeeping and
all placement algorithms.  This resulted in a substantial savings
in time for all Tiler reservation and free operations.  Typical
savings are in the range of 28% decrease in time taken with larger
buffers showing a 80%+ decrease.

Signed-off-by: Andy Gross <andy.gross@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
8 years agodrm: omapdrm: gem: Remove check for impossible condition
Laurent Pinchart [Mon, 14 Dec 2015 20:39:42 +0000 (22:39 +0200)]
drm: omapdrm: gem: Remove check for impossible condition

The GEM object can't be tiled without a usergart as that condition is
checked and considered as an error when creating the GEM object.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
8 years agodrm: omapdrm: gem: Simplify error handling when creating GEM object
Laurent Pinchart [Mon, 14 Dec 2015 20:39:41 +0000 (22:39 +0200)]
drm: omapdrm: gem: Simplify error handling when creating GEM object

The goto error statement end up just returning NULL without performing
any cleanup, replace it with a direct return.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
8 years agodrm: omapdrm: gem: Don't free mmap offset twice
Laurent Pinchart [Mon, 14 Dec 2015 20:39:40 +0000 (22:39 +0200)]
drm: omapdrm: gem: Don't free mmap offset twice

The drm_gem_free_mmap_offset() call in omap_gem_free_object() is
redundant as the same function is called from drm_gem_object_release().
Remove it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
8 years agodrm: omapdrm: gem: Fix GEM object destroy in error path
Laurent Pinchart [Mon, 14 Dec 2015 20:39:39 +0000 (22:39 +0200)]
drm: omapdrm: gem: Fix GEM object destroy in error path

Use the omap_gem_free_object() function to destroy the GEM object in the
omap_gem_new_handle() error path instead of doing it manually (and
incorrectly).

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
8 years agodrm: omapdrm: gem: Free the correct memory object
Laurent Pinchart [Mon, 14 Dec 2015 20:39:38 +0000 (22:39 +0200)]
drm: omapdrm: gem: Free the correct memory object

The GEM object free handler frees memory allocated by the driver using
the pointer to the drm_gem_object instead of the pointer to the
omap_gem_object that embeds it. This doesn't cause any issue in practice
as the drm_gem_object is the first field of omap_gem_object, but would
cause memory corruption if the structure layout changes. Fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
8 years agodrm: omapdrm: gem: Mask out private flags passed from userspace
Laurent Pinchart [Mon, 14 Dec 2015 20:39:36 +0000 (22:39 +0200)]
drm: omapdrm: gem: Mask out private flags passed from userspace

The 8 high order bits of the buffer flags are reserved for internal use.
Mask them out from the flags passed by userspace.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
8 years agodrm: omapdrm: gem: Move global usergart variable to omap_drm_private
Laurent Pinchart [Mon, 14 Dec 2015 20:39:34 +0000 (22:39 +0200)]
drm: omapdrm: gem: Move global usergart variable to omap_drm_private

The structure contains data related to a device instance, it shouldn't
be a global variable.

While at it rename the usergart structures with an omap_drm_ prefix.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
8 years agodrm: omapdrm: gem: Group functions by purpose
Laurent Pinchart [Mon, 14 Dec 2015 20:39:33 +0000 (22:39 +0200)]
drm: omapdrm: gem: Group functions by purpose

Divide the GEM implementation in groups of functions to improve
readability.

No code change is performed by this commit.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
8 years agodrm: omapdrm: gem: Remove forward declarations
Laurent Pinchart [Mon, 14 Dec 2015 20:39:32 +0000 (22:39 +0200)]
drm: omapdrm: gem: Remove forward declarations

Reorder functions to get rid of forward declarations

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
8 years agodrm: omapdrm: gem: Remove unused function prototypes
Laurent Pinchart [Mon, 14 Dec 2015 20:39:31 +0000 (22:39 +0200)]
drm: omapdrm: gem: Remove unused function prototypes

Several DRM core function prototypes refer to functions that don't exist
anymore and are thus obviously never called. Remove them.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
8 years agodrm: omapdrm: Make fbdev emulation optional
Laurent Pinchart [Mon, 14 Dec 2015 20:39:30 +0000 (22:39 +0200)]
drm: omapdrm: Make fbdev emulation optional

Don't compile the fbdev emulation code when fbdev emulation support is
disabled.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
8 years agodrm: omapdrm: Fix plane state free in plane reset handler
Laurent Pinchart [Mon, 14 Dec 2015 20:39:29 +0000 (22:39 +0200)]
drm: omapdrm: Fix plane state free in plane reset handler

The plane reset handler frees the plane state and allocates a new
default state, but when doing so attempt to free the plane state using
the base plane state pointer instead of casting it to the
driver-specific state object that has been allocated. Fix it by using
the omap_plane_atomic_destroy_state() function to destroy the plane
state instead of duplicating the code.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
[tomi.valkeinen@ti.com: move of the func into separate patch]
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
8 years agodrm: omapdrm: move omap_plane_reset()
Tomi Valkeinen [Tue, 15 Dec 2015 09:33:23 +0000 (11:33 +0200)]
drm: omapdrm: move omap_plane_reset()

Move omap_plane_reset() function to avoid forward declarations in the
next patch.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
8 years agodrm/omap: Use platform_register/unregister_drivers()
Thierry Reding [Wed, 2 Dec 2015 16:23:31 +0000 (17:23 +0100)]
drm/omap: Use platform_register/unregister_drivers()

These new helpers simplify implementing multi-driver modules and
properly handle failure to register one driver by unregistering all
previously registered drivers.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
8 years agodrm: omapdrm: tiler: Remove unneded module alias for tiler
Luis de Bethencourt [Tue, 20 Oct 2015 14:48:31 +0000 (15:48 +0100)]
drm: omapdrm: tiler: Remove unneded module alias for tiler

omap_dmm_tiler.c can't be compiled as a module and it is built
unconditionally as part of omapdrm. Since it can't be used as a module,
there is no need for it to have an unused MODULE_ALIAS().

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
8 years agodrm/rockchip: vop: export vop_component_ops to modules
Stephen Rothwell [Thu, 31 Dec 2015 02:40:11 +0000 (13:40 +1100)]
drm/rockchip: vop: export vop_component_ops to modules

Fixes: a67719d18229 ("drm/rockchip: vop: spilt register related into rockchip_reg_vop.c")
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Mark Yao <mark.yao@rock-chips.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
8 years agoMerge branch 'drm-rockchip-next-2015-12-28' of https://github.com/markyzq/kernel...
Dave Airlie [Tue, 29 Dec 2015 21:18:12 +0000 (07:18 +1000)]
Merge branch 'drm-rockchip-next-2015-12-28' of https://github.com/markyzq/kernel-drm-rockchip into drm-next

These patches convert drm/rockchip to atomic API and add rk3036 vop support.

* 'drm-rockchip-next-2015-12-28' of https://github.com/markyzq/kernel-drm-rockchip:
  dt-bindings: add document for rk3036-vop
  drm/rockchip: vop: add rk3036 vop support
  drm/rockchip: vop: spilt scale regsters
  drm/rockchip: vop: spilt register related into rockchip_reg_vop.c
  drm/rockchip: vop: move interrupt registers into vop_data
  drm/rockchip: vop: merge vop cfg_done into vop_data
  drm/rockchip: dw_hdmi: use encoder enable function
  drm: bridge/dw_hdmi: add atomic API support
  drm/rockchip: direct config connecter gate and out_mode
  drm/rockchip: support atomic asynchronous commit
  drm/rockchip: Optimization vop mode set
  drm/rockchip: Convert to support atomic API
  drm/rockchip: vop: replace dpms with enable/disable
  drm/rockchip: Use new vblank api drm_crtc_vblank_*

9 years agodt-bindings: add document for rk3036-vop
Mark Yao [Thu, 17 Dec 2015 02:48:19 +0000 (10:48 +0800)]
dt-bindings: add document for rk3036-vop

Cc: Rob Herring <robh+dt@kernel.org>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
Cc: Kumar Gala <galak@codeaurora.org>
Cc: devicetree@vger.kernel.org
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
Acked-by: Rob Herring <robh@kernel.org>
9 years agodrm/rockchip: vop: add rk3036 vop support
Mark Yao [Tue, 15 Dec 2015 01:57:13 +0000 (09:57 +0800)]
drm/rockchip: vop: add rk3036 vop support

RK3036 registers layout is quite difference with rk3288 layout,
The IC design with different framework, rk3036 vop is VOP LITE,
and rk3288 is VOP FULL.

RK3036 support two overlay plane and one hwc plane, max output
resolution is 1080p. it support IOMMU, and its IOMMU same as
rk3288's.

Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
9 years agodrm/rockchip: vop: spilt scale regsters
Mark Yao [Tue, 15 Dec 2015 01:08:43 +0000 (09:08 +0800)]
drm/rockchip: vop: spilt scale regsters

There are two version scale control register found on vop,
scale full version found on rk3288, support extension registers.
and scale little version found on rk3036, only support common scale.

Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
9 years agodrm/rockchip: vop: spilt register related into rockchip_reg_vop.c
Mark Yao [Tue, 15 Dec 2015 00:58:26 +0000 (08:58 +0800)]
drm/rockchip: vop: spilt register related into rockchip_reg_vop.c

No functional updates. Spilt register related into another file
would be nice to multi vop driver,

Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
9 years agodrm/rockchip: vop: move interrupt registers into vop_data
Mark Yao [Tue, 15 Dec 2015 00:36:55 +0000 (08:36 +0800)]
drm/rockchip: vop: move interrupt registers into vop_data

Move interrupt registers into vop_data, so it can use at multi-vop driver

Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
9 years agodrm/rockchip: vop: merge vop cfg_done into vop_data
Mark Yao [Mon, 14 Dec 2015 10:14:36 +0000 (18:14 +0800)]
drm/rockchip: vop: merge vop cfg_done into vop_data

Move cfg_done register into vop_data, so it can use at multi-vop driver

Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
9 years agodrm/rockchip: dw_hdmi: use encoder enable function
Mark Yao [Mon, 30 Nov 2015 10:41:06 +0000 (18:41 +0800)]
drm/rockchip: dw_hdmi: use encoder enable function

encoder.enable is more compatible to atomic api than encoder.prepare/commit

Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
9 years agodrm: bridge/dw_hdmi: add atomic API support
Mark Yao [Mon, 30 Nov 2015 10:33:40 +0000 (18:33 +0800)]
drm: bridge/dw_hdmi: add atomic API support

Fill atomic needed funcs with default atomic helper library.

Rockchip use dw_hdmi, and drm/rockchip will covert to atomic api,
we need dw_hdmi support atomic funcs.

Now another drm driver use dw_hdmi is imx, not yet atomic, so
check DRIVER_ATOMIC at runtime to spilt atomic and not atomic.

Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
9 years agodrm/rockchip: direct config connecter gate and out_mode
Mark Yao [Wed, 16 Dec 2015 10:11:24 +0000 (18:11 +0800)]
drm/rockchip: direct config connecter gate and out_mode

Both connecter gate and out_mode are not conflict with mode set
configure. Direct setting connecter gate and out_mode, that allow
connector do rockchip_drm_crtc_mode_config after mode set.

Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
9 years agodrm/rockchip: support atomic asynchronous commit
Mark Yao [Wed, 16 Dec 2015 10:09:38 +0000 (18:09 +0800)]
drm/rockchip: support atomic asynchronous commit

If drm core requests a async commit, rockchip_drm_atomic_commit
will schedule a work task to update later.

Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
9 years agodrm/rockchip: Optimization vop mode set
Mark Yao [Wed, 16 Dec 2015 10:08:17 +0000 (18:08 +0800)]
drm/rockchip: Optimization vop mode set

Rk3288 vop timing registers is immediately register, when configure
timing on display active time, will cause tearing. use dclk reset is
not a good idea to avoid this tearing. we can avoid tearing by using
standby register.

Vop standby register will take effect at end of current frame, and
go back to work immediately when exit standby.

So we can use standby register to protect this context.

Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
9 years agodrm/rockchip: Convert to support atomic API
Mark Yao [Mon, 30 Nov 2015 10:22:42 +0000 (18:22 +0800)]
drm/rockchip: Convert to support atomic API

Rockchip vop not support hw vblank counter, needed check the committed
register if it's really take effect.

Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
9 years agodrm/rockchip: vop: replace dpms with enable/disable
Mark Yao [Mon, 9 Nov 2015 03:33:16 +0000 (11:33 +0800)]
drm/rockchip: vop: replace dpms with enable/disable

For vop, power by enable/disable is more suitable then legacy dpms
function, and enable/disable more closely to the new atomic API.

Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
9 years agodrm/rockchip: Use new vblank api drm_crtc_vblank_*
Mark Yao [Mon, 23 Nov 2015 07:21:08 +0000 (15:21 +0800)]
drm/rockchip: Use new vblank api drm_crtc_vblank_*

No functional update, drm_vblank_* is the legacy version of
drm_crtc_vblank_*. and use new api make driver more clean.

Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
9 years agoBackmerge drm-fixes merge into Linus's tree into drm-next.
Dave Airlie [Wed, 23 Dec 2015 22:08:47 +0000 (08:08 +1000)]
Backmerge drm-fixes merge into Linus's tree into drm-next.

This merges '5b726e06d6e8309e5c9ef4109a32caf27c71dfc8' into drm-next

Just to resolve some merges to make Daniel's life easier.

Signed-off-by: DAve Airlie <airlied@redhat.com>
9 years agoMerge tag 'drm-intel-fixes-2015-12-23' of git://anongit.freedesktop.org/drm-intel
Linus Torvalds [Wed, 23 Dec 2015 18:22:16 +0000 (10:22 -0800)]
Merge tag 'drm-intel-fixes-2015-12-23' of git://anongit.freedesktop.org/drm-intel

Pull i915 drm fixes from Jani Nikula:
 "Here's a batch of i915 fixes all around.  It may be slightly bigger
  than one would hope for at this stage, but they've all been through
  testing in our -next before being picked up for v4.4.  Also, I missed
  Dave's fixes pull earlier today just because I wanted an extra testing
  round on this.  So I'm fairly confident.

  Wishing you all the things it is customary to wish this time of the
  year"

* tag 'drm-intel-fixes-2015-12-23' of git://anongit.freedesktop.org/drm-intel:
  drm/i915: Correct max delay for HDMI hotplug live status checking
  drm/i915: mdelay(10) considered harmful
  drm/i915: Kill intel_crtc->cursor_bo
  drm/i915: Workaround CHV pipe C cursor fail
  drm/i915: Only spin whilst waiting on the current request
  drm/i915: Limit the busy wait on requests to 5us not 10ms!
  drm/i915: Break busywaiting for requests on pending signals
  drm/i915: Disable primary plane if we fail to reconstruct BIOS fb (v2)
  drm/i915: Set the map-and-fenceable flag for preallocated objects
  drm/i915: Drop the broken cursor base==0 special casing

9 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Wed, 23 Dec 2015 18:11:12 +0000 (10:11 -0800)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes from Dave Airlie:
 "Not much happening, should have dequeued this lot earlier.

  One amdgpu, one nouveau and one exynos fix"

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/exynos: atomic check only enabled crtc states
  drm/nouveau/bios/fan: hardcode the fan mode to linear
  drm/amdgpu: fix user fence handling

9 years agoMerge tag 'drm-intel-next-2015-12-18' of git://anongit.freedesktop.org/drm-intel...
Dave Airlie [Wed, 23 Dec 2015 04:22:09 +0000 (14:22 +1000)]
Merge tag 'drm-intel-next-2015-12-18' of git://anongit.freedesktop.org/drm-intel into drm-next

- fix atomic watermark recomputation logic (Maarten)
- modeset sequence fixes for LPT (Ville)
- more kbl enabling&prep work (Rodrigo, Wayne)
- first bits for mst audio
- page dirty tracking fixes from Dave Gordon
- new get_eld hook from Takashi, also included in the sound tree
- fixup cursor handling when placed at address 0 (Ville)
- refactor VBT parsing code (Jani)
- rpm wakelock debug infrastructure ( Imre)
- fbdev is pinned again (Chris)
- tune the busywait logic to avoid wasting cpu cycles (Chris)

* tag 'drm-intel-next-2015-12-18' of git://anongit.freedesktop.org/drm-intel: (81 commits)
  drm/i915: Update DRIVER_DATE to 20151218
  drm/i915/skl: Default to noncoherent access up to F0
  drm/i915: Only spin whilst waiting on the current request
  drm/i915: Limit the busy wait on requests to 5us not 10ms!
  drm/i915: Break busywaiting for requests on pending signals
  drm/i915: don't enable autosuspend on platforms without RPM support
  drm/i915/backlight: prefer dev_priv over dev pointer
  drm/i915: Disable primary plane if we fail to reconstruct BIOS fb (v2)
  drm/i915: Pin the ifbdev for the info->system_base GGTT mmapping
  drm/i915: Set the map-and-fenceable flag for preallocated objects
  drm/i915: mdelay(10) considered harmful
  drm/i915: check that we are in an RPM atomic section in GGTT PTE updaters
  drm/i915: add support for checking RPM atomic sections
  drm/i915: check that we hold an RPM wakelock ref before we put it
  drm/i915: add support for checking if we hold an RPM reference
  drm/i915: use assert_rpm_wakelock_held instead of opencoding it
  drm/i915: add assert_rpm_wakelock_held helper
  drm/i915: remove HAS_RUNTIME_PM check from RPM get/put/assert helpers
  drm/i915: get a permanent RPM reference on platforms w/o RPM support
  drm/i915: refactor RPM disabling due to RC6 being disabled
  ...

9 years agoMerge branch 'drm-next-4.5' of git://people.freedesktop.org/~agd5f/linux into drm...
Dave Airlie [Wed, 23 Dec 2015 04:15:26 +0000 (14:15 +1000)]
Merge branch 'drm-next-4.5' of git://people.freedesktop.org/~agd5f/linux into drm-next

[airlied: fixup build problems on arm - added errno.h include]
* 'drm-next-4.5' of git://people.freedesktop.org/~agd5f/linux: (152 commits)
  amd/powerplay: fix copy paste typo in hardwaremanager.c
  amd/powerplay: disable powerplay by default initially
  amd/powerplay: don't enable ucode fan control if vbios has no fan table
  drm/amd/powerplay: show gpu load when print gpu performance for Cz. (v2)
  drm/amd/powerplay: check whether need to enable thermal control. (v2)
  drm/amd/powerplay: add point check to avoid NULL point hang.
  drm/amdgpu/powerplay: Program a calculated value as Deep Sleep clock.
  drm/amd/powerplay: Don't return an error if fan table is missing
  drm/powerplay/hwmgr: log errors in tonga_hwmgr_backend_init
  drm/powerplay: add debugging output to processpptables.c
  drm/powerplay: add debugging output to tonga_processpptables.c
  amd/powerplay: Add structures required to report configuration change
  amd/powerplay: Fix get dal power level
  amd\powerplay Implement get dal power level
  drm/amd/powerplay: display gpu load when print performance for tonga.
  drm/amdgpu/powerplay: enable sysfs and debugfs interfaces late
  drm/amd/powerplay: move shared function of vi to hwmgr. (v2)
  drm/amd/powerplay: check whether enable dpm in powerplay.
  drm/amd/powerplay: fix bug that dpm funcs in debugfs/sysfs missing.
  drm/amd/powerplay: fix boolreturn.cocci warnings
  ...

9 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-block
Linus Torvalds [Wed, 23 Dec 2015 00:00:25 +0000 (16:00 -0800)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-block

Pull block layer fixes from Jens Axboe:
 "Three small fixes for 4.4 final. Specifically:

   - The segment issue fix from Junichi, where the old IO path does a
     bio limit split before potentially bouncing the pages.  We need to
     do that in the right order, to ensure that limitations are met.

   - A NVMe surprise removal IO hang fix from Keith.

   - A use-after-free in null_blk, introduced by a previous patch in
     this series.  From Mike Krinkin"

* 'for-linus' of git://git.kernel.dk/linux-block:
  null_blk: fix use-after-free error
  block: ensure to split after potentially bouncing a bio
  NVMe: IO ending fixes on surprise removal

9 years agoMerge tag 'nfsd-4.4-1' of git://linux-nfs.org/~bfields/linux
Linus Torvalds [Tue, 22 Dec 2015 23:52:32 +0000 (15:52 -0800)]
Merge tag 'nfsd-4.4-1' of git://linux-nfs.org/~bfields/linux

Pull nfsd fix from Bruce Fields:
 "Just one fix for a NFSv4 callback bug introduced in 4.4"

* tag 'nfsd-4.4-1' of git://linux-nfs.org/~bfields/linux:
  nfsd: don't hold ls_mutex across a layout recall

9 years agoMerge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Linus Torvalds [Tue, 22 Dec 2015 23:47:39 +0000 (15:47 -0800)]
Merge tag 'for-linus' of git://git./virt/kvm/kvm

Pull kvm fixes from Paolo Bonzini:

 - A series of fixes to the MTRR emulation, tested in the BZ by several
   users so they should be safe this late

 - A fix for a division by zero

 - Two very simple ARM and PPC fixes

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: x86: Reload pit counters for all channels when restoring state
  KVM: MTRR: treat memory as writeback if MTRR is disabled in guest CPUID
  KVM: MTRR: observe maxphyaddr from guest CPUID, not host
  KVM: MTRR: fix fixed MTRR segment look up
  KVM: VMX: Fix host initiated access to guest MSR_TSC_AUX
  KVM: arm/arm64: vgic: Fix kvm_vgic_map_is_active's dist check
  kvm: x86: move tracepoints outside extended quiescent state
  KVM: PPC: Book3S HV: Prohibit setting illegal transaction state in MSR

9 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Linus Torvalds [Tue, 22 Dec 2015 23:43:18 +0000 (15:43 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/s390/linux

Pull s390 fixes from Martin Schwidefsky:
 "Two late bug fixes for kernel 4.4.

  Merry Christmas"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  s390/dis: Fix handling of format specifiers
  s390/zcrypt: Fix AP queue handling if queue is full

9 years agoMerge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
Linus Torvalds [Tue, 22 Dec 2015 23:37:19 +0000 (15:37 -0800)]
Merge tag 'for_linus' of git://git./linux/kernel/git/mst/vhost

Pull virtio fix from Michael Tsirkin:
 "This includes a single fix for virtio ccw error handling"

* tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
  virtio/s390: handle error values in irb

9 years agoum: Fix pointer cast
Mickaël Salaün [Tue, 22 Dec 2015 20:44:01 +0000 (21:44 +0100)]
um: Fix pointer cast

Fix a pointer cast typo introduced in v4.4-rc5 especially visible for
the i386 subarchitecture where it results in a kernel crash.

[ Also removed pointless cast as per Al Viro - Linus ]

Fixes: 8090bfd2bb9a ("um: Fix fpstate handling")
Signed-off-by: Mickaël Salaün <mic@digikod.net>
Cc: Jeff Dike <jdike@addtoit.com>
Acked-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
9 years agoMerge branch 'drm-tda998x-devel' of git://ftp.arm.linux.org.uk/~rmk/linux-arm into...
Dave Airlie [Tue, 22 Dec 2015 23:21:12 +0000 (09:21 +1000)]
Merge branch 'drm-tda998x-devel' of git://ftp.arm.linux.org.uk/~rmk/linux-arm into drm-next

These changes from Liviu add support for atomic mode setting, add the
TMDS clock limitation according to the device, and ensure that we
correctly clean up in the unbind function.

* 'drm-tda998x-devel' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
  drm/i2c: tda998x: Add support for atomic modesetting
  drm/i2c: tda998x: increase the supported dotclock frequency to 165MHz for TDA19988
  drm/i2c: tda998x: unregister the connector in the unbind function

9 years agoMerge branch 'drm-armada-devel' of git://ftp.arm.linux.org.uk/~rmk/linux-arm into...
Dave Airlie [Tue, 22 Dec 2015 23:19:58 +0000 (09:19 +1000)]
Merge branch 'drm-armada-devel' of git://ftp.arm.linux.org.uk/~rmk/linux-arm into drm-next

These are the patches from Daniel Vetter, getting rid of struct_mutex
from the Armada DRM driver.

* 'drm-armada-devel' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
  drm/armada: use a private mutex to protect priv->linear
  drm/armada: drop struct_mutex from cursor paths
  drm/armada: don't grab dev->struct_mutex for in mmap offset ioctl
  drm/armada: plug leak in dumb_map_offset
  drm/armada: use unlocked gem unreferencing

9 years agonull_blk: fix use-after-free error
Mike Krinkin [Tue, 15 Dec 2015 09:56:40 +0000 (12:56 +0300)]
null_blk: fix use-after-free error

blk_end_request_all may free request, so we need to save
request_queue pointer before blk_end_request_all call.

The problem was introduced in commit cf8ecc5a8455266f8d51
("null_blk: guarantee device restart in all irq modes")
and causes general protection fault with slab poisoning
enabled.

Fixes: cf8ecc5a8455266f8d51 ("null_blk: guarantee device
       restart in all irq modes")

Signed-off-by: Mike Krinkin <krinkin.m.u@gmail.com>
Reviewed-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
9 years agoblock: ensure to split after potentially bouncing a bio
Junichi Nomura [Tue, 22 Dec 2015 17:23:44 +0000 (10:23 -0700)]
block: ensure to split after potentially bouncing a bio

blk_queue_bio() does split then bounce, which makes the segment
counting based on pages before bouncing and could go wrong. Move
the split to after bouncing, like we do for blk-mq, and the we
fix the issue of having the bio count for segments be wrong.

Fixes: 54efd50bfd87 ("block: make generic_make_request handle arbitrarily sized bios")
Cc: stable@vger.kernel.org
Tested-by: Artem S. Tashkinov <t.artem@lycos.com>
Signed-off-by: Jens Axboe <axboe@fb.com>