aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* exynos: honor the repeat mode in g2d_copy_with_scaleTobias Jakobi2015-03-161-0/+5
| | | | | | | | | | | | | | | | 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>
* exynos: add g2d_scale_and_blendTobias Jakobi2015-03-161-0/+129
| | | | | | | | | | | 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>
* exynos: fimg2d: whitespace fix in g2d_flushTobias Jakobi2015-03-101-1/+1
| | | | | Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* exynos: fimg2d: introduce G2D_OP_INTERPOLATETobias Jakobi2015-03-101-0/+4
| | | | | | | | | 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>
* exynos: fimg2d: remove TRUE/FALSE from headerTobias Jakobi2015-03-101-2/+2
| | | | | | | | | 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>
* exynos: introduce g2d_add_base_addr helper functionTobias Jakobi2015-03-101-43/+32
| | | | | | | | | | | | 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>
* tests/exynos: fix typos and change wordingTobias Jakobi2015-03-101-4/+4
| | | | | | | | 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>
* exynos: replace G2D_DOUBLE_TO_FIXED macro with functionTobias Jakobi2015-03-101-5/+17
| | | | | | | | | | | | | | | 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>
* exynos: Use symbol visibility.Maarten Lankhorst2014-08-141-7/+12
| | | | | | No changes to exported symbols. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
* exynos: fix scaling factor computation in g2d_copy_with_scaleTobias Jakobi2014-06-201-1/+1
| | | | | | | | | 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>
* exynos: fix coordinate computation in g2d_copyTobias Jakobi2014-06-201-1/+1
| | | | | | | | 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>
* exynos_fimg2d: fix cast from pointer to integer of different sizeDaniel Kurtz2014-05-121-2/+2
| | | | | | | Fixes two gcc [-Wpointer-to-int-cast] warnings. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Acked-by: Inki Dae <inki.dae@samsung.com>
* libdrm/exynos: add test application for 2d gpu.Inki Dae2013-03-081-0/+630
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>