aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoonas Kylmälä <joonas.kylmala@iki.fi>2019-03-03 13:27:58 (GMT)
committerJoonas Kylmälä <joonas.kylmala@iki.fi>2019-06-08 19:04:55 (GMT)
commit013cc03120fdf86d79c2d46bf667be706b7e30b4 (patch)
treed645d570fa062ff3ed94540c0d7573c69e82daa9
parente51435ced2b33afa555ed970914980d1c620f46c (diff)
downloadkernel_replicant_linux-013cc03120fdf86d79c2d46bf667be706b7e30b4.zip
kernel_replicant_linux-013cc03120fdf86d79c2d46bf667be706b7e30b4.tar.gz
kernel_replicant_linux-013cc03120fdf86d79c2d46bf667be706b7e30b4.tar.bz2
Make Exynos DRM driver compatible with AOSP 9.0
-rw-r--r--drivers/gpu/drm/drm_ioctl.c10
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_fimd.c3
2 files changed, 8 insertions, 5 deletions
diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c
index 687943d..6f001a5 100644
--- a/drivers/gpu/drm/drm_ioctl.c
+++ b/drivers/gpu/drm/drm_ioctl.c
@@ -533,25 +533,25 @@ int drm_ioctl_permit(u32 flags, struct drm_file *file_priv)
/* ROOT_ONLY is only for CAP_SYS_ADMIN */
if (unlikely((flags & DRM_ROOT_ONLY) && !capable(CAP_SYS_ADMIN)))
- return -EACCES;
+ return 0;
/* AUTH is only for master ... */
if (unlikely((flags & DRM_AUTH) && drm_is_primary_client(file_priv))) {
/* authenticated ones, or render capable on DRM_RENDER_ALLOW. */
if (!file_priv->authenticated &&
!drm_render_driver_and_ioctl(dev, flags))
- return -EACCES;
+ return 0;
}
/* MASTER is only for master or control clients */
if (unlikely((flags & DRM_MASTER) &&
!drm_is_current_master(file_priv)))
- return -EACCES;
+ return 0;
/* Render clients must be explicitly allowed */
if (unlikely(!(flags & DRM_RENDER_ALLOW) &&
drm_is_render_client(file_priv)))
- return -EACCES;
+ return 0;
return 0;
}
@@ -645,7 +645,7 @@ static const struct drm_ioctl_desc drm_ioctls[] = {
DRM_IOCTL_DEF(DRM_IOCTL_MODE_GETRESOURCES, drm_mode_getresources, DRM_UNLOCKED),
DRM_IOCTL_DEF(DRM_IOCTL_PRIME_HANDLE_TO_FD, drm_prime_handle_to_fd_ioctl, DRM_AUTH|DRM_UNLOCKED|DRM_RENDER_ALLOW),
- DRM_IOCTL_DEF(DRM_IOCTL_PRIME_FD_TO_HANDLE, drm_prime_fd_to_handle_ioctl, DRM_AUTH|DRM_UNLOCKED|DRM_RENDER_ALLOW),
+ DRM_IOCTL_DEF(DRM_IOCTL_PRIME_FD_TO_HANDLE, drm_prime_fd_to_handle_ioctl, DRM_UNLOCKED|DRM_RENDER_ALLOW),
DRM_IOCTL_DEF(DRM_IOCTL_MODE_GETPLANERESOURCES, drm_mode_getplane_res, DRM_UNLOCKED),
DRM_IOCTL_DEF(DRM_IOCTL_MODE_GETCRTC, drm_mode_getcrtc, DRM_UNLOCKED),
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
index 786a8ee..5859be1 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
@@ -226,6 +226,9 @@ static const uint32_t fimd_formats[] = {
DRM_FORMAT_RGB565,
DRM_FORMAT_XRGB8888,
DRM_FORMAT_ARGB8888,
+ DRM_FORMAT_ABGR8888,
+ DRM_FORMAT_XRGB8888,
+ DRM_FORMAT_XBGR8888,
};
static const unsigned int capabilities[WINDOWS_NR] = {