platform/kernel/linux-rpi.git
7 years agoMerge tag 'drm-misc-next-2017-06-02' of git://anongit.freedesktop.org/git/drm-misc...
Dave Airlie [Tue, 6 Jun 2017 06:53:16 +0000 (16:53 +1000)]
Merge tag 'drm-misc-next-2017-06-02' of git://anongit.freedesktop.org/git/drm-misc into drm-next

Core Changes:
- Stop proliferation of drm_vblank_cleanup by adding to the docs and deleting
  boilerplate (Daniel)
- Roll out and use mode_valid hooks across crtc/encoder/bridge (Jose)
- Add drm_vblank.[hc] to isolate vblank code from optional irq helpers (Daniel)

Driver Changes:
- Replace drm_for_each_connector with drm_for_each_connector_iter (Gustavo)
- A couple misc driver fixes

Cc: Gustavo Padovan <gustavo.padovan@collabora.com>
Cc: Jose Abreu <Jose.Abreu@synopsys.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>
* tag 'drm-misc-next-2017-06-02' of git://anongit.freedesktop.org/git/drm-misc: (34 commits)
  drm/vc4: Mark the device as active when enabling runtime PM.
  drm: remove writeq/readq function definitions
  drm/atmel-hlcdc: Use crtc->mode_valid() callback
  drm/exynos: Drop drm_vblank_cleanup
  drm/hdlcd|mali: Drop drm_vblank_cleanup
  drm/doc: Polish irq helper documentation
  drm: Extract drm_vblank.[hc]
  drm/vc4: Fix comment in vc4_drv.h
  drm/pl111: fix warnings without CONFIG_ARM_AMBA
  drm/atomic: Consitfy mode parameter to drm_atomic_set_mode_for_crtc()
  drm/arcgpu: Drop drm_vblank_cleanup
  drm/atmel: Drop drm_vblank_cleanup
  drm/imx: Drop drm_vblank_cleanup
  drm/meson: Drop drm_vblank_cleanup
  drm/stm: Drop drm_vblank_cleanup
  drm/sun4i: Drop drm_vblank_cleanup
  drm: better document how to send out the crtc disable event
  drm: Use vsnprintf extension %ph
  drm/doc: move printf helpers out of drmP.h
  drm/pl111: select DRM_PANEL
  ...

7 years agoMerge tag 'omapdrm-4.13-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba...
Dave Airlie [Sat, 3 Jun 2017 01:30:42 +0000 (11:30 +1000)]
Merge tag 'omapdrm-4.13-v2' of git://git./linux/kernel/git/tomba/linux into drm-next

omapdrm changes for v4.13

* dmabuf fence support
* TILER rotation fixes
* big pile of various cleanups and refactorings

* tag 'omapdrm-4.13-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: (64 commits)
  drm/omap: fix tiled buffer stride calculations
  drm/omap: fix YUV422 90/270 rotation with mirroring
  drm/omap: fix YUV422 rotation with TILER
  drm/omap: pass rotation to dispc
  drm/omap: DRM_MODE_REFLECT_* instead of mirror boolean
  drm/omap: use DRM_MODE_ROTATE_* instead of OMAP_DSS_ROT_*
  drm/omap: remove omap_drm_win
  drm/omap: add drm_rotation_to_tiler helper()
  drm/omap: rename color_mode to fourcc
  drm/omap: cleanup formats array
  drm/omap: remove omap_framebuffer_get_formats()
  drm/omap: use DRM_FORMAT_* instead of OMAP_DSS_COLOR_*
  drm/omap: use u32 instead of enum omap_color_mode
  drm/omap: change supported_modes to an array
  drm/omap: remove unneeded prototypes
  drm/omap: add format_is_yuv() helper
  drm/omap: cleanup offset calculation
  drm/omap: remove dma & vrfb rotation
  drm/omap: ratelimit OCP error
  drm/omap: remove CLUT
  ...

7 years agodrm/vc4: Mark the device as active when enabling runtime PM.
Eric Anholt [Mon, 15 May 2017 17:16:15 +0000 (10:16 -0700)]
drm/vc4: Mark the device as active when enabling runtime PM.

Failing to do so meant that we got a resume() callback on first use of
the device, so we would leak the bin BO that we allocated during
probe.

Signed-off-by: Eric Anholt <eric@anholt.net>
Fixes: 553c942f8b2c ("drm/vc4: Allow using more than 256MB of CMA memory.")
Link: http://patchwork.freedesktop.org/patch/msgid/20170515171615.10168-1-eric@anholt.net
Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>
7 years agodrm: remove writeq/readq function definitions
Corentin Labbe [Fri, 2 Jun 2017 11:25:10 +0000 (13:25 +0200)]
drm: remove writeq/readq function definitions

Instead of rewriting write/readq, use linux/io-64-nonatomic-lo-hi.h which
already have them.

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/20170602112510.17544-1-clabbe.montjoie@gmail.com
7 years agodrm/atmel-hlcdc: Use crtc->mode_valid() callback
Jose Abreu [Thu, 25 May 2017 14:19:21 +0000 (15:19 +0100)]
drm/atmel-hlcdc: Use crtc->mode_valid() callback

Now that we have a callback to check if crtc supports a given mode
we can use it in atmel-hlcdc so that we restrict the number of probbed
modes to the ones we can actually display.

Also, remove the mode_fixup() callback as this is no longer needed
because mode_valid() will be called before.

Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Link: http://patchwork.freedesktop.org/patch/msgid/95fd6c06c58bd0b957e36a8d7068e6a74b581304.1495720737.git.joabreu@synopsys.com
7 years agodrm/omap: fix tiled buffer stride calculations
Tomi Valkeinen [Thu, 18 May 2017 08:51:51 +0000 (11:51 +0300)]
drm/omap: fix tiled buffer stride calculations

omap_gem uses page alignment for buffer stride. The related calculations
are a bit off, though, as byte stride of 4096 gets aligned to 8192,
instead of 4096.

This patch changes the code to use DIV_ROUND_UP(), which fixes those
calculations and makes them more readable.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agodrm/omap: fix YUV422 90/270 rotation with mirroring
Tomi Valkeinen [Tue, 16 May 2017 12:25:45 +0000 (15:25 +0300)]
drm/omap: fix YUV422 90/270 rotation with mirroring

When rotating 90/270 + mirroring with YUV422, the end result will have
adjacent pixels swapped. The problem is that
dispc_ovl_set_rotation_attrs() has wrong rotation values for these
cases.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agodrm/omap: fix YUV422 rotation with TILER
Tomi Valkeinen [Mon, 15 May 2017 08:09:25 +0000 (11:09 +0300)]
drm/omap: fix YUV422 rotation with TILER

TILER rotation with YUV422 pixelformats does not work at the moment. All
other pixel formats work, because the pixelformat's pixel size is equal
to tiler unit size (e.g. XR24's pixel size is 32 bits, and the TILER
unit size that has to be used is 32 bits).

For YUV422 formats this is not the case, as the TILER unit size has to
be 32 bits, but the pixel size is 16 bits. The end result is OCP errors
and sync losts.

