Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pelt branch modifications #2

Merged
merged 29 commits into from
Feb 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
447861c
Revert "qcacld-3.0: Do not necessarily compile Host Device Driver tra…
hxsyzl Feb 10, 2025
344e758
f2fs/dir: Fix mismerge
Helium-Studio Feb 9, 2025
504cbac
f2fs/dir: Fix mismerge
Helium-Studio Feb 9, 2025
809a7d6
lz4: slight reset
RealJohnGalt Sep 13, 2022
c47d1ec
lib: Update LZ4 module to v1.9.3+
xNombre Jun 29, 2022
804fc9e
lz4: Update to version 1.9.4
xNombre Aug 28, 2022
939a9f2
zram: stop using ->queuedata
Jun 28, 2022
370a088
zram: off by one in read_block_state()
Jun 28, 2022
5a591f9
zram: fix race between zram_reset_device() and disksize_store()
Jul 1, 2022
49ddaa3
mglru: fixes
yuzhaogoogle Jul 21, 2022
099b495
thermal: Increase thermal trip points to 16
kholk Feb 27, 2019
7da8a63
mm: cma: include linux/sched/signal.h
pwnrazr Aug 18, 2022
eb2f537
adreno: hardcode for a640
arter97 Jul 7, 2019
07d0a47
adreno: leave only /sys/kernel/debug/kgsl/proc/%d/mem for debugfs
arter97 Jul 15, 2019
4309d36
gpu: msm: Remove tracing
celtare21 Feb 20, 2020
013b140
msm: ipa3: fix callback function type for ndo_start_xmit
samitolvanen Jan 19, 2018
a8e0ee3
drm/msm/dsi-staging: Fix CFI violation in DSI clock control path
kdrag0n Sep 24, 2019
f395907
platform: msm: ipa: Correctly allocate memory for copy_from_user
kholk Jun 6, 2019
575c697
platform: msm: ipav3: Correct smallest ipa3_write string to 1.
MarijnS95 Jun 8, 2019
2e20f99
icnss: Fix log spam caused by wrong paired PM operation for ICNSS
0wnerDied Dec 20, 2020
ca0a7ce
clk: qcom: clk-cpu-osm: Set min freq to 576MHz
msdx321 Mar 25, 2019
965da4b
fs: f2fs: Remove android tracing and align with upstream
xNombre Aug 24, 2022
d5dd470
f2fs: pagevec_init fixup after removed argument
xNombre Jul 3, 2022
009fdd3
Revert "cpufreq: Kill userspace CPU boosting entirely"
anht3889 Mar 6, 2023
3d00596
msm-camera: Enable initial skip for dual camera synchronization
lzye Jul 22, 2019
3807545
Revert "msm: camera: icp: Enable hang dump on failure"
Jul 4, 2021
e58044b
ANDROID: drivers base/arch_topology: avoid a stuck risk when cpufreq …
qiwuchen Dec 30, 2019
8497869
arch_topology: Report SCHED_CAPACITY_SCALE to the problematic userspace
nullxception Jun 5, 2022
ecc0a24
soc: qcom: smp2p: keeping inbound entry on freeze
Aug 23, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions drivers/base/arch_topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <linux/string.h>
#include <linux/sched/topology.h>
#include <linux/sched/energy.h>
#include <linux/sched/sysctl.h>
#include <linux/cpuset.h>

