summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/rcar-du/rcar_du_encoder.c
Commit message (Collapse)AuthorAgeFilesLines
* drm: rcar-du: Convert LVDS encoder code to bridge driverLaurent Pinchart2018-03-071-160/+15Star
| | | | | | | | | | | The LVDS encoders used to be described in DT as part of the DU. They now have their own DT node, linked to the DU using the OF graph bindings. This allows moving internal LVDS encoder support to a separate driver modelled as a DRM bridge. Backward compatibility is retained as legacy DT is patched live to move to the new bindings. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
* drm: Convert to using %pOF instead of full_nameRob Herring2017-07-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: Rob Herring <robh@kernel.org> Cc: Russell King <linux@armlinux.org.uk> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel.vetter@intel.com> Cc: Jani Nikula <jani.nikula@linux.intel.com> Cc: Sean Paul <seanpaul@chromium.org> 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: Javier Martinez Canillas <javier@osg.samsung.com> Cc: Xinliang Liu <z.liuxinliang@hisilicon.com> Cc: Rongrong Zou <zourongrong@gmail.com> Cc: Xinwei Kong <kong.kongxinwei@hisilicon.com> Cc: Chen Feng <puck.chen@hisilicon.com> Cc: CK Hu <ck.hu@mediatek.com> Cc: Philipp Zabel <p.zabel@pengutronix.de> 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: Thierry Reding <thierry.reding@gmail.com> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Mark Yao <mark.yao@rock-chips.com> Cc: Heiko Stuebner <heiko@sntech.de> Cc: Maxime Ripard <maxime.ripard@free-electrons.com> Cc: Chen-Yu Tsai <wens@csie.org> Cc: Jyri Sarha <jsarha@ti.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: dri-devel@lists.freedesktop.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Cc: linux-mediatek@lists.infradead.org Cc: linux-amlogic@lists.infradead.org Cc: linux-renesas-soc@vger.kernel.org Cc: linux-rockchip@lists.infradead.org Partially-Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> [seanpaul changed subject prefix and fixed conflict in stm/ltdc.c] Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* drm: rcar-du: Hardcode encoders types to DRM_MODE_ENCODER_NONELaurent Pinchart2017-04-041-21/+9Star
| | | | | | | | | | Unlike the connector type, the encoder type is unused by userspace. As it is equally unused in the driver, except in a single location where the connector type can be used instead, hardcode it to DRM_MODE_ENCODER_NONE. This allow removing all code that tries to determine (unsuccessfully in case a bridge is used) the encoder type. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* drm: rcar-du: Replace manual bridge implementation with DRM bridgeLaurent Pinchart2017-04-041-45/+59
| | | | | | | The rcar-du driver contains a manual implementation of HDMI and VGA bridges. Use DRM bridges to replace it. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* drm: rcar-du: Add support for LVDS mode selectionLaurent Pinchart2017-04-041-0/+27
| | | | | | | | | Retrieve the LVDS mode from the panel and configure the LVDS encoder accordingly. LVDS mode selection is static as LVDS panels can't be hot-plugged on any of the device supported by the driver. Support for dynamic mode selection can be implemented in the future when needed. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* drm: rcar-du: Use the DRM panel APILaurent Pinchart2017-04-041-0/+22
| | | | | | | Instead of parsing the panel device tree node manually, use the panel API to delegate panel handling to a panel driver. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* drm: rcar-du: Switch to encoder .atomic_mode_set() helper functionLaurent Pinchart2017-04-041-4/+4
| | | | | | | The native encoder mode set helper function for atomic drivers is .atomic_mode_set(). Replace the legacy .mode_set() implementation. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* drm: rcar-du: Remove i2c slave encoder interface for hdmi encoderArchit Taneja2016-07-181-2/+1Star
| | | | | | | | | | | | | | | | | | The hdmi output in rcar-du uses the i2c slave encoder interface to link to the adv7511 encoder chip. The kms driver creates encoder and connector entities that internally uses the drm_encoder_slave_funcs ops provided by the slave encoder driver. Change the driver such that it expects a bridge entity instead of a slave encoder. The hdmi connector code isn't needed anymore as we expect the adv7511 bridge driver to create/manage the connector. Note that the kms driver still expects a connector node for hdmi to be present in DT. This node has no connection to the connector created by the bridge driver. Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Archit Taneja <architt@codeaurora.org>
* drm: rcar-du: Rely on the default ->best_encoder() behaviorBoris Brezillon2016-06-101-12/+0Star
| | | | | | | | | | | | 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> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1465300095-16971-10-git-send-email-boris.brezillon@free-electrons.com
* drm: rcar-du: lvds: Avoid duplication of clock clamp codeLaurent Pinchart2016-02-231-5/+1Star
| | | | | | Replace the duplicate code by a single central function. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* drm: Pass 'name' to drm_encoder_init()Ville Syrjälä2015-12-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Done with coccinelle for the most part. However, it thinks '...' is part of the semantic patch, so I put an 'int DOTDOTDOT' placeholder in its place and got rid of it with sed afterwards. @@ identifier dev, encoder, funcs; @@ int drm_encoder_init(struct drm_device *dev, struct drm_encoder *encoder, const struct drm_encoder_funcs *funcs, int encoder_type + ,const char *name, int DOTDOTDOT ) { ... } @@ identifier dev, encoder, funcs; @@ int drm_encoder_init(struct drm_device *dev, struct drm_encoder *encoder, const struct drm_encoder_funcs *funcs, int encoder_type + ,const char *name, int DOTDOTDOT ); @@ expression E1, E2, E3, E4; @@ drm_encoder_init(E1, E2, E3, E4 + ,NULL ) v2: Add ', or NULL...' to @name kernel doc (Jani) Annotate the function with __printf() attribute (Jani) Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1449670818-2966-1-git-send-email-ville.syrjala@linux.intel.com
* drm: rcar-du: Replace encoder mode_fixup with atomic_checkLaurent Pinchart2015-03-031-23/+12Star
| | | | | | | The encoder .mode_fixup() operation is legacy, atomic updates uses the new .atomic_check() operation. Convert the encoders drivers. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* drm: rcar-du: Switch connector DPMS to atomic helpersLaurent Pinchart2015-03-031-9/+0Star
| | | | | | | | The atomic connector DPMS helper implements the connector DPMS operation using atomic commit, removing the need for DPMS helper operations on CRTCs and encoders. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* drm: rcar-du: Switch mode config to atomic helpersLaurent Pinchart2015-03-031-12/+0Star
| | | | | | | This removes the legacy mode config code. The CRTC and encoder prepare and commit operations are not used anymore, remove them. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* drm: rcar-du: Rework encoder enable/disable for atomic updatesLaurent Pinchart2015-03-031-11/+22
| | | | | | | | | | When using atomic updates the encoder .enable() and .disable() helper operations are preferred over the (then legacy) .prepare() and .commit() operations. Implement .enable() and .disable() and rework .prepare(), .commit() and .dpms() as wrappers around .enable() and .disable(), easing their future removal. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* drm: rcar-du: Replace LVDS encoder DPMS by enable/disableLaurent Pinchart2015-03-031-8/+4Star
| | | | | | | | The LVDS encoder doesn't support DPMS states, replace the DPMS operation by enable/disable to avoid propagating DPMS states down to the encoder code. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* drm: rcar-du: Clamp DPMS states to on and offLaurent Pinchart2014-12-231-0/+3
| | | | | | | | | | | The intermediate DPMS standby and suspend states are a thing from the past. They only matter in practice for VGA CRT monitors, and are just a power saving vs. resume time optimization. Given that they have never been implemented properly in the rcar-du driver and that the Intel driver has dropped them on the vga port years ago, it's safe to only care about the on and off states. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* drm: rcar-du: Remove LVDS and HDMI encoders chaining restrictionLaurent Pinchart2014-12-231-7/+0Star
| | | | | | | The rcar-du driver refuses connecting an LVDS output to an HDMI encoder. There is not technical reason for that restriction, remove it. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* drm: rcar-du: Don't fail probe in case of partial encoder init errorLaurent Pinchart2014-12-231-7/+21
| | | | | | | | | | | | If an encoder fails to initialize the device can still be used without the failed encoder. Don't propagate the error out of the probe function but just skip the failed encoder. As a special case a deferred probe request from the encoder is still propagated out of the probe function in order not to break the deferred probing mechanism. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* drm: rcar-du: Add HDMI encoder and connector supportLaurent Pinchart2014-11-261-5/+25
| | | | | | | SoCs that integrate the DU have no internal HDMI encoder, support external encoders only. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* drm: rcar-du: Replace direct DRM encoder access with cast macroLaurent Pinchart2014-11-261-3/+5
| | | | | | | | Add a new macro to downcast an rcar_du_encoder pointer to a drm_encoder pointer and use it. This prepares for the replacement of the rcar_drm_encoder encoder field with a drm_slave_encoder. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* drm: rcar-du: Pass the encoder DT node to rcar_du_encoder_init()Laurent Pinchart2014-11-261-2/+3
| | | | | | | | The encoder DT node will be needed to register an external HDMI encoder. Pass it to the rcar_du_encoder_init() function to prepare for HDMI support. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* drm: rcar-du: Remove platform data supportLaurent Pinchart2014-11-261-6/+2Star
| | | | | | | All platforms now instantiate the DU through DT, platform data support isn't needed anymore. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* drm/rcar-du: Add OF supportLaurent Pinchart2014-09-151-4/+7
| | | | | | | Implement support for the R-Car DU DT bindings in the rcar-du DRM driver. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* drm/rcar-du: Update copyright noticeLaurent Pinchart2014-09-151-1/+1
| | | | | | | | The "Renesas Corporation" listed in the copyright notice doesn't exist. Replace it with "Renesas Electronics Corporation" and update the copyright years. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* drm/rcar-du: Add internal LVDS encoder supportLaurent Pinchart2013-08-091-0/+38
| | | | | | | The R8A7790 includes two internal LVDS encoders. Support them in the DU driver. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* drm/rcar-du: Rework output routing supportLaurent Pinchart2013-08-091-5/+21
| | | | | | | | | | | | | | | | Split the output routing specification between SoC-internal data, specified in the rcar_du_device_info structure, and board data, passed through platform data. The DU has 5 possible outputs (DPAD0/1, LVDS0/1, TCON). SoC-internal output routing data specify which output are valid, which CRTCs can be connected to the valid outputs, and the type of in-SoC encoder for the output. Platform data then specifies external encoders and the output they are connected to. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* drm/rcar-du: Rename platform data fields to match what they describeLaurent Pinchart2013-08-091-1/+1
| | | | | | | | The struct rcar_du_encoder_data encoder::field describes the encoder type, and the rcar_du_encoder_lvds_data and rcar_du_encoder_vga_data structures describe connector properties. Rename them accordingly. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
* drm/rcar-du: Merge LVDS and VGA encoder codeLaurent Pinchart2013-08-091-0/+148
Create a single rcar_du_encoder structure that implements a KMS encoder. The current implementation is straightforward and only configures CRTC output routing. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>