summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/sun4i/sun4i_rgb.c
Commit message (Collapse)AuthorAgeFilesLines
* Backmerge tag 'v4.16-rc7' into drm-nextDave Airlie2018-03-281-0/+2
|\ | | | | | | | | | | | | | | Linux 4.16-rc7 This was requested by Daniel, and things were getting a bit hard to reconcile, most of the conflicts were trivial though.
| * drm/sun4i: rgb: Fix potential division by zeroMaxime Ripard2018-03-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | In the case where mode_valid callback of our RGB connector was called before mode_set was being called, the range of dividers would not be set, resulting in a division by zero later on in the clk_round_rate logic. Set the range of dividers before calling clk_round_rate to fix this. Reviewed-by: Chen-Yu Tsai <wens@csie.org> Tested-by: Giulio Benetti <giulio.benetti@micronovasrl.com> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180221125703.4595-2-maxime.ripard@bootlin.com
* | drm/sun4i: move rgb mode_valid from connector to encoderGiulio Benetti2018-03-141-4/+4
|/ | | | | | | | | | | | | mode_valid function must be connected to encoder. Otherwise it could get not be called by drm in the case there's a bridge connected to encoder instead of a panel. Move mode_valid function pointer to encoder helper functions, changing its prototype according to encoder helper function pointer. Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com> Link: https://patchwork.freedesktop.org/patch/msgid/1520941017-81177-1-git-send-email-giulio.benetti@micronovasrl.com
* drm/sun4i: tcon: Don't rely on encoders to set the TCON modeMaxime Ripard2017-10-171-15/+0
| | | | | | | | | | | | Just like we did for the TCON enable and disable, for historical reasons we used to rely on the encoders calling the TCON mode_set function, while the CRTC has a callback for that. Let's implement it in order to reduce the boilerplate code. Reviewed-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Link: https://patchwork.freedesktop.org/patch/msgid/faa3a4d511039af1d116270dfef3a8b60ca3591e.1508231063.git-series.maxime.ripard@free-electrons.com
* drm/sun4i: tcon: Don't rely on encoders to enable the TCONMaxime Ripard2017-10-171-10/+4
| | | | | | | | | | | | | | | | | | | | | So far, we've required all the TCON-connected encoders to call the TCON enable and disable functions. This was made this way because in the RGB/LVDS case, the TCON is the CRTC and the encoder. However, in all the other cases (HDMI, TV, DSI, etc.), we have another encoder down the road that needs to be programmed. We also needed to know which channel the encoder is connected to, which is encoder-specific. The CRTC's enable and disable callbacks can work just fine for our use case, and we can get the channel to use just by looking at the type of encoder, since that is fixed. Implement those callbacks, which will remove some of the encoder boilerplate. Reviewed-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Link: https://patchwork.freedesktop.org/patch/msgid/90b4396e19b3eca61b2ebfdae0672074b88ad74d.1508231063.git-series.maxime.ripard@free-electrons.com
* Merge tag 'sunxi-drm-for-4.14' of ↵Dave Airlie2017-08-211-8/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into drm-next Allwinner DRM changes for 4.14 A few changes, but most notably improving the HDMI support merged in 4.13, by reporting the DDC adapter as an i2c bus, and by adding CEC support through the CEC framework. * tag 'sunxi-drm-for-4.14' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux: sun4i_hdmi: add CEC support dt-bindings: display: sunxi: Improve endpoint ID scheme readability drm/sun4i: tcon: remove unused function drm/sun4i: Remove useless atomic_check drm/sun4i: Add if statement instead of depends on drm/sun4i: hdmi: Implement I2C adapter for A10s DDC bus drm/sun4i: constify drm_plane_helper_funcs
| * drm/sun4i: Remove useless atomic_checkMaxime Ripard2017-07-181-8/+0
| | | | | | | | | | | | | | | | The atomic_check callback is optional, and we don't implement anything in some parts of our drivers. Let's remove it. Reviewed-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* | drm/sun4i: make drm_connector_funcs structures constBhumika Goyal2017-08-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make these const as they are only passed to the function drm_connector_init and the corresponding argument is of type const. Done using Coccinelle @match disable optional_qualifier@ identifier s; @@ static struct drm_connector_funcs s = {...}; @ref@ position p; identifier match.s; @@ s@p @good1@ identifier match.s; expression e1,e2; position ref.p; @@ drm_connector_init(e1,e2,&s@p,...) @bad depends on !good1@ position ref.p; identifier match.s; @@ s@p @depends on forall !bad disable optional_qualifier@ identifier match.s; @@ static + const struct drm_connector_funcs s; Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/1502191712-11231-3-git-send-email-bhumirks@gmail.com
* | drm: Nuke drm_atomic_helper_connector_dpmsDaniel Vetter2017-08-081-1/+0
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's dead code, the core handles all this directly now. The only special case is nouveau and tda988x which used one function for both legacy modeset code and -nv50 atomic world instead of 2 vtables. But amounts to exactly the same. v2: Rebase over the panel/brideg refactorings in stm/ltdc. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Cc: Archit Taneja <architt@codeaurora.org> Cc: Andrzej Hajda <a.hajda@samsung.com> Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com> Cc: Peter Senna Tschudin <peter.senna@collabora.com> Cc: Martin Donnelly <martin.donnelly@ge.com> Cc: Martyn Welch <martyn.welch@collabora.co.uk> Cc: Daniel Vetter <daniel.vetter@intel.com> Cc: Jani Nikula <jani.nikula@linux.intel.com> Cc: Sean Paul <seanpaul@chromium.org> Cc: David Airlie <airlied@linux.ie> 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> Cc: Kukjin Kim <kgene@kernel.org> Cc: Krzysztof Kozlowski <krzk@kernel.org> Cc: Stefan Agner <stefan@agner.ch> Cc: Alison Wang <alison.wang@freescale.com> Cc: Russell King <linux@armlinux.org.uk> Cc: Philipp Zabel <p.zabel@pengutronix.de> Cc: CK Hu <ck.hu@mediatek.com> Cc: Matthias Brugger <matthias.bgg@gmail.com> Cc: Neil Armstrong <narmstrong@baylibre.com> Cc: Carlo Caione <carlo@caione.org> Cc: Kevin Hilman <khilman@baylibre.com> Cc: Marek Vasut <marex@denx.de> Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Eric Anholt <eric@anholt.net> Cc: Mark Yao <mark.yao@rock-chips.com> Cc: Heiko Stuebner <heiko@sntech.de> Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org> Cc: Vincent Abriou <vincent.abriou@st.com> Cc: Yannick Fertre <yannick.fertre@st.com> Cc: Philippe Cornu <philippe.cornu@st.com> Cc: Maxime Ripard <maxime.ripard@free-electrons.com> Cc: Chen-Yu Tsai <wens@csie.org> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Jonathan Hunter <jonathanh@nvidia.com> Cc: Jyri Sarha <jsarha@ti.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Shawn Guo <shawnguo@kernel.org> Cc: John Stultz <john.stultz@linaro.org> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Cc: Jeffy Chen <jeffy.chen@rock-chips.com> Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com> Cc: Yakir Yang <kuankuan.y@gmail.com> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Cc: Jose Abreu <Jose.Abreu@synopsys.com> Cc: Romain Perier <romain.perier@collabora.com> Cc: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Cc: Xinliang Liu <z.liuxinliang@hisilicon.com> Cc: Alexey Brodkin <abrodkin@synopsys.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Rongrong Zou <zourongrong@gmail.com> Cc: Rob Clark <robdclark@gmail.com> Cc: Hai Li <hali@codeaurora.org> Cc: "Noralf Trønnes" <noralf@tronnes.org> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Cc: intel-gfx@lists.freedesktop.org Cc: linux-mediatek@lists.infradead.org Cc: linux-amlogic@lists.infradead.org Cc: nouveau@lists.freedesktop.org Cc: linux-renesas-soc@vger.kernel.org Cc: linux-rockchip@lists.infradead.org Cc: linux-tegra@vger.kernel.org Cc: virtualization@lists.linux-foundation.org Cc: zain wang <wzz@rock-chips.com> Cc: Baoyou Xie <baoyou.xie@linaro.org> Cc: Boris Brezillon <boris.brezillon@free-electrons.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20170725080122.20548-8-daniel.vetter@ffwll.ch Acked-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Acked-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: Archit Taneja <architt@codeaurora.org> Tested-by: Philippe Cornu <philippe.cornu@st.com> (on stm) Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Shawn Guo <shawnguo@kernel.org> Acked-by: Shawn Guo <shawnguo@kernel.org> Acked-by: Noralf Trønnes <noralf@tronnes.org> Acked-by: Vincent Abriou <vincent.abriou@st.com>
* drm/sun4i: tcon: Move the muxing out of the mode set functionMaxime Ripard2017-06-011-0/+1
| | | | | | | | | | | | The muxing can actually happen on both channels on some SoCs, so it makes more sense to just move it out of the sun4i_tcon1_mode_set function and create a separate function that needs to be called by the encoders. Let's do that and convert the existing drivers. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Acked-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* drm/sun4i: Set TCON clock inside sun4i_tconX_mode_setChen-Yu Tsai2017-05-141-2/+0
| | | | | | | | | | | Currently we are configuring the TCON's dot clock or special clock directly from the encoder mode_set functions. Since we already provide mode_set helper functions for the TCON's 2 channels, we can set the respective clock from those helpers, and reduce the exposure of the TCON's internals. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* Merge tag 'sunxi-drm-for-4.12' of ↵Dave Airlie2017-04-201-19/+11
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into drm-next Allwinner DRM changes for 4.12 Not any functional changes, but a lot of preliminary rework in order to support multiple display pipelines. * tag 'sunxi-drm-for-4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux: (26 commits) MAINTAINERS: Add sun4i-drm git repo drm/sun4i: Pass pointer for underlying backend into layer init drm/sun4i: Pass pointers for associated backend and tcon into crtc init drm/sun4i: tv: Get tcon and backend pointers from associated crtc drm/sun4i: Use embedded tcon pointer to get the tcon's output port node drm/sun4i: Fix tcon channel 0 comment about backporch = backporch + hsync drm/sun4i: Fix TCON clock and regmap initialization sequence drm/sun4i: Grab reserved memory region drm/sun4i: Add backend and tcon pointers to sun4i_crtc drm/sun4i: Add backend pointer to sun4i_layer drm/sun4i: rgb: Pass tcon pointer when initializing RGB encoder drm/sun4i: tv: Switch to drm_of_find_possible_crtcs drm/sun4i: Drop hardcoded .possible_crtcs values from layers drm/sun4i: Drop primary layer pointer from sun4i_drv drm/sun4i: Initialize crtc from tcon bind function drm/sun4i: Move layers from sun4i_drv to sun4i_crtc drm/sun4i: Add end of list element for sun4i_layers_init's returned list drm/sun4i: Set drm_crtc.port to the underlying TCON's output port node drm/sun4i: Make sunxi_rgb2yuv_coef constant drm/sun4i: Make sun4i_crtc_init return ERR_PTR style error codes ...
| * drm/sun4i: rgb: Pass tcon pointer when initializing RGB encoderChen-Yu Tsai2017-03-071-18/+9
| | | | | | | | | | | | | | | | | | | | | | | | The RGB encoder represents channel 0 of the TCON. Instead of fetching the pointer to its TCON from the main sun4i_drv structure, pass it in as part of the init call, save it, and use it directly in the encoder and connector callbacks. We can also drop the otherwise unused sun4i_drv pointer. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
| * drm/sun4i: Drop hardcoded .possible_crtcs values from layersChen-Yu Tsai2017-03-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To support multiple display pipelines, we would have multiple crtcs, with one or more planes bound to them. Obviously having hardcoded values for the drm_plane .possible_crtcs field is not going to work. For primary and cursor planes, the value is set by drm_crtc_init_with_planes. We just need to set it for overlay planes. We also fix the value set for the RGB encoder, by referencing the crtc set in sun4i_drv. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* | drm: convert drivers to use drm_of_find_panel_or_bridgeRob Herring2017-04-061-5/+6
|/ | | | | | | | | | | | | | | | | Similar to the previous commit, convert drivers open coding OF graph parsing to use drm_of_find_panel_or_bridge instead. This changes some error messages to debug messages (in the graph core). Graph connections are often "no connects" depending on the particular board, so we want to avoid spurious messages. Plus the kernel is not a DT validator. Signed-off-by: Rob Herring <robh@kernel.org> Reviewed-by: Archit Taneja <architt@codeaurora.org> Tested-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> [seanpaul dropped rockchip changes since they're now obsolete] Signed-off-by: Sean Paul <seanpaul@chromium.org>
* drm: bridge: Link encoder and bridge in core codeLaurent Pinchart2016-12-181-8/+5
| | | | | | | | | | | | | | | | | | | Instead of linking encoders and bridges in every driver (and getting it wrong half of the time, as many drivers forget to set the drm_bridge encoder pointer), do so in core code. The drm_bridge_attach() function needs the encoder and optional previous bridge to perform that task, update all the callers. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Stefan Agner <stefan@agner.ch> # For DCU Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> # For atmel-hlcdc Acked-by: Vincent Abriou <vincent.abriou@st.com> # For STI Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> # For sun4i Acked-by: Xinliang Liu <z.liuxinliang@hisilicon.com> # For hisilicon Acked-by: Jyri Sarha <jsarha@ti.com> # For tilcdc Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Archit Taneja <architt@codeaurora.org> Link: http://patchwork.freedesktop.org/patch/msgid/1481709550-29226-4-git-send-email-laurent.pinchart+renesas@ideasonboard.com
* Merge remote-tracking branch 'airlied/drm-next' into drm-misc-nextDaniel Vetter2016-12-061-12/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Backmerge v4.9-rc8 to get at commit e94bd1736f1f60e916a85a80c0b0ebeaae36cce5 Author: Michel Dänzer <michel.daenzer@amd.com> Date: Wed Nov 30 17:30:01 2016 +0900 drm: Don't call drm_for_each_crtc with a non-KMS driver so I can apply Michel's follow-up patch. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
| * drm/sun4i: rgb: Remove the bridge enable/disable functionsMaxime Ripard2016-10-161-6/+0
| | | | | | | | | | | | | | | | | | The atomic helpers already call the drm_bridge_enable on our behalf, there's no need to do it a second time. Reported-by: Sean Paul <seanpaul@chromium.org> Reviewed-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
| * drm/sun4i: rgb: Enable panel after controllerJonathan Liu2016-10-161-6/+8
| | | | | | | | | | | | | | | | | | | | The panel should be enabled after the controller so that we do not have visual glitches on the panel while the controller is setup. Similarly, the panel should be disabled before the controller. Signed-off-by: Jonathan Liu <net147@gmail.com> Reviewed-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* | drm: Make the connector .detect() callback optionalLaurent Pinchart2016-12-011-7/+0
|/ | | | | | | | | | | | | | | | | | Many drivers (21 to be exact) create connectors that are always connected (for instance to an LVDS or DSI panel). Instead of forcing them to implement a dummy .detect() handler, make the callback optional and consider the connector as always connected in that case. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Acked-by: Jyri Sarha <jsarha@ti.com> Acked-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: Vincent Abriou <vincent.abriou@st.com> Acked-by: Alexey Brodkin <abrodkin@synopsys.com> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> [seanpaul fixed small conflict in rcar-du/rcar_du_lvdscon.c] Signed-off-by: Sean Paul <seanpaul@chromium.org>
* drm/sun4i: add missing header dependenciesBaoyou Xie2016-09-081-0/+1
| | | | | | | | | | | | | | | | | | We get 5 warnings when building kernel with W=1: drivers/gpu/drm/sun4i/sun4i_framebuffer.c:33:23: warning: no previous prototype for 'sun4i_framebuffer_init' [-Wmissing-prototypes] drivers/gpu/drm/sun4i/sun4i_framebuffer.c:47:6: warning: no previous prototype for 'sun4i_framebuffer_free' [-Wmissing-prototypes] drivers/gpu/drm/sun4i/sun4i_rgb.c:202:5: warning: no previous prototype for 'sun4i_rgb_init' [-Wmissing-prototypes] drivers/gpu/drm/sun4i/sun4i_dotclock.c:151:5: warning: no previous prototype for 'sun4i_dclk_create' [-Wmissing-prototypes] drivers/gpu/drm/sun4i/sun4i_dotclock.c:186:5: warning: no previous prototype for 'sun4i_dclk_free' [-Wmissing-prototypes] In fact, these functions are declared in drivers/gpu/drm/sun4i/sun4i_framebuffer.h, drivers/gpu/drm/sun4i/sun4i_rgb.h, drivers/gpu/drm/sun4i/sun4i_dotclock.h, so this patch adds missing header dependencies. Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* drm/sun4i: Clear encoder->bridge if a bridge is not foundChen-Yu Tsai2016-09-011-4/+6
| | | | | | | | | | | | | | | | | The KMS helpers (drm_atomic_helper_check_modeset/mode_fixup) pass encoder->bridge directly to drm_bridge_mode_fixup, which expects a valid pointer, or NULL (in which case it just returns). Clear encoder->bridge if a bridge is not found, instead of keeping the ERR_PTR value. Since other drm_bridge functions also follow this pattern of checking for a non-NULL pointer, we can drop the ifs around the calls and just pass the pointer directly. Fixes: 894f5a9f4b4a ("drm/sun4i: Add bridge support") Signed-off-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* drm/sun4i: rgb: add missing calls to drm_panel_{prepare,unprepare}Jonathan Liu2016-08-301-2/+6
| | | | | | | | | If the enable-gpios property of a simple panel in device tree is set, the GPIO is not toggled on/off because of missing calls to drm_panel_prepare and drm_panel_unprepare. Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* drm/sun4i: Add bridge supportMaxime Ripard2016-08-221-14/+44
| | | | | | | | | Our RGB bus can be either connected to a bridge or a panel. While the panel support was already there, the bridge was not. Fix that. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* drm/sun4i: Move panel retrieval in RGB connectorMaxime Ripard2016-08-221-4/+6
| | | | | | | | In order to properly support bridges and use drm_encoder's bridge pointer, move the panel (and bridge eventually) retrieval code in the RGB output init function. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* Back-merge tag 'v4.7-rc5' into drm-nextDave Airlie2016-07-021-1/+15
|\ | | | | | | | | | | Linux 4.7-rc5 The fsl-dcu pull needs -rc3 so go to -rc5 for now.
| * drm/sun4i: rgb: panel is an error pointerMaxime Ripard2016-05-301-1/+1
| | | | | | | | | | | | | | | | | | | | In case of an error, our pointer to the drm_panel structure attached to our encoder will hold an error pointer, not a NULL pointer. Make sure we check the right thing. Fixes: 29e57fab97fc ("drm: sun4i: Add RGB output") Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
| * drm/sun4i: rgb: Validate the clock rateMaxime Ripard2016-05-301-0/+14
| | | | | | | | | | | | | | | | | | | | | | Our pixel clock cannot reach a high enough rate for some rather high while common resolutions (like 1080p60). Make sure we filter the resolutions we cannot reach in our mode_valid function. Fixes: 29e57fab97fc ("drm: sun4i: Add RGB output") Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
* | drm: sun4i: Rely on the default ->best_encoder() behaviorBoris Brezillon2016-06-101-10/+0
|/ | | | | | | | | | | All outputs have a 1:1 relationship between connectors and encoders and the driver is relying on the atomic helpers: we can drop the custom ->best_encoder() implementations and let the core call drm_atomic_helper_best_encoder() for us. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1465300095-16971-13-git-send-email-boris.brezillon@free-electrons.com
* drm: sun4i: Add RGB outputMaxime Ripard2016-04-281-0/+250
One of the A10 display pipeline possible output is an RGB interface to drive LCD panels directly. This is done through the first channel of the TCON that will output our video signals directly. Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
OpenPOWER on IntegriCloud