summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/rcar-du/rcar_du_encoder.h
AgeCommit message (Collapse)Author
2023-05-29drm: Place Renesas drivers in a separate dirBiju Das
Create vendor specific renesas directory and move renesas drivers to that directory. Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Acked-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
2022-07-07drm: rcar-du: Drop file name from comment header blocksLaurent Pinchart
The comment blocks at the beginning of each file have a one-line summary description of the file that includes the file name. While the description is useful, the file name only creates opportunities for mistakes (as seen in rcar_du_vsp.c) without any added value. Drop it. Reported-by: Biju Das <biju.das.jz@bp.renesas.com> Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
2021-01-05drm: rcar-du: Drop local encoder variableLaurent Pinchart
The local encoder variable is an alias for &renc->base, and is only use twice. It doesn't help much, drop it, along with the rcar_encoder_to_drm_encoder() macro that is then unused. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo+renesas@jmondi.org> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
2019-02-08drm: rcar-du: Simplify encoder registrationLaurent Pinchart
Before the driver fully moved to drm_bridge and drm_panel, it was necessary to parse DT and locate encoder and connector nodes. The connector node is now unused and can be removed as a parameter to rcar_du_encoder_init(). As a consequence rcar_du_encoders_init_one() can be greatly simplified, removing most of the DT parsing. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
2019-01-14drm: rcar-du: Remove inclusion of drmP.hLaurent Pinchart
The DRM kernel API used to be defined in a handful of headers, pulled in through drmP.h. It has since been split in multiple headers for the different DRM components, and drmP.h turned into a legacy header that just pulls in most of the DRM kernel API (and a large number of other miscellaneous kernel headers). In order to speed up compilation, replace inclusion of drmP.h with only the required headers. It turns out that the rcar-du-drm driver already includes most of the necessary headers, so the change is simple. While at it, remove unneeded inclusion of other headers, and unneeded forward declarations of structures. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
2018-09-14drm: rcar-du: Convert to SPDX identifiersKuninori Morimoto
Kconfig doesn't have license line, thus, it is GPL-2.0 as default. rcar_du_regs.h, rcar_lvds_regs.h are GPL-2.0, and all other files are GPL-2.0+ as original license. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2018-03-07drm: rcar-du: Convert LVDS encoder code to bridge driverLaurent Pinchart
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>
2017-04-04drm: rcar-du: Hardcode encoders types to DRM_MODE_ENCODER_NONELaurent Pinchart
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>
2017-04-04drm: rcar-du: Replace manual bridge implementation with DRM bridgeLaurent Pinchart
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>
2017-04-04drm: rcar-du: Use the DRM panel APILaurent Pinchart
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>
2016-12-18drm: Don't include <drm/drm_encoder.h> in <drm/drm_crtc.h>Laurent Pinchart
<drm/drm_crtc.h> used to define most of the in-kernel KMS API. It has now been split into separate files for each object type, but still includes most other KMS headers to avoid breaking driver compilation. As a step towards fixing that problem, remove the inclusion of <drm/drm_encoder.h> from <drm/drm_crtc.h> and include it instead where appropriate. Also remove the forward declarations of the drm_encoder and drm_encoder_helper_funcs structures from <drm/drm_crtc.h> as they're not needed in the header. <drm/drm_encoder.h> now has to include <drm/drm_mode.h> and contain a forward declaration of struct drm_encoder in order to allow including it as the first header in a compilation unit. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Sinclair Yeh <syeh@vmware.com> # For vmwgfx Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Archit Taneja <architt@codeaurora.org> Link: http://patchwork.freedesktop.org/patch/msgid/1481709550-29226-2-git-send-email-laurent.pinchart+renesas@ideasonboard.com
2016-07-18drm: rcar-du: Remove i2c slave encoder interface for hdmi encoderArchit Taneja
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>
2016-06-10drm: rcar-du: Rely on the default ->best_encoder() behaviorBoris Brezillon
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
2014-11-26drm: rcar-du: Add HDMI encoder and connector supportLaurent Pinchart
SoCs that integrate the DU have no internal HDMI encoder, support external encoders only. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
2014-11-26drm: rcar-du: Replace drm_encoder with drm_slave_encoderLaurent Pinchart
DRM slave encoders require their associated struct drm_encoder instance to be embedded in a struct drm_slave_encoder. This makes processing encoders regardless of their types needlessly and painfully complex in drivers that use a mix of slave encoders and custom encoders. Such a driver will need to either create drm_slave_encoder instances that fake their embedded encoder instance, or to turn all drm_encoder instances into drm_slave_encoder instances. Between the two evils, one must choose the lesser. Use drm_slave_encoder everywhere. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
2014-11-26drm: rcar-du: Replace direct DRM encoder access with cast macroLaurent Pinchart
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>
2014-11-26drm: rcar-du: Pass the encoder DT node to rcar_du_encoder_init()Laurent Pinchart
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>
2014-11-26drm: rcar-du: Remove platform data supportLaurent Pinchart
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>
2014-09-15drm/rcar-du: Add OF supportLaurent Pinchart
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>
2014-09-15drm/rcar-du: Update copyright noticeLaurent Pinchart
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>
2013-08-09drm/rcar-du: Add internal LVDS encoder supportLaurent Pinchart
The R8A7790 includes two internal LVDS encoders. Support them in the DU driver. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
2013-08-09drm/rcar-du: Rework output routing supportLaurent Pinchart
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>
2013-08-09drm/rcar-du: Rename platform data fields to match what they describeLaurent Pinchart
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>
2013-08-09drm/rcar-du: Merge LVDS and VGA encoder codeLaurent Pinchart
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>