mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: Fix/HACK for v3.18
Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com>
This commit is contained in:
@@ -5,6 +5,7 @@ ccflags-y += -Idrivers/video/tegra/host
|
||||
ccflags-y += -Idrivers/devfreq
|
||||
ccflags-y += -Wno-multichar
|
||||
ccflags-y += -Werror
|
||||
ccflags-y += -Wno-error=cpp
|
||||
|
||||
ifeq ($(CONFIG_ARCH_TEGRA_18x_SOC),y)
|
||||
ccflags-$(CONFIG_GK20A) += -I$(srctree)/../kernel-t18x/drivers/gpu/nvgpu
|
||||
|
||||
@@ -51,11 +51,6 @@ struct notification {
|
||||
u16 status;
|
||||
};
|
||||
|
||||
struct fence {
|
||||
u32 hw_chid;
|
||||
u32 syncpt_val;
|
||||
};
|
||||
|
||||
/* contexts associated with a channel */
|
||||
struct channel_ctx_gk20a {
|
||||
struct gr_ctx_desc *gr_ctx;
|
||||
|
||||
@@ -1164,6 +1164,7 @@ static int gk20a_pm_unrailgate(struct generic_pm_domain *domain)
|
||||
return _gk20a_pm_unrailgate(platform->g->dev);
|
||||
}
|
||||
|
||||
#if 0
|
||||
static int gk20a_pm_suspend(struct device *dev)
|
||||
{
|
||||
struct gk20a_platform *platform = dev_get_drvdata(dev);
|
||||
@@ -1188,6 +1189,7 @@ static int gk20a_pm_resume(struct device *dev)
|
||||
{
|
||||
return gk20a_pm_finalize_poweron(dev);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int gk20a_pm_initialise_domain(struct platform_device *pdev)
|
||||
{
|
||||
@@ -1211,8 +1213,11 @@ static int gk20a_pm_initialise_domain(struct platform_device *pdev)
|
||||
domain->dev_ops.stop = gk20a_pm_disable_clk;
|
||||
domain->dev_ops.save_state = gk20a_pm_prepare_poweroff;
|
||||
domain->dev_ops.restore_state = gk20a_pm_finalize_poweron;
|
||||
#warning domain suspend/resume ops have been removed upstream
|
||||
#if 0
|
||||
domain->dev_ops.suspend = gk20a_pm_suspend;
|
||||
domain->dev_ops.resume = gk20a_pm_resume;
|
||||
#endif
|
||||
|
||||
device_set_wakeup_capable(&pdev->dev, 0);
|
||||
ret = pm_genpd_add_device(domain, &pdev->dev);
|
||||
|
||||
@@ -435,7 +435,7 @@ static ssize_t aelpg_param_read(struct device *device,
|
||||
g->pmu.aelpg_param[3], g->pmu.aelpg_param[4]);
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(aelpg_param, S_IRWXUGO,
|
||||
static DEVICE_ATTR(aelpg_param, ROOTRW,
|
||||
aelpg_param_read, aelpg_param_store);
|
||||
|
||||
static ssize_t aelpg_enable_store(struct device *device,
|
||||
@@ -648,7 +648,7 @@ static ssize_t tpc_fs_mask_read(struct device *device,
|
||||
return sprintf(buf, "0x%x\n", tpc_fs_mask);
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(tpc_fs_mask, S_IRWXUGO, tpc_fs_mask_read, tpc_fs_mask_store);
|
||||
static DEVICE_ATTR(tpc_fs_mask, ROOTRW, tpc_fs_mask_read, tpc_fs_mask_store);
|
||||
|
||||
void gk20a_remove_sysfs(struct device *dev)
|
||||
{
|
||||
|
||||
@@ -580,7 +580,7 @@ int gr_gk20a_ctx_patch_write_begin(struct gk20a *g,
|
||||
|
||||
ch_ctx->patch_ctx.cpu_va = vmap(ch_ctx->patch_ctx.pages,
|
||||
PAGE_ALIGN(ch_ctx->patch_ctx.size) >> PAGE_SHIFT,
|
||||
0, pgprot_dmacoherent(PAGE_KERNEL));
|
||||
0, pgprot_writecombine(PAGE_KERNEL));
|
||||
|
||||
if (!ch_ctx->patch_ctx.cpu_va)
|
||||
return -ENOMEM;
|
||||
@@ -691,7 +691,7 @@ static int gr_gk20a_ctx_zcull_setup(struct gk20a *g, struct channel_gk20a *c,
|
||||
|
||||
ctx_ptr = vmap(ch_ctx->gr_ctx->pages,
|
||||
PAGE_ALIGN(ch_ctx->gr_ctx->size) >> PAGE_SHIFT,
|
||||
0, pgprot_dmacoherent(PAGE_KERNEL));
|
||||
0, pgprot_writecombine(PAGE_KERNEL));
|
||||
if (!ctx_ptr)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -1455,13 +1455,13 @@ static int gr_gk20a_init_golden_ctx_image(struct gk20a *g,
|
||||
|
||||
gold_ptr = vmap(gr->global_ctx_buffer[GOLDEN_CTX].pages,
|
||||
PAGE_ALIGN(gr->global_ctx_buffer[GOLDEN_CTX].size) >>
|
||||
PAGE_SHIFT, 0, pgprot_dmacoherent(PAGE_KERNEL));
|
||||
PAGE_SHIFT, 0, pgprot_writecombine(PAGE_KERNEL));
|
||||
if (!gold_ptr)
|
||||
goto clean_up;
|
||||
|
||||
ctx_ptr = vmap(ch_ctx->gr_ctx->pages,
|
||||
PAGE_ALIGN(ch_ctx->gr_ctx->size) >> PAGE_SHIFT,
|
||||
0, pgprot_dmacoherent(PAGE_KERNEL));
|
||||
0, pgprot_writecombine(PAGE_KERNEL));
|
||||
if (!ctx_ptr)
|
||||
goto clean_up;
|
||||
|
||||
@@ -1535,7 +1535,7 @@ int gr_gk20a_update_smpc_ctxsw_mode(struct gk20a *g,
|
||||
|
||||
ctx_ptr = vmap(ch_ctx->gr_ctx->pages,
|
||||
PAGE_ALIGN(ch_ctx->gr_ctx->size) >> PAGE_SHIFT,
|
||||
0, pgprot_dmacoherent(PAGE_KERNEL));
|
||||
0, pgprot_writecombine(PAGE_KERNEL));
|
||||
if (!ctx_ptr)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -1575,7 +1575,7 @@ int gr_gk20a_load_golden_ctx_image(struct gk20a *g,
|
||||
|
||||
ctx_ptr = vmap(ch_ctx->gr_ctx->pages,
|
||||
PAGE_ALIGN(ch_ctx->gr_ctx->size) >> PAGE_SHIFT,
|
||||
0, pgprot_dmacoherent(PAGE_KERNEL));
|
||||
0, pgprot_writecombine(PAGE_KERNEL));
|
||||
if (!ctx_ptr)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -4554,7 +4554,7 @@ static int gr_gk20a_init_access_map(struct gk20a *g)
|
||||
|
||||
data = vmap(gr->global_ctx_buffer[PRIV_ACCESS_MAP].pages,
|
||||
PAGE_ALIGN(gr->global_ctx_buffer[PRIV_ACCESS_MAP].size) >>
|
||||
PAGE_SHIFT, 0, pgprot_dmacoherent(PAGE_KERNEL));
|
||||
PAGE_SHIFT, 0, pgprot_writecombine(PAGE_KERNEL));
|
||||
if (!data) {
|
||||
gk20a_err(dev_from_gk20a(g),
|
||||
"failed to map priv access map memory");
|
||||
@@ -6970,7 +6970,7 @@ int gr_gk20a_exec_ctx_ops(struct channel_gk20a *ch,
|
||||
/* recoded in-place instead.*/
|
||||
ctx_ptr = vmap(ch_ctx->gr_ctx->pages,
|
||||
PAGE_ALIGN(ch_ctx->gr_ctx->size) >> PAGE_SHIFT,
|
||||
0, pgprot_dmacoherent(PAGE_KERNEL));
|
||||
0, pgprot_writecombine(PAGE_KERNEL));
|
||||
if (!ctx_ptr) {
|
||||
err = -ENOMEM;
|
||||
goto cleanup;
|
||||
|
||||
@@ -550,7 +550,7 @@ int map_gmmu_pages(void *handle, struct sg_table *sgt,
|
||||
*kva = handle;
|
||||
} else {
|
||||
pages = (struct page **)handle;
|
||||
*kva = vmap(pages, count, 0, pgprot_dmacoherent(PAGE_KERNEL));
|
||||
*kva = vmap(pages, count, 0, pgprot_writecombine(PAGE_KERNEL));
|
||||
if (!(*kva))
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user