Daniel Vetter [Wed, 24 May 2017 14:51:54 +0000 (16:51 +0200)]
drm/fsl: Drop drm_vblank_cleanup
Again cleanup before irq disabling doesn't really stop the races,
so just drop it. Proper fix would be to put drm_atomic_helper_shutdown
before everything gets cleaned up.
Cc: Stefan Agner <stefan@agner.ch>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Stefan Agner <stefan@agner.ch>
Dave Airlie [Tue, 6 Jun 2017 06:54:27 +0000 (16:54 +1000)]
Merge tag 'exynos-drm-next-for-v4.13' of git://git./linux/kernel/git/daeinki/drm-exynos into drm-next
Summary:
- Rework vblank handling
. This patch series adds frame counter callback and removes
unnecessary pipe relevnt fields and simplifies event handling.
- clean up and fix up sw-trigger relevant code
. This patch series moves TE relevant code from Panel and HDMI
to DECON driver to fix a race between interrupt handlers and
DECON disable, and to fix timeout issue at wait-for-vblank.
. It removes unnecessary flags and check code specific to Exynos driver.
* tag 'exynos-drm-next-for-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos: (27 commits)
drm/exynos/decon5433: remove useless check
drm/exynos/decon5433: kill BIT_SUSPENDED flag
drm/exynos/decon5433: kill BIT_WIN_UPDATED flag
drm/exynos/decon5433: kill BIT_CLKS_ENABLED flag
drm/exynos/decon5433: kill BIT_IRQS_ENABLED flag
drm/exynos/decon5433: move TE handling to DECON
dt-bindings: exynos5433-decon: add TE interrupt binding
dt-bindings: exynos5433-decon: fix interrupts bindings
drm/exynos/decon5433: always do sw-trigger when vblanks enabled
drm/exynos: mixer: document YCbCr magic numbers
drm/exynos: mixer: simplify mixer_cfg_rgb_fmt()
drm/exynos/dsi: fix bridge_node DT parsing
drm/exynos/hdmi: fix pipeline disable order
drm/exynos/decon5433: simplify shadow protect code
drm/exynos/decon5433: kill BIT_IRQS_ENABLED
drm/exynos/decon5433: kill DECON_UPDATE workaround
drm/exynos: kill mode_set_nofb callback
drm/exynos: kill pipe field from drivers contexts
drm/exynos: set plane possible_crtcs in exynos_plane_init
drm/exynos: kill exynos_drm_private::pipe
...
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
...
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
...
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>
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
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
Andrzej Hajda [Wed, 5 Apr 2017 07:28:37 +0000 (09:28 +0200)]
drm/exynos/decon5433: remove useless check
TE IRQ is enabled only in case of sw-trigger, so trigger check
is redundant.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Andrzej Hajda [Wed, 5 Apr 2017 07:28:36 +0000 (09:28 +0200)]
drm/exynos/decon5433: kill BIT_SUSPENDED flag
Exynos tracked suspend state to prevent touching disabled HW. After
fixing disable order in HDMI and moving TE handling to DECON it is
not needed anymore - all IRQ handlers and callbacks touching HW
are called only with enabled DECON.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Andrzej Hajda [Wed, 5 Apr 2017 07:28:35 +0000 (09:28 +0200)]
drm/exynos/decon5433: kill BIT_WIN_UPDATED flag
The flag was used to trigger software update in TE IRQ handler only
if framebuffers were replaced. Since TE update is triggered always
when VBLANKs are enabled and after framebuffer replacement VBLANKs
are always enabled the flag becomes redundant.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Andrzej Hajda [Wed, 5 Apr 2017 07:28:34 +0000 (09:28 +0200)]
drm/exynos/decon5433: kill BIT_CLKS_ENABLED flag
The flag was used to check if IRQ handlers can touch HW. Since driver
enables IRQs only if hardware is enabled the flag becomes redundant.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Andrzej Hajda [Wed, 5 Apr 2017 07:28:33 +0000 (09:28 +0200)]
drm/exynos/decon5433: kill BIT_IRQS_ENABLED flag
Since DECON uses enable_irq/disable_irq to full control IRQs,
there is no point in having flags to trace it separately.
As a bonus condition for software trigger becomes always true,
so it can be removed.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Andrzej Hajda [Wed, 5 Apr 2017 07:28:32 +0000 (09:28 +0200)]
drm/exynos/decon5433: move TE handling to DECON
DECON is the only user of TE signal, moving all TE related
code to DECON driver allows to precise control of IRQ handlers.
This control allows to fix race between IRQ handler and DECON disable
code - now it is possible to disable DECON during IRQ handling
which can result in kernel crash. Beside race fixing this change
allows further code simplification.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Andrzej Hajda [Wed, 5 Apr 2017 07:28:31 +0000 (09:28 +0200)]
dt-bindings: exynos5433-decon: add TE interrupt binding
DECON command mode can use hardware trigger where transmission
is triggered automatically, or software trigger - where TE interrupt
handler should trigger transmission.
DECON will use software trigger if TE interrupt is specified.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Andrzej Hajda [Wed, 5 Apr 2017 07:28:30 +0000 (09:28 +0200)]
dt-bindings: exynos5433-decon: fix interrupts bindings
DECON requires different interrupts depending on mode of work, which
depends on panel it is connected to.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Andrzej Hajda [Wed, 5 Apr 2017 07:28:29 +0000 (09:28 +0200)]
drm/exynos/decon5433: always do sw-trigger when vblanks enabled
When vblanks are enabled userspace and/or kernel can expect vblank
interrupt at declared period of time. To generate vblank interrupt
image transfer must be triggered. This patch fixes vblank timeouts
in case of sw-trigger mode.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Tobias Jakobi [Fri, 10 Mar 2017 14:21:54 +0000 (15:21 +0100)]
drm/exynos: mixer: document YCbCr magic numbers
The output stage of the mixer uses YCbCr for the internal
computations, which is the reason that some registers take
YCbCr related data as input. In particular this applies
to MXR_BG_COLOR{0,1,2} and MXR_CM_COEFF_{Y,CB,CR}.
Document the formatting of the data which we write to
these registers.
While at it, unify wording of comments in the register header.
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Tobias Jakobi [Fri, 10 Mar 2017 13:30:16 +0000 (14:30 +0100)]
drm/exynos: mixer: simplify mixer_cfg_rgb_fmt()
Convert if-statements to switch statement. Removes
duplicated code.
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Andrzej Hajda [Thu, 13 Apr 2017 07:19:50 +0000 (16:19 +0900)]
drm/exynos/dsi: fix bridge_node DT parsing
DSIM uses MIC bridge which is between DECON and DSIM, so the driver
should expect bridge node on input side.
Fixes: 86418f9 ("drm: convert drivers to use of_graph_get_remote_node")
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Andrzej Hajda [Fri, 19 May 2017 08:27:08 +0000 (17:27 +0900)]
drm/exynos/hdmi: fix pipeline disable order
Hardware require that MIXER(crtc) should be disabled prior to
HDMI(encoder). It was achieved by disabling crtc from encoder disable
callback, bypassing drm core. As a result drm core tried to call vblank
related routines on disabled crtc. The patch fixes it by simplifying
hdmi_disable routine - now it only cancels hotplug worker. Hardware will
be disabled in proper moment during pipe clock disable.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Andrzej Hajda [Wed, 15 Mar 2017 14:41:10 +0000 (15:41 +0100)]
drm/exynos/decon5433: simplify shadow protect code
There is no point in protecting only particular windows during update.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Andrzej Hajda [Wed, 15 Mar 2017 14:41:09 +0000 (15:41 +0100)]
drm/exynos/decon5433: kill BIT_IRQS_ENABLED
BIT_IRQS_ENABLED flag duplicates drm_vblank_crtc::refcount, it could be
safely removed.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Andrzej Hajda [Wed, 15 Mar 2017 14:41:08 +0000 (15:41 +0100)]
drm/exynos/decon5433: kill DECON_UPDATE workaround
Since fixing CMU code (drm/exynos/decon5433: fix CMU programming)
DECON started behave predictable and does not need special care
during DECON_UPDATE writes.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Andrzej Hajda [Wed, 15 Mar 2017 14:41:07 +0000 (15:41 +0100)]
drm/exynos: kill mode_set_nofb callback
All Exynos CRTCs are fully configured by .enable callback. The only users
of mode_set_nofb actually did nothing in their callbacks - they immediately
returned because devices were in suspend state - mode_set_nofb is always
called on disabled device.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Andrzej Hajda [Wed, 15 Mar 2017 14:41:06 +0000 (15:41 +0100)]
drm/exynos: kill pipe field from drivers contexts
Since possible_crtcs are set by Exynos core helper pipe fields have no
raison d'etre. The only place it was used, as a hack, is
fimd_clear_channels, to avoid calling drm_crtc_handle_vblank, but DRM core
has already other protection mechanism (vblank->enabled), so it could be
safely removed.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Andrzej Hajda [Wed, 15 Mar 2017 14:41:05 +0000 (15:41 +0100)]
drm/exynos: set plane possible_crtcs in exynos_plane_init
All Exynos planes are assigned to exactly one CRTC, it allows to simplify
initialization by moving setting of possible_crtcs to exynos_plane_init.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Andrzej Hajda [Wed, 15 Mar 2017 14:41:04 +0000 (15:41 +0100)]
drm/exynos: kill exynos_drm_private::pipe
The field duplicates drm_dev->mode_config.num_crtc.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Andrzej Hajda [Mon, 29 May 2017 01:05:25 +0000 (10:05 +0900)]
drm/exynos: kill exynos_drm_crtc::pipe
Since crtc index is stored in drm_crtc pipe field became redundant.
The patch beside removing the field simplifies also
exynos_drm_crtc_get_pipe_from_type.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Andrzej Hajda [Wed, 15 Mar 2017 14:41:02 +0000 (15:41 +0100)]
drm/exynos/decon5433: implement frame counter
DECON in Exynos5433 has frame counter, it can be used to implement
get_vblank_counter callback.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Andrzej Hajda [Wed, 15 Mar 2017 14:41:01 +0000 (15:41 +0100)]
drm/exynos: simplify completion event handling
All Exynos CRTC drivers shouldn't fail at referencing vblank events,
alternate path is actually dead code.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Inki Dae [Thu, 1 Jun 2017 07:21:07 +0000 (16:21 +0900)]
Merge tag 'exynos-drm-fixes-for-v4.12' of git://git./linux/kernel/git/daeinki/drm-exynos into exynos-drm-next
- Fix a regression to description of exynos_drm_crtc
- Remove preclose hook of Exynos
. This was a exynos change of the patch series[1] merged already.
- Fix one dt broken issue
- Make sure to release bridge_node of Exynos MIPI-DSI driver.
[1] https://lists.freedesktop.org/archives/dri-devel/2017-March/135111.html
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
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
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
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