mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 02:01:36 +03:00
video: tegra: nvdla: Don't use nvhost print macros
The NVDLA driver uses the nvhost_err() and nvhost_dbg_fn() macros which simply call dev_err() and dev_info(), respectively. When compiling the NVDLA driver against an upstream Linux kernel, nvhost_err() and nvhost_dbg_fn() are not found and compilation fails. Fix this by replacing nvhost_err() with either dev_err() or pr_err() and replace nvhost_dbg_fn() with nvdla_dbg_fn(). JIRA LS-410 Change-Id: Ib89a187f330a4a80bd0b0329171a02f6336565ff Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2643161 Reviewed-by: Arvind M <am@nvidia.com> Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com> Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com> Reviewed-by: Praveen K <kpraveen@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
Laxman Dewangan
parent
6905c6d0dd
commit
16b7d0418a
@@ -29,7 +29,7 @@
|
||||
#include "nvhost_channel.h"
|
||||
#include "nvhost_job.h"
|
||||
#include "dla_queue.h"
|
||||
#include "dev.h"
|
||||
#include "nvdla_debug.h"
|
||||
|
||||
#define CMDBUF_SIZE 4096
|
||||
|
||||
@@ -77,8 +77,8 @@ static int nvdla_queue_task_pool_alloc(struct platform_device *pdev,
|
||||
size_t kmem_pool_size = num_tasks * queue->task_kmem_size;
|
||||
task_pool->kmem_addr = vzalloc(kmem_pool_size);
|
||||
if (!task_pool->kmem_addr) {
|
||||
nvhost_err(&pdev->dev,
|
||||
"failed to allocate task_pool->kmem_addr");
|
||||
dev_err(&pdev->dev,
|
||||
"failed to allocate task_pool->kmem_addr\n");
|
||||
err = -ENOMEM;
|
||||
goto err_alloc_task_kmem;
|
||||
}
|
||||
@@ -91,7 +91,7 @@ static int nvdla_queue_task_pool_alloc(struct platform_device *pdev,
|
||||
0);
|
||||
|
||||
if (task_pool->va == NULL) {
|
||||
nvhost_err(&pdev->dev, "failed to allocate task_pool->va");
|
||||
dev_err(&pdev->dev, "failed to allocate task_pool->va\n");
|
||||
err = -ENOMEM;
|
||||
goto err_alloc_task_pool;
|
||||
}
|
||||
@@ -175,14 +175,14 @@ struct nvdla_queue_pool *nvdla_queue_init(struct platform_device *pdev,
|
||||
|
||||
pool = kzalloc(sizeof(struct nvdla_queue_pool), GFP_KERNEL);
|
||||
if (pool == NULL) {
|
||||
nvhost_err(&pdev->dev, "failed to allocate queue pool");
|
||||
dev_err(&pdev->dev, "failed to allocate queue pool\n");
|
||||
err = -ENOMEM;
|
||||
goto fail_alloc_pool;
|
||||
}
|
||||
|
||||
queues = kcalloc(num_queues, sizeof(struct nvdla_queue), GFP_KERNEL);
|
||||
if (queues == NULL) {
|
||||
nvhost_err(&pdev->dev, "failed to allocate queues");
|
||||
dev_err(&pdev->dev, "failed to allocate queues\n");
|
||||
err = -ENOMEM;
|
||||
goto fail_alloc_queues;
|
||||
}
|
||||
@@ -190,7 +190,7 @@ struct nvdla_queue_pool *nvdla_queue_init(struct platform_device *pdev,
|
||||
task_pool = kcalloc(num_queues,
|
||||
sizeof(struct nvdla_queue_task_pool), GFP_KERNEL);
|
||||
if (task_pool == NULL) {
|
||||
nvhost_err(&pdev->dev, "failed to allocate task_pool");
|
||||
dev_err(&pdev->dev, "failed to allocate task_pool\n");
|
||||
err = -ENOMEM;
|
||||
goto fail_alloc_task_pool;
|
||||
}
|
||||
@@ -257,7 +257,7 @@ static void nvdla_queue_release(struct kref *ref)
|
||||
kref);
|
||||
struct nvdla_queue_pool *pool = queue->pool;
|
||||
|
||||
nvhost_dbg_fn("");
|
||||
nvdla_dbg_fn(pool->pdev, "%s\n", __func__);
|
||||
|
||||
if (queue->use_channel)
|
||||
nvhost_putchannel(queue->channel, 1);
|
||||
@@ -277,13 +277,13 @@ static void nvdla_queue_release(struct kref *ref)
|
||||
|
||||
void nvdla_queue_put(struct nvdla_queue *queue)
|
||||
{
|
||||
nvhost_dbg_fn("");
|
||||
nvdla_dbg_fn(queue->pool->pdev, "%s\n", __func__);
|
||||
kref_put(&queue->kref, nvdla_queue_release);
|
||||
}
|
||||
|
||||
void nvdla_queue_get(struct nvdla_queue *queue)
|
||||
{
|
||||
nvhost_dbg_fn("");
|
||||
nvdla_dbg_fn(queue->pool->pdev, "%s\n", __func__);
|
||||
kref_get(&queue->kref);
|
||||
}
|
||||
|
||||
@@ -448,7 +448,7 @@ int nvdla_queue_submit_to_host1x(struct nvdla_queue *queue,
|
||||
/* Allocate memory for the task and task command buffer */
|
||||
task = kzalloc(sizeof(*task), GFP_KERNEL);
|
||||
if (task == NULL) {
|
||||
nvhost_err(&client_pdev->dev, "failed to allocate task");
|
||||
dev_err(&client_pdev->dev, "failed to allocate task\n");
|
||||
goto err_alloc_task;
|
||||
}
|
||||
|
||||
@@ -457,7 +457,7 @@ int nvdla_queue_submit_to_host1x(struct nvdla_queue *queue,
|
||||
&task->dma_addr,
|
||||
GFP_KERNEL);
|
||||
if (task->cpu_addr == NULL) {
|
||||
nvhost_err(&client_pdev->dev, "failed to allocate task");
|
||||
dev_err(&client_pdev->dev, "failed to allocate task\n");
|
||||
err = -ENOMEM;
|
||||
goto err_alloc_cmdbuf;
|
||||
}
|
||||
@@ -512,9 +512,8 @@ int nvdla_queue_submit_to_host1x(struct nvdla_queue *queue,
|
||||
job->sp->fence,
|
||||
queue_task_update, task);
|
||||
if (err < 0) {
|
||||
nvhost_err(&client_pdev->dev,
|
||||
"failed to register notifier err=%d",
|
||||
err);
|
||||
dev_err(&client_pdev->dev, "failed to register notifier err=%d",
|
||||
err);
|
||||
goto err_register_notifier;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* NVHOST buffer management for T194
|
||||
*
|
||||
* Copyright (c) 2016-2020, NVIDIA Corporation. All rights reserved.
|
||||
* Copyright (c) 2016-2021, 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,
|
||||
@@ -23,7 +23,6 @@
|
||||
#include <linux/dma-buf.h>
|
||||
#include <linux/cvnas.h>
|
||||
|
||||
#include "dev.h"
|
||||
#include "nvdla_buffer.h"
|
||||
|
||||
/**
|
||||
@@ -198,7 +197,7 @@ static void nvdla_free_buffers(struct kref *kref)
|
||||
static void nvdla_buffer_unmap(struct nvdla_buffers *nvdla_buffers,
|
||||
struct nvdla_vm_buffer *vm)
|
||||
{
|
||||
nvhost_dbg_fn("");
|
||||
pr_debug("%s\n", __func__);
|
||||
|
||||
if ((vm->user_map_count != 0) || (vm->submit_map_count != 0))
|
||||
return;
|
||||
@@ -307,7 +306,7 @@ int nvdla_buffer_pin(struct nvdla_buffers *nvdla_buffers,
|
||||
|
||||
vm = kzalloc(sizeof(struct nvdla_vm_buffer), GFP_KERNEL);
|
||||
if (!vm) {
|
||||
nvhost_err(NULL, "could not allocate vm_buffer");
|
||||
pr_err("%s: could not allocate vm_buffer\n", __func__);
|
||||
goto unpin;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user