summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/armada/armada_crtc.h
Commit message (Collapse)AuthorAgeFilesLines
* drm/armada: remove unnecessary armada_plane structureRussell King2018-07-301-7/+0
| | | | | | | We no longer require a private armada_plane structure, so eliminate it, and use the drm_plane structure directly. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
* drm/armada: update planes after the dumb frame is completeRussell King2018-07-301-0/+1
| | | | | | | | Write out the plane updates after the dumb frame has completed, but just before the blank period. This allows all the plane updates to be performed in a flicker-free non-tearing manner. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
* drm/armada: switch overlay plane to atomic modesetRussell King2018-07-301-19/+0
| | | | | | | | Switch the overlay plane away from the transitional helpers and legacy methods, and use atomic helpers instead to implement the legacy set_plane ioctl methods. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
* drm/armada: switch legacy modeset to atomic modesetRussell King2018-07-301-1/+0
| | | | | | | | Switch the legacy set_config() method to use the atomic modeset helper, which allows us to get rid of the legacy dpms, prepare, commit, mode_set, mode_set_base and disable helper methods. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
* drm/armada: handle atomic modeset crtc eventsRussell King2018-07-301-0/+1
| | | | | | | | | | | | | | | | | Prepare handling for atomic modeset CRTC events. Currently, using the transition helpers, CRTC events do not exist, but once we switch to proper atomic modeset, they have to be handled. We queue an event for the next vblank in two places: - armada_drm_crtc_atomic_flush() provided we aren't doing an atomic modeset. - armada_drm_crtc_commit() if we are committing a modeset. This ensures that the event is sent at the correct time (after all updates have been written to the hardware and after the following vblank.) Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
* drm/armada: move sync signal polarity to mode_set_nofb() methodRussell King2018-07-301-1/+0
| | | | | | | | | | For atomic modeset, we need to set the sync signal polarities from the CRTC state structure rather than the legacy mode structure stored in CRTC. In any case, we should update this from our mode_set_nofb() method, rather than the commit() method. Move it there, and ensure that armada_drm_crtc_update() will not overwrite these bits. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
* drm/armada: remove crtc YUV colourspace propertiesRussell King2018-07-301-2/+0
| | | | | | | | | Remove the unused CRTC colourspace properties - userspace does not make use of these. In any case, these are not a property of the CRTC, since they demonstrably only affect the video (overlay) plane, irrespective of the format of the graphics (primary) plane. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
* drm/armada: move CBSH properties into overlay plane stateRussell King2018-07-301-1/+1
| | | | | | | | Move the contrast, brightness, and saturation properties to the overlay plane state structure, and call our overlay commit function to update the hardware via the planes atomic_update() method. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
* drm/armada: move plane works to overlayRussell King2018-07-301-2/+0
| | | | | | Only overlay makes use of these now, so move these to the overlay code. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
* drm/armada: move primary plane to separate fileRussell King2018-07-301-10/+0
| | | | | | | Split out the primary plane support; this is now entirely separate from the CRTC support. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
* drm/armada: use old_state for update tracking in atomic_update()Russell King2018-07-301-12/+0
| | | | | | | | | Rather than tracking the register state, we can now check the previous state and decide which registers need updating from that since the old plane state indicates the previous state which was programmed into the hardware. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
* drm/armada: convert overlay plane to atomic stateRussell King2018-07-301-0/+7
| | | | | | | | | | | | | The overlay plane support updates asynchronously to the request, but the drm_plane_helper_update() transitional helper waits for a vblank event before releasing the framebuffer. Using the transitional helper would make the call block, which would introduce a performance regression. Convert the overlay plane update to use the atomic state structures and methods for the plane, but implement our own legacy update method rather than the transitional helper. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
* drm/armada: convert primary plane to atomic stateRussell King2018-07-301-4/+4
| | | | | | | | Convert the primary plane as a whole to use its atomic state and the transitional helpers. The CRTC is also switched to use the transitional helpers for mode_set() and mode_set_base(). Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
* drm/armada: move mode set vblank handling and disable/enableRussell King2018-07-301-0/+1
| | | | | | | | | Move the mode set vblank handling and controller enable/disable to the prepare() and commit() callbacks. This will be needed when we move to mode_set_nofb() as we should not enable the controller without the plane coordinates and location having been properly updated. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
* drm/armada: move overlay plane register update generationRussell King2017-12-081-0/+2
| | | | | | | Move the overlay plane register update generation to a separate function as this is independent of the legacy or atomic update. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
* drm/armada: avoid work allocationRussell King2017-12-081-0/+3
| | | | Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
* drm/armada: move regs into armada_plane_workRussell King2017-12-081-0/+1
| | | | | | | | Move the register update structure out of the overlay private structure into armada_plane_work, as this is common to both the primary and overlay planes. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
* drm/armada: move event sending into armada_plane_workRussell King2017-12-081-0/+1
| | | | | | | Move the sending of events into the armada_plane_work structure, and combine the processing in armada_drm_plane_work_call(). Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
* drm/armada: move fb retirement into armada_plane_workRussell King2017-12-081-0/+1
| | | | | | | | Both the primary and overlay planes retire framebuffers in a similar manner; this can be consolidated by moving the retirement up to the armada_plane_work layer. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
* drm/armada: clean up armada_drm_crtc_plane_disable()Russell King2017-12-081-2/+2
| | | | | | | | Merge armada_drm_primary_disable() into armada_drm_crtc_plane_disable() and rename to armada_drm_plane_disable(). Use this to simplify armada_ovl_plane_disable(). Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
* drm/armada: add work cancel callbackRussell King2017-12-081-0/+1
| | | | | | | Add a work cancel callback, so that work items can add functionality to clean themselves up when they are cancelled. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
* drm/armada: store plane in armada_plane_workRussell King2017-12-081-4/+3
| | | | | | | | Store the plane in the armada_plane_work structure rather than passing it around; it doesn't get used very much in the work structures, so passing it around is a needless expense. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
* drm/armada: remove armada_drm_plane_work_cancel() return valueRussell King2017-12-081-2/+2
| | | | | | | | | armada_drm_plane_work_cancel()'s returned work structure is never used or referenced, so it's pointless returning it. It's also pointless because the caller doesn't have a clue what kind of work structure it is. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
* drm/armada: fix UV swap codeRussell King2017-12-081-0/+2
| | | | | | | The UV swap code was not always programming things correctly when the source origin box has been offset. Fix this. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
* drm: armada: remove dead empty functionsPeter Rosin2017-08-041-2/+0
| | | | | | | | | | The redundant fb helpers .gamma_set and .gamma_get are no longer used. Remove the dead code. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Peter Rosin <peda@axentia.se> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20170713162538.22788-6-peda@axentia.se
* drm: armada: use vblank hooks in struct drm_crtc_funcsShawn Guo2017-02-071-2/+0
| | | | | | | | | | | | | | | | | The vblank hooks in struct drm_driver are deprecated and only meant for legacy drivers. For modern drivers with DRIVER_MODESET flag, the hooks in struct drm_crtc_funcs should be used instead. As the result, functions armada_drm_crtc_enable[disable]_irq() can be static, although they are moved around a bit to save forward declaration. The armada_crtc pointer array in struct armada_private is still kept in there, because armada_debugfs.c still have reference to it. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Cc: Russell King <linux@armlinux.org.uk> Acked-by: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1486458995-31018-7-git-send-email-shawnguo@kernel.org
* drm/armada: use common helper for plane base addressRussell King2016-11-011-0/+2
| | | | | | | Use a common helper to calculate the plane base address(es) for the framebuffer. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
* drm/armada: move plane state to struct armada_planeRussell King2016-11-011-0/+8
| | | | | | | Move more of the Armada plane state (source size, and displayed size and position) into a state structure inside struct armada_plane. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
* drm/armada: convert overlay plane vbl worker to a armada plane workerRussell King2015-10-011-18/+2
| | | | | | | Convert the overlay plane to use the generic armada plane worker infrastructure which is shared with the primary plane. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* drm/armada: move CRTC flip work to primary plane workRussell King2015-10-011-3/+12
| | | | | | | | Add a plane work implementation, and move the CRTC framebuffer flip work to it for the primary plane. The idea is to have a common plane work implementation for both the primary and overlay planes. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* drm/armada: move frame wait into armada_frameRussell King2015-10-011-1/+3
| | | | | | | | Both the CRTC and overlay frames have their own wait queues. It would make more sense if these were part of the plane - the primary plane for the CRTC and overlay plane for the overlay. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* drm/armada: provide a common helper to disable a planeRussell King2015-10-011-0/+3
| | | | | | | Provide a common helper to disable either the overlay or the primary plane. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* drm/armada: introduce generic armada_plane structRussell King2015-10-011-0/+5
| | | | | | | Introduce a generic armada_plane struct which will eventually be used for both the primary and overlay planes. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* drm/armada: move vbl code into armada_crtcRussell King2015-09-151-0/+17
| | | | | | | Our vblank event code belongs in armada_crtc.c rather than the core of the driver. Move it there. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* drm/armada: remove non-component supportRussell King2015-09-151-4/+0
| | | | | | | | Now that the transition of TDA998x to the component helpers is complete, remove the non-componentised support from the Armada DRM driver. All outputs are expected to use the component helpers from now on. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* drm/armada: register crtc with portRussell King2014-07-111-1/+3
| | | | | | | | Register the CRTC with the port node so that the DRM OF helpers can find the appropriate CRTC. This is important so that encoders can identify their corresponding possible CRTCs. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* drm/armada: permit CRTCs to be registered as separate devicesRussell King2014-07-111-2/+4
| | | | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* drm/armada: make variant a CRTC thingRussell King2014-07-031-1/+4
| | | | | | | Move the variant pointer into the armada_crtc structure, and update for the resulting changes. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* drm/armada: move variant initialisation to CRTC initRussell King2014-07-031-0/+1
| | | | | | | | Move the variant initialisation entirely to the CRTC init function - the variant support is really about the CRTC properties than the whole system, and we want to treat each CRTC individually when we support DT. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* drm/armada: use number of CRTCs registeredRussell King2014-07-031-2/+1
| | | | | | | | | Use the number of CRTCs registered to size the vblank arrays rather than our own count. Number CRTCs using this as well. This permits us to register CRTCs as components in the near future rather than as part of a single device. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* drm/armada: move IRQ handling into CRTCRussell King2014-07-031-2/+2
| | | | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* DRM: Armada: Add support for ARGB 32x64 or 64x32 hardware cursorsRussell King2013-10-181-0/+9
| | | | | | | | | | This patch adds ARGB hardware cursor support to the DRM driver for the Marvell Armada SoCs. ARGB cursors are supported at either 32x64 or 64x32 resolutions. Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Reviewed-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* DRM: Armada: Add Armada DRM driverRussell King2013-10-121-0/+74
This patch adds support for the pair of LCD controllers on the Marvell Armada 510 SoCs. This driver supports: - multiple contiguous scanout buffers for video and graphics - shm backed cacheable buffer objects for X pixmaps for Vivante GPU acceleration - dual lcd0 and lcd1 crt operation - video overlay on each LCD crt via DRM planes - page flipping of the main scanout buffers - DRM prime for buffer export/import This driver is trivial to extend to other Armada SoCs. Included in this commit is the core driver with no output support; output support is platform and encoder driver dependent. Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Reviewed-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
OpenPOWER on IntegriCloud