From af9841fa44fd4ac4a4a59a67bea0491de5b5ca3e Mon Sep 17 00:00:00 2001 From: Yashwanth Date: Tue, 22 Sep 2020 17:06:15 +0530 Subject: [PATCH] disp: msm: enable SDE rotator driver configs for GKI This change enables and exports configs to support SDE offline rotator in GKI. It also removes unused ioctls for rotator compilation with GKI config. Change-Id: I7f67aec394f644478173dcfe9e3ff52fe9129615 Signed-off-by: Yashwanth --- config/gki_holidisp.conf | 3 +++ config/gki_holidispconf.h | 3 +++ rotator/sde_rotator_debug.c | 3 +++ rotator/sde_rotator_dev.c | 1 - rotator/sde_rotator_r1_debug.c | 5 ++++- rotator/sde_rotator_r3_debug.c | 5 ++++- rotator/sde_rotator_sync.c | 4 ++-- 7 files changed, 19 insertions(+), 5 deletions(-) diff --git a/config/gki_holidisp.conf b/config/gki_holidisp.conf index 6df5fa7e71..ce2c475e51 100644 --- a/config/gki_holidisp.conf +++ b/config/gki_holidisp.conf @@ -13,3 +13,6 @@ export CONFIG_DRM_MSM_REGISTER_LOGGING=y export CONFIG_QCOM_MDSS_PLL=y export CONFIG_DRM_SDE_RSC=n export CONFIG_DISPLAY_BUILD=m +export CONFIG_MSM_SDE_ROTATOR=y +export CONFIG_MSM_SDE_ROTATOR_EVTLOG_DEBUG=y +export CONFIG_MSM_SDE_ROTATOR_INIT_ONLY=y diff --git a/config/gki_holidispconf.h b/config/gki_holidispconf.h index 378d3216bb..535c20d518 100644 --- a/config/gki_holidispconf.h +++ b/config/gki_holidispconf.h @@ -12,3 +12,6 @@ #define CONFIG_DRM_SDE_EVTLOG_DEBUG 1 #define CONFIG_QCOM_MDSS_PLL 1 #define CONFIG_GKI_DISPLAY 1 +#define CONFIG_MSM_SDE_ROTATOR 1 +#define CONFIG_MSM_SDE_ROTATOR_EVTLOG_DEBUG 1 +#define CONFIG_MSM_SDE_ROTATOR_INIT_ONLY 1 diff --git a/rotator/sde_rotator_debug.c b/rotator/sde_rotator_debug.c index 42a5272529..181620f8dc 100644 --- a/rotator/sde_rotator_debug.c +++ b/rotator/sde_rotator_debug.c @@ -50,6 +50,8 @@ #define SDE_ROT_TEST_MASK(id, tp) ((id << 4) | (tp << 1) | BIT(0)) +#if defined(CONFIG_MSM_SDE_ROTATOR_EVTLOG_DEBUG) && \ + defined(CONFIG_DEBUG_FS) static DEFINE_SPINLOCK(sde_rot_xlock); /* @@ -1358,3 +1360,4 @@ void sde_rotator_destroy_debugfs(struct dentry *debugfs) { debugfs_remove_recursive(debugfs); } +#endif diff --git a/rotator/sde_rotator_dev.c b/rotator/sde_rotator_dev.c index c97d52e6fb..f8ddb8d41a 100644 --- a/rotator/sde_rotator_dev.c +++ b/rotator/sde_rotator_dev.c @@ -2844,7 +2844,6 @@ static const struct v4l2_ioctl_ops sde_rotator_ioctl_ops = { .vidioc_g_parm = sde_rotator_g_parm, .vidioc_s_parm = sde_rotator_s_parm, .vidioc_default = sde_rotator_private_ioctl, - .vidioc_log_status = v4l2_ctrl_log_status, .vidioc_subscribe_event = sde_rotator_ctrl_subscribe_event, .vidioc_unsubscribe_event = sde_rotator_event_unsubscribe, }; diff --git a/rotator/sde_rotator_r1_debug.c b/rotator/sde_rotator_r1_debug.c index 06bc11c3cd..8dff33de99 100644 --- a/rotator/sde_rotator_r1_debug.c +++ b/rotator/sde_rotator_r1_debug.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2015-2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2015-2020, The Linux Foundation. All rights reserved. */ #define pr_fmt(fmt) "%s: " fmt, __func__ @@ -16,6 +16,8 @@ #include "sde_rotator_r1.h" #include "sde_rotator_r1_internal.h" +#if defined(CONFIG_MSM_SDE_ROTATOR_EVTLOG_DEBUG) && \ + defined(CONFIG_DEBUG_FS) /* * sde_rotator_r1_create_debugfs - Setup rotator r1 debugfs directory structure. * @rot_dev: Pointer to rotator device @@ -34,3 +36,4 @@ int sde_rotator_r1_create_debugfs(struct sde_rot_mgr *mgr, return 0; } +#endif diff --git a/rotator/sde_rotator_r3_debug.c b/rotator/sde_rotator_r3_debug.c index d2060afb0f..267eee54b6 100644 --- a/rotator/sde_rotator_r3_debug.c +++ b/rotator/sde_rotator_r3_debug.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2015-2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2015-2020, The Linux Foundation. All rights reserved. */ #define pr_fmt(fmt) "%s: " fmt, __func__ @@ -16,6 +16,8 @@ #include "sde_rotator_r3.h" #include "sde_rotator_r3_internal.h" +#if defined(CONFIG_MSM_SDE_ROTATOR_EVTLOG_DEBUG) && \ + defined(CONFIG_DEBUG_FS) /* * sde_rotator_r3_create_debugfs - Setup rotator r3 debugfs directory structure. * @rot_dev: Pointer to rotator device @@ -68,3 +70,4 @@ int sde_rotator_r3_create_debugfs(struct sde_rot_mgr *mgr, return 0; } +#endif diff --git a/rotator/sde_rotator_sync.c b/rotator/sde_rotator_sync.c index a4f28cfe05..4f7f54aa62 100644 --- a/rotator/sde_rotator_sync.c +++ b/rotator/sde_rotator_sync.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2015-2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2015-2020, The Linux Foundation. All rights reserved. */ #define pr_fmt(fmt) "%s: " fmt, __func__ @@ -148,7 +148,7 @@ static void sde_rot_fence_release(struct dma_fence *fence) list_del(&f->fence_list); spin_unlock_irqrestore(fence->lock, flags); sde_rotator_put_timeline(to_sde_rot_timeline(fence)); - kfree_rcu(f, base.rcu); + kfree(f); } static void sde_rot_fence_value_str(struct dma_fence *fence, char *str,