Age | Commit message (Collapse) | Author |
|
Cleanup armada_drm_check_plane() a little.
Signed-off-by: Russell King <rmk@armlinux.org.uk>
|
|
Rename "planes" to "mode_planes" and "plane" to "overlay_plane"
Signed-off-by: Russell King <rmk@armlinux.org.uk>
|
|
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>
|
|
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>
|
|
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>
|
|
Use xf86XVFillKeyHelperDrawable() when filling the colorkey, which
avoids potential corruption with some window managers.
Signed-off-by: Russell King <rmk@armlinux.org.uk>
|
|
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>
|
|
Pull out the property initialisation code from armada_drm_XvInit() to
reduce indentation.
Signed-off-by: Russell King <rmk@armlinux.org.uk>
|
|
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>
|
|
Combine the Xv property data into struct drm_xv_prop.
Signed-off-by: Russell King <rmk@armlinux.org.uk>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Add a FAQ file to help people understand some design choices.
Signed-off-by: Russell King <rmk@armlinux.org.uk>
|
|
Remove the etna_bo.h include from etnaviv_accel.h, and include it where
necessary.
Signed-off-by: Russell King <rmk@armlinux.org.uk>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Update the README to make the etnaviv vs etnadrm differences clearer.
Signed-off-by: Russell King <rmk@armlinux.org.uk>
|
|
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>
|
|
Tiling for RGB buffers does not work, so remove it from the Xv backend
completely.
Signed-off-by: Russell King <rmk@armlinux.org.uk>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
We no longer need the 'op' argument, so get rid of it.
Signed-off-by: Russell King <rmk@armlinux.org.uk>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|