Loading drivers/gpu/msm/adreno_a6xx_gmu.c +8 −0 Original line number Diff line number Diff line Loading @@ -1748,6 +1748,13 @@ static int a6xx_gmu_wait_for_active_transition( return -ETIMEDOUT; } static bool a6xx_gmu_scales_bandwidth(struct kgsl_device *device) { struct adreno_device *adreno_dev = ADRENO_DEVICE(device); return (ADRENO_GPUREV(adreno_dev) >= ADRENO_REV_A640); } struct gmu_dev_ops adreno_a6xx_gmudev = { .load_firmware = a6xx_gmu_load_firmware, .oob_set = a6xx_gmu_oob_set, Loading @@ -1767,4 +1774,5 @@ struct gmu_dev_ops adreno_a6xx_gmudev = { .wait_for_active_transition = a6xx_gmu_wait_for_active_transition, .gmu2host_intr_mask = HFI_IRQ_MASK, .gmu_ao_intr_mask = GMU_AO_INT_MASK, .scales_bandwidth = a6xx_gmu_scales_bandwidth, }; drivers/gpu/msm/kgsl_gmu_core.c +5 −6 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved. */ #include <linux/of.h> Loading Loading @@ -98,13 +98,12 @@ bool gmu_core_gpmu_isenabled(struct kgsl_device *device) bool gmu_core_scales_bandwidth(struct kgsl_device *device) { struct adreno_device *adreno_dev = ADRENO_DEVICE(device); struct gmu_dev_ops *ops = GMU_DEVICE_OPS(device); if (device->gmu_core.type == GMU_CORE_TYPE_PCC) return false; if (ops && ops->scales_bandwidth) return ops->scales_bandwidth(device); return gmu_core_gpmu_isenabled(device) && (ADRENO_GPUREV(adreno_dev) >= ADRENO_REV_A640); return false; } int gmu_core_init(struct kgsl_device *device) Loading drivers/gpu/msm/kgsl_gmu_core.h +2 −1 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved. */ #ifndef __KGSL_GMU_CORE_H #define __KGSL_GMU_CORE_H Loading Loading @@ -144,6 +144,7 @@ struct gmu_dev_ops { void (*cooperative_reset)(struct kgsl_device *device); void (*halt_execution)(struct kgsl_device *device); int (*wait_for_active_transition)(struct kgsl_device *device); bool (*scales_bandwidth)(struct kgsl_device *device); const unsigned int gmu2host_intr_mask; const unsigned int gmu_ao_intr_mask; }; Loading Loading
drivers/gpu/msm/adreno_a6xx_gmu.c +8 −0 Original line number Diff line number Diff line Loading @@ -1748,6 +1748,13 @@ static int a6xx_gmu_wait_for_active_transition( return -ETIMEDOUT; } static bool a6xx_gmu_scales_bandwidth(struct kgsl_device *device) { struct adreno_device *adreno_dev = ADRENO_DEVICE(device); return (ADRENO_GPUREV(adreno_dev) >= ADRENO_REV_A640); } struct gmu_dev_ops adreno_a6xx_gmudev = { .load_firmware = a6xx_gmu_load_firmware, .oob_set = a6xx_gmu_oob_set, Loading @@ -1767,4 +1774,5 @@ struct gmu_dev_ops adreno_a6xx_gmudev = { .wait_for_active_transition = a6xx_gmu_wait_for_active_transition, .gmu2host_intr_mask = HFI_IRQ_MASK, .gmu_ao_intr_mask = GMU_AO_INT_MASK, .scales_bandwidth = a6xx_gmu_scales_bandwidth, };
drivers/gpu/msm/kgsl_gmu_core.c +5 −6 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved. */ #include <linux/of.h> Loading Loading @@ -98,13 +98,12 @@ bool gmu_core_gpmu_isenabled(struct kgsl_device *device) bool gmu_core_scales_bandwidth(struct kgsl_device *device) { struct adreno_device *adreno_dev = ADRENO_DEVICE(device); struct gmu_dev_ops *ops = GMU_DEVICE_OPS(device); if (device->gmu_core.type == GMU_CORE_TYPE_PCC) return false; if (ops && ops->scales_bandwidth) return ops->scales_bandwidth(device); return gmu_core_gpmu_isenabled(device) && (ADRENO_GPUREV(adreno_dev) >= ADRENO_REV_A640); return false; } int gmu_core_init(struct kgsl_device *device) Loading
drivers/gpu/msm/kgsl_gmu_core.h +2 −1 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved. */ #ifndef __KGSL_GMU_CORE_H #define __KGSL_GMU_CORE_H Loading Loading @@ -144,6 +144,7 @@ struct gmu_dev_ops { void (*cooperative_reset)(struct kgsl_device *device); void (*halt_execution)(struct kgsl_device *device); int (*wait_for_active_transition)(struct kgsl_device *device); bool (*scales_bandwidth)(struct kgsl_device *device); const unsigned int gmu2host_intr_mask; const unsigned int gmu_ao_intr_mask; }; Loading