Age | Commit message (Collapse) | Author |
|
Already handled by the build system.
v2: s/compiler/build system/
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
|
|
Also add the register field formatting info provided by
Inki Dae <inki.dae@samsung.com>.
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Suggested-by: Inki Dae <inki.dae@samsung.com>
|
|
The reason for this change is to let userspace use the header.
Currently 'make install' does not install it.
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Inki Dae <inki.dae@samsung.com>
Tested-by: Joonyoung Shim <jy0922.shim@samsung.com>
|
|
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Inki Dae <inki.dae@samsung.com>
Tested-by: Joonyoung Shim <jy0922.shim@samsung.com>
|
|
Keeps the code cleaner, since the structs have to be initialized
once anyway.
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Inki Dae <inki.dae@samsung.com>
Tested-by: Joonyoung Shim <jy0922.shim@samsung.com>
[evelikov: squash trivial conflict]
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Conflicts:
tests/exynos/exynos_fimg2d_test.c
|
|
This is useful when the default repeat mode, which is 'repeat'
produces artifacts at the borders of the copied image.
Choose the 'pad' mode to make use of the color of the destination
image.
In my usage case the destination is the framebuffer, which is
solid filled with a background color. Scaling with 'pad' mode
would then just do the right thing and also produces nice
borders on the output.
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Inki Dae <inki.dae@samsung.com>
Tested-by: Joonyoung Shim <jy0922.shim@samsung.com>
|
|
This is a combination of g2d_copy_with_scale and g2d_scale.
It is a pretty common operation to scale one buffer and then
blend it on top of another, so provide a direct way to that
operation.
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Inki Dae <inki.dae@samsung.com>
Tested-by: Joonyoung Shim <jy0922.shim@samsung.com>
|
|
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
|
|
This sets up the blending equation in the following way:
out = src * src_alpha + dst * (1 - src_alpha)
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Tested-by: Joonyoung Shim <jy0922.shim@samsung.com>
|
|
Register defines all use uppercase hex codes.
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Tested-by: Joonyoung Shim <jy0922.shim@samsung.com>
|
|
The coefficient mode enables use of global color, not alpha.
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Tested-by: Joonyoung Shim <jy0922.shim@samsung.com>
|
|
The fimg2d header was defining TRUE and FALSE, but actually
these defines are just used once. Remove them, since they
don't make the code better readable/understandable.
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
|
|
In almost all functions the base address register is written, so it
makes sense to have a helper function for this.
v3: Wrap line as pointed out by Emil Velikov
<emil.l.velikov@gmail.com>.
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Tested-by: Joonyoung Shim <jy0922.shim@samsung.com>
|
|
No functional changes.
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Tested-by: Joonyoung Shim <jy0922.shim@samsung.com>
|
|
This also avoids the floating point conversion steps and just
uses pure integer arithmetic.
Since the G2D hardware scaling approach is a bit unintuitive,
document it in the function as well.
v2: Explicitly mention the normalization constant.
v3: Use common commenting style as pointed out by
Emil Velikov <emil.l.velikov@gmail.com>.
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Tested-by: Joonyoung Shim <jy0922.shim@samsung.com>
|
|
This patch removes the ioctls which are removed from the linux kernel.
Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Signed-off-by: Rob Clark <robclark@freedesktop.org>
|
|
The ioctl DRM_EXYNOS_GEM_MAP_OFFSET and DRM_EXYNOS_GEM_MMAP are removed from
the linux kernel. This patch modifies libdrm and libkms to use drm generic
ioctls instead of the removed ioctls.
v2: The original patch was erroneous. In case the MODE_MAP_DUMB ioctl failed
it would return the retvalue as a void-pointer. Users of libdrm would then
happily use that ptr, eventually leading to a segfault. Change this to
return NULL in that case and also restore the previous behaviour of logging
to stderr.
The other error was that 'bo->vaddr' was never filled with the mapped
buffer address. Hence exynos_bo_map still returned NULL even if the
buffer mapping succeeded.
Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Signed-off-by: Rob Clark <robclark@freedesktop.org>
|
|
No changes to exported symbols.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
|
|
When division of source and destination width yields the
scaling factor for the x-coordinate, then it should be
source/destination _height_ for y.
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
|
|
The hardware accepts scaling factors formatted in a
fixed-point format. The current macro casts to integer
first, then multiplies by the fp conversion factor.
This does not make any sense. In particular, truly
'fractional' inputs, like 1.5, won't work that way.
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
|
|
The right-bottom register isn't set correctly.
Looks like a copy-and-paste error.
Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
|
|
The documentation says fd holds the fd from prime import/export.
However, it isn't actually used, nor is it necessary, so let's just remove
it.
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Inki Dae <inki.dae@samsung.com>
|
|
Reuse the common drmPrime() helper functions rather than reinventing them.
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Inki Dae <inki.dae@samsung.com>
|
|
Fixes two gcc [-Wpointer-to-int-cast] warnings.
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Inki Dae <inki.dae@samsung.com>
|
|
warning: assignment makes pointer from integer without a cast [enabled by default]
warning: initialization makes integer from pointer without a cast [enabled by default]
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Inki Dae <inki.dae@samsung.com>
|
|
I even compile time tested this on a panda with make dist!
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
|
|
This patch adds library and test application for g2d gpu(fimg2d).
The fimg2d hardware is a 2D graphics accelerator(G2D) that
supports Bit Block Transfer(BitBLT).
The library includes the following primitive drawing operations:
.solid fill - This operation fills the given buffer with
the given color data.
.copy - This operation copies contents in source buffer to
destination buffer.
.copy_with_scale - This operation copies contents in source buffer
to destination buffer scaling up or down properly.
.blend - This operation blends contents in source buffer with
the ones in destination buffer.
And the above operations uses gem handle or user space address
allocated by malloc() as source or destination buffer.
And the test application includes just simple primitive drawing
tests with the above library.
And the guide to test is as the following,
"#exynos_fimg2d_test -s connector_id@crtc_id:mode"
With this above simple command, four primitive drawing operations
would be called step by step and also rendered on the output device
to the given connector and crtc id.
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Rob Clark <robdclark@gmail.com>
|
|
|
|
this patch adds libdrm_exynos helper layer that inclues some intefaces
for exynos specific gem and virtual display driver and also adds exynos
module name to modtest and vbltest.
Changelog v2:
- fixed exynos broken ioctl.
the pointer of uint64_t *edid should be removed.
- removed unnecessary definitions.
- added drm prime interfaces.
this feature is used to share a buffer between drivers or memory managers
and for this, please, refer to below links:
http://www.mjmwired.net/kernel/Documentation/dma-buf-sharing.txt
http://lwn.net/Articles/488664/
this patch is based on a link below:
git://anongit.freedesktop.org/mesa/drm
commit id: d72a44c7c4f5eea9c1e5bb0c36cb9e0224b9ca22
Reviewed-by: Rob Clark <rob@ti.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Rob Clark <rob@ti.com>
|