gpu: nvgpu: unify nvgpu_get_gpfifo_entry_size

moved nvgpu_get_gpfifo_entry_size implementation to common code.

Jira GVSCI-10880

Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Change-Id: Ia6ccee5e26836662f7c2196ff41658ff41e3a570
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2541575
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Deepak Nibade <dnibade@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:
Richard Zhao
2021-06-08 18:32:23 -07:00
committed by mobile promotions
parent 67399a1892
commit e2d8bdc38d
5 changed files with 5 additions and 18 deletions

View File

@@ -1026,7 +1026,10 @@ void nvgpu_channel_free_usermode_buffers(struct nvgpu_channel *c);
*
* @return Size of a gpfifo entry in bytes.
*/
u32 nvgpu_get_gpfifo_entry_size(void);
static inline u32 nvgpu_get_gpfifo_entry_size(void)
{
return sizeof(struct nvgpu_gpfifo_entry);
}
#ifdef CONFIG_DEBUG_FS
void trace_write_pushbuffers(struct nvgpu_channel *c, u32 count);

View File

@@ -625,11 +625,6 @@ void nvgpu_channel_remove_support_linux(struct nvgpu_os_linux *l)
g->os_channel.destroy_os_fence_framework = NULL;
}
u32 nvgpu_get_gpfifo_entry_size(void)
{
return sizeof(struct nvgpu_gpfifo_entry);
}
u32 nvgpu_channel_get_max_subctx_count(struct nvgpu_channel *ch)
{
struct nvgpu_channel_linux *priv = ch->os_priv;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018-2020, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2018-2021, NVIDIA CORPORATION. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -22,15 +22,6 @@
#include <nvgpu/channel.h>
u32 nvgpu_get_gpfifo_entry_size(void)
{
/*
* There is no struct nvgpu_gpfifo for us to use yet. But when it's
* defined in userspace this is how big it will be.
*/
return 8;
}
u32 nvgpu_channel_get_max_subctx_count(struct nvgpu_channel *ch)
{
return 64;

View File

@@ -401,7 +401,6 @@ nvgpu_free_enabled_flags
nvgpu_free_fixed
nvgpu_free_gr_ctx_struct
nvgpu_get
nvgpu_get_gpfifo_entry_size
nvgpu_channel_get_max_subctx_count
nvgpu_get_pte
nvgpu_gmmu_default_big_page_size

View File

@@ -417,7 +417,6 @@ nvgpu_free_enabled_flags
nvgpu_free_fixed
nvgpu_free_gr_ctx_struct
nvgpu_get
nvgpu_get_gpfifo_entry_size
nvgpu_channel_get_max_subctx_count
nvgpu_get_pte
nvgpu_gmmu_default_big_page_size