summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h
Commit message (Collapse)AuthorAgeFilesLines
* drm/atmel-hclcdc: Convert to the new generic alpha propertyMaxime Ripard2018-04-161-13/+0
| | | | | | | | | | | Now that we have support for per-plane alpha in the core, let's use it. Acked-by: Boris Brezillon <boris.brezillon@bootlin.com> Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Acked-by: Sean Paul <seanpaul@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com> Link: https://patchwork.freedesktop.org/patch/msgid/e5e97e2aae129600233e0983b748e4ba51ced239.1523432341.git-series.maxime.ripard@bootlin.com
* drm/atmel-hlcdc: Use drm_fb_cma_fbdev_init/fini()Noralf Trønnes2017-12-081-1/+1
| | | | | | | | | | | | Use drm_fb_cma_fbdev_init() and drm_fb_cma_fbdev_fini() which relies on the fact that drm_device holds a pointer to the drm_fb_helper structure. This means that the driver doesn't have to keep track of that. Also use the drm_fb_helper functions directly. Cc: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171115142001.45358-6-noralf@tronnes.org
* drm/atmel-hlcdc: Use drm_gem_fb_create()Noralf Trønnes2017-08-271-0/+1
| | | | | | | | | | drm_fb_cma_create() is just a wrapper around drm_gem_fb_create() now, so use the function directly. Cc: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Link: https://patchwork.freedesktop.org/patch/msgid/1502631125-13557-8-git-send-email-noralf@tronnes.org
* drm: atmel-hlcdc: add support for 8-bit color lookup table modePeter Rosin2017-06-221-0/+16
| | | | | | | | | | All layers of all supported chips support this, the only variable is the base address of the lookup table in the register map. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Peter Rosin <peda@axentia.se> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Link: http://patchwork.freedesktop.org/patch/msgid/1498107791-17450-3-git-send-email-peda@axentia.se
* drm/atmel-hlcdc: Use crtc->mode_valid() callbackJose Abreu2017-06-021-2/+3
| | | | | | | | | | | | | Now that we have a callback to check if crtc supports a given mode we can use it in atmel-hlcdc so that we restrict the number of probbed modes to the ones we can actually display. Also, remove the mode_fixup() callback as this is no longer needed because mode_valid() will be called before. Signed-off-by: Jose Abreu <joabreu@synopsys.com> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Link: http://patchwork.freedesktop.org/patch/msgid/95fd6c06c58bd0b957e36a8d7068e6a74b581304.1495720737.git.joabreu@synopsys.com
* drm/atmel-hlcdc: Fix suspend/resume implementationBoris Brezillon2017-03-161-3/+5
| | | | | | | | | | | | | | The current suspend resume implementation is assuming register values are kept when entering suspend, which is no longer the case with the suspend-to-RAM on the sama5d2. While at it, switch to the generic infrastructure to enter suspend mode (drm_atomic_helper_suspend/resume()). Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Tested-by: Sylvain Rochet <sylvain.rochet@finsecur.com> Link: http://patchwork.freedesktop.org/patch/msgid/1488371461-22243-1-git-send-email-boris.brezillon@free-electrons.com
* drm/atmel-hlcdc: Simplify the HLCDC layer logicBoris Brezillon2017-02-281-50/+311
| | | | | | | | | | | | | | | | | | | | | | | | | | An HLCDC layers in Atmel's nomenclature is either a DRM plane or a 'Post Processing Layer' which can be used to output the results of the HLCDC composition in a memory buffer. atmel_hlcdc_layer.c was designed to be generic enough to be re-usable in both cases, but we're not exposing the post-processing layer yet, and even if we were, I'm not sure the code would provide the necessary tools to manipulate this kind of layer. Moreover, the code in atmel_hlcdc_{plane,layer}.c was designed before the atomic modesetting API, and was trying solve the check-setting/commit-if-ok/rollback-otherwise problem, which is now entirely solved by the existing core infrastructure. And finally, the code in atmel_hlcdc_layer.c is over-complicated compared to what we really need. This rework is a good excuse to simplify it. Note that this rework solves an existing resource leak (leading to a -EBUSY error) which I failed to clearly identify. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Eric Anholt <eric@anholt.net> Tested-by: Nicolas Ferre <nicolas.ferre@microchip.com>
* drm: atmel-hlcdc: route DMA accesses through AHB interfacesBoris Brezillon2016-04-141-0/+1
| | | | | | | | In relation with the actuall bandwidth consumed on a DMA Source interface, choose the less used one for a created plane. 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-0/+3
| | | | | | | | | | | | | | | | | 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: support extended timing ranges on sama5d4 and sama5d2Boris Brezillon2016-04-141-0/+6
| | | | | | | | | | The display timings on old SoCs older than the sama5d4 are quite limited and prevent the use of many displays. Add support for extended timing ranges on sama5d2 and sama5d4. 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: support asynchronous atomic commit operationsBoris Brezillon2016-04-141-0/+5
| | | | | | | | drm_atomic_helper_commit() does not support asynchronous commits. Replace it by a specific commit function supporting these kind of requests. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Tested-by: Nicolas Ferre <nicolas.ferre@atmel.com>
* drm/atmel: Nuke precloseDaniel Vetter2016-02-081-3/+0
| | | | | | | | | | | | The only thing this did was cancle pending flip events, and the core takes care of that now. Cc: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1453756616-28942-5-git-send-email-daniel.vetter@ffwll.ch
* drm: atmel-hlcdc: use appropriate enabled flag in suspend/resumeSylvain Rochet2015-03-161-0/+3
| | | | | | | | | | | | Unfortunately we used the enabled flag in struct drm_crtc instead of the enabled flag in struct atmel_hlcdc_crtc. This obviously leads to discrepancies on crtc enable state. This patch fixes the issue by using the struct atmel_hlcdc_crtc enabled flag in PM support. Signed-off-by: Sylvain Rochet <sylvain.rochet@finsecur.com> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
* drm: atmel-hlcdc: add discard area supportBoris Brezillon2015-02-221-0/+2
| | | | | | | | | | | | | The HLCDC IP provides a way to discard a specific area on the primary plane (in case at least one of the overlay is activated and alpha blending is disabled). Doing this will reduce the amount of data to transfer from the main memory to the Display Controller, and thus alleviate the load on the memory bus (since this link is quite limited on such hardware, this kind of optimization is really important). Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* drm: atmel-hlcdc: Atomic mode-setting conversionBoris Brezillon2015-02-221-56/+3
| | | | | | | | 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/+213
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