Loading drivers/gpu/msm/adreno_a6xx_gmu.c +5 −0 Original line number Diff line number Diff line Loading @@ -2948,6 +2948,8 @@ static int a6xx_boot(struct adreno_device *adreno_dev) kgsl_pwrscale_wake(device); set_bit(GMU_PRIV_GPU_STARTED, &gmu->flags); device->pwrctrl.last_stat_updated = ktime_get(); device->state = KGSL_STATE_ACTIVE; trace_kgsl_pwr_set_state(device, KGSL_STATE_ACTIVE); Loading Loading @@ -3016,6 +3018,7 @@ static int a6xx_first_boot(struct adreno_device *adreno_dev) set_bit(GMU_PRIV_FIRST_BOOT_DONE, &gmu->flags); set_bit(GMU_PRIV_GPU_STARTED, &gmu->flags); device->pwrctrl.last_stat_updated = ktime_get(); device->state = KGSL_STATE_ACTIVE; trace_kgsl_pwr_set_state(device, KGSL_STATE_ACTIVE); Loading Loading @@ -3277,6 +3280,8 @@ static void a6xx_gmu_touch_wakeup(struct adreno_device *adreno_dev) kgsl_pwrscale_wake(device); set_bit(GMU_PRIV_GPU_STARTED, &gmu->flags); device->pwrctrl.last_stat_updated = ktime_get(); device->state = KGSL_STATE_ACTIVE; trace_kgsl_pwr_set_state(device, KGSL_STATE_ACTIVE); Loading drivers/gpu/msm/adreno_a6xx_hwsched.c +5 −1 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2020, The Linux Foundation. All rights reserved. * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved. */ #include <linux/clk.h> Loading Loading @@ -500,6 +500,7 @@ static void a6xx_hwsched_touch_wakeup(struct adreno_device *adreno_dev) set_bit(GMU_PRIV_GPU_STARTED, &gmu->flags); device->pwrctrl.last_stat_updated = ktime_get(); device->state = KGSL_STATE_ACTIVE; trace_kgsl_pwr_set_state(device, KGSL_STATE_ACTIVE); Loading Loading @@ -541,6 +542,8 @@ static int a6xx_hwsched_boot(struct adreno_device *adreno_dev) kgsl_pwrscale_wake(device); set_bit(GMU_PRIV_GPU_STARTED, &gmu->flags); device->pwrctrl.last_stat_updated = ktime_get(); device->state = KGSL_STATE_ACTIVE; trace_kgsl_pwr_set_state(device, KGSL_STATE_ACTIVE); Loading Loading @@ -589,6 +592,7 @@ static int a6xx_hwsched_first_boot(struct adreno_device *adreno_dev) set_bit(GMU_PRIV_FIRST_BOOT_DONE, &gmu->flags); set_bit(GMU_PRIV_GPU_STARTED, &gmu->flags); device->pwrctrl.last_stat_updated = ktime_get(); device->state = KGSL_STATE_ACTIVE; trace_kgsl_pwr_set_state(device, KGSL_STATE_ACTIVE); Loading drivers/gpu/msm/adreno_a6xx_rgmu.c +3 −0 Original line number Diff line number Diff line Loading @@ -896,6 +896,7 @@ static int a6xx_boot(struct adreno_device *adreno_dev) set_bit(RGMU_PRIV_GPU_STARTED, &rgmu->flags); device->pwrctrl.last_stat_updated = ktime_get(); device->state = KGSL_STATE_ACTIVE; trace_kgsl_pwr_set_state(device, KGSL_STATE_ACTIVE); Loading Loading @@ -934,6 +935,7 @@ static void a6xx_rgmu_touch_wakeup(struct adreno_device *adreno_dev) set_bit(RGMU_PRIV_GPU_STARTED, &rgmu->flags); device->pwrctrl.last_stat_updated = ktime_get(); device->state = KGSL_STATE_ACTIVE; trace_kgsl_pwr_set_state(device, KGSL_STATE_ACTIVE); Loading Loading @@ -1002,6 +1004,7 @@ static int a6xx_first_boot(struct adreno_device *adreno_dev) set_bit(RGMU_PRIV_FIRST_BOOT_DONE, &rgmu->flags); set_bit(RGMU_PRIV_GPU_STARTED, &rgmu->flags); device->pwrctrl.last_stat_updated = ktime_get(); device->state = KGSL_STATE_ACTIVE; trace_kgsl_pwr_set_state(device, KGSL_STATE_ACTIVE); Loading drivers/gpu/msm/adreno_dispatch.c +6 −0 Original line number Diff line number Diff line Loading @@ -304,6 +304,9 @@ static void _retire_timestamp(struct kgsl_drawobj *drawobj) context->id, drawobj->timestamp, !!(drawobj->flags & KGSL_DRAWOBJ_END_OF_FRAME)); if (drawobj->flags & KGSL_DRAWOBJ_END_OF_FRAME) atomic64_inc(&context->proc_priv->frame_count); /* * For A3xx we still get the rptr from the CP_RB_RPTR instead of * rptr scratch out address. At this point GPU clocks turned off. Loading Loading @@ -2355,6 +2358,9 @@ static void retire_cmdobj(struct adreno_device *adreno_dev, context->id, drawobj->timestamp, !!(drawobj->flags & KGSL_DRAWOBJ_END_OF_FRAME)); if (drawobj->flags & KGSL_DRAWOBJ_END_OF_FRAME) atomic64_inc(&context->proc_priv->frame_count); /* * For A3xx we still get the rptr from the CP_RB_RPTR instead of * rptr scratch out address. At this point GPU clocks turned off. Loading drivers/gpu/msm/kgsl.c +19 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ #include <linux/ion.h> #include <linux/mman.h> #include <linux/mm_types.h> #include <linux/msm_kgsl.h> #include <linux/of.h> #include <linux/of_fdt.h> #include <linux/pm_runtime.h> Loading Loading @@ -1064,6 +1065,24 @@ static struct kgsl_process_private *kgsl_process_private_open( return private; } int kgsl_gpu_frame_count(pid_t pid, u64 *frame_count) { struct kgsl_process_private *p; if (!frame_count) return -EINVAL; p = kgsl_process_private_find(pid); if (!p) return -ENOENT; *frame_count = atomic64_read(&p->frame_count); kgsl_process_private_put(p); return 0; } EXPORT_SYMBOL(kgsl_gpu_frame_count); static int kgsl_close_device(struct kgsl_device *device) { int result = 0; Loading Loading
drivers/gpu/msm/adreno_a6xx_gmu.c +5 −0 Original line number Diff line number Diff line Loading @@ -2948,6 +2948,8 @@ static int a6xx_boot(struct adreno_device *adreno_dev) kgsl_pwrscale_wake(device); set_bit(GMU_PRIV_GPU_STARTED, &gmu->flags); device->pwrctrl.last_stat_updated = ktime_get(); device->state = KGSL_STATE_ACTIVE; trace_kgsl_pwr_set_state(device, KGSL_STATE_ACTIVE); Loading Loading @@ -3016,6 +3018,7 @@ static int a6xx_first_boot(struct adreno_device *adreno_dev) set_bit(GMU_PRIV_FIRST_BOOT_DONE, &gmu->flags); set_bit(GMU_PRIV_GPU_STARTED, &gmu->flags); device->pwrctrl.last_stat_updated = ktime_get(); device->state = KGSL_STATE_ACTIVE; trace_kgsl_pwr_set_state(device, KGSL_STATE_ACTIVE); Loading Loading @@ -3277,6 +3280,8 @@ static void a6xx_gmu_touch_wakeup(struct adreno_device *adreno_dev) kgsl_pwrscale_wake(device); set_bit(GMU_PRIV_GPU_STARTED, &gmu->flags); device->pwrctrl.last_stat_updated = ktime_get(); device->state = KGSL_STATE_ACTIVE; trace_kgsl_pwr_set_state(device, KGSL_STATE_ACTIVE); Loading
drivers/gpu/msm/adreno_a6xx_hwsched.c +5 −1 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2020, The Linux Foundation. All rights reserved. * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved. */ #include <linux/clk.h> Loading Loading @@ -500,6 +500,7 @@ static void a6xx_hwsched_touch_wakeup(struct adreno_device *adreno_dev) set_bit(GMU_PRIV_GPU_STARTED, &gmu->flags); device->pwrctrl.last_stat_updated = ktime_get(); device->state = KGSL_STATE_ACTIVE; trace_kgsl_pwr_set_state(device, KGSL_STATE_ACTIVE); Loading Loading @@ -541,6 +542,8 @@ static int a6xx_hwsched_boot(struct adreno_device *adreno_dev) kgsl_pwrscale_wake(device); set_bit(GMU_PRIV_GPU_STARTED, &gmu->flags); device->pwrctrl.last_stat_updated = ktime_get(); device->state = KGSL_STATE_ACTIVE; trace_kgsl_pwr_set_state(device, KGSL_STATE_ACTIVE); Loading Loading @@ -589,6 +592,7 @@ static int a6xx_hwsched_first_boot(struct adreno_device *adreno_dev) set_bit(GMU_PRIV_FIRST_BOOT_DONE, &gmu->flags); set_bit(GMU_PRIV_GPU_STARTED, &gmu->flags); device->pwrctrl.last_stat_updated = ktime_get(); device->state = KGSL_STATE_ACTIVE; trace_kgsl_pwr_set_state(device, KGSL_STATE_ACTIVE); Loading
drivers/gpu/msm/adreno_a6xx_rgmu.c +3 −0 Original line number Diff line number Diff line Loading @@ -896,6 +896,7 @@ static int a6xx_boot(struct adreno_device *adreno_dev) set_bit(RGMU_PRIV_GPU_STARTED, &rgmu->flags); device->pwrctrl.last_stat_updated = ktime_get(); device->state = KGSL_STATE_ACTIVE; trace_kgsl_pwr_set_state(device, KGSL_STATE_ACTIVE); Loading Loading @@ -934,6 +935,7 @@ static void a6xx_rgmu_touch_wakeup(struct adreno_device *adreno_dev) set_bit(RGMU_PRIV_GPU_STARTED, &rgmu->flags); device->pwrctrl.last_stat_updated = ktime_get(); device->state = KGSL_STATE_ACTIVE; trace_kgsl_pwr_set_state(device, KGSL_STATE_ACTIVE); Loading Loading @@ -1002,6 +1004,7 @@ static int a6xx_first_boot(struct adreno_device *adreno_dev) set_bit(RGMU_PRIV_FIRST_BOOT_DONE, &rgmu->flags); set_bit(RGMU_PRIV_GPU_STARTED, &rgmu->flags); device->pwrctrl.last_stat_updated = ktime_get(); device->state = KGSL_STATE_ACTIVE; trace_kgsl_pwr_set_state(device, KGSL_STATE_ACTIVE); Loading
drivers/gpu/msm/adreno_dispatch.c +6 −0 Original line number Diff line number Diff line Loading @@ -304,6 +304,9 @@ static void _retire_timestamp(struct kgsl_drawobj *drawobj) context->id, drawobj->timestamp, !!(drawobj->flags & KGSL_DRAWOBJ_END_OF_FRAME)); if (drawobj->flags & KGSL_DRAWOBJ_END_OF_FRAME) atomic64_inc(&context->proc_priv->frame_count); /* * For A3xx we still get the rptr from the CP_RB_RPTR instead of * rptr scratch out address. At this point GPU clocks turned off. Loading Loading @@ -2355,6 +2358,9 @@ static void retire_cmdobj(struct adreno_device *adreno_dev, context->id, drawobj->timestamp, !!(drawobj->flags & KGSL_DRAWOBJ_END_OF_FRAME)); if (drawobj->flags & KGSL_DRAWOBJ_END_OF_FRAME) atomic64_inc(&context->proc_priv->frame_count); /* * For A3xx we still get the rptr from the CP_RB_RPTR instead of * rptr scratch out address. At this point GPU clocks turned off. Loading
drivers/gpu/msm/kgsl.c +19 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ #include <linux/ion.h> #include <linux/mman.h> #include <linux/mm_types.h> #include <linux/msm_kgsl.h> #include <linux/of.h> #include <linux/of_fdt.h> #include <linux/pm_runtime.h> Loading Loading @@ -1064,6 +1065,24 @@ static struct kgsl_process_private *kgsl_process_private_open( return private; } int kgsl_gpu_frame_count(pid_t pid, u64 *frame_count) { struct kgsl_process_private *p; if (!frame_count) return -EINVAL; p = kgsl_process_private_find(pid); if (!p) return -ENOENT; *frame_count = atomic64_read(&p->frame_count); kgsl_process_private_put(p); return 0; } EXPORT_SYMBOL(kgsl_gpu_frame_count); static int kgsl_close_device(struct kgsl_device *device) { int result = 0; Loading