This patch adds the code to adjust the variables for YUV422 formats.

We could make the code more generic by passing around the pixel format,
rotation type, angle and the tiler unit size, which would allow us to do
calculations without special case for YUV422. However, this would make
the code more complex, and at least for now this is much more easier to
handle with these two special cases for YUV422.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agodrm/omap: pass rotation to dispc
Tomi Valkeinen [Tue, 16 May 2017 09:48:58 +0000 (12:48 +0300)]
drm/omap: pass rotation to dispc

The omapdrm driver has not passed the rotation value to the dispc
driver. This doesn't affect RGB formats, but YUV formats don't work
without dispc knowing the orientation.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agodrm/omap: DRM_MODE_REFLECT_* instead of mirror boolean
Tomi Valkeinen [Tue, 16 May 2017 09:05:24 +0000 (12:05 +0300)]
drm/omap: DRM_MODE_REFLECT_* instead of mirror boolean

Change dispc driver to use the DRM_MODE_REFLECT flags instead of a mirror
boolean.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agodrm/omap: use DRM_MODE_ROTATE_* instead of OMAP_DSS_ROT_*
Tomi Valkeinen [Tue, 16 May 2017 08:05:09 +0000 (11:05 +0300)]
drm/omap: use DRM_MODE_ROTATE_* instead of OMAP_DSS_ROT_*

At the moment the dispc driver uses a custom enum for rotation. Change
it to use the DRM's DRM_MODE_ROTATE_*.

Note that mirroring is at the moment handled as a separate boolean in
the dispc driver, so we only use the DRM_MODE_ROTATE_* values.

Note, DSS HW uses clockwise rotation, DRM counter-clockwise.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agodrm/omap: remove omap_drm_win
Tomi Valkeinen [Mon, 15 May 2017 10:40:08 +0000 (13:40 +0300)]
drm/omap: remove omap_drm_win

struct omap_drm_window is only used to pass plane setup data to
omap_framebuffer_update_scanout(). This can as well be accomplished by
just passing the DRM state.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agodrm/omap: add drm_rotation_to_tiler helper()
Tomi Valkeinen [Mon, 15 May 2017 09:57:46 +0000 (12:57 +0300)]
drm/omap: add drm_rotation_to_tiler helper()

Add a helper function to convert DRM rotation to TILER rotation.

Also drop a error print that can never happen, as the DRM framework
makes sure the rotation is valid.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agodrm/omap: rename color_mode to fourcc
Tomi Valkeinen [Thu, 4 May 2017 08:31:56 +0000 (11:31 +0300)]
drm/omap: rename color_mode to fourcc

Now that we use fourccs, we can also rename the 'color_mode' variables
to 'fourcc'.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agodrm/omap: cleanup formats array
Tomi Valkeinen [Thu, 4 May 2017 08:29:58 +0000 (11:29 +0300)]
drm/omap: cleanup formats array

omap_fb.c has a table with DSS and DRM formats, used to convert between
them. This is no longer needed, so we can change the array to a plain
array of DRM_FORMAT_* values which contain all possible pixel formats
supported by any DSS IP version.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agodrm/omap: remove omap_framebuffer_get_formats()
Tomi Valkeinen [Thu, 4 May 2017 08:27:49 +0000 (11:27 +0300)]
drm/omap: remove omap_framebuffer_get_formats()

We now get a fourcc array from dispc when asking for a plane's supported
pixel formats, so we can drop omap_framebuffer_get_formats() which was
used to convert between DSS and DRM pixel formats.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agodrm/omap: use DRM_FORMAT_* instead of OMAP_DSS_COLOR_*
Tomi Valkeinen [Thu, 4 May 2017 07:40:46 +0000 (10:40 +0300)]
drm/omap: use DRM_FORMAT_* instead of OMAP_DSS_COLOR_*

This patch changes omapdrm to use DRM_FORMAT_* values instead of
OMAP_DSS_COLOR_* enum.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agodrm/omap: use u32 instead of enum omap_color_mode
Tomi Valkeinen [Thu, 4 May 2017 08:19:12 +0000 (11:19 +0300)]
drm/omap: use u32 instead of enum omap_color_mode

In this step we drop 'enum omap_color_mode', and use u32 instead.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agodrm/omap: change supported_modes to an array
Tomi Valkeinen [Thu, 4 May 2017 07:27:53 +0000 (10:27 +0300)]
drm/omap: change supported_modes to an array

enum omap_color_mode is a bitmask, so at the moment we present the
supported color modes as mask. To be able to move to fourccs, we need to
use an array to present the supported color modes.

As a first step towards fourccs, this patch changes the code to use an
array to store the enums.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agodrm/omap: remove unneeded prototypes
Tomi Valkeinen [Thu, 4 May 2017 07:18:00 +0000 (10:18 +0300)]
drm/omap: remove unneeded prototypes

omapdss.h contains prototypes for three functions, which are also
defined in dss_features.h. Remove the extra prototypes from omapdss.h.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agodrm/omap: add format_is_yuv() helper
Tomi Valkeinen [Thu, 4 May 2017 06:13:32 +0000 (09:13 +0300)]
drm/omap: add format_is_yuv() helper

In a few places the dispc driver needs to know whether the pixel format
is an YUV format. Add a helper to figure that out.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agodrm/omap: cleanup offset calculation
Tomi Valkeinen [Wed, 3 May 2017 12:01:10 +0000 (15:01 +0300)]
drm/omap: cleanup offset calculation

The code to calculate offset in dispc's calc_offset() is overly complex.
Simplify it.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agodrm/omap: remove dma & vrfb rotation
Tomi Valkeinen [Wed, 3 May 2017 11:14:27 +0000 (14:14 +0300)]
drm/omap: remove dma & vrfb rotation

We have three rotation methods supported by the SoCs with DSS: DMA,
VRFB and TILER.

DMA rotation works in theory on all DSS platforms, but in practice it's
unusable due to the huge amount of memory bandwidth it uses, and has
never really been used.

VRFB is available on OMAP3, but is not supported by omapdrm, even though
we have some code for it in the dispc driver.

TILER is supported on OMAP4/OMAP5/DRA7/AM5 platforms, but has some
driver bugs.

To clean up the driver to help fixing the TILER issues, this patch drops
the DMA and VRFB rotation support, leaving only TILER rotation.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agodrm/omap: ratelimit OCP error
Tomi Valkeinen [Fri, 3 Mar 2017 10:15:39 +0000 (12:15 +0200)]
drm/omap: ratelimit OCP error

Use dev_err_ratelimited() when an OCP error happens, to slightly easen
the flood.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agodrm/omap: remove CLUT
Tomi Valkeinen [Fri, 10 Mar 2017 08:32:30 +0000 (10:32 +0200)]
drm/omap: remove CLUT

