mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvpgu: Rename Linux specific vidmem code
Rename os/linux/vidmem.c to os/linux/dmabuf_vidmem.c. The code is mainly dealing with interfacing with Linux dmabuf framework and its responsibilities got confused with common/mm/vidmem.c. Also move the header include/nvgpu/linux/vidmem.h to os/linux/dmabuf_vidmem.h. It does not expose any interface to outside Linux code. Change-Id: I2cb1057a8934d5cb5c5860023aa12f8f048a6684 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1768261 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
3e12cea363
commit
26783b85bf
@@ -66,7 +66,7 @@ nvgpu-y += \
|
|||||||
os/linux/dt.o
|
os/linux/dt.o
|
||||||
|
|
||||||
nvgpu-$(CONFIG_GK20A_VIDMEM) += \
|
nvgpu-$(CONFIG_GK20A_VIDMEM) += \
|
||||||
os/linux/vidmem.o
|
os/linux/dmabuf_vidmem.o
|
||||||
|
|
||||||
nvgpu-$(CONFIG_DEBUG_FS) += \
|
nvgpu-$(CONFIG_DEBUG_FS) += \
|
||||||
os/linux/debug.o \
|
os/linux/debug.o \
|
||||||
|
|||||||
@@ -27,12 +27,12 @@
|
|||||||
#include <nvgpu/vidmem.h>
|
#include <nvgpu/vidmem.h>
|
||||||
|
|
||||||
#include <nvgpu/linux/dma.h>
|
#include <nvgpu/linux/dma.h>
|
||||||
#include <nvgpu/linux/vidmem.h>
|
|
||||||
|
|
||||||
#include "gk20a/gk20a.h"
|
#include "gk20a/gk20a.h"
|
||||||
|
|
||||||
#include "platform_gk20a.h"
|
#include "platform_gk20a.h"
|
||||||
#include "os_linux.h"
|
#include "os_linux.h"
|
||||||
|
#include "dmabuf_vidmem.h"
|
||||||
|
|
||||||
#ifdef __DMA_ATTRS_LONGS
|
#ifdef __DMA_ATTRS_LONGS
|
||||||
#define NVGPU_DEFINE_DMA_ATTRS(x) \
|
#define NVGPU_DEFINE_DMA_ATTRS(x) \
|
||||||
|
|||||||
@@ -22,13 +22,13 @@
|
|||||||
#include <nvgpu/enabled.h>
|
#include <nvgpu/enabled.h>
|
||||||
|
|
||||||
#include <nvgpu/linux/vm.h>
|
#include <nvgpu/linux/vm.h>
|
||||||
#include <nvgpu/linux/vidmem.h>
|
|
||||||
|
|
||||||
#include "gk20a/gk20a.h"
|
#include "gk20a/gk20a.h"
|
||||||
|
|
||||||
#include "platform_gk20a.h"
|
#include "platform_gk20a.h"
|
||||||
#include "dmabuf.h"
|
#include "dmabuf.h"
|
||||||
#include "os_linux.h"
|
#include "os_linux.h"
|
||||||
|
#include "dmabuf_vidmem.h"
|
||||||
|
|
||||||
static void gk20a_mm_delete_priv(void *_priv)
|
static void gk20a_mm_delete_priv(void *_priv)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -30,10 +30,10 @@
|
|||||||
|
|
||||||
#include <nvgpu/linux/vm.h>
|
#include <nvgpu/linux/vm.h>
|
||||||
#include <nvgpu/linux/dma.h>
|
#include <nvgpu/linux/dma.h>
|
||||||
#include <nvgpu/linux/vidmem.h>
|
|
||||||
|
|
||||||
#include "gk20a/gk20a.h"
|
#include "gk20a/gk20a.h"
|
||||||
#include "gk20a/mm_gk20a.h"
|
#include "gk20a/mm_gk20a.h"
|
||||||
|
#include "dmabuf_vidmem.h"
|
||||||
|
|
||||||
bool nvgpu_addr_is_vidmem_page_alloc(u64 addr)
|
bool nvgpu_addr_is_vidmem_page_alloc(u64 addr)
|
||||||
{
|
{
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
|
* Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
* under the terms and conditions of the GNU General Public License,
|
* under the terms and conditions of the GNU General Public License,
|
||||||
@@ -14,14 +14,15 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __NVGPU_LINUX_VIDMEM_H__
|
#ifndef __NVGPU_LINUX_DMABUF_VIDMEM_H__
|
||||||
#define __NVGPU_LINUX_VIDMEM_H__
|
#define __NVGPU_LINUX_DMABUF_VIDMEM_H__
|
||||||
|
|
||||||
#include <nvgpu/types.h>
|
#include <nvgpu/types.h>
|
||||||
|
|
||||||
struct dma_buf;
|
struct dma_buf;
|
||||||
|
|
||||||
struct gk20a;
|
struct gk20a;
|
||||||
|
struct scatterlist;
|
||||||
|
|
||||||
#ifdef CONFIG_GK20A_VIDMEM
|
#ifdef CONFIG_GK20A_VIDMEM
|
||||||
|
|
||||||
@@ -30,8 +30,6 @@
|
|||||||
#include <nvgpu/enabled.h>
|
#include <nvgpu/enabled.h>
|
||||||
#include <nvgpu/sizes.h>
|
#include <nvgpu/sizes.h>
|
||||||
|
|
||||||
#include <nvgpu/linux/vidmem.h>
|
|
||||||
|
|
||||||
#include "ioctl_ctrl.h"
|
#include "ioctl_ctrl.h"
|
||||||
#include "ioctl_dbg.h"
|
#include "ioctl_dbg.h"
|
||||||
#include "ioctl_as.h"
|
#include "ioctl_as.h"
|
||||||
@@ -44,6 +42,7 @@
|
|||||||
#include "os_linux.h"
|
#include "os_linux.h"
|
||||||
#include "dmabuf.h"
|
#include "dmabuf.h"
|
||||||
#include "channel.h"
|
#include "channel.h"
|
||||||
|
#include "dmabuf_vidmem.h"
|
||||||
|
|
||||||
#define HZ_TO_MHZ(a) ((a > 0xF414F9CD7ULL) ? 0xffff : (a >> 32) ? \
|
#define HZ_TO_MHZ(a) ((a > 0xF414F9CD7ULL) ? 0xffff : (a >> 32) ? \
|
||||||
(u32) ((a * 0x10C8ULL) >> 32) : (u16) ((u32) a/MHZ))
|
(u32) ((a * 0x10C8ULL) >> 32) : (u16) ((u32) a/MHZ))
|
||||||
|
|||||||
@@ -30,7 +30,6 @@
|
|||||||
#include <nvgpu/atomic.h>
|
#include <nvgpu/atomic.h>
|
||||||
#include <nvgpu/cond.h>
|
#include <nvgpu/cond.h>
|
||||||
|
|
||||||
#include <nvgpu/linux/vidmem.h>
|
|
||||||
#include <nvgpu/linux/vm.h>
|
#include <nvgpu/linux/vm.h>
|
||||||
|
|
||||||
#include "gk20a/gk20a.h"
|
#include "gk20a/gk20a.h"
|
||||||
@@ -40,6 +39,7 @@
|
|||||||
#include "os_linux.h"
|
#include "os_linux.h"
|
||||||
#include "platform_gk20a.h"
|
#include "platform_gk20a.h"
|
||||||
#include "ioctl_dbg.h"
|
#include "ioctl_dbg.h"
|
||||||
|
#include "dmabuf_vidmem.h"
|
||||||
|
|
||||||
struct dbg_session_gk20a_linux {
|
struct dbg_session_gk20a_linux {
|
||||||
struct device *dev;
|
struct device *dev;
|
||||||
|
|||||||
@@ -25,12 +25,12 @@
|
|||||||
#include <nvgpu/vidmem.h>
|
#include <nvgpu/vidmem.h>
|
||||||
|
|
||||||
#include <nvgpu/linux/dma.h>
|
#include <nvgpu/linux/dma.h>
|
||||||
#include <nvgpu/linux/vidmem.h>
|
|
||||||
|
|
||||||
#include <linux/vmalloc.h>
|
#include <linux/vmalloc.h>
|
||||||
#include <linux/dma-mapping.h>
|
#include <linux/dma-mapping.h>
|
||||||
|
|
||||||
#include "os_linux.h"
|
#include "os_linux.h"
|
||||||
|
#include "dmabuf_vidmem.h"
|
||||||
|
|
||||||
#include "gk20a/gk20a.h"
|
#include "gk20a/gk20a.h"
|
||||||
#include "gk20a/mm_gk20a.h"
|
#include "gk20a/mm_gk20a.h"
|
||||||
|
|||||||
@@ -27,7 +27,6 @@
|
|||||||
#include <nvgpu/vidmem.h>
|
#include <nvgpu/vidmem.h>
|
||||||
|
|
||||||
#include <nvgpu/linux/vm.h>
|
#include <nvgpu/linux/vm.h>
|
||||||
#include <nvgpu/linux/vidmem.h>
|
|
||||||
#include <nvgpu/linux/nvgpu_mem.h>
|
#include <nvgpu/linux/nvgpu_mem.h>
|
||||||
|
|
||||||
#include "gk20a/gk20a.h"
|
#include "gk20a/gk20a.h"
|
||||||
@@ -36,6 +35,7 @@
|
|||||||
#include "platform_gk20a.h"
|
#include "platform_gk20a.h"
|
||||||
#include "os_linux.h"
|
#include "os_linux.h"
|
||||||
#include "dmabuf.h"
|
#include "dmabuf.h"
|
||||||
|
#include "dmabuf_vidmem.h"
|
||||||
|
|
||||||
static u32 nvgpu_vm_translate_linux_flags(struct gk20a *g, u32 flags)
|
static u32 nvgpu_vm_translate_linux_flags(struct gk20a *g, u32 flags)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user