Loading drivers/gpu/msm/adreno.c +10 −16 Original line number Diff line number Diff line Loading @@ -1385,21 +1385,19 @@ static int adreno_probe(struct platform_device *pdev) /* Get the system cache slice descriptor for GPU */ adreno_dev->gpu_llc_slice = adreno_llc_getd(&pdev->dev, "gpu"); if (IS_ERR(adreno_dev->gpu_llc_slice)) { if (IS_ERR(adreno_dev->gpu_llc_slice) && PTR_ERR(adreno_dev->gpu_llc_slice) != -ENOENT) KGSL_DRV_WARN(device, "Failed to get GPU LLC slice descriptor %ld\n", PTR_ERR(adreno_dev->gpu_llc_slice)); adreno_dev->gpu_llc_slice = NULL; } /* Get the system cache slice descriptor for GPU pagetables */ adreno_dev->gpuhtw_llc_slice = adreno_llc_getd(&pdev->dev, "gpuhtw"); if (IS_ERR(adreno_dev->gpuhtw_llc_slice)) { if (IS_ERR(adreno_dev->gpuhtw_llc_slice) && PTR_ERR(adreno_dev->gpuhtw_llc_slice) != -ENOENT) KGSL_DRV_WARN(device, "Failed to get gpuhtw LLC slice descriptor %ld\n", PTR_ERR(adreno_dev->gpuhtw_llc_slice)); adreno_dev->gpuhtw_llc_slice = NULL; } #ifdef CONFIG_INPUT if (!device->pwrctrl.input_disable) { Loading Loading @@ -1476,9 +1474,7 @@ static int adreno_remove(struct platform_device *pdev) adreno_profile_close(adreno_dev); /* Release the system cache slice descriptor */ if (adreno_dev->gpu_llc_slice) adreno_llc_putd(adreno_dev->gpu_llc_slice); if (adreno_dev->gpuhtw_llc_slice) adreno_llc_putd(adreno_dev->gpuhtw_llc_slice); kgsl_pwrscale_close(device); Loading Loading @@ -2163,9 +2159,7 @@ static int adreno_stop(struct kgsl_device *device) adreno_ocmem_free(adreno_dev); if (adreno_dev->gpu_llc_slice) adreno_llc_deactivate_slice(adreno_dev->gpu_llc_slice); if (adreno_dev->gpuhtw_llc_slice) adreno_llc_deactivate_slice(adreno_dev->gpuhtw_llc_slice); /* Save active coresight registers if applicable */ Loading drivers/gpu/msm/adreno_llc.h +15 −8 Original line number Diff line number Diff line /* Copyright (c) 2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2017-2018, 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 @@ -29,18 +29,21 @@ static inline void *adreno_llc_getd(struct device *dev, const char *name) static inline void adreno_llc_putd(void *desc) { if (!IS_ERR(desc)) llcc_slice_putd(desc); } static inline int adreno_llc_deactivate_slice(void *desc) { if (IS_ERR(desc)) return PTR_ERR(desc); else return llcc_slice_deactivate(desc); } static inline int adreno_llc_get_scid(void *desc) { return llcc_get_slice_id(desc); } static inline void adreno_llc_setup(struct kgsl_device *device) Loading @@ -48,18 +51,22 @@ static inline void adreno_llc_setup(struct kgsl_device *device) struct adreno_device *adreno_dev = ADRENO_DEVICE(device); struct adreno_gpudev *gpudev = ADRENO_GPU_DEVICE(adreno_dev); if (adreno_dev->gpu_llc_slice && adreno_dev->gpu_llc_slice_enable) if (!IS_ERR(adreno_dev->gpu_llc_slice) && adreno_dev->gpu_llc_slice_enable) if (!llcc_slice_activate(adreno_dev->gpu_llc_slice)) { if (gpudev->llc_configure_gpu_scid) gpudev->llc_configure_gpu_scid(adreno_dev); } if (adreno_dev->gpuhtw_llc_slice && adreno_dev->gpuhtw_llc_slice_enable) if (!IS_ERR(adreno_dev->gpuhtw_llc_slice) && adreno_dev->gpuhtw_llc_slice_enable) if (!llcc_slice_activate(adreno_dev->gpuhtw_llc_slice)) { if (gpudev->llc_configure_gpuhtw_scid) gpudev->llc_configure_gpuhtw_scid(adreno_dev); } if (adreno_dev->gpu_llc_slice_enable || adreno_dev->gpuhtw_llc_slice_enable) if (gpudev->llc_enable_overrides) gpudev->llc_enable_overrides(adreno_dev); } Loading drivers/gpu/msm/kgsl_iommu.c +1 −1 Original line number Diff line number Diff line Loading @@ -1178,7 +1178,7 @@ void _enable_gpuhtw_llc(struct kgsl_mmu *mmu, struct kgsl_iommu_pt *iommu_pt) int ret; /* GPU pagetable walk LLC slice not enabled */ if (!adreno_dev->gpuhtw_llc_slice) if (IS_ERR(adreno_dev->gpuhtw_llc_slice)) return; /* Domain attribute to enable system cache for GPU pagetable walks */ Loading Loading
drivers/gpu/msm/adreno.c +10 −16 Original line number Diff line number Diff line Loading @@ -1385,21 +1385,19 @@ static int adreno_probe(struct platform_device *pdev) /* Get the system cache slice descriptor for GPU */ adreno_dev->gpu_llc_slice = adreno_llc_getd(&pdev->dev, "gpu"); if (IS_ERR(adreno_dev->gpu_llc_slice)) { if (IS_ERR(adreno_dev->gpu_llc_slice) && PTR_ERR(adreno_dev->gpu_llc_slice) != -ENOENT) KGSL_DRV_WARN(device, "Failed to get GPU LLC slice descriptor %ld\n", PTR_ERR(adreno_dev->gpu_llc_slice)); adreno_dev->gpu_llc_slice = NULL; } /* Get the system cache slice descriptor for GPU pagetables */ adreno_dev->gpuhtw_llc_slice = adreno_llc_getd(&pdev->dev, "gpuhtw"); if (IS_ERR(adreno_dev->gpuhtw_llc_slice)) { if (IS_ERR(adreno_dev->gpuhtw_llc_slice) && PTR_ERR(adreno_dev->gpuhtw_llc_slice) != -ENOENT) KGSL_DRV_WARN(device, "Failed to get gpuhtw LLC slice descriptor %ld\n", PTR_ERR(adreno_dev->gpuhtw_llc_slice)); adreno_dev->gpuhtw_llc_slice = NULL; } #ifdef CONFIG_INPUT if (!device->pwrctrl.input_disable) { Loading Loading @@ -1476,9 +1474,7 @@ static int adreno_remove(struct platform_device *pdev) adreno_profile_close(adreno_dev); /* Release the system cache slice descriptor */ if (adreno_dev->gpu_llc_slice) adreno_llc_putd(adreno_dev->gpu_llc_slice); if (adreno_dev->gpuhtw_llc_slice) adreno_llc_putd(adreno_dev->gpuhtw_llc_slice); kgsl_pwrscale_close(device); Loading Loading @@ -2163,9 +2159,7 @@ static int adreno_stop(struct kgsl_device *device) adreno_ocmem_free(adreno_dev); if (adreno_dev->gpu_llc_slice) adreno_llc_deactivate_slice(adreno_dev->gpu_llc_slice); if (adreno_dev->gpuhtw_llc_slice) adreno_llc_deactivate_slice(adreno_dev->gpuhtw_llc_slice); /* Save active coresight registers if applicable */ Loading
drivers/gpu/msm/adreno_llc.h +15 −8 Original line number Diff line number Diff line /* Copyright (c) 2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2017-2018, 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 @@ -29,18 +29,21 @@ static inline void *adreno_llc_getd(struct device *dev, const char *name) static inline void adreno_llc_putd(void *desc) { if (!IS_ERR(desc)) llcc_slice_putd(desc); } static inline int adreno_llc_deactivate_slice(void *desc) { if (IS_ERR(desc)) return PTR_ERR(desc); else return llcc_slice_deactivate(desc); } static inline int adreno_llc_get_scid(void *desc) { return llcc_get_slice_id(desc); } static inline void adreno_llc_setup(struct kgsl_device *device) Loading @@ -48,18 +51,22 @@ static inline void adreno_llc_setup(struct kgsl_device *device) struct adreno_device *adreno_dev = ADRENO_DEVICE(device); struct adreno_gpudev *gpudev = ADRENO_GPU_DEVICE(adreno_dev); if (adreno_dev->gpu_llc_slice && adreno_dev->gpu_llc_slice_enable) if (!IS_ERR(adreno_dev->gpu_llc_slice) && adreno_dev->gpu_llc_slice_enable) if (!llcc_slice_activate(adreno_dev->gpu_llc_slice)) { if (gpudev->llc_configure_gpu_scid) gpudev->llc_configure_gpu_scid(adreno_dev); } if (adreno_dev->gpuhtw_llc_slice && adreno_dev->gpuhtw_llc_slice_enable) if (!IS_ERR(adreno_dev->gpuhtw_llc_slice) && adreno_dev->gpuhtw_llc_slice_enable) if (!llcc_slice_activate(adreno_dev->gpuhtw_llc_slice)) { if (gpudev->llc_configure_gpuhtw_scid) gpudev->llc_configure_gpuhtw_scid(adreno_dev); } if (adreno_dev->gpu_llc_slice_enable || adreno_dev->gpuhtw_llc_slice_enable) if (gpudev->llc_enable_overrides) gpudev->llc_enable_overrides(adreno_dev); } Loading
drivers/gpu/msm/kgsl_iommu.c +1 −1 Original line number Diff line number Diff line Loading @@ -1178,7 +1178,7 @@ void _enable_gpuhtw_llc(struct kgsl_mmu *mmu, struct kgsl_iommu_pt *iommu_pt) int ret; /* GPU pagetable walk LLC slice not enabled */ if (!adreno_dev->gpuhtw_llc_slice) if (IS_ERR(adreno_dev->gpuhtw_llc_slice)) return; /* Domain attribute to enable system cache for GPU pagetable walks */ Loading