DSS IP versions 2 and 3 support CLUT modes (color lookup table), but the
driver has never supported those. We still have had some code for CLUT
modes. As the newer DSS IP versions have dropped CLUT support, we might
as well clean up the driver by removing the CLUT related code.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agodrm/omap: fix setting & clearing DOUBLESTRIDE
Tomi Valkeinen [Mon, 29 Aug 2016 08:15:49 +0000 (11:15 +0300)]
drm/omap: fix setting & clearing DOUBLESTRIDE

The code that sets and clears DOUBLESTRIDE is only ran when using NV12.
This is not correct, as we might first set the bith when using NV12, but
never clear it when using other formats.

Fix it so that when the bit is available (when the HW supports NV12) we
always either set or clear the bit.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agodrm/omap: Remove unused omap_dss_find_output() function
Laurent Pinchart [Fri, 12 May 2017 12:33:55 +0000 (15:33 +0300)]
drm/omap: Remove unused omap_dss_find_output() function

The omap_dss_find_output() function is unused, remove it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
7 years agodrm/omap: remove omap_overlay & omap_overlay_manager
Tomi Valkeinen [Fri, 12 May 2017 10:05:45 +0000 (13:05 +0300)]
drm/omap: remove omap_overlay & omap_overlay_manager

Structs omap_overlay and omap_overlay_manager are not used, remove them.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agodrm/omap: remove unused fields
Tomi Valkeinen [Fri, 12 May 2017 09:58:21 +0000 (12:58 +0300)]
drm/omap: remove unused fields

Remove unused fields in struct omap_dss_device.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agodrm/omap: remove legacy get_resolution
Tomi Valkeinen [Fri, 12 May 2017 09:56:57 +0000 (12:56 +0300)]
drm/omap: remove legacy get_resolution

get_resolution is not used, remove it.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agodrm/omap: remove unused get_dimensions()
Tomi Valkeinen [Fri, 12 May 2017 09:55:22 +0000 (12:55 +0300)]
drm/omap: remove unused get_dimensions()

get_dimensions function pointer is not used, remove it.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agodrm/omap: remove rfbi
Tomi Valkeinen [Thu, 4 May 2017 09:18:43 +0000 (12:18 +0300)]
drm/omap: remove rfbi

The RFBI driver has not worked nor compiled for many years. There are
very few boards out there that use RFBI, and no one has stepped up to
fix it.

So let's remove the RFBI code that doesn't even compile.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agodrm/omap: dpi: remove legacy data_lines
Tomi Valkeinen [Fri, 12 May 2017 09:49:14 +0000 (12:49 +0300)]
drm/omap: dpi: remove legacy data_lines

Remove DPI's legacy data_lines code.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agodrm/omap: remove recommended_bpp
Tomi Valkeinen [Fri, 12 May 2017 09:48:33 +0000 (12:48 +0300)]
drm/omap: remove recommended_bpp

recommended_bpp hasn't been used for ages, remove the code.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agodrm/omap: venc: remove set_type & invert_vid_out_polarity
Tomi Valkeinen [Fri, 12 May 2017 09:40:55 +0000 (12:40 +0300)]
drm/omap: venc: remove set_type & invert_vid_out_polarity

Non-DT booting is no longer supported, so remove legacy code.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agodrm/omap: sdi: remove legacy set_datapairs
Tomi Valkeinen [Fri, 12 May 2017 09:38:46 +0000 (12:38 +0300)]
drm/omap: sdi: remove legacy set_datapairs

Non-DT booting is no longer supported, so remove legacy code.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agodrm/omap: connector-dvi/hdmi: remove extra include
Tomi Valkeinen [Fri, 12 May 2017 09:37:04 +0000 (12:37 +0300)]
drm/omap: connector-dvi/hdmi: remove extra include

Remove extra includes related to non-DT boot.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agodrm/omap: connector-analog-tv: remove non-DT support
Tomi Valkeinen [Fri, 12 May 2017 09:36:48 +0000 (12:36 +0300)]
drm/omap: connector-analog-tv: remove non-DT support

Non-DT booting is no longer supported, so remove legacy code.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agodrm/omap: acx565akm: remove non-DT support
Tomi Valkeinen [Fri, 12 May 2017 09:36:32 +0000 (12:36 +0300)]
drm/omap: acx565akm: remove non-DT support

Non-DT booting is no longer supported, so remove legacy code.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agodrm/omap: panel-dpi: remove non-DT support
Tomi Valkeinen [Fri, 12 May 2017 09:36:18 +0000 (12:36 +0300)]
drm/omap: panel-dpi: remove non-DT support

Non-DT booting is no longer supported, so remove legacy code.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agodrm/omap: define compat_ioctl
Tomi Valkeinen [Fri, 24 Feb 2017 11:24:50 +0000 (13:24 +0200)]
drm/omap: define compat_ioctl

Define compat_ioctl in omapdriver_fops to make it possible to use 32bit
apps on 64bit platform.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agodrm/omap: 64bit compile fixes
Tomi Valkeinen [Tue, 21 Feb 2017 07:57:12 +0000 (09:57 +0200)]
drm/omap: 64bit compile fixes

Fix a few type issues that cause compile warnings on 64 bit ARM
compiler. The change should not affect 32bit platforms.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agodrm/omap: remove read_irqenable()
Tomi Valkeinen [Mon, 20 Feb 2017 11:18:38 +0000 (13:18 +0200)]
drm/omap: remove read_irqenable()

We only use read_irqenable() to flush posted write. Instead of having a
separate function for this, do the flush implicitly in write_irqenable().
Thus we can remove read_irqenable().

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agodrm/omap: remove ovl_set_channel_out
Tomi Valkeinen [Fri, 17 Feb 2017 10:30:07 +0000 (12:30 +0200)]
drm/omap: remove ovl_set_channel_out

At the moment we have ovl_set_channel_out() to configure the output
channel of an overlay. It makes sense to have this configuration as part
of the rest of overlay configuration, and in DSS6+ we need the output
channel when doing the other overlay configuration.

This patch adds a 'channel' parameter to ovl_setup(), so that all
overlay configuration is done via the same function, and removes the
ovl_set_channel_out().

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agodrm/omap: remove unused ovl_enabled()
Tomi Valkeinen [Fri, 17 Feb 2017 10:20:16 +0000 (12:20 +0200)]
drm/omap: remove unused ovl_enabled()

ovl_enabled() is not used anywhere, so remove it.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agodrm/omap: add new connector types
Tomi Valkeinen [Thu, 27 Apr 2017 10:02:28 +0000 (13:02 +0300)]
drm/omap: add new connector types

We have been using DRM_MODE_CONNECTOR_Unknown for many of our outputs
because there has not been a proper connector type for them.

We now have connector type for DPI so let's take it into use. At the
same time, add better connector types for the remaining outputs too.

This patch sets the following outputs to use the following connector
types:

DPI -> DPI
DBI -> DPI (MIPI DBI is very similar to DPI at the bus level)
SDI -> LVDS (SDI, TI Flatlink 3G, is a type of LVDS)
VENC -> SVIDEO or Composite

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
7 years agodrm: omapdrm: sdi: Remove platform driver
Laurent Pinchart [Sat, 6 May 2017 22:37:24 +0000 (01:37 +0300)]
drm: omapdrm: sdi: Remove platform driver

