Loading drivers/gpu/msm/adreno.h +3 −0 Original line number Diff line number Diff line Loading @@ -174,6 +174,9 @@ /* Number of times to try hard reset */ #define NUM_TIMES_RESET_RETRY 5 /* Number of times to try loading of zap shader */ #define ZAP_RETRY_MAX 5 /* Number of times to poll the AHB fence in ISR */ #define FENCE_RETRY_MAX 100 Loading drivers/gpu/msm/adreno_a5xx.c +18 −8 Original line number Diff line number Diff line Loading @@ -2211,6 +2211,7 @@ static int a5xx_microcode_load(struct adreno_device *adreno_dev) struct adreno_firmware *pm4_fw = ADRENO_FW(adreno_dev, ADRENO_FW_PM4); struct adreno_firmware *pfp_fw = ADRENO_FW(adreno_dev, ADRENO_FW_PFP); uint64_t gpuaddr; int ret = 0, zap_retry = 0; gpuaddr = pm4_fw->memdesc.gpuaddr; kgsl_regwrite(device, A5XX_CP_PM4_INSTR_BASE_LO, Loading @@ -2231,7 +2232,6 @@ static int a5xx_microcode_load(struct adreno_device *adreno_dev) */ if (adreno_dev->zap_loaded && !(ADRENO_FEATURE(adreno_dev, ADRENO_CPZ_RETENTION))) { int ret; struct scm_desc desc = {0}; desc.args[0] = 0; Loading @@ -2248,15 +2248,25 @@ static int a5xx_microcode_load(struct adreno_device *adreno_dev) /* Load the zap shader firmware through PIL if its available */ if (adreno_dev->gpucore->zap_name && !adreno_dev->zap_loaded) { /* * subsystem_get() may return -EAGAIN in case system is busy * and unable to load the firmware. So keep trying since this * is not a fatal error. */ do { ret = 0; ptr = subsystem_get(adreno_dev->gpucore->zap_name); /* Return error if the zap shader cannot be loaded */ if (IS_ERR_OR_NULL(ptr)) return (ptr == NULL) ? -ENODEV : PTR_ERR(ptr); if (IS_ERR_OR_NULL(ptr)) { ret = (ptr == NULL) ? -ENODEV : PTR_ERR(ptr); ptr = NULL; } else adreno_dev->zap_loaded = 1; } while ((ret == -EAGAIN) && (zap_retry++ < ZAP_RETRY_MAX)); } return 0; return ret; } static int _me_init_ucode_workarounds(struct adreno_device *adreno_dev) Loading drivers/gpu/msm/adreno_a6xx.c +17 −9 Original line number Diff line number Diff line Loading @@ -845,7 +845,7 @@ static int a6xx_microcode_load(struct adreno_device *adreno_dev) struct adreno_firmware *fw = ADRENO_FW(adreno_dev, ADRENO_FW_SQE); uint64_t gpuaddr; void *zap; int ret = 0; int ret = 0, zap_retry = 0; gpuaddr = fw->memdesc.gpuaddr; kgsl_regwrite(device, A6XX_CP_SQE_INSTR_BASE_LO, Loading @@ -855,6 +855,13 @@ static int a6xx_microcode_load(struct adreno_device *adreno_dev) /* Load the zap shader firmware through PIL if its available */ if (adreno_dev->gpucore->zap_name && !adreno_dev->zap_loaded) { /* * subsystem_get() may return -EAGAIN in case system is busy * and unable to load the firmware. So keep trying since this * is not a fatal error. */ do { ret = 0; zap = subsystem_get(adreno_dev->gpucore->zap_name); /* Return error if the zap shader cannot be loaded */ Loading @@ -863,6 +870,7 @@ static int a6xx_microcode_load(struct adreno_device *adreno_dev) zap = NULL; } else adreno_dev->zap_loaded = 1; } while ((ret == -EAGAIN) && (zap_retry++ < ZAP_RETRY_MAX)); } return ret; Loading Loading
drivers/gpu/msm/adreno.h +3 −0 Original line number Diff line number Diff line Loading @@ -174,6 +174,9 @@ /* Number of times to try hard reset */ #define NUM_TIMES_RESET_RETRY 5 /* Number of times to try loading of zap shader */ #define ZAP_RETRY_MAX 5 /* Number of times to poll the AHB fence in ISR */ #define FENCE_RETRY_MAX 100 Loading
drivers/gpu/msm/adreno_a5xx.c +18 −8 Original line number Diff line number Diff line Loading @@ -2211,6 +2211,7 @@ static int a5xx_microcode_load(struct adreno_device *adreno_dev) struct adreno_firmware *pm4_fw = ADRENO_FW(adreno_dev, ADRENO_FW_PM4); struct adreno_firmware *pfp_fw = ADRENO_FW(adreno_dev, ADRENO_FW_PFP); uint64_t gpuaddr; int ret = 0, zap_retry = 0; gpuaddr = pm4_fw->memdesc.gpuaddr; kgsl_regwrite(device, A5XX_CP_PM4_INSTR_BASE_LO, Loading @@ -2231,7 +2232,6 @@ static int a5xx_microcode_load(struct adreno_device *adreno_dev) */ if (adreno_dev->zap_loaded && !(ADRENO_FEATURE(adreno_dev, ADRENO_CPZ_RETENTION))) { int ret; struct scm_desc desc = {0}; desc.args[0] = 0; Loading @@ -2248,15 +2248,25 @@ static int a5xx_microcode_load(struct adreno_device *adreno_dev) /* Load the zap shader firmware through PIL if its available */ if (adreno_dev->gpucore->zap_name && !adreno_dev->zap_loaded) { /* * subsystem_get() may return -EAGAIN in case system is busy * and unable to load the firmware. So keep trying since this * is not a fatal error. */ do { ret = 0; ptr = subsystem_get(adreno_dev->gpucore->zap_name); /* Return error if the zap shader cannot be loaded */ if (IS_ERR_OR_NULL(ptr)) return (ptr == NULL) ? -ENODEV : PTR_ERR(ptr); if (IS_ERR_OR_NULL(ptr)) { ret = (ptr == NULL) ? -ENODEV : PTR_ERR(ptr); ptr = NULL; } else adreno_dev->zap_loaded = 1; } while ((ret == -EAGAIN) && (zap_retry++ < ZAP_RETRY_MAX)); } return 0; return ret; } static int _me_init_ucode_workarounds(struct adreno_device *adreno_dev) Loading
drivers/gpu/msm/adreno_a6xx.c +17 −9 Original line number Diff line number Diff line Loading @@ -845,7 +845,7 @@ static int a6xx_microcode_load(struct adreno_device *adreno_dev) struct adreno_firmware *fw = ADRENO_FW(adreno_dev, ADRENO_FW_SQE); uint64_t gpuaddr; void *zap; int ret = 0; int ret = 0, zap_retry = 0; gpuaddr = fw->memdesc.gpuaddr; kgsl_regwrite(device, A6XX_CP_SQE_INSTR_BASE_LO, Loading @@ -855,6 +855,13 @@ static int a6xx_microcode_load(struct adreno_device *adreno_dev) /* Load the zap shader firmware through PIL if its available */ if (adreno_dev->gpucore->zap_name && !adreno_dev->zap_loaded) { /* * subsystem_get() may return -EAGAIN in case system is busy * and unable to load the firmware. So keep trying since this * is not a fatal error. */ do { ret = 0; zap = subsystem_get(adreno_dev->gpucore->zap_name); /* Return error if the zap shader cannot be loaded */ Loading @@ -863,6 +870,7 @@ static int a6xx_microcode_load(struct adreno_device *adreno_dev) zap = NULL; } else adreno_dev->zap_loaded = 1; } while ((ret == -EAGAIN) && (zap_retry++ < ZAP_RETRY_MAX)); } return ret; Loading