Loading drivers/gpu/msm/adreno.c +14 −3 Original line number Diff line number Diff line Loading @@ -966,6 +966,20 @@ static int adreno_init(struct kgsl_device *device) int i; int ret; /* * If the microcode read fails then either the usermodehelper wasn't * available or there was a corruption problem - in either case fail the * open and force the user to try again */ ret = adreno_ringbuffer_read_pm4_ucode(device); if (ret) return ret; ret = adreno_ringbuffer_read_pfp_ucode(device); if (ret) return ret; kgsl_pwrctrl_change_state(device, KGSL_STATE_INIT); /* * initialization only needs to be done once initially until Loading @@ -982,9 +996,6 @@ static int adreno_init(struct kgsl_device *device) /* Initialize coresight for the target */ adreno_coresight_init(adreno_dev); adreno_ringbuffer_read_pm4_ucode(device); adreno_ringbuffer_read_pfp_ucode(device); /* * Check if firmware supports the sync lock PM4 packets needed * for IOMMUv1 Loading drivers/gpu/msm/adreno_ringbuffer.c +12 −7 Original line number Diff line number Diff line Loading @@ -235,15 +235,16 @@ static int _load_firmware(struct kgsl_device *device, const char *fwfile, return (*data != NULL) ? 0 : -ENOMEM; } void adreno_ringbuffer_read_pm4_ucode(struct kgsl_device *device) int adreno_ringbuffer_read_pm4_ucode(struct kgsl_device *device) { struct adreno_device *adreno_dev = ADRENO_DEVICE(device); int ret; if (adreno_dev->pm4_fw == NULL) { int len; void *ptr; int ret = _load_firmware(device, ret = _load_firmware(device, adreno_dev->gpucore->pm4fw_name, &ptr, &len); if (ret) Loading @@ -254,6 +255,7 @@ void adreno_ringbuffer_read_pm4_ucode(struct kgsl_device *device) KGSL_DRV_ERR(device, "Bad pm4 microcode size: %d\n", len); kfree(ptr); ret = -ENOMEM; goto err; } Loading @@ -262,11 +264,12 @@ void adreno_ringbuffer_read_pm4_ucode(struct kgsl_device *device) adreno_dev->pm4_fw_version = adreno_dev->pm4_fw[1]; } return; return 0; err: KGSL_DRV_FATAL(device, "Failed to read pm4 microcode %s\n", KGSL_DRV_CRIT(device, "Failed to read pm4 microcode %s\n", adreno_dev->gpucore->pm4fw_name); return ret; } /** Loading @@ -292,15 +295,16 @@ static inline int adreno_ringbuffer_load_pm4_ucode(struct kgsl_device *device, return 0; } void adreno_ringbuffer_read_pfp_ucode(struct kgsl_device *device) int adreno_ringbuffer_read_pfp_ucode(struct kgsl_device *device) { struct adreno_device *adreno_dev = ADRENO_DEVICE(device); int ret; if (adreno_dev->pfp_fw == NULL) { int len; void *ptr; int ret = _load_firmware(device, ret = _load_firmware(device, adreno_dev->gpucore->pfpfw_name, &ptr, &len); if (ret) goto err; Loading @@ -310,6 +314,7 @@ void adreno_ringbuffer_read_pfp_ucode(struct kgsl_device *device) KGSL_DRV_ERR(device, "Bad PFP microcode size: %d\n", len); kfree(ptr); ret = -ENOMEM; goto err; } Loading @@ -318,7 +323,7 @@ void adreno_ringbuffer_read_pfp_ucode(struct kgsl_device *device) adreno_dev->pfp_fw_version = adreno_dev->pfp_fw[5]; } return; return 0; err: KGSL_DRV_FATAL(device, "Failed to read pfp microcode %s\n", Loading drivers/gpu/msm/adreno_ringbuffer.h +3 −3 Original line number Diff line number Diff line /* Copyright (c) 2002,2007-2014, The Linux Foundation. All rights reserved. /* Copyright (c) 2002,2007-2015, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -179,9 +179,9 @@ void kgsl_cp_intrcallback(struct kgsl_device *device); unsigned int *adreno_ringbuffer_allocspace(struct adreno_ringbuffer *rb, unsigned int numcmds); void adreno_ringbuffer_read_pfp_ucode(struct kgsl_device *device); int adreno_ringbuffer_read_pfp_ucode(struct kgsl_device *device); void adreno_ringbuffer_read_pm4_ucode(struct kgsl_device *device); int adreno_ringbuffer_read_pm4_ucode(struct kgsl_device *device); void adreno_ringbuffer_mmu_disable_clk_on_ts(struct kgsl_device *device, struct adreno_ringbuffer *rb, unsigned int ts, Loading Loading
drivers/gpu/msm/adreno.c +14 −3 Original line number Diff line number Diff line Loading @@ -966,6 +966,20 @@ static int adreno_init(struct kgsl_device *device) int i; int ret; /* * If the microcode read fails then either the usermodehelper wasn't * available or there was a corruption problem - in either case fail the * open and force the user to try again */ ret = adreno_ringbuffer_read_pm4_ucode(device); if (ret) return ret; ret = adreno_ringbuffer_read_pfp_ucode(device); if (ret) return ret; kgsl_pwrctrl_change_state(device, KGSL_STATE_INIT); /* * initialization only needs to be done once initially until Loading @@ -982,9 +996,6 @@ static int adreno_init(struct kgsl_device *device) /* Initialize coresight for the target */ adreno_coresight_init(adreno_dev); adreno_ringbuffer_read_pm4_ucode(device); adreno_ringbuffer_read_pfp_ucode(device); /* * Check if firmware supports the sync lock PM4 packets needed * for IOMMUv1 Loading
drivers/gpu/msm/adreno_ringbuffer.c +12 −7 Original line number Diff line number Diff line Loading @@ -235,15 +235,16 @@ static int _load_firmware(struct kgsl_device *device, const char *fwfile, return (*data != NULL) ? 0 : -ENOMEM; } void adreno_ringbuffer_read_pm4_ucode(struct kgsl_device *device) int adreno_ringbuffer_read_pm4_ucode(struct kgsl_device *device) { struct adreno_device *adreno_dev = ADRENO_DEVICE(device); int ret; if (adreno_dev->pm4_fw == NULL) { int len; void *ptr; int ret = _load_firmware(device, ret = _load_firmware(device, adreno_dev->gpucore->pm4fw_name, &ptr, &len); if (ret) Loading @@ -254,6 +255,7 @@ void adreno_ringbuffer_read_pm4_ucode(struct kgsl_device *device) KGSL_DRV_ERR(device, "Bad pm4 microcode size: %d\n", len); kfree(ptr); ret = -ENOMEM; goto err; } Loading @@ -262,11 +264,12 @@ void adreno_ringbuffer_read_pm4_ucode(struct kgsl_device *device) adreno_dev->pm4_fw_version = adreno_dev->pm4_fw[1]; } return; return 0; err: KGSL_DRV_FATAL(device, "Failed to read pm4 microcode %s\n", KGSL_DRV_CRIT(device, "Failed to read pm4 microcode %s\n", adreno_dev->gpucore->pm4fw_name); return ret; } /** Loading @@ -292,15 +295,16 @@ static inline int adreno_ringbuffer_load_pm4_ucode(struct kgsl_device *device, return 0; } void adreno_ringbuffer_read_pfp_ucode(struct kgsl_device *device) int adreno_ringbuffer_read_pfp_ucode(struct kgsl_device *device) { struct adreno_device *adreno_dev = ADRENO_DEVICE(device); int ret; if (adreno_dev->pfp_fw == NULL) { int len; void *ptr; int ret = _load_firmware(device, ret = _load_firmware(device, adreno_dev->gpucore->pfpfw_name, &ptr, &len); if (ret) goto err; Loading @@ -310,6 +314,7 @@ void adreno_ringbuffer_read_pfp_ucode(struct kgsl_device *device) KGSL_DRV_ERR(device, "Bad PFP microcode size: %d\n", len); kfree(ptr); ret = -ENOMEM; goto err; } Loading @@ -318,7 +323,7 @@ void adreno_ringbuffer_read_pfp_ucode(struct kgsl_device *device) adreno_dev->pfp_fw_version = adreno_dev->pfp_fw[5]; } return; return 0; err: KGSL_DRV_FATAL(device, "Failed to read pfp microcode %s\n", Loading
drivers/gpu/msm/adreno_ringbuffer.h +3 −3 Original line number Diff line number Diff line /* Copyright (c) 2002,2007-2014, The Linux Foundation. All rights reserved. /* Copyright (c) 2002,2007-2015, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -179,9 +179,9 @@ void kgsl_cp_intrcallback(struct kgsl_device *device); unsigned int *adreno_ringbuffer_allocspace(struct adreno_ringbuffer *rb, unsigned int numcmds); void adreno_ringbuffer_read_pfp_ucode(struct kgsl_device *device); int adreno_ringbuffer_read_pfp_ucode(struct kgsl_device *device); void adreno_ringbuffer_read_pm4_ucode(struct kgsl_device *device); int adreno_ringbuffer_read_pm4_ucode(struct kgsl_device *device); void adreno_ringbuffer_mmu_disable_clk_on_ts(struct kgsl_device *device, struct adreno_ringbuffer *rb, unsigned int ts, Loading