summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-02-25src: Xv: cleanup armada_drm_check_plane()Russell King
Cleanup armada_drm_check_plane() a little. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2017-02-25src: Xv: rename some struct membersRussell King
Rename "planes" to "mode_planes" and "plane" to "overlay_plane" Signed-off-by: Russell King <rmk@armlinux.org.uk>
2017-02-25src: Xv: pass desired plane into armada_drm_XvInitPlane()Russell King
Pass the desired plane into armada_drm_XvInitPlane(), rather than having armada_drm_XvInitPlane() use the first plane. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2017-02-25src: Xv: store number of planesRussell King
Store the number of planes in the array of planes, rather than checking for NULL entries. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2017-02-25src: Xv: move plane gathering to separate functionRussell King
Move the gathering of plane information to a separate function rather than lumping it in armada_drm_XvInit(). Signed-off-by: Russell King <rmk@armlinux.org.uk>
2017-02-25src: Xv: use xf86XVFillKeyHelperDrawable()Russell King
Use xf86XVFillKeyHelperDrawable() when filling the colorkey, which avoids potential corruption with some window managers. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2017-02-25src: Xv: always repaint colorkey on ReputImageRussell King
Always repaint the colorkey on ReputImage - we may have received an exposure event, and the X server may have cleared the window, resulting in loss of the colorkey (and therefore the displayed video.) Signed-off-by: Russell King <rmk@armlinux.org.uk>
2017-02-25src: Xv: pull out property initialisationRussell King
Pull out the property initialisation code from armada_drm_XvInit() to reduce indentation. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2017-02-25src: Xv: no need to store the full propertyRussell King
There is no need to store a pointer to the full property; we only need the property id to update the values in the kernel. Store the ID and free the property structure. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2017-02-25src: Xv: combine property dataRussell King
Combine the Xv property data into struct drm_xv_prop. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2017-02-25src: add universal plane supportRussell King
Add universal plane support to the common drm implementation - this gets all planes and plane properties from the kernel for overlay planes, and stores the primary plane ID in our CRTC structure. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2017-02-12etnaviv: cleanup etnaviv pixmap memory managementRussell King
Group all etnaviv pixmap memory management functions into one place, combining the contents of etnaviv_put_vpix() with etnaviv_free_vpix(), since it is now only called from within etnaviv_put_vpix(). This also ensures that the refcounting can't be accidentally bypassed. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2017-02-12etnaviv: remove "fence" argument from etnaviv_commit()Russell King
The "fence" pointer to etnaviv_commit() no longer provides any useful purpose - we never made use of the fence ID returned through this pointer. Remove it. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2017-02-12etnaviv: convert usermem nodes to use fencesRussell King
Rather than tying the usermem nodes to their current specific use case (for uploading glyphs) which relies on the destination pixmap never being freed over their lifetimes, switch to using the fencing support. This means we will avoid blocking in etnaviv_BlockHandler() waiting for the glyph upload to complete. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2017-02-12etnaviv: pull out fence implementationRussell King
Pull out the underlying basics of our fence implementation into a separate file, so we can re-use this for objects other than pixmaps within the GPU driver. This involves some slight behavioural changes in the driver: - we always retire all fences up to and including "etnaviv->last_fence" everywhere - etnaviv_batch_wait_commit() no longer checks whether the fence on the pixmap has already completed - due to the above change, this optimisation will no longer trigger. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2017-02-12etnaviv: remove busy_free_listRussell King
Rather than using the busy_free_list, use the refcounting on the etnaviv pixmap to control their lifetime. This means that we will automatically free them when they are retired from the batch without having to place them on lists. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2017-02-12etnaviv: add etnaviv_pixmap reference counting to batchesRussell King
Add etnaviv_pixmap reference counting to batches to prevent them being freed while they are on the batch or fence lists. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2017-02-12etnaviv: add reference counting to etnaviv_pixmapsRussell King
Add reference counting to etnaviv_pixmaps so we can track when it is safe to free these. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2017-02-12etnaviv: factor out batch retirement codeRussell King
Factor out the batch retirement code: xorg_list_del(&vpix->batch_node); vpix->batch_state = B_NONE; into a common function. This is called when we know that the GPU has finished with the etnaviv pixmap buffer, and we are ready to take it off the batch and fence lists. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2017-02-11README update to mention unstable-devel branchRussell King
Update the README to mention that the unstable-devel branch should be used when building _this_ version of the driver. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2017-02-11build: lack of viv_open should not disable etnadrmRussell King
The lack of viv_open() should not disable etnadrm, as etnadrm does not require libetnaviv to be built. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2017-02-11Add FAQRussell King
Add a FAQ file to help people understand some design choices. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2017-02-11etnaviv: remove <etnaviv/etna_bo.h> include from etnaviv_accel.hRussell King
Remove the etna_bo.h include from etnaviv_accel.h, and include it where necessary. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2017-02-11etnaviv: remove unnecessary <etnaviv/viv.h> includesRussell King
Remove <etnaviv/viv.h> from etnaviv_utils.h and etnaviv_dummy.c, neither of which actually make use of definitions from these files. Add <stdlib.h> to etnaviv_dummy.c for the definition of NULL, and <stdint.h> with declarations for the etna_bo and viv_conn structures. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2017-02-11etnaviv: remove unnecessary <etnaviv/etna.h> includesRussell King
Remove the <etnaviv/etna.h> include from etnaviv_accel.h, etnaviv.c, and etnaviv_dri3.c. Add this header to those files that actually require this include, or <etnaviv/common.xml.h> for those that just require definitions from common.xml.h. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2017-02-11etnaviv: arrange include files consistentlyRussell King
Arrange the order of include files consistently: - C library includes - Xorg includes - our includes - etnaviv includes - etnaviv_compat.h include Signed-off-by: Russell King <rmk@armlinux.org.uk>
2017-02-11build: cater for laanwj's etna_viv changeRussell King
Allow for etna_viv commit "3dadcdd Move almost everything under src/ to attic/", which moved the libetnaviv source code into attic. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2017-02-11README update to make etnaviv vs etnadrm differences clearerRussell King
Update the README to make the etnaviv vs etnadrm differences clearer. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2017-02-05etnaviv: add xrgb8888 Xv formatRussell King
Add XRGB8888 Xv format, which speeds up rendering from the gstreamer bayer2rgb plugin, as it avoids gstreamer having to convert XRGB to YUV. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2017-02-05etnaviv: remove tiled support from Xv backendRussell King
Tiling for RGB buffers does not work, so remove it from the Xv backend completely. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2017-02-04move armada_fourcc.h to common/Russell King
There's nothing armada specific about this fourcc.h file, so move it to the common/ subdirectory. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2017-02-04armada: Adapt to video API 23Christian Gmeiner
Block and wakeup handlers lose their pReadmask arguments. Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Signed-off-by: Russell King <rmk@armlinux.org.uk>
2017-02-04armada: Use NotifyFd for drm fdChristian Gmeiner
NotifyFd is available after API 22, and must be used after API 23. Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Signed-off-by: Russell King <rmk@armlinux.org.uk>
2017-02-04etnaviv: fix blend mode adjustment for component alphaLucas Stach
Set the correct fields for the blendmode, as otherwise the old blend mode in those fields is still OR'ed into the final register value after the adjustment. Fixes: 3080f6afb5ae (etnaviv: split blend modes from the alpha mode) Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Russell King <rmk@armlinux.org.uk>
2017-02-04etnaviv: fall back if composite region is bigger than src or maskLucas Stach
Having a composite region bigger than the src or mask picture is well defined as per the X.Org renderproto spec chapter "9. Source and Mask Transformations". We can not do this on the GPU as the core is not clipping the source size in relative mode and there is no way to control the behavior in absolute mode. This is especially visible on a GPU with MMUv2, where such operations will cause MMU faults, as the GPU tries to read outside of the source buffer. On MMUv1 it will only cause reading of undefined data. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Russell King <rmk@armlinux.org.uk>
2017-02-04etnaviv: fix XV resize for UYVY source formatLucas Stach
Contrary to what is stated in the documentation, the stage1 buffer for the filter blit needs to have the same component ordering as the source image, otherwise it will only be zero filled when doing the stage1 blit. This has been validated to be correct on: - i.MX6DL (GC320 rev 5007) - i.MX6Q (GC320 rev 5007) - i.MX6QP (GC320 rev 5303) Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Russell King <rmk@armlinux.org.uk>
2017-02-04etnaviv: implement handling for large number of clip rects in vr_opLucas Stach
Unlike de_op, vr_op had no way to deal with a large number of clip rects which would make the draw operation overflow a single command stream buffer. Implement splitting the draw operation into multiple chunks, to be able to submit them to the kernel in several pieces. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Russell King <rmk@armlinux.org.uk>
2016-11-27etnaviv: move destination alpha workaround away from global alpha subsitutionRussell King
Make the code slightly simpler by changing the non-alpha destination workaround to subsitute a constant value blend mode rather than one which depends on the destination alpha. This means there's no possibility of the alpha subsitution causing conflicts. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2016-11-27etnaviv: set and test separated blend modesRussell King
Set and test the separated blend modes, rather than inserting and extracting them from the alpha_modes member. This makes the code clearer, avoiding the use of some very long definitions from state_2d.xml.h. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2016-11-27etnaviv: split blend modes from the alpha modeRussell King
Split the individual blend modes from the combined alpha mode to allow easier testing and updating these modes. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2016-11-25Update READMERussell King
Update the readme with updated GIT hostname, mention etnaviv DRM support, and add some step-by-step build instructions. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2016-11-25etnaviv: get rid of redundant 'op' argument to etnaviv_accel_reduce_mask()Russell King
We no longer need the 'op' argument, so get rid of it. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2016-11-25etnaviv: improve constant mask reduction for other operationsRussell King
We can support many other constant non-CA mask operations in addition to OVER if we key off the individual blend modes to compute the new blend parameters. Rewrite etnaviv_accel_reduce_mask() to cater for this. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2016-11-25etnaviv: avoid redundant opaque mask operationRussell King
If the mask is opaque, there's no point in going through the expense of using the mask for any composite operation, so bypass it entirely. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2016-11-24etnaviv: stop using pict_format in glyph codeRussell King
Stop explicitly using the pict_format pixmap member in most of the glyph code, as this is not really necessary. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2016-11-24etnaviv: stop using composite destination pict_formatRussell King
Stop using the destination etnaviv_pixmap's pict_format member, storing the format in the composite state instead. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2016-11-24etnaviv: etnaviv_workaround_nonalpha() to operate on formatsRussell King
Rather than taking an etnaviv_pixmap pointer, take a pointer to the format itself. This will allow us to use this workaround on formats rather than modifying the state of a pixmap. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2016-11-24etnaviv: move initialisation of final operation of compositeRussell King
Move the initialisation of the final composite operation into the main function, rather than being duplicated in three different locations. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2016-11-24etnaviv: move dst_offset into composite stateRussell King
Move the destination offset into the composite state structure, so we don't have to re-fetch the etnaviv pixmap to get the offset. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2016-11-24etnaviv: collect composite state into single structureRussell King
Collect all the composite state into a single structure that can be passed around, instead of using separate structures. Signed-off-by: Russell King <rmk@armlinux.org.uk>