eyxnos: install exynos tests if HAVE_INSTALL_TESTS

This exynos test was added just before HAVE_INSTALL_TESTS, and so didn't
get this annotation.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Inki Dae <inki.dae@samsung.com>
exynos: fix two warnings

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>
exynos_fimg2d: fix cast from pointer to integer of different size

Fixes two gcc [-Wpointer-to-int-cast] warnings.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Inki Dae <inki.dae@samsung.com>
exynos: remove unusable "run" target

This looks like it was copied from kmstest, but isn't needed, and doesn't
actually work since exynos_fimg2d_test requires parameters.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Inki Dae <inki.dae@samsung.com>
exynos_fimg2d_test: fix drmModeRmFB

The first parameter should be the drm fd, second param is the fb id.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Acked-by: Inki Dae <inki.dae@samsung.com>
exynos: prime: use drmPrime*() helpers

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>
exynos: removed unused fd field

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>
drmOpenByName: remove redundant drmAvailable check

drmOpenByName() is a static function that is only called by drmOpen().
drmOpen() already checks drmAvailable(), so the check in
drmOpenByName() is redundant.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drm: Add universal plane capability bit and plane type enums

Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Rob Clark <robclark@freedesktop.org>
freedreno: sync kernel header

Signed-off-by: Rob Clark <robclark@freedesktop.org>
freedreno: add chip-id property

Userspace needs to know the patch-revision in addition to just the
gpu-id (ie. 320, 305, etc).

Signed-off-by: Rob Clark <robclark@freedesktop.org>
intel: Sync the command parser version parameter from kernel

Cc: Bradley Volkin <bradley.d.volkin@intel.com>
Reviewed-by: Brad Volkin <bradley.d.volkin@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
intel: Sync typo fix from the kernel sources.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
intel: Add new userptr ioctl

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
exynos: fix coordinate computation in g2d_copy

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: fix G2D_DOUBLE_TO_FIXED for non-integer input

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>
exynos: fix scaling factor computation in g2d_copy_with_scale

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>
radeon: Remove superfluous parentheses.

Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
radeon: Add missing header includes.

unistd.h for close() and xf86drm.h for drmOpen().

Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
exynos: do not build fimg2d_test when building without libkms support.

This prevents a build failure.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>