mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: Compile out linux nvhost
This is added to compile out some non safety code from safety build. JIRA NVGPU-4146 Change-Id: Ie2b05f7c1bf1d0400184ae95d39103828c28de1e Signed-off-by: dinesh <dt@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2217415 Reviewed-by: Philip Elcan <pelcan@nvidia.com> Reviewed-by: Debarshi Dutta <ddutta@nvidia.com> Reviewed-by: Ankur Kishore <ankkishore@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
@@ -380,13 +380,16 @@ nvgpu_channel_sync_syncpt_create(struct nvgpu_channel *c, bool user_managed)
|
||||
|
||||
sp->id = nvgpu_nvhost_get_syncpt_client_managed(sp->nvhost_dev,
|
||||
syncpt_name);
|
||||
} else {
|
||||
}
|
||||
#ifdef CONFIG_NVGPU_KERNEL_MODE_SUBMIT
|
||||
else {
|
||||
snprintf(syncpt_name, sizeof(syncpt_name),
|
||||
"%s_%d", c->g->name, c->chid);
|
||||
|
||||
sp->id = nvgpu_nvhost_get_syncpt_host_managed(sp->nvhost_dev,
|
||||
c->chid, syncpt_name);
|
||||
}
|
||||
#endif
|
||||
if (sp->id == 0) {
|
||||
nvgpu_kfree(c->g, sp);
|
||||
nvgpu_err(c->g, "failed to get free syncpt");
|
||||
|
||||
@@ -36,11 +36,16 @@ struct timespec;
|
||||
int nvgpu_get_nvhost_dev(struct gk20a *g);
|
||||
void nvgpu_free_nvhost_dev(struct gk20a *g);
|
||||
|
||||
#ifdef CONFIG_NVGPU_KERNEL_MODE_SUBMIT
|
||||
int nvgpu_nvhost_module_busy_ext(struct nvgpu_nvhost_dev *nvgpu_syncpt_dev);
|
||||
void nvgpu_nvhost_module_idle_ext(struct nvgpu_nvhost_dev *nvgpu_syncpt_dev);
|
||||
|
||||
void nvgpu_nvhost_debug_dump_device(struct nvgpu_nvhost_dev *nvgpu_syncpt_dev);
|
||||
|
||||
int nvgpu_nvhost_intr_register_notifier(struct nvgpu_nvhost_dev *nvgpu_syncpt_dev,
|
||||
u32 id, u32 thresh, void (*callback)(void *priv, int nr_completed),
|
||||
void *private_data);
|
||||
|
||||
bool nvgpu_nvhost_syncpt_is_expired_ext(struct nvgpu_nvhost_dev *nvgpu_syncpt_dev,
|
||||
u32 id, u32 thresh);
|
||||
int nvgpu_nvhost_syncpt_wait_timeout_ext(struct nvgpu_nvhost_dev *nvgpu_syncpt_dev,
|
||||
@@ -48,34 +53,37 @@ int nvgpu_nvhost_syncpt_wait_timeout_ext(struct nvgpu_nvhost_dev *nvgpu_syncpt_d
|
||||
|
||||
u32 nvgpu_nvhost_syncpt_incr_max_ext(struct nvgpu_nvhost_dev *nvgpu_syncpt_dev,
|
||||
u32 id, u32 incrs);
|
||||
void nvgpu_nvhost_syncpt_set_min_eq_max_ext(struct nvgpu_nvhost_dev *nvgpu_syncpt_dev,
|
||||
u32 id);
|
||||
|
||||
int nvgpu_nvhost_syncpt_read_ext_check(struct nvgpu_nvhost_dev *nvgpu_syncpt_dev,
|
||||
u32 id, u32 *val);
|
||||
|
||||
u32 nvgpu_nvhost_get_syncpt_host_managed(struct nvgpu_nvhost_dev *nvgpu_syncpt_dev,
|
||||
u32 param,
|
||||
const char *syncpt_name);
|
||||
|
||||
int nvgpu_nvhost_create_symlink(struct gk20a *g);
|
||||
void nvgpu_nvhost_remove_symlink(struct gk20a *g);
|
||||
|
||||
const char *nvgpu_nvhost_syncpt_get_name(struct nvgpu_nvhost_dev *nvgpu_syncpt_dev,
|
||||
int id);
|
||||
|
||||
#endif
|
||||
|
||||
void nvgpu_nvhost_syncpt_set_min_eq_max_ext(struct nvgpu_nvhost_dev *nvgpu_syncpt_dev,
|
||||
u32 id);
|
||||
u32 nvgpu_nvhost_syncpt_read_maxval(struct nvgpu_nvhost_dev *nvgpu_syncpt_dev,
|
||||
u32 id);
|
||||
void nvgpu_nvhost_syncpt_set_safe_state(
|
||||
struct nvgpu_nvhost_dev *nvgpu_syncpt_dev, u32 id);
|
||||
|
||||
int nvgpu_nvhost_intr_register_notifier(struct nvgpu_nvhost_dev *nvgpu_syncpt_dev,
|
||||
u32 id, u32 thresh, void (*callback)(void *priv, int nr_completed),
|
||||
void *private_data);
|
||||
|
||||
const char *nvgpu_nvhost_syncpt_get_name(struct nvgpu_nvhost_dev *nvgpu_syncpt_dev,
|
||||
int id);
|
||||
bool nvgpu_nvhost_syncpt_is_valid_pt_ext(struct nvgpu_nvhost_dev *nvgpu_syncpt_dev,
|
||||
u32 id);
|
||||
void nvgpu_nvhost_syncpt_put_ref_ext(struct nvgpu_nvhost_dev *nvgpu_syncpt_dev,
|
||||
u32 id);
|
||||
u32 nvgpu_nvhost_get_syncpt_host_managed(struct nvgpu_nvhost_dev *nvgpu_syncpt_dev,
|
||||
u32 param,
|
||||
const char *syncpt_name);
|
||||
|
||||
u32 nvgpu_nvhost_get_syncpt_client_managed(struct nvgpu_nvhost_dev *nvgpu_syncpt_dev,
|
||||
const char *syncpt_name);
|
||||
|
||||
int nvgpu_nvhost_create_symlink(struct gk20a *g);
|
||||
void nvgpu_nvhost_remove_symlink(struct gk20a *g);
|
||||
|
||||
#ifdef CONFIG_SYNC
|
||||
u32 nvgpu_nvhost_sync_pt_id(struct sync_pt *pt);
|
||||
u32 nvgpu_nvhost_sync_pt_thresh(struct sync_pt *pt);
|
||||
|
||||
@@ -35,32 +35,6 @@ void nvgpu_free_nvhost_dev(struct gk20a *g)
|
||||
BUG();
|
||||
}
|
||||
|
||||
int nvgpu_nvhost_module_busy_ext(
|
||||
struct nvgpu_nvhost_dev *nvhost_dev)
|
||||
{
|
||||
BUG();
|
||||
return 0;
|
||||
}
|
||||
|
||||
void nvgpu_nvhost_module_idle_ext(
|
||||
struct nvgpu_nvhost_dev *nvhost_dev)
|
||||
{
|
||||
BUG();
|
||||
}
|
||||
|
||||
void nvgpu_nvhost_debug_dump_device(
|
||||
struct nvgpu_nvhost_dev *nvhost_dev)
|
||||
{
|
||||
BUG();
|
||||
}
|
||||
|
||||
const char *nvgpu_nvhost_syncpt_get_name(
|
||||
struct nvgpu_nvhost_dev *nvhost_dev, int id)
|
||||
{
|
||||
BUG();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool nvgpu_nvhost_syncpt_is_valid_pt_ext(
|
||||
struct nvgpu_nvhost_dev *nvhost_dev, u32 id)
|
||||
{
|
||||
@@ -68,27 +42,6 @@ bool nvgpu_nvhost_syncpt_is_valid_pt_ext(
|
||||
return false;
|
||||
}
|
||||
|
||||
bool nvgpu_nvhost_syncpt_is_expired_ext(
|
||||
struct nvgpu_nvhost_dev *nvhost_dev, u32 id, u32 thresh)
|
||||
{
|
||||
BUG();
|
||||
return false;
|
||||
}
|
||||
|
||||
u32 nvgpu_nvhost_syncpt_incr_max_ext(
|
||||
struct nvgpu_nvhost_dev *nvhost_dev, u32 id, u32 incrs)
|
||||
{
|
||||
BUG();
|
||||
return 0U;
|
||||
}
|
||||
|
||||
int nvgpu_nvhost_intr_register_notifier(
|
||||
struct nvgpu_nvhost_dev *nvhost_dev, u32 id, u32 thresh,
|
||||
void (*callback)(void *priv, int nr_completed), void *private_data)
|
||||
{
|
||||
BUG();
|
||||
return 0;
|
||||
}
|
||||
|
||||
void nvgpu_nvhost_syncpt_set_min_eq_max_ext(
|
||||
struct nvgpu_nvhost_dev *nvhost_dev, u32 id)
|
||||
@@ -102,14 +55,6 @@ void nvgpu_nvhost_syncpt_put_ref_ext(
|
||||
BUG();
|
||||
}
|
||||
|
||||
u32 nvgpu_nvhost_get_syncpt_host_managed(
|
||||
struct nvgpu_nvhost_dev *nvhost_dev,
|
||||
u32 param, const char *syncpt_name)
|
||||
{
|
||||
BUG();
|
||||
return 0U;
|
||||
}
|
||||
|
||||
u32 nvgpu_nvhost_get_syncpt_client_managed(
|
||||
struct nvgpu_nvhost_dev *nvhost_dev,
|
||||
const char *syncpt_name)
|
||||
@@ -118,21 +63,6 @@ u32 nvgpu_nvhost_get_syncpt_client_managed(
|
||||
return 0U;
|
||||
}
|
||||
|
||||
int nvgpu_nvhost_syncpt_wait_timeout_ext(
|
||||
struct nvgpu_nvhost_dev *nvhost_dev, u32 id,
|
||||
u32 thresh, u32 timeout)
|
||||
{
|
||||
BUG();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int nvgpu_nvhost_syncpt_read_ext_check(
|
||||
struct nvgpu_nvhost_dev *nvhost_dev, u32 id, u32 *val)
|
||||
{
|
||||
BUG();
|
||||
return 0;
|
||||
}
|
||||
|
||||
u32 nvgpu_nvhost_syncpt_read_maxval(
|
||||
struct nvgpu_nvhost_dev *nvhost_dev, u32 id)
|
||||
{
|
||||
@@ -146,17 +76,6 @@ void nvgpu_nvhost_syncpt_set_safe_state(
|
||||
BUG();
|
||||
}
|
||||
|
||||
int nvgpu_nvhost_create_symlink(struct gk20a *g)
|
||||
{
|
||||
BUG();
|
||||
return 0;
|
||||
}
|
||||
|
||||
void nvgpu_nvhost_remove_symlink(struct gk20a *g)
|
||||
{
|
||||
BUG();
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SYNC
|
||||
u32 nvgpu_nvhost_sync_pt_id(struct sync_pt *pt)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user