The SDI platform driver was used for non-DT platforms only. On DT
platforms the SDI port is handled manually. As OMAP display devices are
now instantiated from DT only, remove the SDI platform driver.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
7 years agodrm: omapdrm: dpi: Remove platform driver
Laurent Pinchart [Sat, 6 May 2017 22:37:24 +0000 (01:37 +0300)]
drm: omapdrm: dpi: Remove platform driver

The DPI platform driver was used for non-DT platforms only. On DT
platforms the DPI port is handled manually. As OMAP display devices are
now instantiated from DT only, remove the DPI platform driver.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
7 years agodrm: omapdrm: Infer the OMAP version from the SoC family
Laurent Pinchart [Fri, 5 May 2017 23:57:12 +0000 (02:57 +0300)]
drm: omapdrm: Infer the OMAP version from the SoC family

The omapdrm exposes the SoC version to userspace through an integer that
contains the OMAP model (e.g. 0x3430 for the OMAP3430). This is an
unfortunate choice of userspace API as it's both conceptually wrong
(userspace nowadays should use /sys/bus/soc/ for that purpose) and
inaccurate as many models with different features are reported with the
same version number.

The only known user of this API is the xomap X11 driver. Even if it has
been deprecated for some time we can't drop the kernel API yet. We can,
however, infer the version number from the SoC family to avoid the need
to pass the version number through platform data.

Do this, which makes the omapdrm platform data not needed anymore, and
ready to be removed.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
7 years agodrm: omapdrm: Remove unused default display name support
Laurent Pinchart [Wed, 14 Dec 2016 01:35:03 +0000 (03:35 +0200)]
drm: omapdrm: Remove unused default display name support

The default display name is both unused and never set by platform data.
Remove default display name module parameter, platform data field and
runtime infrastructure.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
7 years agodrm: omapdrm: Remove unused dss_get_core_pdev() function
Laurent Pinchart [Fri, 5 May 2017 21:26:15 +0000 (00:26 +0300)]
drm: omapdrm: Remove unused dss_get_core_pdev() function

The dss_get_core_pdev() function is unused, remove it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
7 years agodrm: omapdrm: Drop support for non-DT devices
Laurent Pinchart [Sat, 6 May 2017 21:42:26 +0000 (00:42 +0300)]
drm: omapdrm: Drop support for non-DT devices

All OMAP platforms use DT nowadays, drop support for non-DT devices.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
7 years agodrm: omapdrm: Remove duplicate error messages when mapping memory
Laurent Pinchart [Sat, 6 May 2017 21:29:09 +0000 (00:29 +0300)]
drm: omapdrm: Remove duplicate error messages when mapping memory

The devm_ioremap_resource() call can handle being given a NULL resource,
and prints an error message when mapping fails. Switch the remaining
devm_ioremap() calls to devm_ioremap_resource() and remove all
extraneous resource NULL checks and error messages printed manually by
the driver.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
7 years agodrm: omapdrm: Take GEM object reference when exporting dmabuf
Laurent Pinchart [Mon, 8 May 2017 18:59:24 +0000 (21:59 +0300)]
drm: omapdrm: Take GEM object reference when exporting dmabuf

To ensure that neither the GEM object nor the DRM device goes away while
a GEM object exported through dma-buf is still accessible, references
must be taken to both the GEM object and the DRM device at export time.
The dma-buf release handler already releases the GEM object, but the
export handler doesn't take a corresponding reference, which results in
a refcount underflow.

Fix this by replacing the custom implementation by
drm_gem_dmabuf_export() and drm_gem_dmabuf_release() that handle
reference counting for us.

Fixes: 6ad11bc3a0b8 ("staging: drm/omap: dmabuf/prime support")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 years agodrm: omapdrm: Map pages for DMA in DMA_TO_DEVICE direction
Laurent Pinchart [Thu, 20 Apr 2017 21:33:58 +0000 (00:33 +0300)]
drm: omapdrm: Map pages for DMA in DMA_TO_DEVICE direction

The display engine only reads from memory, there's no need to use
bidirectional DMA mappings. Use DMA_TO_DEVICE instead.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
7 years agodrm: omapdrm: DMA-unmap pages for all buffer types when freeing buffers
Laurent Pinchart [Thu, 20 Apr 2017 21:33:57 +0000 (00:33 +0300)]
drm: omapdrm: DMA-unmap pages for all buffer types when freeing buffers

Both coherent (uncached) and non-coherent (cached) buffers can have
their pages mapped to the device through the DMA mapping API. Make sure
to unmap any mapped page when freeing a buffer, regardless of its type.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
7 years agodrm: omapdrm: Fix incorrect usage of the term 'cache coherency'
Laurent Pinchart [Thu, 20 Apr 2017 21:33:56 +0000 (00:33 +0300)]
drm: omapdrm: Fix incorrect usage of the term 'cache coherency'

The is_cache_coherent() function currently returns true when the mapping
is not cache-coherent. This isn't a bug as such as the callers interpret
cache-coherent as meaning that the driver has to handle the coherency
manually, but it is nonetheless very confusing. Fix it and add a bit
more documentation to explain how cached buffers are handled.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
7 years agodrm: omapdrm: Rename GEM DMA sync functions
Laurent Pinchart [Thu, 20 Apr 2017 21:33:55 +0000 (00:33 +0300)]
drm: omapdrm: Rename GEM DMA sync functions

The omap_gem_cpu_sync() function operates at a page level, while the
omap_gem_dma_sync() function operates at a buffer level. Rename them to
omap_gem_cpu_sync_page() and omap_gem_dma_sync_buffer() respectively to
avoid confusion.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
7 years agodrm: omapdrm: Rename the omap_gem_object addrs field to dma_addrs
Laurent Pinchart [Thu, 20 Apr 2017 21:33:54 +0000 (00:33 +0300)]
drm: omapdrm: Rename the omap_gem_object addrs field to dma_addrs

The field contains DMA addresses, clarify that by renaming it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
7 years agodrm: omapdrm: Lower indentation level in omap_gem_dma_sync_buffer()
Laurent Pinchart [Thu, 20 Apr 2017 21:33:53 +0000 (00:33 +0300)]
drm: omapdrm: Lower indentation level in omap_gem_dma_sync_buffer()

This makes the function more readable.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
7 years agodrm: omapdrm: Rename omap_gem_(get|put)_paddr() to omap_gem_(un)pin()
Laurent Pinchart [Thu, 20 Apr 2017 21:33:52 +0000 (00:33 +0300)]
drm: omapdrm: Rename omap_gem_(get|put)_paddr() to omap_gem_(un)pin()

The reflects the purpose of the function better.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
7 years agodrm: omapdrm: Rename occurrences of paddr to dma_addr
Laurent Pinchart [Thu, 20 Apr 2017 21:33:51 +0000 (00:33 +0300)]
drm: omapdrm: Rename occurrences of paddr to dma_addr

