]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
video: tegra: host: Rework gfilter enabled flag
authorArto Merilainen <amerilainen@nvidia.com>
Wed, 31 Dec 2014 11:39:03 +0000 (13:39 +0200)
committerArto Merilainen <amerilainen@nvidia.com>
Mon, 5 Jan 2015 13:06:25 +0000 (05:06 -0800)
Currently we determine gather filter enabled status based on the
chipid which is hacky. This patch reworks gather filter enabled flag
so that the gather filter flag is stored inside host1x structure.

Change-Id: I5aa52e1101c3c000e29a3583f5755d68d4f0de67
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-on: http://git-master/r/668750
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit

drivers/video/tegra/host/host1x/host1x.c
drivers/video/tegra/host/t124/t124.c
drivers/video/tegra/host/t210/t210.c

index c96c49ffb1369360006c03b597337b33417cefdc..82c2248a4632a6ba8f716350142bd0e5af679ad6 100644 (file)
@@ -525,12 +525,9 @@ static int disable_irq_host(struct platform_device *dev)
 
 int nvhost_gather_filter_enabled(struct nvhost_syncpt *sp)
 {
-       enum tegra_chipid cid = tegra_get_chipid();
-
-       if (cid == TEGRA_CHIPID_TEGRA12 || cid == TEGRA_CHIPID_TEGRA13 ||
-           cid == TEGRA_CHIPID_TEGRA21)
-               return 1;
-       return 0;
+       struct nvhost_master *host = syncpt_to_dev(sp);
+       struct nvhost_device_data *pdata = platform_get_drvdata(host->dev);
+       return pdata->gather_filter_enabled;
 }
 
 static int alloc_syncpts_per_apps(struct nvhost_syncpt *sp)
index 77071b6aeb5b934d93277f3c0fed2402c7551b57..76b7d4b56114103392f1a7df392bb5276cf39a56 100644 (file)
@@ -90,7 +90,7 @@ struct nvhost_device_data t124_host1x_info = {
        .private_data   = &host1x04_info,
        .finalize_poweron = nvhost_host1x_finalize_poweron,
        .prepare_poweroff = nvhost_host1x_prepare_poweroff,
-       .gather_filter_enabled = false,
+       .gather_filter_enabled = true,
 };
 
 
index ad13d881b8550ccd0f71b01e4287dfa13914d970..676bd2af016486c48d12b0683c3928d454464f10 100644 (file)
@@ -71,6 +71,7 @@ struct nvhost_device_data t21_host1x_info = {
        .finalize_poweron = nvhost_host1x_finalize_poweron,
        .prepare_poweroff = nvhost_host1x_prepare_poweroff,
        .bond_out_id            = BOND_OUT_HOST1X,
+       .gather_filter_enabled  = true,
 };
 
 #ifdef CONFIG_TEGRA_GRHOST_ISP