mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 02:52:51 +03:00
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 <nvgpu/nvhost_t19x.h> 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 <dnibade@nvidia.com> Reviewed-on: http://git-master/r/1493792 Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
c37a7a577a
commit
366386d189
29
drivers/gpu/nvgpu/common/linux/nvhost_priv_t19x.h
Normal file
29
drivers/gpu/nvgpu/common/linux/nvhost_priv_t19x.h
Normal file
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __NVGPU_NVHOST_PRIV_T19X_H__
|
||||
#define __NVGPU_NVHOST_PRIV_T19X_H__
|
||||
|
||||
/*
|
||||
* This file is copy of common/linux/nvhost_priv.h in nvgpu repo
|
||||
* This file should be removed when nvgpu-t19x repo is merged
|
||||
* into common nvgpu repo
|
||||
*/
|
||||
struct nvgpu_nvhost_dev {
|
||||
struct platform_device *host1x_pdev;
|
||||
};
|
||||
|
||||
#endif /* __NVGPU_NVHOST_PRIV_T19X_H__ */
|
||||
36
drivers/gpu/nvgpu/common/linux/nvhost_t19x.c
Normal file
36
drivers/gpu/nvgpu/common/linux/nvhost_t19x.c
Normal file
@@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <linux/nvhost.h>
|
||||
#include <linux/nvhost_t194.h>
|
||||
|
||||
#include <nvgpu/nvhost_t19x.h>
|
||||
|
||||
#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);
|
||||
}
|
||||
Reference in New Issue
Block a user