The fields, variables and functions deal with DMA addresses, name them
accordingly. The omap_gem_get_paddr() and omap_gem_put_paddr() will be
addressed differently separately.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
7 years agodrm: omapdrm: Remove remap argument to omap_gem_get_paddr()
Laurent Pinchart [Thu, 20 Apr 2017 21:33:50 +0000 (00:33 +0300)]
drm: omapdrm: Remove remap argument to omap_gem_get_paddr()

The function is always called with the remap argument set to true.
Hardcode that behaviour and remove it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
7 years agodrm: omapdrm: Add zpos property
Laurent Pinchart [Mon, 8 May 2017 22:27:14 +0000 (01:27 +0300)]
drm: omapdrm: Add zpos property

Create a standard zpos property for every plane as an alias to the
omapdrm-specific zorder property. Unlike the zorder property that has to
be instantiated for both planes and CRTCs due to backward compatibility,
the zpos property is only instantiated for planes. When userspace will
have switched to the zpos property the zorder property will be removed.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
7 years agodrm: omapdrm: Remove custom plane state
Laurent Pinchart [Mon, 8 May 2017 22:27:13 +0000 (01:27 +0300)]
drm: omapdrm: Remove custom plane state

The custom plane state only encapsulates the standard plane state with
adding any custom field. Remove it and use the atomic plane helpers
directly.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
7 years agodrm: omapdrm: Store the Z order in the plane state zpos field
Laurent Pinchart [Mon, 8 May 2017 22:27:12 +0000 (01:27 +0300)]
drm: omapdrm: Store the Z order in the plane state zpos field

The DRM core implements a standard "zpos" property to control planes
ordering. The omapdrm driver implements a similar property named
"zorder". Although we can't switch to DRM core handling of the "zpos"
property for backward compatibility reasons, we can store the zorder
value in the drm_plane_state zpos field, saving us from adding a custom
field to the plane state.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
7 years agodrm: omapdrm: Remove legacy buffer synchronization support
Laurent Pinchart [Mon, 8 May 2017 22:27:11 +0000 (01:27 +0300)]
drm: omapdrm: Remove legacy buffer synchronization support

The omapdrm driver uses a custom API to synchronize with the SGX GPU.
This is unusable as such in the mainline kernel as the API is only
partially implemented and requires additional out-of-tree patches.
Furthermore, as no SGX driver is available in the mainline kernel, the
API can't be considered as a stable mainline API.

Now that the driver supports synchronization through fences, remove
legacy buffer synchronization support. The two userspace ioctls are
turned into no-ops to avoid breaking userspace and will be removed in
the future.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
7 years agodrm: omapdrm: Use DRM core's atomic commit helper
Laurent Pinchart [Mon, 8 May 2017 22:27:10 +0000 (01:27 +0300)]
drm: omapdrm: Use DRM core's atomic commit helper

The DRM core atomic helper now supports asynchronous commits natively.
The custom omapdrm implementation isn't needed anymore, remove it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
7 years agodrm: omapdrm: Handle events when enabling/disabling CRTCs
Laurent Pinchart [Mon, 8 May 2017 22:27:09 +0000 (01:27 +0300)]
drm: omapdrm: Handle events when enabling/disabling CRTCs

The driver currently handles vblank events only when updating planes on
an already enabled CRTC. The atomic update API however allows requesting
an event when enabling or disabling a CRTC. This currently leads to
event objects being leaked in the kernel and to events not being sent
out. Fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
7 years agodrm/exynos: Drop drm_vblank_cleanup
Daniel Vetter [Wed, 24 May 2017 14:51:53 +0000 (16:51 +0200)]
drm/exynos: Drop drm_vblank_cleanup

Only in the load failure path, where the hardware is quiet anyway.

Cc: Inki Dae <inki.dae@samsung.com>
Cc: Joonyoung Shim <jy0922.shim@samsung.com>
Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170524145212.27837-19-daniel.vetter@ffwll.ch
7 years agodrm/hdlcd|mali: Drop drm_vblank_cleanup
Daniel Vetter [Wed, 24 May 2017 14:51:51 +0000 (16:51 +0200)]
drm/hdlcd|mali: Drop drm_vblank_cleanup

IRQs are properly shut down, so it almost works as race-free shutdown.
Except the irq is stopped after the vblank stuff, so boom anyway.
Proper way would be to call drm_atomic_helper_shutdown before any of
the kms things gets stopped. So no harm in removing the
drm_vblank_cleanup here really.

Same story for both hdlcd and mali.

v2: Move misplaced malidp hunk to this patch (Liviu).

Cc: Liviu Dudau <liviu.dudau@arm.com>
Cc: Brian Starkey <brian.starkey@arm.com>
Acked-by: Liviu Dudau <liviu.dudau@arm.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170524145212.27837-17-daniel.vetter@ffwll.ch
7 years agodrm/doc: Polish irq helper documentation
Daniel Vetter [Wed, 31 May 2017 09:22:53 +0000 (11:22 +0200)]
drm/doc: Polish irq helper documentation

Pull a (much shorter) overview into drm_irq.c, and instead put the
callback documentation into in-line comments in drm_drv.h.

v2: Move the include stanzas back to the split-up patch (Stefan).

Cc: Stefan Agner <stefan@agner.ch>
Reviewed-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170531092253.12833-1-daniel.vetter@ffwll.ch
7 years agodrm: Extract drm_vblank.[hc]
Daniel Vetter [Wed, 31 May 2017 09:21:46 +0000 (11:21 +0200)]
drm: Extract drm_vblank.[hc]

