From: Ishu Brar <[email protected]> Without an A620 specific table the GMU falls back to the generic A630 one, whose BCM addresses do not exist on SM7250, and the first GX performance vote times out.
Like the A650 one, send a single "off" entry just to get things running, with the BCM addresses looked up in cmd-db. Add adreno_is_a620() for the selection. Assisted-by: Claude Signed-off-by: Ishu Brar <[email protected]> --- drivers/gpu/drm/msm/adreno/a6xx_hfi.c | 33 +++++++++++++++++++++++++++++++++ drivers/gpu/drm/msm/adreno/adreno_gpu.h | 5 +++++ 2 files changed, 38 insertions(+) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_hfi.c b/drivers/gpu/drm/msm/adreno/a6xx_hfi.c index 6b34e704a..cab7ffc63 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_hfi.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_hfi.c @@ -553,6 +553,37 @@ static void a650_build_bw_table(struct a6xx_hfi_msg_bw_table *msg) msg->cnoc_cmds_data[1][0] = 0x60000001; } +static void a620_build_bw_table(struct a6xx_hfi_msg_bw_table *msg) +{ + /* + * Send a single "off" entry just to get things running + * TODO: bus scaling + */ + msg->bw_level_num = 1; + + msg->ddr_cmds_num = 3; + msg->ddr_wait_bitmask = 0x01; + + msg->ddr_cmds_addrs[0] = cmd_db_read_addr("MC0"); + msg->ddr_cmds_addrs[1] = cmd_db_read_addr("SH0"); + msg->ddr_cmds_addrs[2] = cmd_db_read_addr("ACV"); + + msg->ddr_cmds_data[0][0] = 0x40000000; + msg->ddr_cmds_data[0][1] = 0x40000000; + msg->ddr_cmds_data[0][2] = 0x40000000; + + /* + * These are the CX (CNOC) votes - these are used by the GMU but the + * votes are known and fixed for the target + */ + msg->cnoc_cmds_num = 1; + msg->cnoc_wait_bitmask = 0x01; + + msg->cnoc_cmds_addrs[0] = cmd_db_read_addr("CN0"); + msg->cnoc_cmds_data[0][0] = 0x40000000; + msg->cnoc_cmds_data[1][0] = 0x60000001; +} + static void a690_build_bw_table(struct a6xx_hfi_msg_bw_table *msg) { /* @@ -818,6 +849,8 @@ static int a6xx_hfi_send_bw_table(struct a6xx_gmu *gmu) a619_build_bw_table(msg); else if (adreno_is_a640_family(adreno_gpu)) a640_build_bw_table(msg); + else if (adreno_is_a620(adreno_gpu)) + a620_build_bw_table(msg); else if (adreno_is_a650(adreno_gpu)) a650_build_bw_table(msg); else if (adreno_is_7c3(adreno_gpu)) diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.h b/drivers/gpu/drm/msm/adreno/adreno_gpu.h index 4b2156825..b77502446 100644 --- a/drivers/gpu/drm/msm/adreno/adreno_gpu.h +++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.h @@ -443,6 +443,11 @@ static inline int adreno_is_a619_holi(const struct adreno_gpu *gpu) return adreno_is_a619(gpu) && adreno_has_gmu_wrapper(gpu); } +static inline int adreno_is_a620(const struct adreno_gpu *gpu) +{ + return gpu->info->chip_ids[0] == 0x06020000; +} + static inline int adreno_is_a621(const struct adreno_gpu *gpu) { return gpu->info->chip_ids[0] == 0x06020100; -- 2.56.0
