Loading drivers/gpu/msm/adreno_a6xx_rgmu.c +6 −13 Original line number Diff line number Diff line Loading @@ -371,8 +371,8 @@ static int a6xx_rgmu_fw_start(struct kgsl_device *device, unsigned int boot_state) { struct rgmu_device *rgmu = KGSL_RGMU_DEVICE(device); const struct firmware *fw = rgmu->fw_image; unsigned int status; int i; switch (boot_state) { case GMU_COLD_BOOT: Loading @@ -381,9 +381,8 @@ static int a6xx_rgmu_fw_start(struct kgsl_device *device, gmu_core_regwrite(device, A6XX_GMU_GENERAL_7, 1); /* Load RGMU FW image via AHB bus */ for (i = 0; i < rgmu->fw_size; i++) gmu_core_regwrite(device, A6XX_GMU_CM3_ITCM_START + i, rgmu->fw_hostptr[i]); gmu_core_blkwrite(device, A6XX_GMU_CM3_ITCM_START, fw->data, fw->size); /* * Enable power counter because it was disabled before * slumber. Loading Loading @@ -531,7 +530,7 @@ static int a6xx_rgmu_load_firmware(struct kgsl_device *device) int ret; /* RGMU fw already saved and verified so do nothing new */ if (rgmu->fw_hostptr) if (rgmu->fw_image) return 0; ret = request_firmware(&fw, gpucore->gpmufw_name, device->dev); Loading @@ -541,14 +540,8 @@ static int a6xx_rgmu_load_firmware(struct kgsl_device *device) return ret; } rgmu->fw_hostptr = devm_kmemdup(&rgmu->pdev->dev, fw->data, fw->size, GFP_KERNEL); if (rgmu->fw_hostptr) rgmu->fw_size = (fw->size / sizeof(u32)); release_firmware(fw); return rgmu->fw_hostptr ? 0 : -ENOMEM; rgmu->fw_image = fw; return rgmu->fw_image ? 0 : -ENOMEM; } /* Halt RGMU execution */ Loading drivers/gpu/msm/kgsl_rgmu.c +15 −1 Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ #include <linux/io.h> #include <linux/of_platform.h> #include <linux/clk-provider.h> #include <linux/firmware.h> #include "kgsl_device.h" #include "kgsl_rgmu.h" Loading Loading @@ -310,6 +311,19 @@ static void rgmu_stop(struct kgsl_device *device) set_bit(GMU_FAULT, &device->gmu_core.flags); rgmu_snapshot(device); } static void rgmu_remove(struct kgsl_device *device) { struct rgmu_device *rgmu = KGSL_RGMU_DEVICE(device); if (rgmu == NULL || rgmu->pdev == NULL) return; rgmu_stop(device); if (rgmu->fw_image) { release_firmware(rgmu->fw_image); rgmu->fw_image = NULL; } } /* Do not access any RGMU registers in RGMU probe function */ static int rgmu_probe(struct kgsl_device *device, struct device_node *node) Loading Loading @@ -478,7 +492,7 @@ static bool rgmu_regulator_isenabled(struct kgsl_device *device) struct gmu_core_ops rgmu_ops = { .probe = rgmu_probe, .remove = rgmu_stop, .remove = rgmu_remove, .start = rgmu_start, .stop = rgmu_stop, .dcvs_set = rgmu_dcvs_set, Loading drivers/gpu/msm/kgsl_rgmu.h +2 −4 Original line number Diff line number Diff line Loading @@ -31,8 +31,6 @@ * @reg_len: RGMU CSR range * @rgmu_interrupt_num: RGMU interrupt number * @oob_interrupt_num: number of RGMU asserted OOB interrupt * @fw_hostptr: Buffer which holds the RGMU firmware * @fw_size: Size of RGMU firmware buffer * @cx_gdsc: CX headswitch that controls power of RGMU and subsystem peripherals * @clks: RGMU clocks including the GPU Loading @@ -43,6 +41,7 @@ * @flags: RGMU flags * @idle_level: Minimal GPU idle power level * @fault_count: RGMU fault count * @fw_image: RGMU firmware image */ struct rgmu_device { u32 ver; Loading @@ -51,8 +50,6 @@ struct rgmu_device { unsigned int reg_len; unsigned int rgmu_interrupt_num; unsigned int oob_interrupt_num; unsigned int *fw_hostptr; uint32_t fw_size; struct regulator *cx_gdsc; struct regulator *gx_gdsc; struct clk *clks[MAX_RGMU_CLKS]; Loading @@ -62,6 +59,7 @@ struct rgmu_device { unsigned int num_gpupwrlevels; unsigned int idle_level; unsigned int fault_count; const struct firmware *fw_image; }; extern struct gmu_dev_ops adreno_a6xx_rgmudev; Loading Loading
drivers/gpu/msm/adreno_a6xx_rgmu.c +6 −13 Original line number Diff line number Diff line Loading @@ -371,8 +371,8 @@ static int a6xx_rgmu_fw_start(struct kgsl_device *device, unsigned int boot_state) { struct rgmu_device *rgmu = KGSL_RGMU_DEVICE(device); const struct firmware *fw = rgmu->fw_image; unsigned int status; int i; switch (boot_state) { case GMU_COLD_BOOT: Loading @@ -381,9 +381,8 @@ static int a6xx_rgmu_fw_start(struct kgsl_device *device, gmu_core_regwrite(device, A6XX_GMU_GENERAL_7, 1); /* Load RGMU FW image via AHB bus */ for (i = 0; i < rgmu->fw_size; i++) gmu_core_regwrite(device, A6XX_GMU_CM3_ITCM_START + i, rgmu->fw_hostptr[i]); gmu_core_blkwrite(device, A6XX_GMU_CM3_ITCM_START, fw->data, fw->size); /* * Enable power counter because it was disabled before * slumber. Loading Loading @@ -531,7 +530,7 @@ static int a6xx_rgmu_load_firmware(struct kgsl_device *device) int ret; /* RGMU fw already saved and verified so do nothing new */ if (rgmu->fw_hostptr) if (rgmu->fw_image) return 0; ret = request_firmware(&fw, gpucore->gpmufw_name, device->dev); Loading @@ -541,14 +540,8 @@ static int a6xx_rgmu_load_firmware(struct kgsl_device *device) return ret; } rgmu->fw_hostptr = devm_kmemdup(&rgmu->pdev->dev, fw->data, fw->size, GFP_KERNEL); if (rgmu->fw_hostptr) rgmu->fw_size = (fw->size / sizeof(u32)); release_firmware(fw); return rgmu->fw_hostptr ? 0 : -ENOMEM; rgmu->fw_image = fw; return rgmu->fw_image ? 0 : -ENOMEM; } /* Halt RGMU execution */ Loading
drivers/gpu/msm/kgsl_rgmu.c +15 −1 Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ #include <linux/io.h> #include <linux/of_platform.h> #include <linux/clk-provider.h> #include <linux/firmware.h> #include "kgsl_device.h" #include "kgsl_rgmu.h" Loading Loading @@ -310,6 +311,19 @@ static void rgmu_stop(struct kgsl_device *device) set_bit(GMU_FAULT, &device->gmu_core.flags); rgmu_snapshot(device); } static void rgmu_remove(struct kgsl_device *device) { struct rgmu_device *rgmu = KGSL_RGMU_DEVICE(device); if (rgmu == NULL || rgmu->pdev == NULL) return; rgmu_stop(device); if (rgmu->fw_image) { release_firmware(rgmu->fw_image); rgmu->fw_image = NULL; } } /* Do not access any RGMU registers in RGMU probe function */ static int rgmu_probe(struct kgsl_device *device, struct device_node *node) Loading Loading @@ -478,7 +492,7 @@ static bool rgmu_regulator_isenabled(struct kgsl_device *device) struct gmu_core_ops rgmu_ops = { .probe = rgmu_probe, .remove = rgmu_stop, .remove = rgmu_remove, .start = rgmu_start, .stop = rgmu_stop, .dcvs_set = rgmu_dcvs_set, Loading
drivers/gpu/msm/kgsl_rgmu.h +2 −4 Original line number Diff line number Diff line Loading @@ -31,8 +31,6 @@ * @reg_len: RGMU CSR range * @rgmu_interrupt_num: RGMU interrupt number * @oob_interrupt_num: number of RGMU asserted OOB interrupt * @fw_hostptr: Buffer which holds the RGMU firmware * @fw_size: Size of RGMU firmware buffer * @cx_gdsc: CX headswitch that controls power of RGMU and subsystem peripherals * @clks: RGMU clocks including the GPU Loading @@ -43,6 +41,7 @@ * @flags: RGMU flags * @idle_level: Minimal GPU idle power level * @fault_count: RGMU fault count * @fw_image: RGMU firmware image */ struct rgmu_device { u32 ver; Loading @@ -51,8 +50,6 @@ struct rgmu_device { unsigned int reg_len; unsigned int rgmu_interrupt_num; unsigned int oob_interrupt_num; unsigned int *fw_hostptr; uint32_t fw_size; struct regulator *cx_gdsc; struct regulator *gx_gdsc; struct clk *clks[MAX_RGMU_CLKS]; Loading @@ -62,6 +59,7 @@ struct rgmu_device { unsigned int num_gpupwrlevels; unsigned int idle_level; unsigned int fault_count; const struct firmware *fw_image; }; extern struct gmu_dev_ops adreno_a6xx_rgmudev; Loading