summaryrefslogtreecommitdiff
path: root/exynos
AgeCommit message (Collapse)AuthorFilesLines
2020-12-08exynos: add support kernel userspace api for IPPv2 callsMarek Szyprowski1-0/+253
Add kernel header defines for Exynos DRM IPPv2 API. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Change-Id: I1f0e8d957829b85808b5332c4e0e9bf4ddec65df
2020-12-08exynos: Add kernel userspace api for v1Hoegeun Kwon1-0/+275
Change-Id: Ic2bbde341316924bc3c9bf3af8cd206c6f3f8f6b Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com> drm: ipptest: support ipp dynamic color range This patch supports dynamic range for color space conversion. COLOR_RANGE_LIMITED: selects narrow -> Y(16 to 235), Cb/Cr(16 to 240) COLOR_RANGE_FULL: selects wide -> Y/Cb/Cr(0 to 255), Wide default Change-Id: I94190ac3f3630904d2461e226d34378ac2b82b9d Signed-off-by: Donghwa Lee <dh09.lee@samsung.com> libdrm/exynos: add support for IPP blending, dithering, and colorfill This patch adds the fields for IPP bleding, dithering, and colorfill. Change-Id: Ib9cd7c7b22ee9f1017d1db3ae34d39dea342ffec Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com> ipptest: added M2M to screen on fimc_m2m_set_mode This patch added for the function outputing the M2M to a screen. So, you can check for Image Post processing dirver to screen. Also you can select the degree about (0, 90, 180, 270). I will briefly explain the process of the function: - Memory(YUV422) ---> IPP ---> Memory(RGB888) ---> Screen - Create four DMA memory. - Draw the image of the YUV422 format on three DMA memories. - Rotate the relevant image by using IPP driver. - The rotated image is stored in one DMA memory as the RGB888 format. - The one DMA memory output screen. I referred to the modetest code. Change-Id: I2bf5738d98a457ced274dc8237df8ef108153e61 Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com> exynos/drm: sync with v4.1.36 rebased tree for exynos_ipp_prop_list There is a problem using the IPP_GET_RPOPERTY ioctl because the structure exynos_ipp_prop_list is not synchronized. Synchronize with exynos_ipp_prop_list structure of tizen kernel v4.1.36 Refer below commit of tizen kernel: - Commit id: 60f8b78 (drm/exynos/gsc: Add rotation hardware limits of gscaler) - https://review.tizen.org/git/?p=platform/kernel/linux-exynos.git;a=commit;h=60f8b78ad8b75c5c3a52f2ad66897da628153eec Change-Id: Id1989f571c989afb2c73bd4d654f560c3be4067c Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
2020-12-08exynos: support DRM_IOCTL_EXYNOS_GEM_MAPJoonyoung Shim3-4/+19
The commit d41b7a3a745a("exynos: Don't use DRM_EXYNOS_GEM_{MAP_OFFSET/ MMAP} ioctls") removed it same with the ioctl that this patch adds. The reason that removed DRM_IOCTL_EXYNOS_GEM_MAP_OFFSET was we could use DRM_IOCTL_MODE_MAP_DUMB. Both did exactly same thing. Now exynos-drm driver of linux kernel revives it as DRM_EXYNOS_GEM_MAP because of render node. DRM_IOCTL_MODE_MAP_DUMB isn't permitted in render node, so this patch also supports DRM_IOCTL_EXYNOS_GEM_MAP. Change-Id: Ib548dc8a6bea076375465f64ee2fdd658a90e435 Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> exynos: fix build warnings Fix build warnings to exynos_fimg2d module. This patch fixes below two build warnings, exynos_fimg2d.c: In function 'g2d_scale_and_blend': exynos_fimg2d.c:978:3: warning: 'scale_y' may be used uninitialized in this function [-Wmaybe-uninitialized] g2d_add_cmd(ctx, SRC_YSCALE_REG, scale_y); ^ exynos_fimg2d.c:977:3: warning: 'scale_x' may be used uninitialized in this function [-Wmaybe-uninitialized] g2d_add_cmd(ctx, SRC_XSCALE_REG, scale_x); Change-Id: I70908088c61b85570aec6e3ec19b405df4820d37 Signed-off-by: Inki Dae <inki.dae@samsung.com>
2019-11-11exynos: convert to new symbols checkEric Engestrom3-46/+30
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
2019-10-18Revert "Revert "libdrm: remove autotools support""Eric Engestrom1-29/+0
The external tooling issue has been fixed, so we can delete autotools again :)
2019-10-16Revert "libdrm: remove autotools support"Marek Olšák1-0/+29
This reverts commit f057dc91e93ae21e11ab48a26127d569972f3eae.
2019-10-14libdrm: remove autotools supportEric Engestrom1-29/+0
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2019-10-04*-symbols-check: let meson figure out how to execute the scriptsEric Engestrom1-2/+2
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
2019-10-04*-symbols-check: use normal shell over bashEmil Velikov1-1/+1
None of the tests are bash specific. Tested with bash, zsh, dash, mksh and ksh. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Tested-by: Niclas Zeising <zeising@daemonic.se> Reviewed-by: Niclas Zeising <zeising@daemonic.se> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2019-04-17fix various typosEric Engestrom3-3/+3
Saw a couple of typos fixes in the patch DragonFlyBSD carries [1], so I ran codespell (a spell checker for code) on the whole repo. [1] https://github.com/DragonFlyBSD/DPorts/blob/master/graphics/libdrm/files/patch-xf86drm.c Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-10-04*-symbols-check: error out when using unset variablesEmil Velikov1-0/+2
It will make bugs like the one fixed with previous patch dead obvious. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2018-10-04automake: set NM before running the testsEmil Velikov1-0/+1
Set/export the NM variable since it may not be set already. Fixes: 4f08bfe96da ("*-symbol-check: Don't hard-code nm executable") Cc: Heiko Becker <heirecka@exherbo.org> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2018-09-19autotools: make symbols hidden by defaultLucas De Marchi1-0/+1
Now that symbols that should be exported are annotated accordingly, make all the rest hidden by default. Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Acked-by: Eric Engestrom <eric.engestrom@intel.com>
2018-09-19meson: make symbols hidden by defaultLucas De Marchi1-1/+1
Now that symbols that should be exported are annotated accordingly, make all the rest hidden by default. Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
2018-09-19exynos: annotate public functionsLucas De Marchi2-25/+25
while read sym; do read f func line _ <<<$(cscope -d -L -1 $sym) if [ ! -z "$f" ]; then sed -i "${line}s/^/drm_public /" $f fi done < /tmp/a.txt In which /tmp/a.txt contains the public symbols from exynos-symbol-check. The idea here will be to switch the default visibility to hidden so we don't export symbols we shouldn't. Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Acked-by: Eric Engestrom <eric.engestrom@intel.com>
2018-03-20meson,configure: include config.h automaticallyEric Engestrom2-8/+0
This will prevent any more missing `#include "config.h"` bug, at the cost of having to recompile some files that didn't need to be when changing build options. Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-02-23*-symbol-check: Don't hard-code nm executableHeiko Becker2-1/+2
Helpful if your nm executable has a prefix based on the architecture, for example. Signed-off-by: Heiko Becker <heirecka@exherbo.org> Cc: Timo Gurr <timo.gurr@gmail.com> [Eric: v2: rebase and add Meson support] Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-01-12Add meson build systemDylan Baker1-0/+53
This patch adds a complete meson build system, including tests and install. It has the necessary hooks to allow it be used as a subproject for other meson based builds such as mesa. Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Reviewed-and-tested-by: Igor Gnatenko <i.gnatenko.brain@gmail.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-11-07exynos: change the license to X11/MITInki Dae3-12/+51
Change GPL license of Exynos related code to X11/MIT. I'd like to keep a consistent license across all Exynos code because License checker notices two more licenses exist in libdrm. For the license change I need to get your agree - all committers. So please give me Acked-by if you agree with me. Signed-off-by: Inki Dae <inki.dae@samsung.com> Acked-by: Hyungwon Hwang <human.hwang@samsung.com> Acked-by: SooChan Lim <sc1.lim@samsung.com> Acked-by: Sangjin LEE <lsj119@samsung.com> Acked-by: Boram Park <boram1288.park@samsung.com> Acked-by: Seung-Woo Kim <sw0312.kim@samsung.com> Acked-by: Joonyoung Shim <jy0922.shim@samsung.com> Acked-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Acked-by: Jan Vesely <jan.vesely@rutgers.edu>
2017-04-08exynos: add C++ support to exynos_drmif headerTobias Jakobi1-0/+8
Add the usual extern "C" when compiling in C++ mode. Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2017-04-03exynos/fimg2d: remove unused-function build warningSeung-Woo Kim1-14/+0
The function g2d_reset() is not anymore used after the commit e3c97d1a2473 ("exynos/fimg2d: add g2d_validate_xyz() functions"), so it should be removed. Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Reviewed-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2017-04-03exynos: fix type-punned pointer build warningSeung-Woo Kim1-1/+1
As like the commit ecc2a097294d ("xf86drm: Fix type-punned pointer build warning"), this fixes following build warning. exynos_drm.c: In function 'exynos_handle_event': exynos_drm.c:420:15: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] e = (struct drm_event *) &buffer[i]; ^ Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Reviewed-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2016-04-07exynos: Fix spelling mistakeEric Engestrom1-1/+1
Signed-off-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-12-18exynos: bump version numberTobias Jakobi1-1/+1
The Exynos API was extended quite a bit, so reflect this in the version number. Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
2015-12-18tests/exynos: add test for g2d_moveTobias Jakobi1-0/+1
To check if g2d_move() works properly we create a small checkerboard pattern in the center of the screen and then shift this pattern around with g2d_move(). The pattern should be properly preserved by the operation (but not the surrounding area). Tested-by: Hyungwon Hwang <human.hwang@samsung.com> Reviewed-by: Hyungwon Hwang <human.hwang@samsung.com> Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> [Emil Velikov: add g2d_move to the symbol check] Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-12-18exynos/fimg2d: add g2d_moveTobias Jakobi2-0/+98
We already have g2d_copy() which implements G2D copy operations from one buffer to another. However we can't do a overlapping copy operation in one buffer. Add g2d_move() which acts like the standard memmove() and properly handles overlapping copies. Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
2015-12-18exynos: fimg2d: add g2d_set_directionTobias Jakobi1-0/+51
This allows setting the two direction registers, which specify how the engine blits pixels. This can be used for overlapping blits, which happen e.g. when 'moving' a rectangular region inside a fixed buffer. Reviewed-by: Hyungwon Hwang <human.hwang@samsung.com> Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
2015-12-18exynos/fimg2d: add g2d_config_eventTobias Jakobi3-2/+28
This enables us to pass command buffers to the kernel which trigger an event on the DRM fd upon completion. The final goal is to enable asynchronous operation of the G2D engine, similar to async page flips. Passing the event userdata pointer through the G2D context was chosen to not change the current API (e.g. by adding a userdata argument to each public functions). Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
2015-12-18exynos: Introduce exynos_handle_event()Tobias Jakobi4-0/+115
Used to handle kernel events specific to the Exynos platform. Currently only G2D events are handled. Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
2015-09-21exynos/fimg2d: remove g2d_context from public headerTobias Jakobi2-13/+16
All functions from the public API only operation on struct g2d_context*, so this shouldn't break too much. Make the context private since we don't want the user to modify its content directly. Also remove the defines that were only used for fields of g2d_context. Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
2015-09-21exynos/fimg2d: add message prefixTobias Jakobi1-14/+16
Add a prefix to the messages printed to the console via printf() and fprintf() so that one can easily see where the message comes from. Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-09-21exynos/fimg2d: make g2d_add_cmd() less heavyTobias Jakobi1-11/+7
The function currently checks for each added command if an overflow of the corresponding command buffers occurs, but none of the callers ever checks the return value. Since all callers are now converted to use g2d_check_space() simplify the function. (1) The overflow checks become asserts, so they're only active for debug builds. This is fine since g2d_add_cmd() is not part of the public API. (2) Switch the return value to void. (3) Explicitly state that the caller has to check buffer space before calling g2d_add_cmd(). Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-09-21exynos/fimg2d: remove superfluous initialization of g2d_point_valTobias Jakobi1-19/+0
The g2d_point_val union consists of two coordinates of 16 bits. Whenever this union is used though, both coordinates are explicitly set. Hence prior initialization is unnecessary. Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-09-21exynos/fimg2d: remove default case from g2d_get_blend_op()Tobias Jakobi1-5/+5
We now validate the blending mode via g2d_validate_mode() prior to feeding it to g2d_get_blend_op(). Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-09-21exynos/fimg2d: add g2d_validate_xyz() functionsTobias Jakobi1-55/+126
The G2D headers define a number of modes through enums (like e.g. color, select, repeat, etc.). This introduces g2d_validate_select_mode() and g2d_validate_blending_op() which validate a select mode or blending operation respectively. Use this together with g2d_check_space() in g2d_{blend,scale_and_blend}(). For this we move parameter validation to the top and also validate the select mode of the source image and the requested blending operation before starting command submission. Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-09-21exynos/fimg2d: add g2d_check_space()Tobias Jakobi1-35/+64
This is going to be used to check if the command buffers have enough space left prior to actual submission of the commands. Use this in g2d_{solid_fill,copy,copy_with_scale}(). For this the parameter validation before buffer space checking so that we can exit early if it fails. Also don't reset the G2D context in this situation since the buffers are not partially submitted anymore. The repeat mode in g2d_copy_with_scale() is checked first to make computation of space easier. Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-09-21exynos/fimg2d: simplify base address submission in g2d_scale_and_blend()Tobias Jakobi1-12/+2
Use g2d_add_base_addr() for source and destination base address just like all other calls. Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-09-21exynos/fimg2d: fix empty buffer handling in g2d_flush()Tobias Jakobi1-1/+1
Empty command buffers are no error, we just don't have anything to do for flushing then. Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-06-29exynos/fimg2d: simplify g2d_fini()Tobias Jakobi1-2/+1
free()ing a nullptr is a noop, so remove the check. Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Acked-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-06-29exynos: fimg2d: fix return codesTobias Jakobi1-15/+5
Even if flushing the command buffer doesn't succeed, the G2D calls would still return zero. Fix this by just passing the flush return code. In fact error handling currently ignores the fact that g2d_add_cmd() can fail. This is going to be handled in a later patch. Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Acked-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28drm: remove drm_public macroEmil Velikov2-20/+20
Some compilers (like the Oracle Studio), require that the function declaration must be annotated with the same visibility attribute as the definition. As annotating functions with drm_public is no longer required just remove the macro. Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Damien Lespiau <damien.lespiau@intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: Michel Dänzer <michel.daenzer@amd.com> Cc: Rob Clark <robdclark@gmail.com> Cc: Thierry Reding <treding@nvidia.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28drm: remove no longer needed VISIBILITY_CFLAGSEmil Velikov1-1/+0
With earlier commits we've annotated the private symbols, thus we no longer require the -fvisibility=hidden CFLAGS. Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Damien Lespiau <damien.lespiau@intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: Michel Dänzer <michel.daenzer@amd.com> Cc: Rob Clark <robdclark@gmail.com> Cc: Thierry Reding <treding@nvidia.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28drm: rename libdrm{,_macros}.hEmil Velikov2-2/+2
Provide a more meaningful name, considering what it does. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-04-28exynos: add symbols testEmil Velikov2-0/+40
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-20autotools: remove ${srcdir} from the includesEmil Velikov1-1/+0
Already handled by the build system. v2: s/compiler/build system/ Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-16exynos: fimg2d: follow-up fix for G2D_COEFF_MODE_GB_COLORTobias Jakobi1-1/+7
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>
2015-03-16exynos: add fimg2d header to common includesTobias Jakobi1-2/+1
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>
2015-03-16exynos: add exynos prefix to fimg2d headerTobias Jakobi3-2/+2
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>
2015-03-16exynos: use structure initialization instead of memsetTobias Jakobi1-3/+1
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
2015-03-16exynos: honor the repeat mode in g2d_copy_with_scaleTobias Jakobi1-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>