From e9ecc84ce2f8cadd73e26a9a75cda1cc7765f221 Mon Sep 17 00:00:00 2001 From: Shridhar Rasal Date: Thu, 31 Jan 2019 14:08:26 +0530 Subject: [PATCH] video: tegra: host: dla: disable GOS GOS is not working with kernel 4.14 and is hence disabled until GOS issue is fixed. Bug 200497310 Change-Id: Ie14bfa92e8af659f2192bf4f8f9b488013bbcc64 Signed-off-by: Shridhar Rasal Reviewed-on: https://git-master.nvidia.com/r/2030013 Reviewed-by: svc-mobile-coverity Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Prashant Gaikwad Reviewed-by: Bharat Nihalani Tested-by: Bharat Nihalani Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/video/tegra/host/nvdla/nvdla.c | 10 +++------- drivers/video/tegra/host/nvdla/nvdla_queue.c | 21 +++++++++++++++----- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/drivers/video/tegra/host/nvdla/nvdla.c b/drivers/video/tegra/host/nvdla/nvdla.c index b0525fdc..42c723cd 100644 --- a/drivers/video/tegra/host/nvdla/nvdla.c +++ b/drivers/video/tegra/host/nvdla/nvdla.c @@ -647,13 +647,9 @@ int nvhost_nvdla_finalize_poweron(struct platform_device *pdev) goto fail_to_alloc_trace; } - nvdla_dev->is_gos_enabled = true; - ret = nvdla_send_gos_region(pdev); - if (ret) { - nvdla_dbg_err(pdev, "set gos region is failed\n"); - nvdla_dev->is_gos_enabled = false; - /* ignore send gos region failure */ - } + /* Disable GOS until it is fixed in Kernel 4.14 */ + nvdla_dev->is_gos_enabled = false; + nvdla_dev->is_gos_fetched = true; if (nvdla_dev->quirks & NVDLA_QUIRK_T194_A01_WAR) { host1x_writel(pdev, diff --git a/drivers/video/tegra/host/nvdla/nvdla_queue.c b/drivers/video/tegra/host/nvdla/nvdla_queue.c index 9c14a8d6..ee578c2f 100644 --- a/drivers/video/tegra/host/nvdla/nvdla_queue.c +++ b/drivers/video/tegra/host/nvdla/nvdla_queue.c @@ -503,8 +503,7 @@ fail_to_pin_mem: return err; } -static int nvdla_get_gos(struct platform_device *pdev, u32 syncpt_id, - u32 *gos_id, u32 *gos_offset) +static int nvdla_update_gos(struct platform_device *pdev) { struct nvhost_device_data *pdata = platform_get_drvdata(pdev); struct nvdla_device *nvdla_dev = pdata->private_data; @@ -538,8 +537,20 @@ static int nvdla_get_gos(struct platform_device *pdev, u32 syncpt_id, nvhost_module_idle(pdev); } +fail_to_send_gos: +fail_to_poweron: + return err; +} + +static int nvdla_get_gos(struct platform_device *pdev, u32 syncpt_id, + u32 *gos_id, u32 *gos_offset) +{ + struct nvhost_device_data *pdata = platform_get_drvdata(pdev); + struct nvdla_device *nvdla_dev = pdata->private_data; + int err = 0; + if (!nvdla_dev->is_gos_enabled) { - nvdla_dbg_err(pdev, "GoS is not enabled\n"); + nvdla_dbg_info(pdev, "GoS is not enabled\n"); err = -EINVAL; goto gos_disabled; } @@ -551,8 +562,6 @@ static int nvdla_get_gos(struct platform_device *pdev, u32 syncpt_id, } gos_disabled: -fail_to_send_gos: -fail_to_poweron: return err; } @@ -971,6 +980,8 @@ int nvdla_fill_task_desc(struct nvdla_task *task) task_desc->postactions = task_desc->preactions + sizeof(struct dla_action_list); + nvdla_update_gos(pdev); + /* fill pre actions */ nvdla_fill_preactions(task);