summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c
AgeCommit message (Collapse)AuthorFilesLines
2016-10-19drm/fsl-dcu: enable TCON bypass mode by defaultStefan Agner1-34/+5
Do not use encoder disable/enable callbacks to control bypass mode as this seems to mess with the signals not liked by displays. This also makes more sense since the encoder is already defined to be parallel RGB/LVDS at creation time. Signed-off-by: Stefan Agner <stefan@agner.ch> Tested-By: Meng Yi <meng.yi@nxp.com>
2016-07-15drm/fsl-dcu: add support for drm bridgeMeng Yi1-3/+13
The current output code only supports connection to drm panels. Add code to support drm bridge, to support connections to external connectors. Signed-off-by: Meng Yi <meng.yi@nxp.com> Signed-off-by: Stefan Agner <stefan@agner.ch>
2016-07-15drm/fsl-dcu: rework codes to support of_graph dt binding for panelMeng Yi1-20/+48
This patch rework the output code to add of_graph dt binding support for panel device and also keeps the backward compatibility Signed-off-by: Meng Yi <meng.yi@nxp.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Stefan Agner <stefan@agner.ch>
2016-06-10drm: fsl-dcu: Rely on the default ->best_encoder() behaviorBoris Brezillon1-9/+0
We 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() 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-6-git-send-email-boris.brezillon@free-electrons.com
2016-04-25drm/fsl-dcu: handle missing panel gracefullyStefan Agner1-7/+13
If the device tree property fsl,panel is missing, drm_panel_attach is called with a NULL pointer as first argument. Having a panel is basically mandatory since RGB is the only supported connector. Check if a panel node has been found, return -ENODEV and cleanup otherwise. Signed-off-by: Stefan Agner <stefan@agner.ch>
2016-04-25drm/fsl-dcu: detach panel on destroyStefan Agner1-0/+3
Disable the earlier attached panel on connector destroy. Signed-off-by: Stefan Agner <stefan@agner.ch>
2016-04-25drm/layerscape: reduce excessive stack usageArnd Bergmann1-2/+2
The fsl-dcu driver copies a drm_mode_config object to its stack but then only accesses a single member (dpms_property) once. The data structure is large enough to trigger a warning about the amount of kernel stack being used: drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c: In function 'fsl_dcu_drm_connector_create': drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c:182:1: error: the frame size of 1040 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] This changes the fsl_dcu_drm_connector_create() function to only access the drm_mode_config by reference, which is also more efficient. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: 109eee2f2a18 ("drm/layerscape: Add Freescale DCU DRM driver") Signed-off-by: Stefan Agner <stefan@agner.ch>
2016-04-25drm/fsl-dcu: add TCON driverStefan Agner1-0/+11
Add driver for the TCON (timing controller) module. The TCON module is a separate module attached after the DCU (display controller unit). Each DCU instance has its own, directly connected TCON instance. The DCU's RGB and timing signals are passing through the TCON module. TCON can provide timing signals for raw TFT panels or operate in a bypass mode which leaves all signals unaltered. The driver currently only supports the bypass mode. Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Stefan Agner <stefan@agner.ch>
2015-12-11drm: Pass 'name' to drm_encoder_init()Ville Syrjälä1-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
2015-08-19drm/layerscape: Add Freescale DCU DRM driverJianwei Wang1-0/+182
This patch add support for Two Dimensional Animation and Compositing Engine (2D-ACE) on the Freescale SoCs. 2D-ACE is a Freescale display controller. 2D-ACE describes the functionality of the module extremely well its name is a value that cannot be used as a token in programming languages. Instead the valid token "DCU" is used to tag the register names and function names. The Display Controller Unit (DCU) module is a system master that fetches graphics stored in internal or external memory and displays them on a TFT LCD panel. A wide range of panel sizes is supported and the timing of the interface signals is highly configurable. Graphics are read directly from memory and then blended in real-time, which allows for dynamic content creation with minimal CPU intervention. The features: (1) Full RGB888 output to TFT LCD panel. (2) Blending of each pixel using up to 4 source layers dependent on size of panel. (3) Each graphic layer can be placed with one pixel resolution in either axis. (4) Each graphic layer support RGB565 and RGB888 direct colors without alpha channel and BGRA8888 BGRA4444 ARGB1555 direct colors with an alpha channel and YUV422 format. (5) Each graphic layer support alpha blending with 8-bit resolution. This is a simplified version, only one primary plane, one framebuffer, one crtc, one connector and one encoder for TFT LCD panel. Signed-off-by: Alison Wang <b18965@freescale.com> Signed-off-by: Xiubo Li <lixiubo@cmss.chinamobile.com> Signed-off-by: Jianwei Wang <jianwei.wang.chn@gmail.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>