DEFINE_PER_CPU(unsigned long, freq_scale) = SCHED_CAPACITY_SCALE;
Expand Down Expand Up @@ -76,6 +77,9 @@ static ssize_t cpu_capacity_show(struct device *dev,
{
struct cpu *cpu = container_of(dev, struct cpu, dev);

if (is_sched_lib_based_app(current->pid))
return scnprintf(buf, PAGE_SIZE, "%lu\n", SCHED_CAPACITY_SCALE);

return sprintf(buf, "%lu\n", topology_get_cpu_scale(NULL, cpu->dev.id));
}

Expand Down Expand Up @@ -184,20 +188,25 @@ int detect_share_cap_flag(void)
if (cpumask_equal(cpu_cpu_mask(cpu),
policy->related_cpus)) {
share_cap_level = share_cap_die;
cpufreq_cpu_put(policy);
continue;
}

if (cpumask_equal(topology_core_cpumask(cpu),
policy->related_cpus)) {
share_cap_level = share_cap_core;
cpufreq_cpu_put(policy);
continue;
}

if (cpumask_equal(topology_sibling_cpumask(cpu),
policy->related_cpus)) {
share_cap_level = share_cap_thread;
cpufreq_cpu_put(policy);
continue;
}

cpufreq_cpu_put(policy);
}

