summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'drm-misc-next-2017-06-15' of ↵Dave Airlie2017-06-161-158/+15
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://anongit.freedesktop.org/git/drm-misc into drm-next Cross-subsystem Changes: - dt-bindings: add vendor prefix for NLT Technologies, Ltd. (Lucas) - dt-bindings: Add support for samsung s6e3hf2 panel (Hoegeun) Core Changes: - Add drm_panel_bridge to avoid connector boilerplate in drivers (Eric) - Trival fixes for dupe forward decl and reduce scope of variable (Dawid) Driver Changes: - dw-hdmi: Use mode_valid hook on bridge instead of connector (Jose) - vc4,atmel-hlcdc: Use drm_panel_bridge where appropriate (Eric) - panel: Add Innolux P079ZCA panel driver (Chris) - panel-simple: Add NL12880B20-05, NL192108AC18-02D, P320HVN03 panels (Lucas) - panel-samsung-s6e3ha2: Add s6e3hf2 panel support (Hoegeun) - zte,vc4,pl111,panel,mxsfb: Miscellaneous fixes Cc: Jose Abreu <Jose.Abreu@synopsys.com> Cc: Eric Anholt <eric@anholt.net> Cc: Chris Zhong <zyw@rock-chips.com> Cc: Lucas Stach <l.stach@pengutronix.de> Cc: Hoegeun Kwon <hoegeun.kwon@samsung.com> Cc: Dawid Kurek <dawikur@gmail.com> * tag 'drm-misc-next-2017-06-15' of git://anongit.freedesktop.org/git/drm-misc: (26 commits) drm: Reduce scope of 'state' variable drm: mxsfb_crtc: Reset the eLCDIF controller drm: Remove duplicate forward declaration drm/panel: s6e3ha2: Add support for s6e3hf2 panel on TM2e board dt-bindings: Add support for samsung s6e3hf2 panel drm/panel: add backlight dependency for sitronix-st7789v drm/panel: S6E3HA2 needs backlight code drm/panel: simple: add support for AUO P320HVN03 drm/panel: simple: add support for NLT NL192108AC18-02D dt-bindings: add vendor prefix for NLT Technologies, Ltd. drm/panel: simple: add support for NEC NL12880B20-05 drm/panel: add Innolux P079ZCA panel driver dt-bindings: Add INNOLUX P079ZCA panel bindings drm/vc4: Fix resource leak in 'vc4_get_hang_state_ioctl()' in error handling path drm/vc4/vc4_bo.c: always set bo->resv drm: Add const to name field declaration in struct drm_prop_enum_list drm/pl111: Fix offset calculation for the primary plane. drm/atmel-hlcdc: Fix panel registration drm/bridge: Build the panel wrapper in drm_kms_helper drm/atmel-hlcdc: Replace the panel usage with drm_panel_bridge. ...
| * drm/atmel-hlcdc: Fix panel registrationBoris Brezillon2017-06-071-2/+0
| | | | | | | | | | | | | | | | | | | | | | Attach the panel-bridge created by drm_panel_bridge_add() to the parallel RGB encoder. Fixes: 96160a8071b2 ("drm/atmel-hlcdc: Replace the panel usage with drm_panel_bridge.") Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Archit Taneja <architt@codeaurora.org> Link: http://patchwork.freedesktop.org/patch/msgid/1496748866-17165-1-git-send-email-boris.brezillon@free-electrons.com
| * drm/atmel-hlcdc: Replace the panel usage with drm_panel_bridge.Eric Anholt2017-06-051-149/+14
| | | | | | | | | | | | | | | | | | | | | | | | This cuts 135 lines of boilerplate, at the cost of losing the filtering of get_modes() using atmel_hlcdc_dc_mode_valid(). The atomic check will still check that we don't set an invalid mode, though. Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Archit Taneja <architt@codeaurora.org> Link: http://patchwork.freedesktop.org/patch/msgid/20170511183128.25085-7-eric@anholt.net
| * drm/atmel-hlcdc: Drop custom encoder cleanup func.Eric Anholt2017-06-051-7/+1
| | | | | | | | | | | | | | | | | | drm_encoder_cleanup() finishes with memsetting it to 0, already. Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Archit Taneja <architt@codeaurora.org> Link: http://patchwork.freedesktop.org/patch/msgid/20170511183128.25085-6-eric@anholt.net
* | drm/atmel-hlcdc: Fix output initializationBoris Brezillon2017-05-181-22/+14
|/ | | | | | | | | | | | | | | | | drm_of_find_panel_or_bridge() is expecting np to point to the encoder node, not the bridge or panel this encoder is feeding. Moreover, the endpoint parameter passed to drm_of_find_panel_or_bridge() is always set to zero, which prevents us from probing all outputs. We also move the atmel_hlcdc_rgb_output allocation after the panel/bridge detection to avoid useless allocations. Reported-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Fixes: ebc944613567 ("drm: convert drivers to use drm_of_find_panel_or_bridge") Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Tested-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Sean Paul <seanpaul@chromium.org> Link: http://patchwork.freedesktop.org/patch/msgid/1495110921-4032-1-git-send-email-boris.brezillon@free-electrons.com
* drm: atmel-hlcdc: Uninitialized return in atmel_hlcdc_create_outputs()Dan Carpenter2017-04-181-3/+2
| | | | | | | | | | | It's not possible for endpoint to be zero so the test doesn't work. If we break on the first iteration through the loop then endpoint is 1 and "ret" is uninitialized. Fixes: ebc944613567 ("drm: convert drivers to use drm_of_find_panel_or_bridge") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170415192142.GA6416@mwanda
* drm: convert drivers to use drm_of_find_panel_or_bridgeRob Herring2017-04-061-52/+21
| | | | | | | | | | | | | | | | | 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-3/+1
| | | | | | | | | | | | | | | | | | | 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
* Back-merge tag 'v4.7-rc5' into drm-nextDave Airlie2016-07-021-4/+6
|\ | | | | | | | | | | Linux 4.7-rc5 The fsl-dcu pull needs -rc3 so go to -rc5 for now.
| * drm: atmel-hlcdc: Fix OF graph parsingBoris Brezillon2016-06-211-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | atmel_hlcdc_create_outputs() iterates over OF graph nodes and releases the node (using of_node_put()) after each iteration, which is wrong since for_each_endpoint_of_node() is already taking care of that. Move the of_node_put() call in the error path. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Reviewed-by: Nicolas Ferre <nicolas.ferre@atmel.com> Fixes: 17a8e03e7e97 ("drm: atmel-hlcdc: rework the output code to support drm bridges")
* | drm: atmel-hlcdc: Rely on the default ->best_encoder() behaviorBoris Brezillon2016-06-101-12/+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-4-git-send-email-boris.brezillon@free-electrons.com
* drm: atmel-hlcdc: rework the output code to support drm bridgesBoris Brezillon2016-04-141-81/+112
| | | | | | | | | The current output code only supports connection to drm panels. First simplify the drm panel code, and then add support for external drm bridges. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Tested-by: Nicolas Ferre <nicolas.ferre@atmel.com>
* drm: atmel-hlcdc: move output mode selection in CRTC implementationBoris Brezillon2016-04-141-46/+0
| | | | | | | | | | | | | | | | | In order to support multiple outputs we need to move the output mode selection to the CRTC object, so that the output validity check can be done against the drm_atomic_state. If the connectors selected by a specific mode setting are requiring incompatible bus format the atomic operation is aborted (->atomic_check() returns -EINVAL). In order to implement that, we need to define our own CRTC state and overload default ->reset(), ->atomic_duplicate_state() and ->atomic_destroy_state() functions. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Tested-by: Nicolas Ferre <nicolas.ferre@atmel.com>
* drm: atmel-hlcdc: remove leftovers from atomic mode setting migrationBoris Brezillon2016-04-141-12/+0
| | | | | | | | | | The ->dpms field is no longer used and can be removed. The same goes for the dummy ->mode_fixup() implementation which always returns true. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Tested-by: Nicolas Ferre <nicolas.ferre@atmel.com>
* drm: atmel-hlcdc: fix connector and encoder typesBoris Brezillon2016-04-141-2/+2
| | | | | | | | | | The hlcdc IP keep the pixel stream in raw RGB mode, and does not provide any specific connector. Since DRM_MODE_CONNECTOR_RAW_RGB does not exist, use DRM_MODE_CONNECTOR_Unknown. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Tested-by: Nicolas Ferre <nicolas.ferre@atmel.com>
* drm/atmel-hlcdc: Constify function pointer structsVille Syrjälä2015-12-151-2/+2
| | | | | | | | | | | | | | | | | | | | Moves a bunch of junk to .rodata from .data. drivers/gpu/drm/atmel-hlcdc/atmel-hlcdc-dc.ko: -.text 12488 +.text 12480 -.rodata 1696 +.rodata 1760 -.data 776 +.data 712 Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Link: http://patchwork.freedesktop.org/patch/msgid/1450178476-26284-13-git-send-email-boris.brezillon@free-electrons.com Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* 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: atmel-hlcdc: add RGB565 and RGB444 output supportBoris Brezillon2015-08-181-0/+4
| | | | | | The HLCDC IP supports RGB565 and RGB444 output formats. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
* drm: atmel-hlcdc: Atomic mode-setting conversionBoris Brezillon2015-02-221-26/+15
| | | | | | | | Convert the HLCDC driver to atomic mode-setting. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Tested-by: Sylvain Rochet <sylvain.rochet@finsecur.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* drm: add Atmel HLCDC Display Controller supportBoris Brezillon2015-01-211-0/+319
The Atmel HLCDC (HLCD Controller) IP available on some Atmel SoCs (i.e. at91sam9n12, at91sam9x5 family or sama5d3 family) provides a display controller device. This display controller supports at least one primary plane and might provide several overlays and an hardware cursor depending on the IP version. At the moment, this driver only implements an RGB connector to interface with LCD panels, but support for other kind of external devices might be added later. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Reviewed-by: Rob Clark <robdclark@gmail.com> Tested-by: Anthony Harivel <anthony.harivel@emtrion.de> Tested-by: Ludovic Desroches <ludovic.desroches@atmel.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
OpenPOWER on IntegriCloud