Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit fb386fd6 authored by Michael Bestas's avatar Michael Bestas
Browse files

Merge tag 'LA.UM.9.12.r1-15300-SMxx50.QSSI12.0' of...

Merge tag 'LA.UM.9.12.r1-15300-SMxx50.QSSI12.0' of https://git.codelinaro.org/clo/la/kernel/msm-4.19 into android13-4.19-kona

"LA.UM.9.12.r1-15300-SMxx50.QSSI12.0"

* tag 'LA.UM.9.12.r1-15300-SMxx50.QSSI12.0' of https://git.codelinaro.org/clo/la/kernel/msm-4.19:
  Revert "Revert "msm: kgsl: Make sure that pool pages don't have any extra references""
  Revert "msm: kgsl: Make sure that pool pages don't have any extra references"
  msm: kgsl: Make sure that pool pages don't have any extra references
  msm: kgsl: Use dma_buf_get() to get dma_buf structure
  msm: kgsl: move kgsl shmem pages to unevictable list
  misc: update nordic DFU function check
  fs: crypto: Setting IV_INO_LBLK_32 flag only to F2FS
  msm: kgsl: Use dma_buf_get() to get dma_buf structure
  msm: kgsl: Make sure that pool pages don't have any extra references
  msm: adsprpc: Fix race condition in internal_control
  defconfig: msm: Enable dcc in sdm660 config
  clk: qcom: clk-debug: Cleanup the tracing code
  misc: Add Nordic driver sleep mode support
  clk: qcom: Enable ftrace for clock frequency measurement

Change-Id: Ib1cd799bec72fd258dd1035299d7e826013056d2
parents d628d952 d181e60e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -3859,8 +3859,8 @@ static int fastrpc_file_free(struct fastrpc_file *fl)
	mutex_unlock(&fl->perf_mutex);
	mutex_destroy(&fl->perf_mutex);
	mutex_destroy(&fl->map_mutex);
	mutex_destroy(&fl->pm_qos_mutex);
	mutex_destroy(&fl->internal_map_mutex);
	mutex_destroy(&fl->pm_qos_mutex);
	kfree(fl);
	return 0;
}
+7 −0
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/* Copyright (c) 2016, 2019-2021 The Linux Foundation. All rights reserved. */
/* Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved. */

#include <linux/clk.h>
#include <linux/export.h>
@@ -11,6 +12,10 @@
#include <linux/bitops.h>
#include <linux/mfd/syscon.h>
#include <linux/msm-bus.h>
#include <trace/events/power.h>

#define CREATE_TRACE_POINTS
#include "trace.h"

#include "clk-regmap.h"
#include "clk-debug.h"
@@ -273,6 +278,8 @@ static int clk_debug_measure_get(void *data, u64 *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)
+51 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only
 *
 * Copyright (c) 2022-2023, Qualcomm Innovation Center, Inc. All rights reserved.
 */

#undef TRACE_SYSTEM
#define TRACE_SYSTEM clk_qcom

#if !defined(_TRACE_CLOCK_QCOM_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_CLOCK_QCOM

#include <linux/tracepoint.h>

DECLARE_EVENT_CLASS(clk_measure_support,

	TP_PROTO(const char *name, unsigned long rate),

	TP_ARGS(name, rate),

	TP_STRUCT__entry(
		__string(name, name)
		__field(unsigned long, rate)
	),

	TP_fast_assign(
		__assign_str(name, name);
		__entry->rate = rate;
	),

	TP_printk("%s rate: %lu",
		__get_str(name), (unsigned long)__entry->rate)
);

DEFINE_EVENT(clk_measure_support, clk_measure,

	TP_PROTO(const char *name, unsigned long rate),

	TP_ARGS(name, rate)
);

#endif /* _TRACE_CLOCK_QCOM */

/* This part must be outside protection */

#undef TRACE_INCLUDE_PATH
#define TRACE_INCLUDE_PATH .

#undef TRACE_INCLUDE_FILE
#define TRACE_INCLUDE_FILE trace

#include <trace/define_trace.h>
+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>
@@ -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)
{
@@ -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(&current->mm->mmap_sem);
@@ -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(&current->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(&current->mm->mmap_sem);
				return -EBADF;
			}
		}
	}

	if (IS_ERR_OR_NULL(dmabuf)) {
Loading