if (share_cap != share_cap_level) {
Expand Down
8 changes: 4 additions & 4 deletions drivers/block/zram/zram_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,7 @@ static ssize_t read_block_state(struct file *file, char __user *buf,
zram_test_flag(zram, index, ZRAM_IDLE) ? 'i' : '.',
zram_test_flag(zram, index, ZRAM_DEDUPED) ? 'd' : '.');

if (count < copied) {
if (count <= copied) {
zram_slot_unlock(zram, index);
break;
}
Expand Down Expand Up @@ -1847,7 +1847,7 @@ static void __zram_make_request(struct zram *zram, struct bio *bio)
*/
static blk_qc_t zram_make_request(struct request_queue *queue, struct bio *bio)
{
struct zram *zram = queue->queuedata;
struct zram *zram = bio->bi_disk->private_data;

if (!valid_io_request(zram, bio->bi_iter.bi_sector,
bio->bi_iter.bi_size)) {
Expand Down Expand Up @@ -1952,12 +1952,13 @@ static void zram_reset_device(struct zram *zram)
set_capacity(zram->disk, 0);
part_stat_set_all(&zram->disk->part0, 0);

up_write(&zram->init_lock);
/* I/O operation under all of CPU are done so let's free */
zram_meta_free(zram, disksize);
memset(&zram->stats, 0, sizeof(zram->stats));
zcomp_destroy(comp);
reset_bdev(zram);

up_write(&zram->init_lock);
}

static ssize_t disksize_store(struct device *dev,
Expand Down Expand Up @@ -2175,7 +2176,6 @@ static int zram_add(void)
zram->disk->first_minor = device_id;
zram->disk->fops = &zram_devops;
zram->disk->queue = queue;
zram->disk->queue->queuedata = zram;
zram->disk->private_data = zram;
snprintf(zram->disk->disk_name, 16, "zram%d", device_id);

Expand Down
2 changes: 1 addition & 1 deletion drivers/char/rdbg.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ struct rdbg_device {

int registers[32] = {0};
static struct rdbg_device g_rdbg_instance = {
{ {0} },
{},
NULL,
0,
SMP2P_NUM_PROCS,
Expand Down
2 changes: 1 addition & 1 deletion drivers/clk/qcom/clk-cpu-osm.c
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ static int osm_cpufreq_cpu_init(struct cpufreq_policy *policy)
if (!osm_dt_find_freq(of_table, of_len, table[i].frequency))
table[i].frequency = CPUFREQ_ENTRY_INVALID;

if (core_count == SINGLE_CORE_COUNT)
if (core_count == SINGLE_CORE_COUNT || table[i].frequency < 576000)
table[i].frequency = CPUFREQ_ENTRY_INVALID;

/* Two of the same frequencies means end of table */
Expand Down
3 changes: 0 additions & 3 deletions drivers/cpufreq/cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -726,9 +726,6 @@ static ssize_t store_##file_name \
int ret, temp; \
struct cpufreq_policy new_policy; \
\
if (&policy->object == &policy->min) \
return count; \
\
memcpy(&new_policy, policy, sizeof(*policy)); \
new_policy.min = policy->user_policy.min; \
new_policy.max = policy->user_policy.max; \
Expand Down
3 changes: 1 addition & 2 deletions drivers/gpu/drm/msm/dsi-staging/dsi_clk.h
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,7 @@ int dsi_display_link_clk_force_update(void *handle);
*
* return: error code in case of failure or 0 for success.
*/
int dsi_display_clk_ctrl(void *handle,
enum dsi_clk_type clk_type, enum dsi_clk_state clk_state);
int dsi_display_clk_ctrl(void *handle, u32 clk_type, u32 clk_state);

/**
* dsi_clk_set_link_frequencies() - set frequencies for link clks
Expand Down
3 changes: 1 addition & 2 deletions drivers/gpu/drm/msm/dsi-staging/dsi_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -5067,8 +5067,7 @@ static int dsi_display_link_clk_force_update_ctrl(void *handle)
return rc;
}

int dsi_display_clk_ctrl(void *handle,
enum dsi_clk_type clk_type, enum dsi_clk_state clk_state)
int dsi_display_clk_ctrl(void *handle, u32 clk_type, u32 clk_state)
{
int rc = 0;

Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/msm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ msm_adreno-y += \
adreno_perfcounter.o

msm_adreno-$(CONFIG_QCOM_KGSL_IOMMU) += adreno_iommu.o
msm_adreno-$(CONFIG_DEBUG_FS) += adreno_debugfs.o adreno_profile.o
msm_adreno-$(CONFIG_COMPAT) += adreno_compat.o

msm_kgsl_core-objs = $(msm_kgsl_core-y)
Expand Down
73 changes: 25 additions & 48 deletions drivers/gpu/msm/adreno.h
Original file line number Diff line number Diff line change
Expand Up @@ -1220,13 +1220,12 @@ u32 adreno_get_ucode_version(const u32 *data);
#define ADRENO_TARGET(_name, _id) \
static inline int adreno_is_##_name(struct adreno_device *adreno_dev) \
{ \
return (ADRENO_GPUREV(adreno_dev) == (_id)); \
return 0; \
}

static inline int adreno_is_a3xx(struct adreno_device *adreno_dev)
{
return ((ADRENO_GPUREV(adreno_dev) >= 300) &&
(ADRENO_GPUREV(adreno_dev) < 400));
return 0;
}

ADRENO_TARGET(a304, ADRENO_REV_A304)
Expand All @@ -1241,28 +1240,24 @@ ADRENO_TARGET(a330, ADRENO_REV_A330)

static inline int adreno_is_a330v2(struct adreno_device *adreno_dev)
{
return ((ADRENO_GPUREV(adreno_dev) == ADRENO_REV_A330) &&
(ADRENO_CHIPID_PATCH(adreno_dev->chipid) > 0));
return 0;
}

static inline int adreno_is_a330v21(struct adreno_device *adreno_dev)
{
return ((ADRENO_GPUREV(adreno_dev) == ADRENO_REV_A330) &&
(ADRENO_CHIPID_PATCH(adreno_dev->chipid) > 0xF));
return 0;
}

static inline int adreno_is_a4xx(struct adreno_device *adreno_dev)
{
return ADRENO_GPUREV(adreno_dev) >= 400 &&
ADRENO_GPUREV(adreno_dev) < 500;
return 0;
}

ADRENO_TARGET(a405, ADRENO_REV_A405);

static inline int adreno_is_a405v2(struct adreno_device *adreno_dev)
{
return (ADRENO_GPUREV(adreno_dev) == ADRENO_REV_A405) &&
(ADRENO_CHIPID_PATCH(adreno_dev->chipid) == 0x10);
return 0;
}

ADRENO_TARGET(a418, ADRENO_REV_A418)
Expand All @@ -1271,14 +1266,12 @@ ADRENO_TARGET(a430, ADRENO_REV_A430)

static inline int adreno_is_a430v2(struct adreno_device *adreno_dev)
{
return ((ADRENO_GPUREV(adreno_dev) == ADRENO_REV_A430) &&
(ADRENO_CHIPID_PATCH(adreno_dev->chipid) == 1));
return 0;
}

static inline int adreno_is_a5xx(struct adreno_device *adreno_dev)
{
return ADRENO_GPUREV(adreno_dev) >= 500 &&
ADRENO_GPUREV(adreno_dev) < 600;
return 0;
}

ADRENO_TARGET(a504, ADRENO_REV_A504)
Expand All @@ -1292,51 +1285,48 @@ ADRENO_TARGET(a540, ADRENO_REV_A540)

static inline int adreno_is_a530v1(struct adreno_device *adreno_dev)
{
return (ADRENO_GPUREV(adreno_dev) == ADRENO_REV_A530) &&
(ADRENO_CHIPID_PATCH(adreno_dev->chipid) == 0);
return 0;
}

static inline int adreno_is_a530v2(struct adreno_device *adreno_dev)
{
return (ADRENO_GPUREV(adreno_dev) == ADRENO_REV_A530) &&
(ADRENO_CHIPID_PATCH(adreno_dev->chipid) == 1);
return 0;
}

static inline int adreno_is_a530v3(struct adreno_device *adreno_dev)
{
return (ADRENO_GPUREV(adreno_dev) == ADRENO_REV_A530) &&
(ADRENO_CHIPID_PATCH(adreno_dev->chipid) == 2);
return 0;
}

static inline int adreno_is_a504_to_a506(struct adreno_device *adreno_dev)
{
return ADRENO_GPUREV(adreno_dev) >= 504 &&
ADRENO_GPUREV(adreno_dev) <= 506;
return 0;
}

static inline int adreno_is_a540v1(struct adreno_device *adreno_dev)
{
return (ADRENO_GPUREV(adreno_dev) == ADRENO_REV_A540) &&
(ADRENO_CHIPID_PATCH(adreno_dev->chipid) == 0);
return 0;
}

static inline int adreno_is_a540v2(struct adreno_device *adreno_dev)
{
return (ADRENO_GPUREV(adreno_dev) == ADRENO_REV_A540) &&
(ADRENO_CHIPID_PATCH(adreno_dev->chipid) == 1);
return 0;
}

static inline int adreno_is_a6xx(struct adreno_device *adreno_dev)
{
return ADRENO_GPUREV(adreno_dev) >= 600 &&
ADRENO_GPUREV(adreno_dev) < 700;
return 1;
}

static inline int adreno_is_a640(struct adreno_device *adreno_dev)
{
return 1;
}

ADRENO_TARGET(a610, ADRENO_REV_A610)
ADRENO_TARGET(a612, ADRENO_REV_A612)
ADRENO_TARGET(a618, ADRENO_REV_A618)
ADRENO_TARGET(a630, ADRENO_REV_A630)
ADRENO_TARGET(a640, ADRENO_REV_A640)
ADRENO_TARGET(a680, ADRENO_REV_A680)

/*
Expand All @@ -1345,22 +1335,17 @@ ADRENO_TARGET(a680, ADRENO_REV_A680)
*/
static inline int adreno_is_a615_family(struct adreno_device *adreno_dev)
{
unsigned int rev = ADRENO_GPUREV(adreno_dev);

return (rev == ADRENO_REV_A615 || rev == ADRENO_REV_A616 ||
rev == ADRENO_REV_A618);
return 0;
}

static inline int adreno_is_a630v1(struct adreno_device *adreno_dev)
{
return (ADRENO_GPUREV(adreno_dev) == ADRENO_REV_A630) &&
(ADRENO_CHIPID_PATCH(adreno_dev->chipid) == 0);
return 0;
}

static inline int adreno_is_a630v2(struct adreno_device *adreno_dev)
{
return (ADRENO_GPUREV(adreno_dev) == ADRENO_REV_A630) &&
(ADRENO_CHIPID_PATCH(adreno_dev->chipid) == 1);
return 0;
}

static inline int adreno_is_a640v1(struct adreno_device *adreno_dev)
Expand All @@ -1377,14 +1362,12 @@ static inline int adreno_is_a640v2(struct adreno_device *adreno_dev)

static inline int adreno_is_a680v1(struct adreno_device *adreno_dev)
{
return (ADRENO_GPUREV(adreno_dev) == ADRENO_REV_A680) &&
(ADRENO_CHIPID_PATCH(adreno_dev->chipid) == 0);
return 0;
}

static inline int adreno_is_a680v2(struct adreno_device *adreno_dev)
{
return (ADRENO_GPUREV(adreno_dev) == ADRENO_REV_A680) &&
(ADRENO_CHIPID_PATCH(adreno_dev->chipid) == 1);
return 0;
}

/*
Expand Down Expand Up @@ -1691,16 +1674,10 @@ static inline void adreno_set_protected_registers(
*index = *index + 1;
}

#ifdef CONFIG_DEBUG_FS
void adreno_debugfs_init(struct adreno_device *adreno_dev);
void adreno_context_debugfs_init(struct adreno_device *adreno_dev,
struct adreno_context *ctx);
#else
static inline void adreno_debugfs_init(struct adreno_device *adreno_dev) { }
static inline void adreno_context_debugfs_init(struct adreno_device *device,
struct adreno_context *context)
{ }
#endif

/**
* adreno_compare_pm4_version() - Compare the PM4 microcode version
Expand Down
11 changes: 0 additions & 11 deletions drivers/gpu/msm/adreno_profile.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,6 @@ struct adreno_profile {
#define ADRENO_PROFILE_LOG_BUF_SIZE_DWORDS (ADRENO_PROFILE_LOG_BUF_SIZE / \
sizeof(unsigned int))

#ifdef CONFIG_DEBUG_FS
void adreno_profile_init(struct adreno_device *adreno_dev);
void adreno_profile_close(struct adreno_device *adreno_dev);
int adreno_profile_process_results(struct adreno_device *adreno_dev);
void adreno_profile_preib_processing(struct adreno_device *adreno_dev,
struct adreno_context *drawctxt, unsigned int *cmd_flags,
unsigned int **rbptr);
void adreno_profile_postib_processing(struct adreno_device *adreno_dev,
unsigned int *cmd_flags, unsigned int **rbptr);
#else
static inline void adreno_profile_init(struct adreno_device *adreno_dev) { }
static inline void adreno_profile_close(struct adreno_device *adreno_dev) { }
static inline int adreno_profile_process_results(
Expand All @@ -88,7 +78,6 @@ static inline void adreno_profile_preib_processing(
static inline void adreno_profile_postib_processing(
struct adreno_device *adreno_dev,
unsigned int *cmd_flags, unsigned int **rbptr) { }
#endif

static inline bool adreno_profile_enabled(struct adreno_profile *profile)
{
Expand Down
5 changes: 0 additions & 5 deletions drivers/gpu/msm/kgsl.c
Original file line number Diff line number Diff line change
Expand Up @@ -4949,9 +4949,6 @@ int kgsl_device_platform_probe(struct kgsl_device *device)
if (status)
return status;

/* Initialize logging first, so that failures below actually print. */
kgsl_device_debugfs_init(device);

/* Disable the sparse ioctl invocation as they are not used */
device->flags &= ~KGSL_FLAG_SPARSE;

Expand Down Expand Up @@ -5094,7 +5091,6 @@ int kgsl_device_platform_probe(struct kgsl_device *device)
error_pwrctrl_close:
kgsl_pwrctrl_close(device);
error:
kgsl_device_debugfs_close(device);
_unregister_device(device);
return status;
}
Expand Down Expand Up @@ -5123,7 +5119,6 @@ void kgsl_device_platform_remove(struct kgsl_device *device)

kgsl_pwrctrl_close(device);

kgsl_device_debugfs_close(device);
_unregister_device(device);
}
EXPORT_SYMBOL(kgsl_device_platform_remove);
Expand Down
Loading