]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
video: tegra: host: move nvenc PM ops to flcn driver
authorShridhar Rasal <srasal@nvidia.com>
Thu, 29 May 2014 03:32:47 +0000 (09:02 +0530)
committerTerje Bergstrom <tbergstrom@nvidia.com>
Fri, 30 May 2014 06:21:39 +0000 (23:21 -0700)
- move nvenc remaining PM OPS to generic falcon driver.
- add module reset call before nvenc falcon boot.

Bug 200006528

Change-Id: I318a425a12adf99847e09bd7b147f1d7a6ac9137
Signed-off-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-on: http://git-master/r/416472
GVS: Gerrit_Virtual_Submit
Reviewed-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
drivers/video/tegra/host/Makefile
drivers/video/tegra/host/flcn/flcn.c
drivers/video/tegra/host/flcn/flcn.h
drivers/video/tegra/host/nvenc/Makefile [deleted file]
drivers/video/tegra/host/nvenc/nvenc.c [deleted file]
drivers/video/tegra/host/nvenc/nvenc.h [deleted file]
drivers/video/tegra/host/t210/t210.c

index 5df38859937e7555931f2d27a8a8dd3a2265bd65..0603dbacc499a795c225e52fd21de90182cc7783 100644 (file)
@@ -29,7 +29,6 @@ obj-$(CONFIG_TEGRA_GRHOST) += isp/
 obj-$(CONFIG_TEGRA_GRHOST) += vi/
 obj-$(CONFIG_TEGRA_GRHOST) += t124/
 obj-$(CONFIG_TEGRA_GRHOST) += flcn/
-obj-$(CONFIG_TEGRA_GRHOST) += nvenc/
 obj-$(CONFIG_TEGRA_GRHOST) += t210/
 
 obj-$(CONFIG_TEGRA_GRHOST_SYNC) += nvhost_sync.o
index 32b1b7d87ad0fd152dec7559b77a215cf0e8196c..250b2fedbb60f4ba5d6a2ac7114aeea44d1d0ea0 100644 (file)
@@ -584,6 +584,19 @@ int nvhost_vic_prepare_poweroff(struct platform_device *dev)
        return 0;
 }
 
+int nvhost_nvenc_t210_finalize_poweron(struct platform_device *pdev)
+{
+       nvhost_dbg_fn("");
+
+       nvhost_module_reset(pdev, false);
+
+       host1x_writel(pdev, 0x117c, 0x18004);
+       host1x_writel(pdev, 0x2200, 0x800040);
+       host1x_writel(pdev, 0x2204, 0x10000000);
+       host1x_writel(pdev, 0x2208, 0x0);
+
+       return nvhost_flcn_boot(pdev);
+}
 static struct of_device_id tegra_flcn_of_match[] = {
        { .compatible = "nvidia,tegra124-vic",
                .data = (struct nvhost_device_data *)&t124_vic_info },
index bfb75d1190cd147da9de01f47646553fe43f61d7..7db9ce9c6c8db3da3a85996f0d868b41fd1ac5ad 100644 (file)
@@ -22,7 +22,7 @@
 #include <linux/types.h>
 #include <linux/dma-attrs.h>
 #include <linux/firmware.h>
-
+#include <linux/platform_device.h>
 
 struct ucode_bin_header_v1_flcn {
        u32 bin_magic;        /* 0x10de */
@@ -95,7 +95,7 @@ void nvhost_flcn_suspend(struct platform_device *);
 int nvhost_flcn_init(struct platform_device *);
 void nvhost_flcn_deinit(struct platform_device *);
 int nvhost_flcn_finalize_poweron(struct platform_device *);
-
+int nvhost_nvenc_t210_finalize_poweron(struct platform_device *dev);
 
 
 /* hack, get these from elsewhere */
diff --git a/drivers/video/tegra/host/nvenc/Makefile b/drivers/video/tegra/host/nvenc/Makefile
deleted file mode 100644 (file)
index ec2832c..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-GCOV_PROFILE := y
-ccflags-y += -Idrivers/video/tegra/host
-
-nvhost-nvenc-objs  = \
-       nvenc.o
-
-obj-$(CONFIG_TEGRA_GRHOST) += nvhost-nvenc.o
diff --git a/drivers/video/tegra/host/nvenc/nvenc.c b/drivers/video/tegra/host/nvenc/nvenc.c
deleted file mode 100644 (file)
index 9983842..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Tegra NVENC Module Support
- *
- * Copyright (c) 2014, NVIDIA CORPORATION.  All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <linux/types.h>
-#include <linux/nvhost.h>
-#include "nvenc.h"
-#include "flcn/flcn.h"
-
-int nvhost_nvenc_t210_finalize_poweron(struct platform_device *dev)
-{
-       host1x_writel(dev, 0x117c, 0x18004);
-       host1x_writel(dev, 0x2200, 0x800040);
-       host1x_writel(dev, 0x2204, 0x10000000);
-       host1x_writel(dev, 0x2208, 0x0);
-
-       return nvhost_flcn_boot(dev);
-}
diff --git a/drivers/video/tegra/host/nvenc/nvenc.h b/drivers/video/tegra/host/nvenc/nvenc.h
deleted file mode 100644 (file)
index c8e2246..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Tegra NVENC Module Support
- *
- * Copyright (c) 2014, NVIDIA CORPORATION.  All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef __NVHOST_NVENC_H__
-#define __NVHOST_NVENC_H__
-
-#include <linux/platform_device.h>
-
-int nvhost_nvenc_t210_finalize_poweron(struct platform_device *dev);
-
-#endif
index 4fc2d42038831ff04ac8098b2712552287fe2be7..dd256996da963fe5537fcb624cff55184fde66c9 100644 (file)
@@ -33,7 +33,6 @@
 #include "flcn/flcn.h"
 #include "nvdec/nvdec.h"
 #include "nvjpg/nvjpg.h"
-#include "nvenc/nvenc.h"
 #include "tsec/tsec.h"
 #include "vi/vi.h"
 #include "isp/isp.h"