Noralf Trønnes
d3820952ea
drm/tinydrm: Use drm_fb_cma_fbdev_init_with_funcs/fini()
...
Use drm_fb_cma_fbdev_init_with_funcs() and drm_fb_cma_fbdev_fini() which
relies on the fact that drm_device holds a pointer to the drm_fb_helper
structure. This means that the driver doesn't have to keep track of that.
Also use the drm_fb_helper functions directly.
Remove todo entry.
Cc: David Lechner <david@lechnology.com >
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Acked-by: David Lechner <david@lechnology.com >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Tested-by: David Lechner <david@lechnolgy.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20171208193743.34450-11-noralf@tronnes.org
2017-12-10 15:37:07 +01:00
Noralf Trønnes
bdecd83546
drm/arm/mali: Use drm_fb_cma_fbdev_init/fini()
...
Use drm_fb_cma_fbdev_init() and drm_fb_cma_fbdev_fini() which relies on
the fact that drm_device holds a pointer to the drm_fb_helper structure.
This means that the driver doesn't have to keep track of that.
Also use the drm_fb_helper functions directly.
Cc: Liviu Dudau <liviu.dudau@arm.com >
Cc: Brian Starkey <brian.starkey@arm.com >
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Acked-by: Liviu Dudau <liviu.dudau@arm.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20171115142001.45358-20-noralf@tronnes.org
2017-12-08 14:47:43 +01:00
Noralf Trønnes
f05682a8b4
drm/zte: Use drm_fb_cma_fbdev_init/fini()
...
Use drm_fb_cma_fbdev_init() and drm_fb_cma_fbdev_fini() which relies on
the fact that drm_device holds a pointer to the drm_fb_helper structure.
This means that the driver doesn't have to keep track of that.
Also use the drm_fb_helper functions directly.
Cc: Shawn Guo <shawnguo@kernel.org >
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Acked-by: Shawn Guo <shawnguo@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20171115142001.45358-19-noralf@tronnes.org
2017-12-08 14:47:43 +01:00
Noralf Trønnes
b8f429a77f
drm/vc4: Use drm_fb_cma_fbdev_init/fini()
...
Use drm_fb_cma_fbdev_init() and drm_fb_cma_fbdev_fini() which relies on
the fact that drm_device holds a pointer to the drm_fb_helper structure.
This means that the driver doesn't have to keep track of that.
Also use the drm_fb_helper functions directly.
Cc: Eric Anholt <eric@anholt.net >
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Reviewed-by: Eric Anholt <eric@anholt.net >
Link: https://patchwork.freedesktop.org/patch/msgid/20171115142001.45358-18-noralf@tronnes.org
2017-12-08 14:47:43 +01:00
Noralf Trønnes
4f054fcf47
drm/tve200: Use drm_fb_cma_fbdev_init/fini()
...
Use drm_fb_cma_fbdev_init() and drm_fb_cma_fbdev_fini() which relies on
the fact that drm_device holds a pointer to the drm_fb_helper structure.
This means that the driver doesn't have to keep track of that.
Also use the drm_fb_helper functions directly.
Cc: Linus Walleij <linus.walleij@linaro.org >
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Reviewed-by: Linus Walleij <linus.walleij@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20171115142001.45358-17-noralf@tronnes.org
2017-12-08 14:47:42 +01:00
Noralf Trønnes
50b45f2137
drm/tilcdc: Use drm_fb_cma_fbdev_init/fini()
...
Use drm_fb_cma_fbdev_init() and drm_fb_cma_fbdev_fini() which relies on
the fact that drm_device holds a pointer to the drm_fb_helper structure.
This means that the driver doesn't have to keep track of that.
Also use the drm_fb_helper functions directly.
Cc: Jyri Sarha <jsarha@ti.com >
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com >
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Acked-by: Jyri Sarha <jsarha@ti.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20171115142001.45358-16-noralf@tronnes.org
2017-12-08 14:47:42 +01:00
Noralf Trønnes
22efc85b6c
drm/sun4i: Use drm_fb_cma_fbdev_init/fini()
...
Use drm_fb_cma_fbdev_init() and drm_fb_cma_fbdev_fini() which relies on
the fact that drm_device holds a pointer to the drm_fb_helper structure.
This means that the driver doesn't have to keep track of that.
Also use the drm_fb_helper functions directly.
Cc: Maxime Ripard <maxime.ripard@free-electrons.com >
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20171115142001.45358-15-noralf@tronnes.org
2017-12-08 14:47:42 +01:00
Noralf Trønnes
068b393c1a
drm/stm: Use drm_fb_cma_fbdev_init/fini()
...
Use drm_fb_cma_fbdev_init() and drm_fb_cma_fbdev_fini() which relies on
the fact that drm_device holds a pointer to the drm_fb_helper structure.
This means that the driver doesn't have to keep track of that.
Also use the drm_fb_helper functions directly.
Remove duplicate ldev assignment.
Cc: Yannick Fertre <yannick.fertre@st.com >
Cc: Philippe Cornu <philippe.cornu@st.com >
Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org >
Cc: Vincent Abriou <vincent.abriou@st.com >
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Acked-by: Philippe Cornu <philippe.cornu@st.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20171115142001.45358-14-noralf@tronnes.org
2017-12-08 14:47:41 +01:00
Noralf Trønnes
53889c92fd
drm/sti: Use drm_fb_cma_fbdev_init/fini()
...
Use drm_fb_cma_fbdev_init() and drm_fb_cma_fbdev_fini() which relies on
the fact that drm_device holds a pointer to the drm_fb_helper structure.
This means that the driver doesn't have to keep track of that.
Also use the drm_fb_helper functions directly.
Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org >
Cc: Vincent Abriou <vincent.abriou@st.com >
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20171115142001.45358-13-noralf@tronnes.org
2017-12-08 14:47:41 +01:00
Noralf Trønnes
d18df744de
drm/pl111: Use drm_fb_cma_fbdev_init/fini()
...
Use drm_fb_cma_fbdev_init() and drm_fb_cma_fbdev_fini() which relies on
the fact that drm_device holds a pointer to the drm_fb_helper structure.
This means that the driver doesn't have to keep track of that.
Also use the drm_fb_helper functions directly.
Cc: Eric Anholt <eric@anholt.net >
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Reviewed-by: Linus Walleij <linus.walleij@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20171115142001.45358-11-noralf@tronnes.org
2017-12-08 14:47:41 +01:00
Noralf Trønnes
b2ad947210
drm/imx: Use drm_fb_cma_fbdev_init/fini()
...
Use drm_fb_cma_fbdev_init() and drm_fb_cma_fbdev_fini() which relies on
the fact that drm_device holds a pointer to the drm_fb_helper structure.
This means that the driver doesn't have to keep track of that.
Also use the drm_fb_helper functions directly.
Cc: Philipp Zabel <p.zabel@pengutronix.de >
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Acked-by: Philipp Zabel <p.zabel@pengutronix.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20171115142001.45358-8-noralf@tronnes.org
2017-12-08 14:47:40 +01:00
Noralf Trønnes
ce4eb35bfa
drm/atmel-hlcdc: Use drm_fb_cma_fbdev_init/fini()
...
Use drm_fb_cma_fbdev_init() and drm_fb_cma_fbdev_fini() which relies on
the fact that drm_device holds a pointer to the drm_fb_helper structure.
This means that the driver doesn't have to keep track of that.
Also use the drm_fb_helper functions directly.
Cc: Boris Brezillon <boris.brezillon@free-electrons.com >
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20171115142001.45358-6-noralf@tronnes.org
2017-12-08 14:47:39 +01:00
Noralf Trønnes
41b676e03f
drm/cma-helper: Add drm_fb_cma_fbdev_init/fini()
...
Add functions drm_fb_cma_fbdev_init(), drm_fb_cma_fbdev_fini() and
drm_fb_cma_fbdev_init_with_funcs(). These functions relies on the fact
that the drm_fb_helper struct is stored in dev->drm_fb_helper_private
so drivers don't need to store it.
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20171115142001.45358-3-noralf@tronnes.org
2017-12-08 14:27:47 +01:00
Noralf Trønnes
e44f0801bb
drm/gem-fb-helper: drm_gem_fbdev_fb_create() make funcs optional
...
Make the drm_framebuffer_funcs argument optional for drivers that
don't need to set the dirty callback.
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20171115142001.45358-2-noralf@tronnes.org
2017-12-08 14:26:00 +01:00
Noralf Trønnes
c94bedabb3
drm/tegra: Use drm_fb_helper_lastclose() and _poll_changed()
...
This driver can use drm_fb_helper_lastclose() as its .lastclose callback.
It can also use drm_fb_helper_output_poll_changed() as its
.output_poll_changed callback.
Cc: Thierry Reding <thierry.reding@gmail.com >
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20171205182504.41923-12-noralf@tronnes.org
2017-12-08 13:09:27 +01:00
Noralf Trønnes
33e9d03822
drm/rockchip: Use drm_fb_helper_lastclose() and _poll_changed()
...
This driver can use drm_fb_helper_lastclose() as its .lastclose callback.
It can also use drm_fb_helper_output_poll_changed() as its
.output_poll_changed callback.
Cc: Mark Yao <mark.yao@rock-chips.com >
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20171205182504.41923-11-noralf@tronnes.org
2017-12-08 13:08:06 +01:00
Noralf Trønnes
ef62d30878
drm/omap: Use drm_fb_helper_lastclose() and _poll_changed()
...
This driver can use drm_fb_helper_lastclose() as its .lastclose callback.
It can also use drm_fb_helper_output_poll_changed() as its
.output_poll_changed callback.
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com >
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20171205182504.41923-9-noralf@tronnes.org
2017-12-08 13:07:34 +01:00
Noralf Trønnes
d0f54f51f6
drm/nouveau: Use drm_fb_helper_output_poll_changed()
...
This driver can use drm_fb_helper_output_poll_changed() instead of
its own nouveau_fbcon_output_poll_changed().
Cc: Ben Skeggs <bskeggs@redhat.com >
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20171205182504.41923-8-noralf@tronnes.org
2017-12-08 13:07:01 +01:00
Noralf Trønnes
4ccbc6e575
drm/msm: Use drm_fb_helper_lastclose() and _poll_changed()
...
This driver can use drm_fb_helper_lastclose() as its .lastclose callback.
It can also use drm_fb_helper_output_poll_changed() as its
.output_poll_changed callback.
Cc: Rob Clark <robdclark@gmail.com >
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20171205182504.41923-7-noralf@tronnes.org
2017-12-08 13:05:53 +01:00
Noralf Trønnes
cdc13f6813
drm/gma500: Use drm_fb_helper_lastclose() and _poll_changed()
...
This driver can use drm_fb_helper_lastclose() as its .lastclose callback.
It can also use drm_fb_helper_output_poll_changed() as its
.output_poll_changed callback.
Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com >
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20171205182504.41923-6-noralf@tronnes.org
2017-12-08 13:05:22 +01:00
Noralf Trønnes
d293615309
drm/exynos: Use drm_fb_helper_lastclose() and _poll_changed()
...
This driver can use drm_fb_helper_lastclose() as its .lastclose callback.
It can also use drm_fb_helper_output_poll_changed() as its
.output_poll_changed callback.
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 >
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Acked-by: Inki Dae <inki.dae@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20171205182504.41923-5-noralf@tronnes.org
2017-12-08 13:04:53 +01:00
Noralf Trønnes
df13928814
drm/armada: Use drm_fb_helper_lastclose() and _poll_changed()
...
This driver can use drm_fb_helper_lastclose() as its .lastclose callback.
It can also use drm_fb_helper_output_poll_changed() as its
.output_poll_changed callback.
Cc: Russell King <linux@armlinux.org.uk >
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Acked-by: Russell King <rmk+kernel@armlinux.org.uk >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20171205182504.41923-4-noralf@tronnes.org
2017-12-08 13:03:52 +01:00
Neil Armstrong
09762525d6
drm/meson: Add missing VPU init
...
The VPU init misses these configurations values.
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com >
Acked-by: Chris Wilson <chris@chris-wilson.co.uk >
Tested-by: Jerome Brunet <jbrunet@baylibre.com >
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com >
Link: https://patchwork.freedesktop.org/patch/msgid/1512561268-29806-5-git-send-email-narmstrong@baylibre.com
2017-12-08 10:43:46 +01:00
Neil Armstrong
161a803fe3
drm/meson: dw_hdmi: Add support for an optional external 5V regulator
...
On reference boards and derivatives, the HDMI Logic is powered by an external
5V regulator.
This regulator was set by the Vendor U-Boot, add optional support for it.
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com >
Tested-by: Jerome Brunet <jbrunet@baylibre.com >
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com >
Link: https://patchwork.freedesktop.org/patch/msgid/1512561268-29806-4-git-send-email-narmstrong@baylibre.com
2017-12-08 10:43:40 +01:00
Neil Armstrong
133e8ee9a1
dt-bindings: display: amlogic, meson-dw-hdmi: Add optional HDMI 5V regulator
...
On reference boards and derivatives, the HDMI Logic is powered by an external
5V regulator.
This regulator was set by the Vendor U-Boot, add optional support for it.
Acked-by: Rob Herring <robh@kernel.org >
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com >
Tested-by: Jerome Brunet <jbrunet@baylibre.com >
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com >
Link: https://patchwork.freedesktop.org/patch/msgid/1512561268-29806-3-git-send-email-narmstrong@baylibre.com
2017-12-08 10:43:33 +01:00
Neil Armstrong
942fc649a3
dt-bindings: display: amlogic, meson-vpu: Add optional power domain property
...
The Video Processing Unit power domain was setup by the Vendor U-Boot,
add support for an optional Power Domain phandle to setup it from the kernel.
Acked-by: Rob Herring <robh@kernel.org >
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com >
Tested-by: Jerome Brunet <jbrunet@baylibre.com >
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com >
Link: https://patchwork.freedesktop.org/patch/msgid/1512561268-29806-2-git-send-email-narmstrong@baylibre.com
2017-12-08 10:43:28 +01:00
Daniel Vetter
2aa0fcc2c7
drm: More debug info for fb leaks in mode_config_cleanup
...
We're spotting this very rarely in CI, but have no idea. Let's add
more debug info about what's going on here.
References: https://bugs.freedesktop.org/show_bug.cgi?id=102707
Acked-by: Noralf Trønnes <noralf@tronnes.org >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20171207144925.14191-1-daniel.vetter@ffwll.ch
2017-12-07 18:40:43 +01:00
Jernej Skrabec
bc29489f71
drm/sun4i: Fix uninitialized variables in vi layer
...
min_scale and max_scale in sun8i_vi_layer_atomic_check() can be used
without initialization.
Fix that.
Fixes: b862a648de ("drm/sun4i: Add support for HW scaling to DE2")
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net >
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20171206152603.25937-1-jernej.skrabec@siol.net
2017-12-07 09:51:41 +01:00
Gustavo A. R. Silva
89f3f35620
drm/fb-helper: Fix potential NULL pointer dereference
...
fb_helper is being dereferenced before it is null checked,
hence there is a potential null pointer dereference.
Fix this by moving the pointer dereference after fb_helper
has been null checked.
This issue was detected with the help of Coccinelle.
Fixes: c777990fb4 ("drm/fb-helper: Handle function NULL argument")
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20171205174628.GA31189@embeddedor.com
2017-12-06 21:45:28 +01:00
Benjamin Gaignard
ec17f0341d
gpu: drm: stm: Adopt SPDX identifiers
...
Add SPDX identifiers to files under stm directory
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com >
Acked-by: Vincent Abriou <vincent.abriou@st.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20171206112947.9569-1-benjamin.gaignard@st.com
2017-12-06 15:51:37 +01:00
Benjamin Gaignard
e284257027
gpu: drm: sti: Adopt SPDX identifiers
...
Add SPDX identifiers to files under sti directory
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com >
Acked-by: Vincent Abriou <vincent.abriou@st.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20171206112947.9569-2-benjamin.gaignard@st.com
2017-12-06 15:51:23 +01:00
Noralf Trønnes
3b71239181
drm/fsl-dcu: Use drm_mode_config_helper_suspend/resume()
...
Replace driver's code with the generic helpers that do the same thing.
Cc: Stefan Agner <stefan@agner.ch >
Cc: Alison Wang <alison.wang@freescale.com >
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Acked-by: Stefan Agner <stefan@agner.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20171114212517.23536-5-noralf@tronnes.org
2017-12-05 13:46:41 +01:00
Jernej Skrabec
e1ef900666
drm/sun4i: Wire in DE2 YUV support
...
Now that we have all required bits, add support for YUV formats.
DRM subsystem doesn't know YUV411 semi-planar format, so leave that out
for now.
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net >
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20171201060550.10392-27-jernej.skrabec@siol.net
2017-12-05 13:22:44 +01:00
Jernej Skrabec
1343bd6c23
drm/sun4i: Expand DE2 scaler lib with YUV support
...
Basic principle of operation when using YUV framebuffer is that chroma
planes have to be upscaled to same size as luma.
Because of that, expand DE2 scaler library to support that.
BSP driver uses another set of FIR filter coefficients for YUV planes.
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net >
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20171201060550.10392-26-jernej.skrabec@siol.net
2017-12-05 13:22:44 +01:00
Jernej Skrabec
60a3dcf96a
drm/sun4i: Add DE2 definitions for YUV formats
...
This commit expands translation of DRM YUV format to HW specific
information.
It doesn't do any functional changes.
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net >
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20171201060550.10392-25-jernej.skrabec@siol.net
2017-12-05 13:22:44 +01:00
Jernej Skrabec
8830293905
drm/sun4i: Add DE2 CSC library
...
DE2 have many CSC units - channel input CSC, channel output CSC and
mixer output CSC and maybe more.
Fortunately, they have all same register layout, only base offsets
differs.
Add support only for channel output CSC for now.
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net >
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20171201060550.10392-24-jernej.skrabec@siol.net
2017-12-05 13:22:44 +01:00
Jernej Skrabec
bd3bcb9112
drm/sun4i: Add CCSC property to DE2 configuration
...
Base addresses of channel output CSC (CCSC) depends whether mixer in
question is first or second and if it is second, if supports VEP or not.
This new property will tell which set of base addresses to take.
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net >
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20171201060550.10392-23-jernej.skrabec@siol.net
2017-12-05 13:22:44 +01:00
Jernej Skrabec
b862a648de
drm/sun4i: Add support for HW scaling to DE2
...
Scaling is currently supported only for RGB framebuffers
Coefficients and algorithm which coefficients to select are taken
from BSP driver.
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net >
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20171201060550.10392-22-jernej.skrabec@siol.net
2017-12-05 13:22:44 +01:00
Jernej Skrabec
5b1f8367f3
drm/sun4i: Add scaler configuration to DE2 mixers
...
No all SoCs support scaling on all channels. For example, V3s support
scaling only on VI channels. Because of that, add additional
configuration bitmask which tells which channel support scaler.
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net >
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20171201060550.10392-21-jernej.skrabec@siol.net
2017-12-05 13:22:43 +01:00
Jernej Skrabec
7480ba4d75
drm/sun4i: Add support for DE2 VI planes
...
This commit adds basic support for VI planes. They are meant for video
overlay and because of that they support YUV formats too. However, using
YUV format is not straightforward, so only RGB formats are supported for
now.
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net >
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20171201060550.10392-20-jernej.skrabec@siol.net
2017-12-05 13:22:43 +01:00
Jernej Skrabec
5bb5f5dafa
drm/sun4i: Reorganize UI layer code in DE2
...
Till now, DE2 driver supported only UI planes. Before we add support for
VI planes, lets split out UI layer specific code from common parts. This
commit does the following:
- renames sun8i_layer.c to sun8i_ui_layer.c
- moves UI channel specific code to sun8i_ui_layer.c
- moves common code from sun8i_layer.c to sun8i_mixer.c
- renames function and structure names so it is apparent where they
belong to
No functional change is made.
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net >
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20171201060550.10392-19-jernej.skrabec@siol.net
2017-12-05 13:22:43 +01:00
Jernej Skrabec
fba4955e9c
drm/sun4i: Add support for all HW supported DE2 RGB formats
...
Currently only a few RGB formats are supported by the DE2 driver. Add
support for all formats supported by the HW.
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net >
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20171201060550.10392-18-jernej.skrabec@siol.net
2017-12-05 13:22:43 +01:00
Jernej Skrabec
7a2b89244e
drm/sun4i: Add multi plane support to DE2 driver
...
Support for multiple UI planes can now be easily enabled just by adding
more planes with different index.
For now, add immutable zpos property.
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net >
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20171201060550.10392-17-jernej.skrabec@siol.net
2017-12-05 13:22:43 +01:00
Jernej Skrabec
165d24df78
drm/sun4i: Move interlace related code in DE2
...
There is no point having code which sets interlace mode of mixer in
channel related function. Interlace mode will only change when CRTC
state will change, so let's move it to the block which is executed only
when primary plane state is changed.
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net >
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20171201060550.10392-16-jernej.skrabec@siol.net
2017-12-05 13:22:43 +01:00
Jernej Skrabec
58e21823ed
drm/sun4i: Move channel size related code in DE2
...
Channel size should be set every time plane is changed, not only when
primary plane changes. Current code works only because only one
(primary) plane is supported at the moment.
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net >
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20171201060550.10392-15-jernej.skrabec@siol.net
2017-12-05 13:22:43 +01:00
Jernej Skrabec
c53e6fd47d
drm/sun4i: Move line width setting in DE2
...
Line width is a property of a framebuffer and it belongs to
sun8i_mixer_update_layer_buffer(). This will became even more obvious
when support for multi-plane formats will be added.
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net >
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20171201060550.10392-14-jernej.skrabec@siol.net
2017-12-05 13:22:43 +01:00
Jernej Skrabec
90212fffa4
drm/sun4i: Use values calculated by atomic check
...
Now that we have properly clipped coordinates in plane state structure,
use them.
This also fixes bug where source x and y were adjusted for negative
value, but width and height weren't. It wasn't discovered because
primary plane usually doesn't have negative coordinates.
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net >
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20171201060550.10392-13-jernej.skrabec@siol.net
2017-12-05 13:22:42 +01:00
Jernej Skrabec
5dd2d999ac
drm/sun4i: Add constraints checking to DE2 driver
...
Since current DE2 driver doesn't know how to scale yet, add atomic check
function which checks that.
Nice side effect of that function is that populates clipped coordinates
and checks visibility of the plane. That data will be used in the
future.
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net >
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20171201060550.10392-12-jernej.skrabec@siol.net
2017-12-05 13:22:42 +01:00
Jernej Skrabec
f356fe8e0f
drm/sun4i: Start using layer id in DE2 driver
...
Till now, plane selection was hardcoded to first overlay in first UI
channel and layer parameter is unused.
Rename and add parameters to layer functions so they would represent HW
more accurately and start using then.
It turns out that overlays don't fit well in current DRM design, because
they can't be blended together or scaled independetly when they are set
to same channel. Because of that, always use only first overlay in each
channel.
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net >
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20171201060550.10392-11-jernej.skrabec@siol.net
2017-12-05 13:22:42 +01:00
Jernej Skrabec
26264ceeb5
drm/sun4i: Rework enabling plane in DE2 driver
...
If we want to support multiple planes in the future, code which enables
pipe has to be moved to appropriate place and it must depend on channel
id instead of being hardcoded.
Side effect of that rework is definition of default Z position. For now,
put first channel at the bottom, second above it and so on.
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net >
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20171201060550.10392-10-jernej.skrabec@siol.net
2017-12-05 13:22:42 +01:00