drm: msm: Add 680 gpu to the adreno gpu list
Subsystems (4)
PATCH 1/1 drm: msm: Add 680 gpu to the adreno gpu list
This patch adds a Adreno 680 entry to the gpulist.
--- drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 5 +++-- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 12 +++++++----- drivers/gpu/drm/msm/adreno/a6xx_hfi.c | 2 +- drivers/gpu/drm/msm/adreno/adreno_device.c | 13 +++++++++++++ drivers/gpu/drm/msm/adreno/adreno_gpu.h | 5 +++++ 5 files changed, 29 insertions(+), 8 deletions(-)
drivers/gpu/drm/msm/adreno/a6xx_gmu.c +3 -2
@@ -521,7 +521,8 @@ static void a6xx_gmu_rpmh_init(struct a6xx_gmu *gmu)if (adreno_is_a650 (adreno_gpu) ||adreno_is_a660 (adreno_gpu)) pdc_in_aop = true; -else if (adreno_is_a618 (adreno_gpu) ||adreno_is_a640 (adreno_gpu)) +else if (adreno_is_a618 (adreno_gpu) ||adreno_is_a640 (adreno_gpu) || +adreno_is_a680 (adreno_gpu)) pdc_address_offset =0x30090 ;else pdc_address_offset =0x30080 ;
@@ -1522,7 +1523,7 @@ int a6xx_gmu_init(struct a6xx_gpu *a6xx_gpu, struct device_node *node) SZ_16M - SZ_16K, 0x04000);if (ret) goto err_memory; - }else if (adreno_is_a640 (adreno_gpu)) { + }else if (adreno_is_a640 (adreno_gpu) ||adreno_is_a680 (adreno_gpu)) { ret =a6xx_gmu_memory_alloc (gmu, &gmu->icache,SZ_256K -SZ_16K ,0x04000 );if (ret)
drivers/gpu/drm/msm/adreno/a6xx_gpu.c +7 -5
@@ -683,7 +683,7 @@ static void a6xx_set_ubwc_config(struct msm_gpu *gpu)if (adreno_is_a618 (adreno_gpu))return ; -if (adreno_is_a640 (adreno_gpu)) +if (adreno_is_a640 (adreno_gpu) ||adreno_is_a680 (adreno_gpu)) amsbc =1 ;if (adreno_is_a650 (adreno_gpu) ||adreno_is_a660 (adreno_gpu)) {
@@ -757,7 +757,7 @@ static bool a6xx_ucode_check_version(struct a6xx_gpu *a6xx_gpu,* a660 targets have all the critical security fixes from the start */ if (adreno_is_a618 (adreno_gpu) ||adreno_is_a630 (adreno_gpu) || -adreno_is_a640 (adreno_gpu)) { +adreno_is_a640 (adreno_gpu) ||adreno_is_a680 (adreno_gpu)) {/* * If the lowest nibble is 0xa that is an indication that this * microcode has been patched. The actual version is in dword
@@ -897,7 +897,8 @@ static int a6xx_hw_init(struct msm_gpu *gpu)a6xx_set_hwcg (gpu, true);/* VBIF/GBIF start*/ -if (adreno_is_a640 (adreno_gpu) ||adreno_is_a650_family (adreno_gpu)) { +if (adreno_is_a640 (adreno_gpu) ||adreno_is_a650_family (adreno_gpu) || +adreno_is_a680 (adreno_gpu)) {gpu_write (gpu,REG_A6XX_GBIF_QSB_SIDE0 ,0x00071620 );gpu_write (gpu,REG_A6XX_GBIF_QSB_SIDE1 ,0x00071620 );gpu_write (gpu,REG_A6XX_GBIF_QSB_SIDE2 ,0x00071620 );
@@ -935,7 +936,8 @@ static int a6xx_hw_init(struct msm_gpu *gpu)gpu_write (gpu,REG_A6XX_UCHE_FILTER_CNTL ,0x804 );gpu_write (gpu,REG_A6XX_UCHE_CACHE_WAYS ,0x4 ); -if (adreno_is_a640 (adreno_gpu) ||adreno_is_a650_family (adreno_gpu)) +if (adreno_is_a640 (adreno_gpu) ||adreno_is_a650_family (adreno_gpu) || +adreno_is_a680 (adreno_gpu))gpu_write (gpu,REG_A6XX_CP_ROQ_THRESHOLDS_2 ,0x02000140 );else gpu_write (gpu,REG_A6XX_CP_ROQ_THRESHOLDS_2 ,0x010000c0 );
@@ -952,7 +954,7 @@ static int a6xx_hw_init(struct msm_gpu *gpu)*/ if (adreno_is_a650 (adreno_gpu) ||adreno_is_a660 (adreno_gpu))gpu_write (gpu,REG_A6XX_PC_DBG_ECO_CNTL ,0x00300200 ); -else if (adreno_is_a640 (adreno_gpu)) +else if (adreno_is_a640 (adreno_gpu) ||adreno_is_a680 (adreno_gpu))gpu_write (gpu,REG_A6XX_PC_DBG_ECO_CNTL ,0x00200200 );else gpu_write (gpu,REG_A6XX_PC_DBG_ECO_CNTL ,0x00180000 );
drivers/gpu/drm/msm/adreno/a6xx_hfi.c +1 -1
@@ -428,7 +428,7 @@ static int a6xx_hfi_send_bw_table(struct a6xx_gmu *gmu)if (adreno_is_a618 (adreno_gpu))a618_build_bw_table (&msg); -else if (adreno_is_a640 (adreno_gpu)) +else if (adreno_is_a640 (adreno_gpu) ||adreno_is_a680 (adreno_gpu))a640_build_bw_table (&msg);else if (adreno_is_a650 (adreno_gpu))a650_build_bw_table (&msg);
drivers/gpu/drm/msm/adreno/adreno_device.c +13 -0
@@ -300,6 +300,19 @@ static const struct adreno_info gpulist[] = { .init = a6xx_gpu_init, .zapfw = "a660_zap.mdt", .hwcg = a660_hwcg, + }, { + .rev = ADRENO_REV(6, 8, 0, ANY_ID), + .revn = 680, + .name = "A680", + .fw = { + [ADRENO_FW_SQE] = "a630_sqe.fw", + [ADRENO_FW_GMU] = "a640_gmu.bin", + }, + .gmem = SZ_2M, + .inactive_period = DRM_MSM_INACTIVE_PERIOD, + .init = a6xx_gpu_init, + .zapfw = "a640_zap.mdt", + .hwcg = a640_hwcg, }, };
drivers/gpu/drm/msm/adreno/adreno_gpu.h +5 -0
@@ -258,6 +258,11 @@ static inline int adreno_is_a650_family(struct adreno_gpu *gpu)return gpu->revn ==650 || gpu->revn ==620 || gpu->revn ==660 ; } +static inline int adreno_is_a680 (struct adreno_gpu *gpu) +{ +return gpu->revn ==680 ; +} +int adreno_get_param (struct msm_gpu *gpu,uint32_t param,uint64_t *value);const struct firmware *adreno_request_fw (struct adreno_gpu *adreno_gpu,const char *fwname);
Signature · 1 line
2.29.2
Quoted 2 lines · Bjorn Andersson
This patch adds a Adreno 680 entry to the gpulist.
Looks reasonable, but I wonder if we should just go ahead and add adreno_is_a640_family() in a similar vein to adreno_is_a650_familiy()/adreno_is_a660_family().. I think most of the 'if (a640) ...' should also apply to a680?
BR,
-R
Quoted 139 lines
Signed-off-by Bjorn Andersson <[email protected]>--- drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 5 +++-- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 12 +++++++----- drivers/gpu/drm/msm/adreno/a6xx_hfi.c | 2 +- drivers/gpu/drm/msm/adreno/adreno_device.c | 13 +++++++++++++ drivers/gpu/drm/msm/adreno/adreno_gpu.h | 5 +++++ 5 files changed, 29 insertions(+), 8 deletions(-)drivers/gpu/drm/msm/adreno/a6xx_gmu.c +3
-2@@ -521,7 +521,8 @@ static void a6xx_gmu_rpmh_init(struct a6xx_gmu *gmu)if (adreno_is_a650 (adreno_gpu) ||adreno_is_a660 (adreno_gpu)) pdc_in_aop = true; -else if (adreno_is_a618 (adreno_gpu) ||adreno_is_a640 (adreno_gpu)) +else if (adreno_is_a618 (adreno_gpu) ||adreno_is_a640 (adreno_gpu) || +adreno_is_a680 (adreno_gpu)) pdc_address_offset =0x30090 ;else pdc_address_offset =0x30080 ;@@ -1522,7 +1523,7 @@ int a6xx_gmu_init(struct a6xx_gpu *a6xx_gpu, struct device_node *node) SZ_16M - SZ_16K, 0x04000);if (ret) goto err_memory; - }else if (adreno_is_a640 (adreno_gpu)) { + }else if (adreno_is_a640 (adreno_gpu) ||adreno_is_a680 (adreno_gpu)) { ret =a6xx_gmu_memory_alloc (gmu, &gmu->icache,SZ_256K -SZ_16K ,0x04000 );if (ret)drivers/gpu/drm/msm/adreno/a6xx_gpu.c +7
-5@@ -683,7 +683,7 @@ static void a6xx_set_ubwc_config(struct msm_gpu *gpu)if (adreno_is_a618 (adreno_gpu))return ; -if (adreno_is_a640 (adreno_gpu)) +if (adreno_is_a640 (adreno_gpu) ||adreno_is_a680 (adreno_gpu)) amsbc =1 ;if (adreno_is_a650 (adreno_gpu) ||adreno_is_a660 (adreno_gpu)) {@@ -757,7 +757,7 @@ static bool a6xx_ucode_check_version(struct a6xx_gpu *a6xx_gpu,* a660 targets have all the critical security fixes from the start */ if (adreno_is_a618 (adreno_gpu) ||adreno_is_a630 (adreno_gpu) || -adreno_is_a640 (adreno_gpu)) { +adreno_is_a640 (adreno_gpu) ||adreno_is_a680 (adreno_gpu)) {/* * If the lowest nibble is 0xa that is an indication that this * microcode has been patched. The actual version is in dword @@ -897,7 +897,8 @@ static int a6xx_hw_init(struct msm_gpu *gpu)a6xx_set_hwcg (gpu, true);/* VBIF/GBIF start*/ -if (adreno_is_a640 (adreno_gpu) ||adreno_is_a650_family (adreno_gpu)) { +if (adreno_is_a640 (adreno_gpu) ||adreno_is_a650_family (adreno_gpu) || +adreno_is_a680 (adreno_gpu)) {gpu_write (gpu,REG_A6XX_GBIF_QSB_SIDE0 ,0x00071620 );gpu_write (gpu,REG_A6XX_GBIF_QSB_SIDE1 ,0x00071620 );gpu_write (gpu,REG_A6XX_GBIF_QSB_SIDE2 ,0x00071620 );@@ -935,7 +936,8 @@ static int a6xx_hw_init(struct msm_gpu *gpu)gpu_write (gpu,REG_A6XX_UCHE_FILTER_CNTL ,0x804 );gpu_write (gpu,REG_A6XX_UCHE_CACHE_WAYS ,0x4 ); -if (adreno_is_a640 (adreno_gpu) ||adreno_is_a650_family (adreno_gpu)) +if (adreno_is_a640 (adreno_gpu) ||adreno_is_a650_family (adreno_gpu) || +adreno_is_a680 (adreno_gpu))gpu_write (gpu,REG_A6XX_CP_ROQ_THRESHOLDS_2 ,0x02000140 );else gpu_write (gpu,REG_A6XX_CP_ROQ_THRESHOLDS_2 ,0x010000c0 );@@ -952,7 +954,7 @@ static int a6xx_hw_init(struct msm_gpu *gpu)*/ if (adreno_is_a650 (adreno_gpu) ||adreno_is_a660 (adreno_gpu))gpu_write (gpu,REG_A6XX_PC_DBG_ECO_CNTL ,0x00300200 ); -else if (adreno_is_a640 (adreno_gpu)) +else if (adreno_is_a640 (adreno_gpu) ||adreno_is_a680 (adreno_gpu))gpu_write (gpu,REG_A6XX_PC_DBG_ECO_CNTL ,0x00200200 );else gpu_write (gpu,REG_A6XX_PC_DBG_ECO_CNTL ,0x00180000 );drivers/gpu/drm/msm/adreno/a6xx_hfi.c +1
-1@@ -428,7 +428,7 @@ static int a6xx_hfi_send_bw_table(struct a6xx_gmu *gmu)if (adreno_is_a618 (adreno_gpu))a618_build_bw_table (&msg); -else if (adreno_is_a640 (adreno_gpu)) +else if (adreno_is_a640 (adreno_gpu) ||adreno_is_a680 (adreno_gpu))a640_build_bw_table (&msg);else if (adreno_is_a650 (adreno_gpu))a650_build_bw_table (&msg);drivers/gpu/drm/msm/adreno/adreno_device.c +13
-0@@ -300,6 +300,19 @@ static const struct adreno_info gpulist[] = { .init = a6xx_gpu_init, .zapfw = "a660_zap.mdt", .hwcg = a660_hwcg, + }, { + .rev = ADRENO_REV(6, 8, 0, ANY_ID), + .revn = 680, + .name = "A680", + .fw = { + [ADRENO_FW_SQE] = "a630_sqe.fw", + [ADRENO_FW_GMU] = "a640_gmu.bin", + }, + .gmem = SZ_2M, + .inactive_period = DRM_MSM_INACTIVE_PERIOD, + .init = a6xx_gpu_init, + .zapfw = "a640_zap.mdt", + .hwcg = a640_hwcg, }, };drivers/gpu/drm/msm/adreno/adreno_gpu.h +5
-1@@ -258,6 +258,11 @@ static inline int adreno_is_a650_family(struct adreno_gpu *gpu)return gpu->revn ==650 || gpu->revn ==620 || gpu->revn ==660 ; } +static inline int adreno_is_a680 (struct adreno_gpu *gpu) +{ +return gpu->revn ==680 ; +} +int adreno_get_param (struct msm_gpu *gpu,uint32_t param,uint64_t *value);const struct firmware *adreno_request_fw (struct adreno_gpu *adreno_gpu,const char *fwname); --2.29.2
Quoted 9 lines · Rob Clark
Quoted 2 lines · Bjorn Andersson
This patch adds a Adreno 680 entry to the gpulist.
Looks reasonable, but I wonder if we should just go ahead and add
adreno_is_a640_family()in a similar vein to adreno_is_a650_familiy()/adreno_is_a660_family().. I think most of the 'if (a640) ...' should also apply to a680?
If there is no delta, wouldn't it be better to simply add a680 to adreno_is_a640?
-Akhil.
Quoted 143 lines
BR,
-RQuoted 139 lines
Signed-off-by Bjorn Andersson <[email protected]>--- drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 5 +++-- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 12 +++++++----- drivers/gpu/drm/msm/adreno/a6xx_hfi.c | 2 +- drivers/gpu/drm/msm/adreno/adreno_device.c | 13 +++++++++++++ drivers/gpu/drm/msm/adreno/adreno_gpu.h | 5 +++++ 5 files changed, 29 insertions(+), 8 deletions(-)drivers/gpu/drm/msm/adreno/a6xx_gmu.c +3
-2@@ -521,7 +521,8 @@ static void a6xx_gmu_rpmh_init(struct a6xx_gmu *gmu)if (adreno_is_a650 (adreno_gpu) ||adreno_is_a660 (adreno_gpu)) pdc_in_aop = true; -else if (adreno_is_a618 (adreno_gpu) ||adreno_is_a640 (adreno_gpu)) +else if (adreno_is_a618 (adreno_gpu) ||adreno_is_a640 (adreno_gpu) || +adreno_is_a680 (adreno_gpu)) pdc_address_offset =0x30090 ;else pdc_address_offset =0x30080 ;@@ -1522,7 +1523,7 @@ int a6xx_gmu_init(struct a6xx_gpu *a6xx_gpu, struct device_node *node) SZ_16M - SZ_16K, 0x04000);if (ret) goto err_memory; - }else if (adreno_is_a640 (adreno_gpu)) { + }else if (adreno_is_a640 (adreno_gpu) ||adreno_is_a680 (adreno_gpu)) { ret =a6xx_gmu_memory_alloc (gmu, &gmu->icache,SZ_256K -SZ_16K ,0x04000 );if (ret)drivers/gpu/drm/msm/adreno/a6xx_gpu.c +7
-5@@ -683,7 +683,7 @@ static void a6xx_set_ubwc_config(struct msm_gpu *gpu)if (adreno_is_a618 (adreno_gpu))return ; -if (adreno_is_a640 (adreno_gpu)) +if (adreno_is_a640 (adreno_gpu) ||adreno_is_a680 (adreno_gpu)) amsbc =1 ;if (adreno_is_a650 (adreno_gpu) ||adreno_is_a660 (adreno_gpu)) {@@ -757,7 +757,7 @@ static bool a6xx_ucode_check_version(struct a6xx_gpu *a6xx_gpu,* a660 targets have all the critical security fixes from the start */ if (adreno_is_a618 (adreno_gpu) ||adreno_is_a630 (adreno_gpu) || -adreno_is_a640 (adreno_gpu)) { +adreno_is_a640 (adreno_gpu) ||adreno_is_a680 (adreno_gpu)) {/* * If the lowest nibble is 0xa that is an indication that this * microcode has been patched. The actual version is in dword @@ -897,7 +897,8 @@ static int a6xx_hw_init(struct msm_gpu *gpu)a6xx_set_hwcg (gpu, true);/* VBIF/GBIF start*/ -if (adreno_is_a640 (adreno_gpu) ||adreno_is_a650_family (adreno_gpu)) { +if (adreno_is_a640 (adreno_gpu) ||adreno_is_a650_family (adreno_gpu) || +adreno_is_a680 (adreno_gpu)) {gpu_write (gpu,REG_A6XX_GBIF_QSB_SIDE0 ,0x00071620 );gpu_write (gpu,REG_A6XX_GBIF_QSB_SIDE1 ,0x00071620 );gpu_write (gpu,REG_A6XX_GBIF_QSB_SIDE2 ,0x00071620 );@@ -935,7 +936,8 @@ static int a6xx_hw_init(struct msm_gpu *gpu)gpu_write (gpu,REG_A6XX_UCHE_FILTER_CNTL ,0x804 );gpu_write (gpu,REG_A6XX_UCHE_CACHE_WAYS ,0x4 ); -if (adreno_is_a640 (adreno_gpu) ||adreno_is_a650_family (adreno_gpu)) +if (adreno_is_a640 (adreno_gpu) ||adreno_is_a650_family (adreno_gpu) || +adreno_is_a680 (adreno_gpu))gpu_write (gpu,REG_A6XX_CP_ROQ_THRESHOLDS_2 ,0x02000140 );else gpu_write (gpu,REG_A6XX_CP_ROQ_THRESHOLDS_2 ,0x010000c0 );@@ -952,7 +954,7 @@ static int a6xx_hw_init(struct msm_gpu *gpu)*/ if (adreno_is_a650 (adreno_gpu) ||adreno_is_a660 (adreno_gpu))gpu_write (gpu,REG_A6XX_PC_DBG_ECO_CNTL ,0x00300200 ); -else if (adreno_is_a640 (adreno_gpu)) +else if (adreno_is_a640 (adreno_gpu) ||adreno_is_a680 (adreno_gpu))gpu_write (gpu,REG_A6XX_PC_DBG_ECO_CNTL ,0x00200200 );else gpu_write (gpu,REG_A6XX_PC_DBG_ECO_CNTL ,0x00180000 );drivers/gpu/drm/msm/adreno/a6xx_hfi.c +1
-1@@ -428,7 +428,7 @@ static int a6xx_hfi_send_bw_table(struct a6xx_gmu *gmu)if (adreno_is_a618 (adreno_gpu))a618_build_bw_table (&msg); -else if (adreno_is_a640 (adreno_gpu)) +else if (adreno_is_a640 (adreno_gpu) ||adreno_is_a680 (adreno_gpu))a640_build_bw_table (&msg);else if (adreno_is_a650 (adreno_gpu))a650_build_bw_table (&msg);drivers/gpu/drm/msm/adreno/adreno_device.c +13
-0@@ -300,6 +300,19 @@ static const struct adreno_info gpulist[] = { .init = a6xx_gpu_init, .zapfw = "a660_zap.mdt", .hwcg = a660_hwcg, + }, { + .rev = ADRENO_REV(6, 8, 0, ANY_ID), + .revn = 680, + .name = "A680", + .fw = { + [ADRENO_FW_SQE] = "a630_sqe.fw", + [ADRENO_FW_GMU] = "a640_gmu.bin", + }, + .gmem = SZ_2M, + .inactive_period = DRM_MSM_INACTIVE_PERIOD, + .init = a6xx_gpu_init, + .zapfw = "a640_zap.mdt", + .hwcg = a640_hwcg, }, };drivers/gpu/drm/msm/adreno/adreno_gpu.h +5
-1@@ -258,6 +258,11 @@ static inline int adreno_is_a650_family(struct adreno_gpu *gpu)return gpu->revn ==650 || gpu->revn ==620 || gpu->revn ==660 ; } +static inline int adreno_is_a680 (struct adreno_gpu *gpu) +{ +return gpu->revn ==680 ; +} +int adreno_get_param (struct msm_gpu *gpu,uint32_t param,uint64_t *value);const struct firmware *adreno_request_fw (struct adreno_gpu *adreno_gpu,const char *fwname); --2.29.2
Quoted 7 lines · Akhil P Oommen
Quoted 5 lines · Rob Clark
Quoted 2 lines · Bjorn Andersson
This patch adds a Adreno 680 entry to the gpulist.
Quoted 7 lines
Quoted 4 lines
Looks reasonable, but I wonder if we should just go ahead and add
adreno_is_a640_family()in a similar vein to adreno_is_a650_familiy()/adreno_is_a660_family().. I think most of the 'if (a640) ...' should also apply to a680?If there is no delta, wouldn't it be better to simply add a680 to
adreno_is_a640?
Until we move to features flags (and if needed, other config table params.. I know UMD needs more than just booleans but that may not be the case on kernel side), I'd kinda prefer "_family()" to make it clear that it applies to more than just a single gpu but a sub-generation of a6xx.. I'd kinda assume the differences in memory configuration (iirc dual vs quad ddr interfaces) have some small differences between a640 and a680 that matters somewhere on the kernel side?
BR,
-R
Quoted 150 lines
-Akhil.
Quoted 132 lines
BR,
-RQuoted 128 lines
Signed-off-by Bjorn Andersson <[email protected]>--- drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 5 +++-- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 12 +++++++----- drivers/gpu/drm/msm/adreno/a6xx_hfi.c | 2 +- drivers/gpu/drm/msm/adreno/adreno_device.c | 13 +++++++++++++ drivers/gpu/drm/msm/adreno/adreno_gpu.h | 5 +++++ 5 files changed, 29 insertions(+), 8 deletions(-)drivers/gpu/drm/msm/adreno/a6xx_gmu.c +3
-2@@ -521,7 +521,8 @@ static void a6xx_gmu_rpmh_init(struct a6xx_gmu *gmu)if (adreno_is_a650 (adreno_gpu) ||adreno_is_a660 (adreno_gpu)) pdc_in_aop = true; -else if (adreno_is_a618 (adreno_gpu) ||adreno_is_a640 (adreno_gpu)) +else if (adreno_is_a618 (adreno_gpu) ||adreno_is_a640 (adreno_gpu) || +adreno_is_a680 (adreno_gpu)) pdc_address_offset =0x30090 ;else pdc_address_offset =0x30080 ;@@ -1522,7 +1523,7 @@ int a6xx_gmu_init(struct a6xx_gpu *a6xx_gpu, struct device_node *node) SZ_16M - SZ_16K, 0x04000);if (ret) goto err_memory; - }else if (adreno_is_a640 (adreno_gpu)) { + }else if (adreno_is_a640 (adreno_gpu) ||adreno_is_a680 (adreno_gpu)) { ret =a6xx_gmu_memory_alloc (gmu, &gmu->icache,SZ_256K -SZ_16K ,0x04000 );if (ret)drivers/gpu/drm/msm/adreno/a6xx_gpu.c +7
-5@@ -683,7 +683,7 @@ static void a6xx_set_ubwc_config(struct msm_gpu *gpu)if (adreno_is_a618 (adreno_gpu))return ; -if (adreno_is_a640 (adreno_gpu)) +if (adreno_is_a640 (adreno_gpu) ||adreno_is_a680 (adreno_gpu)) amsbc =1 ;if (adreno_is_a650 (adreno_gpu) ||adreno_is_a660 (adreno_gpu)) {@@ -757,7 +757,7 @@ static bool a6xx_ucode_check_version(struct a6xx_gpu *a6xx_gpu,* a660 targets have all the critical security fixes from the start */ if (adreno_is_a618 (adreno_gpu) ||adreno_is_a630 (adreno_gpu) || -adreno_is_a640 (adreno_gpu)) { +adreno_is_a640 (adreno_gpu) ||adreno_is_a680 (adreno_gpu)) {/* * If the lowest nibble is 0xa that is an indication that this * microcode has been patched. The actual version is in dword @@ -897,7 +897,8 @@ static int a6xx_hw_init(struct msm_gpu *gpu)a6xx_set_hwcg (gpu, true);/* VBIF/GBIF start*/ -if (adreno_is_a640 (adreno_gpu) ||adreno_is_a650_family (adreno_gpu)) { +if (adreno_is_a640 (adreno_gpu) ||adreno_is_a650_family (adreno_gpu) || +adreno_is_a680 (adreno_gpu)) {gpu_write (gpu,REG_A6XX_GBIF_QSB_SIDE0 ,0x00071620 );gpu_write (gpu,REG_A6XX_GBIF_QSB_SIDE1 ,0x00071620 );gpu_write (gpu,REG_A6XX_GBIF_QSB_SIDE2 ,0x00071620 );@@ -935,7 +936,8 @@ static int a6xx_hw_init(struct msm_gpu *gpu)gpu_write (gpu,REG_A6XX_UCHE_FILTER_CNTL ,0x804 );gpu_write (gpu,REG_A6XX_UCHE_CACHE_WAYS ,0x4 ); -if (adreno_is_a640 (adreno_gpu) ||adreno_is_a650_family (adreno_gpu)) +if (adreno_is_a640 (adreno_gpu) ||adreno_is_a650_family (adreno_gpu) || +adreno_is_a680 (adreno_gpu))gpu_write (gpu,REG_A6XX_CP_ROQ_THRESHOLDS_2 ,0x02000140 );else gpu_write (gpu,REG_A6XX_CP_ROQ_THRESHOLDS_2 ,0x010000c0 );@@ -952,7 +954,7 @@ static int a6xx_hw_init(struct msm_gpu *gpu)*/ if (adreno_is_a650 (adreno_gpu) ||adreno_is_a660 (adreno_gpu))gpu_write (gpu,REG_A6XX_PC_DBG_ECO_CNTL ,0x00300200 ); -else if (adreno_is_a640 (adreno_gpu)) +else if (adreno_is_a640 (adreno_gpu) ||adreno_is_a680 (adreno_gpu))gpu_write (gpu,REG_A6XX_PC_DBG_ECO_CNTL ,0x00200200 );else gpu_write (gpu,REG_A6XX_PC_DBG_ECO_CNTL ,0x00180000 );drivers/gpu/drm/msm/adreno/a6xx_hfi.c +1
-1@@ -428,7 +428,7 @@ static int a6xx_hfi_send_bw_table(struct a6xx_gmu *gmu)if (adreno_is_a618 (adreno_gpu))a618_build_bw_table (&msg); -else if (adreno_is_a640 (adreno_gpu)) +else if (adreno_is_a640 (adreno_gpu) ||adreno_is_a680 (adreno_gpu))a640_build_bw_table (&msg);else if (adreno_is_a650 (adreno_gpu))a650_build_bw_table (&msg);drivers/gpu/drm/msm/adreno/adreno_device.c +13
-0@@ -300,6 +300,19 @@ static const struct adreno_info gpulist[] = { .init = a6xx_gpu_init, .zapfw = "a660_zap.mdt", .hwcg = a660_hwcg, + }, { + .rev = ADRENO_REV(6, 8, 0, ANY_ID), + .revn = 680, + .name = "A680", + .fw = { + [ADRENO_FW_SQE] = "a630_sqe.fw", + [ADRENO_FW_GMU] = "a640_gmu.bin", + }, + .gmem = SZ_2M, + .inactive_period = DRM_MSM_INACTIVE_PERIOD, + .init = a6xx_gpu_init, + .zapfw = "a640_zap.mdt", + .hwcg = a640_hwcg, }, };drivers/gpu/drm/msm/adreno/adreno_gpu.h +0
-0@@ -258,6 +258,11 @@ static inline int adreno_is_a650_family(struct adreno_gpu *gpu)return gpu->revn ==650 || gpu->revn ==620 || gpu->revn ==660 ; }Quoted 11 lines
Quoted 11 lines
drivers/gpu/drm/msm/adreno/adreno_gpu.h +5
-1+static inline int adreno_is_a680 (struct adreno_gpu *gpu) +{ +return gpu->revn ==680 ; +} +int adreno_get_param (struct msm_gpu *gpu,uint32_t param,uint64_t *value);const struct firmware *adreno_request_fw (struct adreno_gpu *adreno_gpu,const char *fwname); --2.29.2
_______________________________________________
Freedreno mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/freedreno