From 366386d1898af61eb425aa8b37cfb656ff898c1a Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Fri, 2 Jun 2017 14:47:20 +0530 Subject: gpu: nvgpu: add t19x specific nvhost abstraction files Add new abstraction file common/linux/nvhost_t19x.c for all nvhost APIs exported from linux/nvhost_t194.h This file will be compiled only if config CONFIG_TEGRA_GK20A_NVHOST is set Export the new headers from file Also add dummy private header file nvhost_priv_t19x.h to store definition of private structure nvgpu_nvhost_dev This file should be deleted when nvgpu-t19x repo is merged into common nvhost repo Jira NVGPU-29 Change-Id: I8c08c9242b08cc45f7c99cc400b3e1a720f9439c Signed-off-by: Deepak Nibade Reviewed-on: http://git-master/r/1493792 Reviewed-by: svccoveritychecker GVS: Gerrit_Virtual_Submit Reviewed-by: Bharat Nihalani --- drivers/gpu/nvgpu/common/linux/nvhost_t19x.c | 36 ++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 drivers/gpu/nvgpu/common/linux/nvhost_t19x.c (limited to 'drivers/gpu/nvgpu/common/linux/nvhost_t19x.c') diff --git a/drivers/gpu/nvgpu/common/linux/nvhost_t19x.c b/drivers/gpu/nvgpu/common/linux/nvhost_t19x.c new file mode 100644 index 00000000..0bbb3d72 --- /dev/null +++ b/drivers/gpu/nvgpu/common/linux/nvhost_t19x.c @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2017, 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 . + */ + +#include +#include + +#include + +#include "nvhost_priv_t19x.h" + +int nvgpu_nvhost_syncpt_unit_interface_get_aperture( + struct nvgpu_nvhost_dev *nvhost_dev, + phys_addr_t *base, + size_t *size) +{ + return nvhost_syncpt_unit_interface_get_aperture( + nvhost_dev->host1x_pdev, base, size); +} + +u32 nvgpu_nvhost_syncpt_unit_interface_get_byte_offset(u32 syncpt_id) +{ + return nvhost_syncpt_unit_interface_get_byte_offset(syncpt_id); +} -- cgit v1.2.2 From 9cb4cc5d07e8a894f7d0c3ea5ea932291df32c36 Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Thu, 8 Jun 2017 12:55:51 +0530 Subject: gpu: nvgpu: remove duplicate nvhost_priv_t19x.h We added duplicate common/linux/nvhost_priv_t19x.h so that the definition of struct nvgpu_nvhost_dev is available in nvgpu-t19x repo But instead of duplicating the file, directly include original file with path #include "common/linux/nvhost_priv.h Jira NVGPU-29 Change-Id: I5d373227f0f6b2b4670d2fd3ad433a4655df8e4f Signed-off-by: Deepak Nibade Reviewed-on: http://git-master/r/1499167 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/common/linux/nvhost_t19x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/common/linux/nvhost_t19x.c') diff --git a/drivers/gpu/nvgpu/common/linux/nvhost_t19x.c b/drivers/gpu/nvgpu/common/linux/nvhost_t19x.c index 0bbb3d72..0b2ae08c 100644 --- a/drivers/gpu/nvgpu/common/linux/nvhost_t19x.c +++ b/drivers/gpu/nvgpu/common/linux/nvhost_t19x.c @@ -19,7 +19,7 @@ #include -#include "nvhost_priv_t19x.h" +#include "common/linux/nvhost_priv.h" int nvgpu_nvhost_syncpt_unit_interface_get_aperture( struct nvgpu_nvhost_dev *nvhost_dev, -- cgit v1.2.2 From ade9f5e03f1d0fd4987fc3f9fafb12e4118ac570 Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Tue, 10 Oct 2017 13:18:02 -0700 Subject: gpu: nvgpu: Remove phys_addr_t from common code Remove phys_addr_t change for corresponding change in the nvgpu main repo. JIRA NVGPU-30 JIRA NVGPU-226 Change-Id: I05a19bc51e949279edef6e9ad7161226cbca51a7 Signed-off-by: Alex Waterman Reviewed-on: https://git-master.nvidia.com/r/1576466 Reviewed-by: svc-mobile-coverity Reviewed-by: svccoveritychecker GVS: Gerrit_Virtual_Submit Reviewed-by: Deepak Nibade Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/common/linux/nvhost_t19x.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'drivers/gpu/nvgpu/common/linux/nvhost_t19x.c') diff --git a/drivers/gpu/nvgpu/common/linux/nvhost_t19x.c b/drivers/gpu/nvgpu/common/linux/nvhost_t19x.c index 0b2ae08c..21cf62ec 100644 --- a/drivers/gpu/nvgpu/common/linux/nvhost_t19x.c +++ b/drivers/gpu/nvgpu/common/linux/nvhost_t19x.c @@ -23,11 +23,10 @@ int nvgpu_nvhost_syncpt_unit_interface_get_aperture( struct nvgpu_nvhost_dev *nvhost_dev, - phys_addr_t *base, - size_t *size) + u64 *base, size_t *size) { return nvhost_syncpt_unit_interface_get_aperture( - nvhost_dev->host1x_pdev, base, size); + nvhost_dev->host1x_pdev, (phys_addr_t *)base, size); } u32 nvgpu_nvhost_syncpt_unit_interface_get_byte_offset(u32 syncpt_id) -- cgit v1.2.2