From 35e17c237e95d1e325f499dcfaea54a332aa6a93 Mon Sep 17 00:00:00 2001 From: omar Date: Mon, 13 May 2024 17:03:33 +0000 Subject: [PATCH] drivers: pva: update SID programming for PVA Jira PVAAS-15366 Change-Id: Id0a541350afc62bb6d1eef59fb301b8650d16254 Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3160296 Tested-by: Omar Nemri Reviewed-by: Omar Nemri Reviewed-by: Amruta Sai Anusha Bhamidipati GVS: buildbot_gerritrpt --- drivers/video/tegra/host/pva/Makefile | 4 +- .../tegra/host/pva/pva_cntxt_dev_name_t264.h | 2 +- drivers/video/tegra/host/pva/pva_t264.h | 39 +++++++++---------- 3 files changed, 23 insertions(+), 22 deletions(-) diff --git a/drivers/video/tegra/host/pva/Makefile b/drivers/video/tegra/host/pva/Makefile index bbc4f941..b622284a 100644 --- a/drivers/video/tegra/host/pva/Makefile +++ b/drivers/video/tegra/host/pva/Makefile @@ -17,6 +17,7 @@ ccflags-y += -DTEGRA_OOT_MODULE ccflags-y += -DCONFIG_TEGRA_T26X_GRHOST_PVA ccflags-y += -DNVPVA_CONFIG_T264 +ccflags-y += -DCONFIG_PVA_CO_DISABLED_T264 nvhost-pva-objs = \ pva.o \ @@ -53,4 +54,5 @@ nvhost-pva-objs = \ obj-m += nvhost-pva.o endif -endif \ No newline at end of file +endif + diff --git a/drivers/video/tegra/host/pva/pva_cntxt_dev_name_t264.h b/drivers/video/tegra/host/pva/pva_cntxt_dev_name_t264.h index ea2bae4c..1310878c 100644 --- a/drivers/video/tegra/host/pva/pva_cntxt_dev_name_t264.h +++ b/drivers/video/tegra/host/pva/pva_cntxt_dev_name_t264.h @@ -15,5 +15,5 @@ */ #ifndef __PVA_CNTXT_DEV_NAME_T264_H__ #define __PVA_CNTXT_DEV_NAME_T264_H__ -#define PVA_CNTXT_DEV_NAME_T264 "\"pva0_niso1_ctx8\"," +#define PVA_CNTXT_DEV_NAME_T264 "pva0_niso1_ctx8" #endif diff --git a/drivers/video/tegra/host/pva/pva_t264.h b/drivers/video/tegra/host/pva/pva_t264.h index 84c9fd45..51a502d6 100644 --- a/drivers/video/tegra/host/pva/pva_t264.h +++ b/drivers/video/tegra/host/pva/pva_t264.h @@ -20,7 +20,7 @@ #ifndef __PVA_T264_H__ #define __PVA_T264_H__ -static char *aux_dev_name_t264 = "818c000000.pva0:pva0_niso1_ctx7"; +static char *aux_dev_name_t264 = "818c000000.pva0:pva0_niso1_ctx8"; static u32 aux_dev_name_len_t264 = 31; struct nvhost_device_data t264_pva0_info = { @@ -40,19 +40,19 @@ struct nvhost_device_data t264_pva0_info = { .firmware_name = "nvhost_pva030.fw", .resource_policy = RESOURCE_PER_CHANNEL_INSTANCE, .vm_regs = { - {0x240000, false, 0}, - {0x240004, false, 0}, - {0x240008, false, 0}, - {0x24000c, false, 0}, - {0x240010, false, 0}, - {0x240014, false, 0}, - {0x240018, false, 0}, - {0x24001c, false, 0}, - {0x240020, false, 0}, - {0x240020, false, 8}, - {0x240020, false, 16}, - {0x240024, false, 0}, - {0x240024, false, 8} + {0x240000, false, 0xFFFF0000}, + {0x240004, false, 0xFFFF0000}, + {0x240008, false, 0xFFFF0000}, + {0x24000c, false, 0xFFFF0000}, + {0x240010, false, 0xFFFF0000}, + {0x240014, false, 0xFFFF0000}, + {0x240018, false, 0xFFFF0000}, + {0x24001c, false, 0xFFFF0000}, + {0x240020, false, 0x00FF0000}, + {0x240020, false, 0x00FF0008}, + {0x240020, false, 0x00FF0010}, + {0x240024, false, 0x00FF0000}, + {0x240024, false, 0x00FF0008} }, .poweron_reset = true, .serialize = true, @@ -60,14 +60,13 @@ struct nvhost_device_data t264_pva0_info = { .can_powergate = true, }; -#if (defined(CONFIG_PVA_CO_DISABLED) || defined(CONFIG_TEGRA_T26X_GRHOST_PVA)) -static u32 vm_regs_sid_idx_t264[] = {1, 2, 3, 4, 5, 6, 7, 7, - 8, 8, 8, 8, 8, 0, 0, 0}; +#if defined(CONFIG_PVA_CO_DISABLED_T264) +static u32 vm_regs_sid_idx_t264[] = {1, 2, 3, 4, 5, 6, 7, 8, + 9, 9, 9, 9, 9, 0, 0, 0}; #else -static u32 vm_regs_sid_idx_t264[] = {1, 2, 3, 4, 5, 6, 7, 7, - 8, 0, 9, 0, 0, 0, 0, 0}; +static u32 vm_regs_sid_idx_t264[] = {1, 2, 3, 4, 5, 6, 7, 8, + 9, 0, 9, 0, 0, 0, 0, 0}; #endif static u32 vm_regs_reg_idx_t264[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 8, 8, 9, 9, 0, 0, 0}; - #endif