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

Commit c6b5cdb5 authored by Linux Build Service Account's avatar Linux Build Service Account
Browse files

Merge ca4e701e on remote branch

Change-Id: I7fa895708c92587d93dbba0e935fff86a3da4683
parents 3162ed5f ca4e701e
Loading
Loading
Loading
Loading
+6 −15
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@
struct dentry *my_direc;
const char delim[] = ",";
int columns = NAME_COLUMN |
	BOUND_COLUMN | STATE_COLUMN | ERROR_CODES;
BOUND_COLUMN | ERROR_CODES;

void populate_bound_rows(
	struct synx_table_row *row,
@@ -29,14 +29,13 @@ void populate_bound_rows(
	char *end)
{
	int j;
	int state = SYNX_STATE_INVALID;


	for (j = 0; j < row->num_bound_synxs;
		j++) {
		cur += scnprintf(cur, end - cur,
			"\n\tID: %d State: %s",
			row->bound_synxs[j].external_data->synx_obj,
			state);
			"\n\tID: %d ",
			row->bound_synxs[j].external_data->synx_obj);
	}
}
static ssize_t synx_table_read(struct file *file,
@@ -51,7 +50,6 @@ static ssize_t synx_table_read(struct file *file,
	char *dbuf, *cur, *end;

	int i = 0;
	int state = SYNX_STATE_INVALID;
	ssize_t len = 0;
	s32 index;

@@ -64,17 +62,15 @@ static ssize_t synx_table_read(struct file *file,
		cur += scnprintf(cur, end - cur, "|   Name   |");
	if (columns & BOUND_COLUMN)
		cur += scnprintf(cur, end - cur, "|   Bound   |");
	if (columns & STATE_COLUMN)
		cur += scnprintf(cur, end - cur, "|  Status  |");
	cur += scnprintf(cur, end - cur, "\n");
	for (i = 0; i < SYNX_MAX_OBJS; i++) {
	for (i = 1; i < SYNX_MAX_OBJS; i++) {
		row = &dev->synx_table[i];

		index = row->index;
		mutex_lock(&dev->row_locks[index]);
		if (!row->index) {
			mutex_unlock(&dev->row_locks[index]);
			pr_warn("synx obj at %d invalid\n", index);
			pr_debug("synx obj at %d invalid\n", index);
			continue;
		}

@@ -84,11 +80,6 @@ static ssize_t synx_table_read(struct file *file,
		if (columns & BOUND_COLUMN)
			cur += scnprintf(cur, end - cur,
				"|%11d|", row->num_bound_synxs);
		if (columns & STATE_COLUMN) {
			state = synx_status(row);
			cur += scnprintf(cur, end - cur,
				"|%10d|", state);
		}
		if ((columns & BOUND_COLUMN) &&
			(row->num_bound_synxs > 0)) {
			cur += scnprintf(
+1 −0
Original line number Diff line number Diff line
@@ -252,6 +252,7 @@ int synx_deinit_object(struct synx_table_row *row)
		}
	}


	memset(row, 0, sizeof(*row));
	clear_bit(index, synx_dev->bitmap);

+50 −50
Original line number Diff line number Diff line
@@ -200,8 +200,8 @@ struct socinfo_v0_14 {
	struct socinfo_v0_13 v0_13;
	uint32_t num_clusters;
	uint32_t ncluster_array_offset;
	uint32_t num_defective_parts;
	uint32_t ndefective_parts_array_offset;
	uint32_t num_subset_parts;
	uint32_t nsubset_parts_array_offset;
};

struct socinfo_v0_15 {
@@ -633,19 +633,19 @@ static uint32_t socinfo_get_ncluster_array_offset(void)
		: 0;
}

static uint32_t socinfo_get_num_defective_parts(void)
static uint32_t socinfo_get_num_subset_parts(void)
{
	return socinfo ?
		(socinfo_format >= SOCINFO_VERSION(0, 14) ?
			socinfo->v0_14.num_defective_parts : 0)
			socinfo->v0_14.num_subset_parts : 0)
		: 0;
}

static uint32_t socinfo_get_ndefective_parts_array_offset(void)
static uint32_t socinfo_get_nsubset_parts_array_offset(void)
{
	return socinfo ?
		(socinfo_format >= SOCINFO_VERSION(0, 14) ?
			socinfo->v0_14.ndefective_parts_array_offset : 0)
			socinfo->v0_14.nsubset_parts_array_offset : 0)
		: 0;
}

@@ -872,9 +872,9 @@ msm_get_ncluster_array_offset(struct device *dev,
}

uint32_t
socinfo_get_cluster_info(enum defective_cluster_type cluster)
socinfo_get_cluster_info(enum subset_cluster_type cluster)
{
	uint32_t def_cluster, num_cluster, offset;
	uint32_t sub_cluster, num_cluster, offset;
	void *cluster_val;
	void *info = socinfo;

@@ -891,46 +891,46 @@ socinfo_get_cluster_info(enum defective_cluster_type cluster)

	info += offset;
	cluster_val = info + (sizeof(uint32_t) * cluster);
	def_cluster = get_unaligned_le32(cluster_val);
	sub_cluster = get_unaligned_le32(cluster_val);

	return def_cluster;
	return sub_cluster;
}
EXPORT_SYMBOL(socinfo_get_cluster_info);

static ssize_t
msm_get_defective_cores(struct device *dev,
msm_get_subset_cores(struct device *dev,
		struct device_attribute *attr,
		char *buf)
{
	uint32_t def_cluster = socinfo_get_cluster_info(CLUSTER_CPUSS);
	uint32_t sub_cluster = socinfo_get_cluster_info(CLUSTER_CPUSS);

	return scnprintf(buf, PAGE_SIZE, "%x\n", def_cluster);
	return scnprintf(buf, PAGE_SIZE, "%x\n", sub_cluster);
}

static ssize_t
msm_get_num_defective_parts(struct device *dev,
msm_get_num_subset_parts(struct device *dev,
			struct device_attribute *attr,
			char *buf)
{
	return snprintf(buf, PAGE_SIZE, "0x%x\n",
		socinfo_get_num_defective_parts());
		socinfo_get_num_subset_parts());
}

static ssize_t
msm_get_ndefective_parts_array_offset(struct device *dev,
msm_get_nsubset_parts_array_offset(struct device *dev,
			struct device_attribute *attr,
			char *buf)
{
	return snprintf(buf, PAGE_SIZE, "0x%x\n",
		socinfo_get_ndefective_parts_array_offset());
		socinfo_get_nsubset_parts_array_offset());
}

static uint32_t
socinfo_get_defective_parts(void)
socinfo_get_subset_parts(void)
{
	uint32_t num_parts = socinfo_get_num_defective_parts();
	uint32_t offset = socinfo_get_ndefective_parts_array_offset();
	uint32_t def_parts = 0;
	uint32_t num_parts = socinfo_get_num_subset_parts();
	uint32_t offset = socinfo_get_nsubset_parts_array_offset();
	uint32_t sub_parts = 0;
	void *info = socinfo;
	uint32_t part_entry;
	int i;
@@ -942,15 +942,15 @@ socinfo_get_defective_parts(void)
	for (i = 0; i < num_parts; i++) {
		part_entry = get_unaligned_le32(info);
		if (part_entry)
			def_parts |= BIT(i);
			sub_parts |= BIT(i);
		info += sizeof(uint32_t);
	}

	return def_parts;
	return sub_parts;
}

bool
socinfo_get_part_info(enum defective_part_type part)
socinfo_get_part_info(enum subset_part_type part)
{
	uint32_t partinfo;

@@ -959,7 +959,7 @@ socinfo_get_part_info(enum defective_part_type part)
		return false;
	}

	partinfo = socinfo_get_defective_parts();
	partinfo = socinfo_get_subset_parts();
	if (partinfo < 0) {
		pr_err("Failed to get part information\n");
		return false;
@@ -970,13 +970,13 @@ socinfo_get_part_info(enum defective_part_type part)
EXPORT_SYMBOL(socinfo_get_part_info);

static ssize_t
msm_get_defective_parts(struct device *dev,
msm_get_subset_parts(struct device *dev,
		struct device_attribute *attr,
		char *buf)
{
	uint32_t def_parts = socinfo_get_defective_parts();
	uint32_t sub_parts = socinfo_get_subset_parts();

	return scnprintf(buf, PAGE_SIZE, "%x\n", def_parts);
	return scnprintf(buf, PAGE_SIZE, "%x\n", sub_parts);
}

static ssize_t
@@ -1283,21 +1283,21 @@ static struct device_attribute msm_soc_attr_ncluster_array_offset =
	__ATTR(ncluster_array_offset, 0444,
			msm_get_ncluster_array_offset, NULL);

static struct device_attribute msm_soc_attr_defective_cores =
	__ATTR(defective_cores, 0444,
			msm_get_defective_cores, NULL);
static struct device_attribute msm_soc_attr_subset_cores =
	__ATTR(subset_cores, 0444,
			msm_get_subset_cores, NULL);

static struct device_attribute msm_soc_attr_num_defective_parts =
	__ATTR(num_defective_parts, 0444,
			msm_get_num_defective_parts, NULL);
static struct device_attribute msm_soc_attr_num_subset_parts =
	__ATTR(num_subset_parts, 0444,
			msm_get_num_subset_parts, NULL);

static struct device_attribute msm_soc_attr_ndefective_parts_array_offset =
	__ATTR(ndefective_parts_array_offset, 0444,
			msm_get_ndefective_parts_array_offset, NULL);
static struct device_attribute msm_soc_attr_nsubset_parts_array_offset =
	__ATTR(nsubset_parts_array_offset, 0444,
			msm_get_nsubset_parts_array_offset, NULL);

static struct device_attribute msm_soc_attr_defective_parts =
	__ATTR(defective_parts, 0444,
			msm_get_defective_parts, NULL);
static struct device_attribute msm_soc_attr_subset_parts =
	__ATTR(subset_parts, 0444,
			msm_get_subset_parts, NULL);

static struct device_attribute msm_soc_attr_nmodem_supported =
	__ATTR(nmodem_supported, 0444,
@@ -1498,13 +1498,13 @@ static void __init populate_soc_sysfs_files(struct device *msm_soc_device)
		device_create_file(msm_soc_device,
					&msm_soc_attr_ncluster_array_offset);
		device_create_file(msm_soc_device,
					&msm_soc_attr_defective_cores);
					&msm_soc_attr_subset_cores);
		device_create_file(msm_soc_device,
					&msm_soc_attr_num_defective_parts);
					&msm_soc_attr_num_subset_parts);
		device_create_file(msm_soc_device,
				&msm_soc_attr_ndefective_parts_array_offset);
				&msm_soc_attr_nsubset_parts_array_offset);
		device_create_file(msm_soc_device,
					&msm_soc_attr_defective_parts);
					&msm_soc_attr_subset_parts);
	case SOCINFO_VERSION(0, 13):
		 device_create_file(msm_soc_device,
					&msm_soc_attr_nproduct_id);
@@ -1741,7 +1741,7 @@ static void socinfo_print(void)
		break;

	case SOCINFO_VERSION(0, 14):
		pr_info("v%u.%u, id=%u, ver=%u.%u, raw_id=%u, raw_ver=%u, hw_plat=%u, hw_plat_ver=%u\n accessory_chip=%u, hw_plat_subtype=%u, pmic_model=%u, pmic_die_revision=%u foundry_id=%u serial_number=%u num_pmics=%u chip_family=0x%x raw_device_family=0x%x raw_device_number=0x%x nproduct_id=0x%x num_clusters=0x%x ncluster_array_offset=0x%x num_defective_parts=0x%x ndefective_parts_array_offset=0x%x\n",
		pr_info("v%u.%u, id=%u, ver=%u.%u, raw_id=%u, raw_ver=%u, hw_plat=%u, hw_plat_ver=%u\n accessory_chip=%u, hw_plat_subtype=%u, pmic_model=%u, pmic_die_revision=%u foundry_id=%u serial_number=%u num_pmics=%u chip_family=0x%x raw_device_family=0x%x raw_device_number=0x%x nproduct_id=0x%x num_clusters=0x%x ncluster_array_offset=0x%x num_subset_parts=0x%x nsubset_parts_array_offset=0x%x\n",
			f_maj, f_min, socinfo->v0_1.id, v_maj, v_min,
			socinfo->v0_2.raw_id, socinfo->v0_2.raw_version,
			socinfo->v0_3.hw_platform,
@@ -1759,12 +1759,12 @@ static void socinfo_print(void)
			socinfo->v0_13.nproduct_id,
			socinfo->v0_14.num_clusters,
			socinfo->v0_14.ncluster_array_offset,
			socinfo->v0_14.num_defective_parts,
			socinfo->v0_14.ndefective_parts_array_offset);
			socinfo->v0_14.num_subset_parts,
			socinfo->v0_14.nsubset_parts_array_offset);
		break;

	case SOCINFO_VERSION(0, 15):
		pr_info("v%u.%u, id=%u, ver=%u.%u, raw_id=%u, raw_ver=%u, hw_plat=%u, hw_plat_ver=%u\n accessory_chip=%u, hw_plat_subtype=%u, pmic_model=%u, pmic_die_revision=%u foundry_id=%u serial_number=%u num_pmics=%u chip_family=0x%x raw_device_family=0x%x raw_device_number=0x%x nproduct_id=0x%x num_clusters=0x%x ncluster_array_offset=0x%x num_defective_parts=0x%x ndefective_parts_array_offset=0x%x nmodem_supported=0x%x\n",
		pr_info("v%u.%u, id=%u, ver=%u.%u, raw_id=%u, raw_ver=%u, hw_plat=%u, hw_plat_ver=%u\n accessory_chip=%u, hw_plat_subtype=%u, pmic_model=%u, pmic_die_revision=%u foundry_id=%u serial_number=%u num_pmics=%u chip_family=0x%x raw_device_family=0x%x raw_device_number=0x%x nproduct_id=0x%x num_clusters=0x%x ncluster_array_offset=0x%x num_subset_parts=0x%x nsubset_parts_array_offset=0x%x nmodem_supported=0x%x\n",
			f_maj, f_min, socinfo->v0_1.id, v_maj, v_min,
			socinfo->v0_2.raw_id, socinfo->v0_2.raw_version,
			socinfo->v0_3.hw_platform,
@@ -1782,8 +1782,8 @@ static void socinfo_print(void)
			socinfo->v0_13.nproduct_id,
			socinfo->v0_14.num_clusters,
			socinfo->v0_14.ncluster_array_offset,
			socinfo->v0_14.num_defective_parts,
			socinfo->v0_14.ndefective_parts_array_offset,
			socinfo->v0_14.num_subset_parts,
			socinfo->v0_14.nsubset_parts_array_offset,
			socinfo->v0_15.nmodem_supported);
		break;

+4 −4
Original line number Diff line number Diff line
@@ -233,7 +233,7 @@ enum pmic_model {
	PMIC_MODEL_UNKNOWN	= 0xFFFFFFFF
};

enum defective_part_type {
enum subset_part_type {
	PART_UNKNOWN      = 0,
	PART_GPU          = 1,
	PART_VIDEO        = 2,
@@ -252,7 +252,7 @@ enum defective_part_type {
	NUM_PARTS_MAX,
};

enum defective_cluster_type {
enum subset_cluster_type {
	CLUSTER_CPUSS      = 0,
	NUM_CLUSTERS_MAX,
};
@@ -267,8 +267,8 @@ uint32_t socinfo_get_platform_type(void);
uint32_t socinfo_get_platform_subtype(void);
uint32_t socinfo_get_platform_version(void);
uint32_t socinfo_get_serial_number(void);
uint32_t socinfo_get_cluster_info(enum defective_cluster_type cluster);
bool socinfo_get_part_info(enum defective_part_type part);
uint32_t socinfo_get_cluster_info(enum subset_cluster_type cluster);
bool socinfo_get_part_info(enum subset_part_type part);
enum pmic_model socinfo_get_pmic_model(void);
uint32_t socinfo_get_pmic_die_revision(void);
int __init socinfo_init(void) __must_check;
+5 −4
Original line number Diff line number Diff line
@@ -146,7 +146,7 @@ static int sched_effective_boost(void)
static void sched_boost_disable(int type)
{
	struct sched_boost_data *sb = &sched_boosts[type];
	int next_boost;
	int next_boost, prev_boost = sched_boost_type;

	if (sb->refcount <= 0)
		return;
@@ -156,14 +156,15 @@ static void sched_boost_disable(int type)
	if (sb->refcount)
		return;

	next_boost = sched_effective_boost();
	if (next_boost == prev_boost)
		return;
	/*
	 * This boost's refcount becomes zero, so it must
	 * be disabled. Disable it first and then apply
	 * the next boost.
	 */
	sb->exit();

	next_boost = sched_effective_boost();
	sched_boosts[prev_boost].exit();
	sched_boosts[next_boost].enter();
}

Loading