Age | Commit message (Collapse) | Author |
|
We never force a format with etnaviv_pict_format() now, so get rid of
this redundant argument.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
Rename etnaviv_blit_start() to etnaviv_batch_start(), and expose it
for others. This will allow the render code to be moved out of
etnaviv_accel.c.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
Move the batch building macros into etnaviv_op.c, which is the only
place they're used.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
free_time is only ever written to, so kill it.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
etnaviv_blit() is just a wrapper around etnaviv_de_op(). Use
etnaviv_de_op() directly.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
Move the draw box splitting into etnaviv_de_op(), rather than
etnaviv_blit(). This allows us to calculate how many boxes we can fit
into the remainder of the batch buffer.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
etnaviv_blit_end() is just a wrapper around etnaviv_de_end(). Use
etnaviv_de_end() directly.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
Sometimes, we clip away all the spans to be filled. In this case,
it's pointless emitting the setup states and adding the bo to the
batch list.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
Finally get rid of gal_prepare_gpu(), which has been needing to die for
a while now.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
Arrange for etnadrm to track the last completed fence id, using it to
decide whether the next command buffer needs a call into the kernel to
check whether it has completed or not. This cuts down on some kernel
calls.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
Move the etnadrm_pipe member into our etna_viv_conn structure, rather
than hacking around with the etna_viv viv_conn structure.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
Provide a version of etnaviv_drawable_offset() which doesn't return the
offsets. This is useful in a couple of places, and avoids us having to
either supply a dummy offset argument, or open code this.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
Prevent A8 destination formats if the GPU does not support this
destination format.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
Avoid allocating (and freeing) the temporary pixmap for composite
operations unless we're going to use it.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
Add source/destination format validation for standard X operations.
This will allow us to add support for other formats where GPU
capabilities allow.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
We should be using vSrc, since that's what etnaviv_acquire_src()
returned to us, even though it's the same as vTemp.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
Add the missing calls to miCompositeSourceValidate() for the
accelerated Composite() operation.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
Provide an xorg.conf option to switch pixmap allocations off Armada DRM
onto the GPU instead. This is useful for Dove, where we would
otherwise always use the Armada DRM allocator, and it allows the
performance of the two allocators to be compared.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
Add full xvbo support.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
Add support for exporting dmabufs from etnadrm, and importing global
names into etnadrm. These are required to support Xvbo overlay
display, and also Xvbo in the etnadrm backend.
It is necessary to also add dummy functions for libetnaviv to avoid
link or runtime unresolved symbol errors, but we need to be careful
of clashing with libetnaviv's etna_bo_from_name(), which uses different
"names".
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
Add support for retrieving the bo size from bos, including dmabuf and
usermem bos. This is needed for Xvbo support.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
If we have a DRM-based GPU, the DRI2 system exports the GPU DRM device
rather than the KMS DRM device, and so the Xvbo names will be specific
to the GPU rather than the KMS. Therefore, we need a way to talk to
our accelerator backend to convert the GPU name into something we can
display.
This adds a hook in the Xv code to allow this, updates the GPU drivers
to return capabilities indicating what they support. Currently, the
etnaviv/drm backend does not support Xvbo in any form.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
If an Xvbo stream switches between passing Xvbo buffers and normal
images, we should re-setup accordingly, rather than trying to parse
a normal image buffer as an Xvbo buffer. Handle this situation.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
is_xvbo better reflects the function of this struct member, now that
the old bmm support is completely gone.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
Remove the old (and non-functional) bmm buffer passing from the
Armada DRM Xv backend. This is obsolete and unsupported.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
Provide a sample xorg.conf file so that people know what is expected to
make Xorg servers find the driver module.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
Use a BoxRec for the destination rectangle for the glyph, so the
etnaviv code doesn't have to manually convert to a BoxRec.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
Convert the tiled rectangle fill to use the source origin de operation,
thereby allow etnaviv_blit_srcdst() to be removed.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
When glyphs are coming from the glyph cache, it's common for them to
have the same source. Since the destination is constant, we can save
the setup time for each glyph, and only compute the source origin and
destination box. Convert the glyph rendering to this model.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
etnaviv_blit_srcdst() is a single-box copy from a source origin point
to a single box on the destination. It doesn't make sense to calculate
a relative offset for the source, we might as well use absolute origin
mode. Switch to absolute origin mode, and add a DE op helper for this
operation.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
Add support for multiple source origin modes. When we setup the
source bo, we support:
* None - no source origin, absolute mode.
* Relative - relative top-left corner of source.
* Absolute - absolute top-left corner of source.
We treat None and Absolute the same, since we need the additional word
in the command stream for alignment anyway.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
Convert etnaviv_set_source_bo() and etnaviv_set_dest_bo() to take a
pointer to the etnaviv_blit_buf structure, rather than individual
members of this struct.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
Switching the output mode between reflected and normal causes the Xorg
cached scratch pixmap to end up with etnaviv private data pointing at
a freed etnaviv_pixmap. A subsequent use of the scratch pixmap then
causes glibc to complain about a double-free. Fix this.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
Delay freeing the userptr etna bo and memory until we're about to
block, rather than waiting for the glyph upload to complete. This
should make glyph upload of multiple glyphs more efficient as we
don't have to wait for each to complete before uploading the next
one.
The down-side is an increase in the memory used by the X server, as
we have to keep this memory around until the block handler gets
called.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
Add support for the new GEM_WAIT ioctl, which waits for the kernel to
finish with the GEM object (all render complete, and has been retired).
This is different from the WAIT_FENCE ioctl, which just waits for
rendering to complete.
This is an important distinction, as when a gem object is retired and
freed, the kernel will invalidate the cache for this object, which
effectively changes the data userspace sees. If userspace merely
waits for rendering to complete, there is a race condition where a
userptr BO can be free()d and re-used, and the kernel's invalidation
then corrupts the malloc() free lists.
This commit ensures that etna_bo_del() on a userptr BO will not
return until the kernel has done with the BO.
On kernels which do not support the GEM_WAIT ioctl, we presently
ignore the error.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
Fix the repeat handling in etnaviv_acquire_src() - we need to apply the
transform before checking for repeat. In doing this, we can convert
over to using picture_needs_repeat() instead of adjusting the repeat
on the source, which is more efficient.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
Move the forcing of the source into the temporary pixmap into
etnaviv_acquire_src(), where we will be able to better decide how to
handle that case.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
If the source pixmap does not have an etna bo associated with it, we
should nevertheless try to obtain it in a format we can use, to save
bouncing the destination pixmap back to the CPU. Rearrange the code
in etnaviv_acquire_src() to handle this case.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
Extensive analysis of Xorg, Intel SNA, and other code indicates that
the source clips are not affected by the transformation matrix, only
the drawable position on the backing pixmap needs to be included in
the passed coordinates.
Since we now let through all transformations, we must ensure that
transformations we can't handle in hardware cause us to fallback.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
We were not freeing the array of glyphs to be drawn. Add the missing
free()s.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
Add bo caching support to etnadrm.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
Add generic bo caching support to the common library. Bo caching
allows us to efficiently re-use bos which we have already allocated.
Bos are sorted into buckets, and free entries are time-limited in
the cache (provided bo_cache_clean() is called.)
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
The xorg_list_entry alias was missing, add it.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
Clean up the render debugging, and in doing so, eliminate some of the
arguments to the composite lower levels.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
In the source-only code, if we're using the temporary pixmap, it will
have alpha, so etnaviv_workaround_nonalpha() will fail anyway. There's
no need to check for vSrc != vTemp.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
Use the actual size of the region we will be compositing for the mask
repeat check, rather than the requested size. This avoids cases where
the area could be clipped smaller than the requested size, resulting in
no repeat being needed.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
We can gain some performance for cases we don't handle by performing
the masked blend in software, but still having the final blend in
hardware.
Rearrange etnaviv_accel_composite_masked() so that we are able to setup
what we need, and then for cases we don't handle, fall back to using
a software blend instead.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|
|
Pass a pointer to the temporary pixmap pointer into
etnaviv_acquire_src(), thereby avoiding dereferencing this pointer
until we actually need to use it.
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
|