Loading arch/arm64/configs/vendor/sdm660_defconfig +1 −1 Original line number Diff line number Diff line Loading @@ -623,7 +623,6 @@ CONFIG_MSM_PIL=y CONFIG_MSM_SYSMON_QMI_COMM=y CONFIG_MSM_PIL_SSR_GENERIC=y CONFIG_MSM_BOOT_STATS=y CONFIG_QCOM_DCC_V2=y CONFIG_QCOM_EUD=y CONFIG_QCOM_MINIDUMP=y CONFIG_MSM_CORE_HANG_DETECT=y Loading @@ -644,6 +643,7 @@ CONFIG_QCOM_SMCINVOKE=y CONFIG_MSM_EVENT_TIMER=y CONFIG_MSM_PM=y CONFIG_QTI_L2_REUSE=y CONFIG_QCOM_DCC=y CONFIG_QTI_RPM_STATS_LOG=y CONFIG_QTEE_SHM_BRIDGE=y CONFIG_MEM_SHARE_QMI_SERVICE=y Loading drivers/char/adsprpc.c +5 −0 Original line number Diff line number Diff line Loading @@ -472,6 +472,7 @@ struct fastrpc_file { struct mutex perf_mutex; struct pm_qos_request pm_qos_req; int qos_request; struct mutex pm_qos_mutex; struct mutex map_mutex; struct mutex internal_map_mutex; /* Identifies the device (MINOR_NUM_DEV / MINOR_NUM_SECURE_DEV) */ Loading Loading @@ -3859,6 +3860,7 @@ static int fastrpc_file_free(struct fastrpc_file *fl) mutex_destroy(&fl->perf_mutex); mutex_destroy(&fl->map_mutex); mutex_destroy(&fl->internal_map_mutex); mutex_destroy(&fl->pm_qos_mutex); kfree(fl); return 0; } Loading Loading @@ -4232,6 +4234,7 @@ static int fastrpc_device_open(struct inode *inode, struct file *filp) hlist_add_head(&fl->hn, &me->drivers); spin_unlock(&me->hlock); mutex_init(&fl->perf_mutex); mutex_init(&fl->pm_qos_mutex); init_completion(&fl->shutdown); return 0; } Loading Loading @@ -4359,12 +4362,14 @@ static int fastrpc_internal_control(struct fastrpc_file *fl, fl->pm_qos_req.type = PM_QOS_REQ_AFFINE_CORES; cpumask_copy(&fl->pm_qos_req.cpus_affine, &mask); mutex_lock(&fl->pm_qos_mutex); if (!fl->qos_request) { pm_qos_add_request(&fl->pm_qos_req, PM_QOS_CPU_DMA_LATENCY, latency); fl->qos_request = 1; } else pm_qos_update_request(&fl->pm_qos_req, latency); mutex_unlock(&fl->pm_qos_mutex); /* Ensure CPU feature map updated to DSP for early WakeUp */ fastrpc_send_cpuinfo_to_dsp(fl); Loading drivers/clk/qcom/clk-debug.c +2 −1 Original line number Diff line number Diff line Loading @@ -276,9 +276,10 @@ static int clk_debug_measure_get(void *data, u64 *val) enable_debug_clks(measure); *val = clk_debug_mux_measure_rate(measure); trace_clk_measure(clk_hw_get_name(hw), *val); /* recursively calculate actual freq */ *val *= get_mux_divs(measure); /* enable ftrace support */ trace_clk_measure(clk_hw_get_name(hw), *val); disable_debug_clks(measure); exit: if (meas->bus_cl_id) Loading drivers/gpu/msm/kgsl.c +33 −8 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2008-2021, The Linux Foundation. All rights reserved. * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2022-2023, Qualcomm Innovation Center, Inc. All rights reserved. */ #include <uapi/linux/sched/types.h> Loading Loading @@ -2677,6 +2677,15 @@ static int kgsl_setup_anon_useraddr(struct kgsl_pagetable *pagetable, } #ifdef CONFIG_DMA_SHARED_BUFFER static int match_file(const void *p, struct file *file, unsigned int fd) { /* * We must return fd + 1 because iterate_fd stops searching on * non-zero return, but 0 is a valid fd. */ return (p == file) ? (fd + 1) : 0; } static void _setup_cache_mode(struct kgsl_mem_entry *entry, struct vm_area_struct *vma) { Loading Loading @@ -2714,6 +2723,8 @@ static int kgsl_setup_dmabuf_useraddr(struct kgsl_device *device, vma = find_vma(current->mm, hostptr); if (vma && vma->vm_file) { int fd; ret = check_vma_flags(vma, entry->memdesc.flags); if (ret) { up_read(¤t->mm->mmap_sem); Loading @@ -2729,13 +2740,27 @@ static int kgsl_setup_dmabuf_useraddr(struct kgsl_device *device, return -EFAULT; } /* Look for the fd that matches this vma file */ fd = iterate_fd(current->files, 0, match_file, vma->vm_file); if (fd) { dmabuf = dma_buf_get(fd - 1); if (IS_ERR(dmabuf)) { up_read(¤t->mm->mmap_sem); return PTR_ERR(dmabuf); } /* * Take a refcount because dma_buf_put() decrements the * refcount * It is possible that the fd obtained from iterate_fd * was closed before passing the fd to dma_buf_get(). * Hence dmabuf returned by dma_buf_get() could be * different from vma->vm_file->private_data. Return * failure if this happens. */ get_file(vma->vm_file); dmabuf = vma->vm_file->private_data; if (dmabuf != vma->vm_file->private_data) { dma_buf_put(dmabuf); up_read(¤t->mm->mmap_sem); return -EBADF; } } } if (IS_ERR_OR_NULL(dmabuf)) { Loading drivers/gpu/msm/kgsl_pool.c +10 −0 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2016-2021, The Linux Foundation. All rights reserved. * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. */ #include <asm/cacheflush.h> Loading Loading @@ -61,6 +62,15 @@ _kgsl_get_pool_from_order(unsigned int order) static void _kgsl_pool_add_page(struct kgsl_page_pool *pool, struct page *p) { /* * Sanity check to make sure we don't re-pool a page that * somebody else has a reference to. */ if (WARN_ON_ONCE(unlikely(page_count(p) > 1))) { __free_pages(p, pool->pool_order); return; } kgsl_zero_page(p, pool->pool_order); spin_lock(&pool->list_lock); Loading Loading
arch/arm64/configs/vendor/sdm660_defconfig +1 −1 Original line number Diff line number Diff line Loading @@ -623,7 +623,6 @@ CONFIG_MSM_PIL=y CONFIG_MSM_SYSMON_QMI_COMM=y CONFIG_MSM_PIL_SSR_GENERIC=y CONFIG_MSM_BOOT_STATS=y CONFIG_QCOM_DCC_V2=y CONFIG_QCOM_EUD=y CONFIG_QCOM_MINIDUMP=y CONFIG_MSM_CORE_HANG_DETECT=y Loading @@ -644,6 +643,7 @@ CONFIG_QCOM_SMCINVOKE=y CONFIG_MSM_EVENT_TIMER=y CONFIG_MSM_PM=y CONFIG_QTI_L2_REUSE=y CONFIG_QCOM_DCC=y CONFIG_QTI_RPM_STATS_LOG=y CONFIG_QTEE_SHM_BRIDGE=y CONFIG_MEM_SHARE_QMI_SERVICE=y Loading
drivers/char/adsprpc.c +5 −0 Original line number Diff line number Diff line Loading @@ -472,6 +472,7 @@ struct fastrpc_file { struct mutex perf_mutex; struct pm_qos_request pm_qos_req; int qos_request; struct mutex pm_qos_mutex; struct mutex map_mutex; struct mutex internal_map_mutex; /* Identifies the device (MINOR_NUM_DEV / MINOR_NUM_SECURE_DEV) */ Loading Loading @@ -3859,6 +3860,7 @@ static int fastrpc_file_free(struct fastrpc_file *fl) mutex_destroy(&fl->perf_mutex); mutex_destroy(&fl->map_mutex); mutex_destroy(&fl->internal_map_mutex); mutex_destroy(&fl->pm_qos_mutex); kfree(fl); return 0; } Loading Loading @@ -4232,6 +4234,7 @@ static int fastrpc_device_open(struct inode *inode, struct file *filp) hlist_add_head(&fl->hn, &me->drivers); spin_unlock(&me->hlock); mutex_init(&fl->perf_mutex); mutex_init(&fl->pm_qos_mutex); init_completion(&fl->shutdown); return 0; } Loading Loading @@ -4359,12 +4362,14 @@ static int fastrpc_internal_control(struct fastrpc_file *fl, fl->pm_qos_req.type = PM_QOS_REQ_AFFINE_CORES; cpumask_copy(&fl->pm_qos_req.cpus_affine, &mask); mutex_lock(&fl->pm_qos_mutex); if (!fl->qos_request) { pm_qos_add_request(&fl->pm_qos_req, PM_QOS_CPU_DMA_LATENCY, latency); fl->qos_request = 1; } else pm_qos_update_request(&fl->pm_qos_req, latency); mutex_unlock(&fl->pm_qos_mutex); /* Ensure CPU feature map updated to DSP for early WakeUp */ fastrpc_send_cpuinfo_to_dsp(fl); Loading
drivers/clk/qcom/clk-debug.c +2 −1 Original line number Diff line number Diff line Loading @@ -276,9 +276,10 @@ static int clk_debug_measure_get(void *data, u64 *val) enable_debug_clks(measure); *val = clk_debug_mux_measure_rate(measure); trace_clk_measure(clk_hw_get_name(hw), *val); /* recursively calculate actual freq */ *val *= get_mux_divs(measure); /* enable ftrace support */ trace_clk_measure(clk_hw_get_name(hw), *val); disable_debug_clks(measure); exit: if (meas->bus_cl_id) Loading
drivers/gpu/msm/kgsl.c +33 −8 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2008-2021, The Linux Foundation. All rights reserved. * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2022-2023, Qualcomm Innovation Center, Inc. All rights reserved. */ #include <uapi/linux/sched/types.h> Loading Loading @@ -2677,6 +2677,15 @@ static int kgsl_setup_anon_useraddr(struct kgsl_pagetable *pagetable, } #ifdef CONFIG_DMA_SHARED_BUFFER static int match_file(const void *p, struct file *file, unsigned int fd) { /* * We must return fd + 1 because iterate_fd stops searching on * non-zero return, but 0 is a valid fd. */ return (p == file) ? (fd + 1) : 0; } static void _setup_cache_mode(struct kgsl_mem_entry *entry, struct vm_area_struct *vma) { Loading Loading @@ -2714,6 +2723,8 @@ static int kgsl_setup_dmabuf_useraddr(struct kgsl_device *device, vma = find_vma(current->mm, hostptr); if (vma && vma->vm_file) { int fd; ret = check_vma_flags(vma, entry->memdesc.flags); if (ret) { up_read(¤t->mm->mmap_sem); Loading @@ -2729,13 +2740,27 @@ static int kgsl_setup_dmabuf_useraddr(struct kgsl_device *device, return -EFAULT; } /* Look for the fd that matches this vma file */ fd = iterate_fd(current->files, 0, match_file, vma->vm_file); if (fd) { dmabuf = dma_buf_get(fd - 1); if (IS_ERR(dmabuf)) { up_read(¤t->mm->mmap_sem); return PTR_ERR(dmabuf); } /* * Take a refcount because dma_buf_put() decrements the * refcount * It is possible that the fd obtained from iterate_fd * was closed before passing the fd to dma_buf_get(). * Hence dmabuf returned by dma_buf_get() could be * different from vma->vm_file->private_data. Return * failure if this happens. */ get_file(vma->vm_file); dmabuf = vma->vm_file->private_data; if (dmabuf != vma->vm_file->private_data) { dma_buf_put(dmabuf); up_read(¤t->mm->mmap_sem); return -EBADF; } } } if (IS_ERR_OR_NULL(dmabuf)) { Loading
drivers/gpu/msm/kgsl_pool.c +10 −0 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2016-2021, The Linux Foundation. All rights reserved. * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. */ #include <asm/cacheflush.h> Loading Loading @@ -61,6 +62,15 @@ _kgsl_get_pool_from_order(unsigned int order) static void _kgsl_pool_add_page(struct kgsl_page_pool *pool, struct page *p) { /* * Sanity check to make sure we don't re-pool a page that * somebody else has a reference to. */ if (WARN_ON_ONCE(unlikely(page_count(p) > 1))) { __free_pages(p, pool->pool_order); return; } kgsl_zero_page(p, pool->pool_order); spin_lock(&pool->list_lock); Loading