summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRakesh Iyer <riyer@nvidia.com>2013-12-03 14:14:04 -0800
committerMitch Luban <mluban@nvidia.com>2013-12-03 16:45:56 -0800
commit159d4bdb5bb5a3aefa4f77442b232c812584267d (patch)
treefa0fc4cce92ac6b2516ca74d6218ec217dd23b78
parent4116cbb96a1d8e0f0e216f8b905fc8636bde6154 (diff)
video: tegra: dc: conditionalize sync code
sync code should be executed only in the appropriate configuration. Bug 1356564. Change-Id: I87bd15a792a9fa317f6070933007b6f7002f38bc Signed-off-by: Rakesh Iyer <riyer@nvidia.com> Reviewed-on: http://git-master/r/337930 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Jon Mayo <jmayo@nvidia.com> Tested-by: Jon Mayo <jmayo@nvidia.com> Reviewed-by: Mitch Luban <mluban@nvidia.com>
-rw-r--r--drivers/video/tegra/dc/ext/dev.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/video/tegra/dc/ext/dev.c b/drivers/video/tegra/dc/ext/dev.c
index a7c823458f26..0d1d6980311b 100644
--- a/drivers/video/tegra/dc/ext/dev.c
+++ b/drivers/video/tegra/dc/ext/dev.c
@@ -39,7 +39,9 @@
/* XXX ew 3 */
#include "tegra_dc_ext_priv.h"
/* XXX ew 4 */
+#ifdef CONFIG_TEGRA_GRHOST_SYNC
#include "../../../staging/android/sync.h"
+#endif
int tegra_dc_ext_devno;
struct class *tegra_dc_ext_class;
@@ -56,7 +58,9 @@ struct tegra_dc_ext_flip_win {
dma_addr_t phys_addr_u2;
dma_addr_t phys_addr_v2;
u32 syncpt_max;
+#ifdef CONFIG_TEGRA_GRHOST_SYNC
struct sync_fence *pre_syncpt_fence;
+#endif
};
struct tegra_dc_ext_flip_data {
@@ -341,10 +345,13 @@ static int tegra_dc_ext_set_windowattr(struct tegra_dc_ext *ext,
dev_err(&ext->dc->ndev->dev,
"Window atrributes are invalid.\n");
+#ifdef CONFIG_TEGRA_GRHOST_SYNC
if (flip_win->pre_syncpt_fence) {
sync_fence_wait(flip_win->pre_syncpt_fence, 500);
sync_fence_put(flip_win->pre_syncpt_fence);
- } else if ((s32)flip_win->attr.pre_syncpt_id >= 0) {
+ } else
+#endif
+ if ((s32)flip_win->attr.pre_syncpt_id >= 0) {
nvhost_syncpt_wait_timeout_ext(ext->dc->ndev,
flip_win->attr.pre_syncpt_id,
flip_win->attr.pre_syncpt_val,
@@ -686,8 +693,12 @@ static int tegra_dc_ext_pin_windows(struct tegra_dc_ext_user *user,
if (syncpt_fd) {
if (flip_win->attr.pre_syncpt_fd >= 0) {
+#ifdef CONFIG_TEGRA_GRHOST_SYNC
flip_win->pre_syncpt_fence = sync_fence_fdget(
flip_win->attr.pre_syncpt_fd);
+#else
+ BUG();
+#endif
} else {
flip_win->attr.pre_syncpt_id = NVSYNCPT_INVALID;
}