drm_irq.c contains both the irq helper library (optional) and the
vblank support (optional, but part of the modeset uapi, and doesn't
require the use of the irq helpers at all.

Split this up for more clarity of the scope of the individual bits.

v2: Move misplaced hunks to this patch (Stefan).

Cc: Stefan Agner <stefan@agner.ch>
Reviewed-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170531092146.12528-1-daniel.vetter@ffwll.ch
7 years agodrm/vc4: Fix comment in vc4_drv.h
Boris Brezillon [Tue, 23 May 2017 14:36:27 +0000 (16:36 +0200)]
drm/vc4: Fix comment in vc4_drv.h

Fixes a copy&paste error.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Link: http://patchwork.freedesktop.org/patch/msgid/1495550187-525-1-git-send-email-boris.brezillon@free-electrons.com
7 years agodrm/pl111: fix warnings without CONFIG_ARM_AMBA
Arnd Bergmann [Wed, 24 May 2017 15:49:58 +0000 (17:49 +0200)]
drm/pl111: fix warnings without CONFIG_ARM_AMBA

The driver is written in a way to enable compile-testing without CONFIG_ARM_AMBA,
but it just causes needless warnings:

drivers/gpu/drm/pl111/pl111_drv.c:149:26: error: 'pl111_drm_driver' defined but not used [-Werror=unused-variable]
drivers/gpu/drm/pl111/pl111_drv.c:81:12: error: 'pl111_modeset_init' defined but not used [-Werror=unused-function]

This unhides the probe/remove functions again and just leaves the driver
object as unused when CONFIG_ARM_AMBA is disabled, with a __maybe_unused
annotation to shut up the warning.

Fixes: bed41005e617 ("drm/pl111: Initial drm/kms driver for pl111")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Eric Anholt <eric@anholt.net>
Link: http://patchwork.freedesktop.org/patch/msgid/20170524155020.1777369-1-arnd@arndb.de
7 years agodrm/atomic: Consitfy mode parameter to drm_atomic_set_mode_for_crtc()
Ville Syrjälä [Thu, 18 May 2017 19:38:36 +0000 (22:38 +0300)]
drm/atomic: Consitfy mode parameter to drm_atomic_set_mode_for_crtc()

drm_atomic_set_mode_for_crtc() doesn't modify the passed mode, so let's
make it const.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170518193837.393-1-ville.syrjala@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
7 years agodrm/arcgpu: Drop drm_vblank_cleanup
Daniel Vetter [Wed, 24 May 2017 14:51:50 +0000 (16:51 +0200)]
drm/arcgpu: Drop drm_vblank_cleanup

CRTC don't seem to get shut down in a controlled fashion, but no one
bothers to stop interrupts either so this races no matter what. Might
as well remove it. A call to drm_atomic_helper_shutdown would be
pretty sweet somewhere (and maybe getting rid of the load/unload
callbacks while at it).

Cc: Alexey Brodkin <abrodkin@synopsys.com>
Reviewed-by: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170524145212.27837-16-daniel.vetter@ffwll.ch
Link: http://patchwork.freedesktop.org/patch/msgid/20170524145212.27837-14-daniel.vetter@ffwll.ch
7 years agodrm/atmel: Drop drm_vblank_cleanup
Daniel Vetter [Wed, 24 May 2017 14:51:52 +0000 (16:51 +0200)]
drm/atmel: Drop drm_vblank_cleanup

Again almost correct, but since interrupts are shut down after vblank
still a race. Proper cleanup would call drm_atomic_helper_shutdown to
make sure this really is safe.

v2: Remove misplace malidp hunk (Liviu).

Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170524145212.27837-18-daniel.vetter@ffwll.ch
7 years agodrm/imx: Drop drm_vblank_cleanup
Daniel Vetter [Wed, 24 May 2017 14:51:58 +0000 (16:51 +0200)]
drm/imx: Drop drm_vblank_cleanup

It's only done in the driver load error path, where vblanks don't need
to be quiescent anyway. And that's all drm_vblank_cleanup does, since
the core will release the vblank allocations on its own already. So
drop it.

Cc: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170524145212.27837-24-daniel.vetter@ffwll.ch
7 years agodrm/meson: Drop drm_vblank_cleanup
Daniel Vetter [Wed, 24 May 2017 14:52:00 +0000 (16:52 +0200)]
drm/meson: Drop drm_vblank_cleanup

Again seems just cargo-culted.

Cc: Neil Armstrong <narmstrong@baylibre.com>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170524145212.27837-26-daniel.vetter@ffwll.ch
7 years agodrm/stm: Drop drm_vblank_cleanup
Daniel Vetter [Wed, 24 May 2017 14:52:06 +0000 (16:52 +0200)]
drm/stm: Drop drm_vblank_cleanup

Again seems just cargo-culted.

Cc: Yannick Fertre <yannick.fertre@st.com>
Cc: Philippe Cornu <philippe.cornu@st.com>
Acked-by: Philippe Cornu <philippe.cornu@st.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170524145212.27837-32-daniel.vetter@ffwll.ch
7 years agodrm/sun4i: Drop drm_vblank_cleanup
Daniel Vetter [Wed, 24 May 2017 14:52:07 +0000 (16:52 +0200)]
drm/sun4i: Drop drm_vblank_cleanup

Again seems just cargo-culted ... It's not ordered against any
irq/vblank/modeset shutdown.

Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170524145212.27837-33-daniel.vetter@ffwll.ch
7 years agodrm: better document how to send out the crtc disable event
Daniel Vetter [Wed, 24 May 2017 14:51:48 +0000 (16:51 +0200)]
drm: better document how to send out the crtc disable event

The kernel doc explained what needs to happen, but not how to most
easily accomplish that using the functions. Fix that.

Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170524145212.27837-14-daniel.vetter@ffwll.ch
7 years agodrm: Use vsnprintf extension %ph
Joe Perches [Tue, 30 May 2017 23:35:37 +0000 (16:35 -0700)]
drm: Use vsnprintf extension %ph

Using the extension saves a bit of code.

Miscellanea:

o Neaten and simplify dump_dp_payload_table
o Removed trailing blank space from output

$ size drivers/gpu/drm/drm_dp_mst_topology.o.* drivers/gpu/drm/tinydrm/*.o*
   text    data     bss     dec     hex filename
  25848       0      16   25864    6508 drivers/gpu/drm/drm_dp_mst_topology.o.new
  26091       0      16   26107    65fb drivers/gpu/drm/drm_dp_mst_topology.o.old
   3362       2       0    3364     d24 drivers/gpu/drm/tinydrm/mipi-dbi.o.new
   3376       2       0    3378     d32 drivers/gpu/drm/tinydrm/mipi-dbi.o.old

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/a78a21b5f34947da65473a0b7326922cda51a3be.1496187315.git.joe@perches.com
7 years agodrm/doc: move printf helpers out of drmP.h
Daniel Vetter [Wed, 24 May 2017 14:51:36 +0000 (16:51 +0200)]
drm/doc: move printf helpers out of drmP.h

And document them lightly. Unfortunately kernel-doc isn't the most
awesome for documenting #defines that don't look like functions, it
makes functions out of them :-/

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170524145212.27837-2-daniel.vetter@ffwll.ch
Link: http://patchwork.freedesktop.org/patch/msgid/20170524145212.27837-3-daniel.vetter@ffwll.ch
7 years agodrm/pl111: select DRM_PANEL
Arnd Bergmann [Tue, 30 May 2017 09:22:08 +0000 (11:22 +0200)]
drm/pl111: select DRM_PANEL

When DRM_PANEL is disabled, we get a link error for pl111:

drivers/gpu/built-in.o: In function `pl111_connector_destroy':
pl111_connector.c:(.text+0x3487e6): undefined reference to `drm_panel_detach'

For some reason this only appears in the latest linux-next
although the driver appears to have used the symbol for a few
weeks already. The solution however is simple enough, we just
need to add a 'select' statement.

Fixes: bed41005e617 ("drm/pl111: Initial drm/kms driver for pl111")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20170530092224.1204037-1-arnd@arndb.de
7 years agodrm/bridge: analogix-anx78xx: Use bridge->mode_valid() callback
Jose Abreu [Thu, 25 May 2017 14:19:18 +0000 (15:19 +0100)]
drm/bridge: analogix-anx78xx: Use bridge->mode_valid() callback

Now that we have a callback to check if bridge supports a given mode
we can use it in Analogix bridge so that we restrict the number of
probbed modes to the ones we can actually display.

Also, there is no need to use mode_fixup() callback as mode_valid()
will handle the mode validation.

Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Cc: Carlos Palminha <palminha@synopsys.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Archit Taneja <architt@codeaurora.org>
Cc: Andrzej Hajda <a.hajda@samsung.com>
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
Cc: David Airlie <airlied@linux.ie>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1d0ed1858ae56c827bd09cc1fa6ff4a05d1530eb.1495720737.git.joabreu@synopsys.com
7 years agodrm: Use mode_valid() in atomic modeset
Jose Abreu [Thu, 25 May 2017 14:19:16 +0000 (15:19 +0100)]
drm: Use mode_valid() in atomic modeset

This patches makes use of the new mode_valid() callbacks introduced
previously to validate the full video pipeline when modesetting.

This calls the connector->mode_valid(), encoder->mode_valid(),
bridge->mode_valid() and crtc->mode_valid() so that we can
make sure that the mode will be accepted in every components.

Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Cc: Carlos Palminha <palminha@synopsys.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Dave Airlie <airlied@linux.ie>
Cc: Andrzej Hajda <a.hajda@samsung.com>
Cc: Archit Taneja <architt@codeaurora.org>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Changes v1->v2:
- Removed call to connector->mode_valid (Ville, Daniel)
- Changed function name (Ville)
- Use for_each_new_connector_in_state (Ville)
- Do not validate if connector and mode didn't change (Ville)
- Use new helpers to call mode_valid

Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/a457d6a69ad07b3936304653c919068c430c0857.1495720737.git.joabreu@synopsys.com
7 years agodrm: Use new mode_valid() helpers in connector probe helper
Jose Abreu [Thu, 25 May 2017 14:19:15 +0000 (15:19 +0100)]
drm: Use new mode_valid() helpers in connector probe helper

This changes the connector probe helper function to use the new
encoder->mode_valid(), bridge->mode_valid() and crtc->mode_valid()
helper callbacks to validate the modes.

The new callbacks are optional so the behaviour remains the same
if they are not implemented. If they are, then the code loops
through all the connector's encodersXbridgesXcrtcs and calls the
callback.

If at least a valid encoderXbridgeXcrtc combination is found which
accepts the mode then the function returns MODE_OK.

Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Carlos Palminha <palminha@synopsys.com>
Cc: Dave Airlie <airlied@linux.ie>
Cc: Andrzej Hajda <a.hajda@samsung.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Changes v3->v4:
- Change function name (Laurent)
Changes v2->v3:
- Call also bridge->mode_valid (Daniel)
Changes v1->v2:
- Use new helpers suggested by Ville
- Change documentation (Daniel)
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/d4e3ba87d822fa92f1b8773e441b9a02af3bde71.1495720737.git.joabreu@synopsys.com
7 years agodrm: Introduce drm_bridge_mode_valid()
Jose Abreu [Thu, 25 May 2017 14:19:14 +0000 (15:19 +0100)]
drm: Introduce drm_bridge_mode_valid()

Introduce a new helper function which calls mode_valid() callback
for all bridges in an encoder chain.

Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Carlos Palminha <palminha@synopsys.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Dave Airlie <airlied@linux.ie>
Cc: Andrzej Hajda <a.hajda@samsung.com>
Cc: Archit Taneja <architt@codeaurora.org>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/36bd5e054496ad3c9c71f1ffe204f28533f55f1e.1495720737.git.joabreu@synopsys.com
7 years agodrm: Add drm_{crtc/encoder/connector}_mode_valid()
Jose Abreu [Thu, 25 May 2017 14:19:13 +0000 (15:19 +0100)]
drm: Add drm_{crtc/encoder/connector}_mode_valid()

Add a new helper to call crtc->mode_valid, connector->mode_valid
and encoder->mode_valid callbacks.

Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Cc: Carlos Palminha <palminha@synopsys.com>
Cc: Dave Airlie <airlied@linux.ie>
Changes v2->v3:
- Move helpers to drm_probe_helper.c (Daniel)
- Squeeze patches that introduce helpers into a single
one (Daniel)

Signed-off-by: Jose Abreu <joabreu@synopsys.com>
[danvet: Make it compile when CONFIG_DRM_DP_AUX_CHARDEV is selected.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/b55c8bd029da219ff04e39086025c115731a49b1.1495720737.git.joabreu@synopsys.com
7 years agoBackmerge tag 'v4.12-rc3' into drm-next
Dave Airlie [Tue, 30 May 2017 05:54:15 +0000 (15:54 +1000)]
Backmerge tag 'v4.12-rc3' into drm-next

Linux 4.12-rc3

Daniel has requested this for some drm-intel-next work.

7 years agoMerge tag 'drm-intel-next-2017-05-29' of git://anongit.freedesktop.org/git/drm-intel...
Dave Airlie [Tue, 30 May 2017 05:25:28 +0000 (15:25 +1000)]
Merge tag 'drm-intel-next-2017-05-29' of git://anongit.freedesktop.org/git/drm-intel into drm-next

More stuff for 4.13:

- skl+ wm fixes from Mahesh Kumar
- some refactor and tests for i915_sw_fence (Chris)
- tune execlist/scheduler code (Chris)
- g4x,g33 gpu reset improvements (Chris, Mika)
- guc code cleanup (Michal Wajdeczko, Michał Winiarski)
- dp aux backlight improvements (Puthikorn Voravootivat)
- buffer based guc/host communication (Michal Wajdeczko)

* tag 'drm-intel-next-2017-05-29' of git://anongit.freedesktop.org/git/drm-intel: (253 commits)
  drm/i915: Update DRIVER_DATE to 20170529
  drm/i915: Keep the forcewake timer alive for 1ms past the most recent use
  drm/i915/guc: capture GuC logs if FW fails to load
  drm/i915/guc: Introduce buffer based cmd transport
  drm/i915/guc: Disable send function on fini
  drm: Add definition for eDP backlight frequency
  drm/i915: Drop AUX backlight enable check for backlight control
  drm/i915: Consolidate #ifdef CONFIG_INTEL_IOMMU
  drm/i915: Only GGTT vma may be pinned and prevent shrinking
  drm/i915: Serialize GTT/Aperture accesses on BXT
  drm/i915: Convert i915_gem_object_ops->flags values to use BIT()
  drm/i915/selftests: Silence compiler warning in igt_ctx_exec
  drm/i915/guc: Skip port assign on first iteration of GuC dequeue
  drm/i915: Remove misleading comment in request_alloc
  drm/i915/g33: Improve reset reliability
  Revert "drm/i915: Restore lost "Initialized i915" welcome message"
  drm/i915/huc: Update GLK HuC version
  drm/i915: Check for allocation failure
  drm/i915/guc: Remove action status and statistics from debugfs
  drm/i915/g4x: Improve gpu reset reliability
  ...

7 years agodrm: Remove drm_device->virtdev
Daniel Vetter [Wed, 24 May 2017 14:51:37 +0000 (16:51 +0200)]
drm: Remove drm_device->virtdev

This is a leftover from the drm_bus days, where we've had a
bus-specific device type for every bus type in drm_device. Except for
pci (which we can't remove because dri1 drivers) this is all gone. And
the virt driver also doesn't really need it, dev_to_virtio works
perfectly fine.

Cc: David Airlie <airlied@linux.ie>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: virtualization@lists.linux-foundation.org
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170524145212.27837-3-daniel.vetter@ffwll.ch
7 years agodrm/i915: Update DRIVER_DATE to 20170529
Daniel Vetter [Mon, 29 May 2017 07:00:58 +0000 (09:00 +0200)]
drm/i915: Update DRIVER_DATE to 20170529

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
7 years agoLinux 4.12-rc3
Linus Torvalds [Mon, 29 May 2017 00:20:53 +0000 (17:20 -0700)]
Linux 4.12-rc3

7 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux...
Linus Torvalds [Sun, 28 May 2017 23:18:27 +0000 (16:18 -0700)]
Merge branch 'fixes' of git://git./linux/kernel/git/evalenti/linux-soc-thermal

Pull thermal SoC management fixes from Eduardo Valentin:

 - fixes to TI SoC driver, Broadcom, qoriq

 - small sparse warning fix on thermal core

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal:
  thermal: broadcom: ns-thermal: default on iProc SoCs
  ti-soc-thermal: Fix a typo in a comment line
  ti-soc-thermal: Delete error messages for failed memory allocations in ti_bandgap_build()
  ti-soc-thermal: Use devm_kcalloc() in ti_bandgap_build()
  thermal: core: make thermal_emergency_poweroff static
  thermal: qoriq: remove useless call for of_thermal_get_trip_points()

7 years agoMerge tag 'drm-misc-next-2017-05-26' of git://anongit.freedesktop.org/git/drm-misc...
Dave Airlie [Sun, 28 May 2017 20:04:39 +0000 (06:04 +1000)]
Merge tag 'drm-misc-next-2017-05-26' of git://anongit.freedesktop.org/git/drm-misc into drm-next

UAPI Changes:
- Add DRM_MODE_ROTATE_ and DRM_MODE_REFLECT_ defines to the UAPI (Robert)

Cross-subsystem Changes:
- Standardize sync_file.txt documentation format (Mauro)

Core Changes:
- Turf drm_[cm]alloc functions for kvmalloc alternatives (Michal)
- Add optional mode_valid() hook to crtc/encoder/bridge (Jose)
- Improve documentation around mode validation/alteration (Daniel)
- Reduce sync_file construction time by deferring name creation (Chris)

Driver Changes:
- pl111: Wire up the clock divider and add debugfs (Eric)
- various: Fix include notation and remove -Iinclude/drm (Masahiro)
- stm: Add Benjamin Gaignard and Vincent Abriou as STM maintainers (Vincent)
- various: Miscellaneous trivial fixes to pl111/stm/vgem/vc4

Cc: Michal Hocko <mhocko@suse.com>
Cc: Eric Anholt <eric@anholt.net>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Robert Foss <robert.foss@collabora.com>
Cc: Vincent Abriou <vincent.abriou@st.com>
Cc: Jose Abreu <Jose.Abreu@synopsys.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* tag 'drm-misc-next-2017-05-26' of git://anongit.freedesktop.org/git/drm-misc: (55 commits)
  dma-buf/sync-file: Defer creation of sync_file->name
  sync_file.txt: standardize document format
  gpu: drm: gma500: remove two more dead variable
  drm/doc: Clarify mode_fixup vs. atomic_check a bit more
  drm/doc: Document adjusted/request modes a bit better
  drm: Add crtc/encoder/bridge->mode_valid() callbacks
  MAINTAINERS: update drm/stm maintainers list
  drm/stm: ltdc: fix duplicated arguments
  drm/pl111: Fix return value check in pl111_amba_probe()
  drm/amd: include <linux/delay.h> instead of "linux/delay.h"
  drm: Add DRM_MODE_ROTATE_ and DRM_MODE_REFLECT_ to UAPI
  drm/vgem: Fix return value check in vgem_init()
  drm/blend: Fix comment typ-o
  drm/stm: remove unneeded -Iinclude/drm compiler flag
  drm/vc4: fix include notation and remove -Iinclude/drm flag
  drm/pl111: Add a debugfs node to dump our registers.
  drm/pl111: make structure mode_config_funcs static
  drm/pl111: make structure pl111_display_funcs static
  drm/pl111: Register the clock divider and use it.
  drm: drop drm_[cm]alloc* helpers
  ...

7 years agoMerge tag 'tty-4.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Linus Torvalds [Sat, 27 May 2017 16:39:09 +0000 (09:39 -0700)]
Merge tag 'tty-4.12-rc3' of git://git./linux/kernel/git/gregkh/tty

Pull tty/serial fixes from Greg KH:
 "Here are some serial and tty fixes for 4.12-rc3. They are a bit bigger
  than normal, which is why I had them bake in linux-next for a few
  weeks and didn't send them to you for -rc2.

  They revert a few of the serdev patches from 4.12-rc1, and bring
  things back to how they were in 4.11, to try to make things a bit more
  stable there. Rob and Johan both agree that this is the way forward,
  so this isn't people squabbling over semantics. Other than that, just
  a few minor serial driver fixes that people have had problems with.

  All of these have been in linux-next for a few weeks with no reported
  issues"

* tag 'tty-4.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  serial: altera_uart: call iounmap() at driver remove
  serial: imx: ensure UCR3 and UFCR are setup correctly
  MAINTAINERS/serial: Change maintainer of jsm driver
  serial: enable serdev support
  tty/serdev: add serdev registration interface
  serdev: Restore serdev_device_write_buf for atomic context
  serial: core: fix crash in uart_suspend_port
  tty: fix port buffer locking
  tty: ehv_bytechan: clean up init error handling
  serial: ifx6x60: fix use-after-free on module unload
  serial: altera_jtaguart: adding iounmap()
  serial: exar: Fix stuck MSIs
  serial: efm32: Fix parity management in 'efm32_uart_console_get_options()'
  serdev: fix tty-port client deregistration
  Revert "tty_port: register tty ports with serdev bus"
  drivers/tty: 8250: only call fintek_8250_probe when doing port I/O

7 years agoMerge tag 'powerpc-4.12-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
Linus Torvalds [Sat, 27 May 2017 16:28:34 +0000 (09:28 -0700)]
Merge tag 'powerpc-4.12-4' of git://git./linux/kernel/git/powerpc/linux

Pull powerpc fixes from Michael Ellerman:
 "Fix running SPU programs on Cell, and a few other minor fixes.

  Thanks to Alistair Popple, Jeremy Kerr, Michael Neuling, Nicholas
  Piggin"

* tag 'powerpc-4.12-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
  powerpc: Add PPC_FEATURE userspace bits for SCV and DARN instructions
  powerpc/spufs: Fix hash faults for kernel regions
  powerpc: Fix booting P9 hash with CONFIG_PPC_RADIX_MMU=N
  powerpc/powernv/npu-dma.c: Fix opal_npu_destroy_context() call
  selftests/powerpc: Fix TM resched DSCR test with some compilers