Skip to content

Commit

Permalink
G985FXXUEFVDB
Browse files Browse the repository at this point in the history
Signed-off-by: corsicanu <me@corsicanu.ro>
  • Loading branch information
corsicanu committed May 20, 2022
1 parent a917a16 commit f816c5f
Show file tree
Hide file tree
Showing 293 changed files with 54,693 additions and 52,449 deletions.
1 change: 1 addition & 0 deletions arch/arm64/configs/exynos9830-c1s_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1409,6 +1409,7 @@ CONFIG_CMA_SIZE_SEL_MBYTES=y
# CONFIG_CMA_SIZE_SEL_MAX is not set
CONFIG_CMA_ALIGNMENT=8
CONFIG_GENERIC_ARCH_TOPOLOGY=y
CONFIG_CPU_CAPACITY_FIXUP=y

#
# Bus devices
Expand Down
1 change: 1 addition & 0 deletions arch/arm64/configs/exynos9830-c2s_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1409,6 +1409,7 @@ CONFIG_CMA_SIZE_SEL_MBYTES=y
# CONFIG_CMA_SIZE_SEL_MAX is not set
CONFIG_CMA_ALIGNMENT=8
CONFIG_GENERIC_ARCH_TOPOLOGY=y
CONFIG_CPU_CAPACITY_FIXUP=y

#
# Bus devices
Expand Down
1 change: 1 addition & 0 deletions arch/arm64/configs/exynos9830-x1s_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1407,6 +1407,7 @@ CONFIG_CMA_SIZE_SEL_MBYTES=y
# CONFIG_CMA_SIZE_SEL_MAX is not set
CONFIG_CMA_ALIGNMENT=8
CONFIG_GENERIC_ARCH_TOPOLOGY=y
CONFIG_CPU_CAPACITY_FIXUP=y

#
# Bus devices
Expand Down
1 change: 1 addition & 0 deletions arch/arm64/configs/exynos9830-y2s_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1407,6 +1407,7 @@ CONFIG_CMA_SIZE_SEL_MBYTES=y
# CONFIG_CMA_SIZE_SEL_MAX is not set
CONFIG_CMA_ALIGNMENT=8
CONFIG_GENERIC_ARCH_TOPOLOGY=y
CONFIG_CPU_CAPACITY_FIXUP=y

#
# Bus devices
Expand Down
1 change: 1 addition & 0 deletions arch/arm64/configs/exynos9830-z3s_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1407,6 +1407,7 @@ CONFIG_CMA_SIZE_SEL_MBYTES=y
# CONFIG_CMA_SIZE_SEL_MAX is not set
CONFIG_CMA_ALIGNMENT=8
CONFIG_GENERIC_ARCH_TOPOLOGY=y
CONFIG_CPU_CAPACITY_FIXUP=y

#
# Bus devices
Expand Down
11 changes: 6 additions & 5 deletions arch/arm64/configs/xyz-stock_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1430,6 +1430,7 @@ CONFIG_CMA_SIZE_SEL_MBYTES=y
# CONFIG_CMA_SIZE_SEL_MAX is not set
CONFIG_CMA_ALIGNMENT=8
CONFIG_GENERIC_ARCH_TOPOLOGY=y
CONFIG_CPU_CAPACITY_FIXUP=y

#
# Bus devices
Expand Down Expand Up @@ -3193,12 +3194,12 @@ CONFIG_OIS_USE=y
CONFIG_AF_HOST_CONTROL=y
CONFIG_TORCH_CURRENT_CHANGE_SUPPORT=y
CONFIG_FLASH_CURRENT_CHANGE_SUPPORT=y
CONFIG_CAMERA_HST_V01=y
# CONFIG_CAMERA_HST_V02 is not set
# CONFIG_CAMERA_HST_V01 is not set
CONFIG_CAMERA_HST_V02=y
# CONFIG_CAMERA_HST_V03 is not set
CONFIG_USE_SIGNED_BINARY=y
# CONFIG_USE_CAMERA_LDU is not set
# CONFIG_CAMERA_CIS_TOF_BUCK_USE is not set
CONFIG_CAMERA_CIS_TOF_BUCK_USE=y
# CONFIG_CAMERA_USE_MCU is not set
# CONFIG_SENSORCORE_MCU_CONTROL is not set
CONFIG_CAMERA_USE_INTERNAL_MCU=y
Expand Down Expand Up @@ -3261,8 +3262,8 @@ CONFIG_CAMERA_CIS_2LD_OBJ=y
# CONFIG_CAMERA_CIS_4HA_OBJ is not set
# CONFIG_CAMERA_CIS_IMX576_OBJ is not set
# CONFIG_CAMERA_CIS_IMX316_OBJ is not set
# CONFIG_CAMERA_CIS_IMX516_OBJ is not set
# CONFIG_CAMERA_CIS_IMX518_OBJ is not set
CONFIG_CAMERA_CIS_IMX516_OBJ=y
CONFIG_CAMERA_CIS_IMX518_OBJ=y
# CONFIG_CAMERA_CIS_5E9_OBJ is not set
# CONFIG_CAMERA_CIS_GC5035_OBJ is not set
# CONFIG_CAMERA_CIS_GM1SP_OBJ is not set
Expand Down
6 changes: 6 additions & 0 deletions drivers/base/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -276,4 +276,10 @@ config GENERIC_ARCH_TOPOLOGY
appropriate scaling, sysfs interface for changing capacity values at
runtime.

config CPU_CAPACITY_FIXUP
bool
default y
help
Enable to avoid that unity set cpuset of its client task to big core only.

endmenu
69 changes: 69 additions & 0 deletions drivers/base/arch_topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@
#include <linux/sched/topology.h>
#include <linux/cpuset.h>

#if IS_ENABLED(CONFIG_CPU_CAPACITY_FIXUP)
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/uaccess.h>
#endif

DEFINE_PER_CPU(unsigned long, freq_scale) = SCHED_CAPACITY_SCALE;
DEFINE_PER_CPU(unsigned long, max_cpu_freq);
DEFINE_PER_CPU(unsigned long, max_freq_scale) = SCHED_CAPACITY_SCALE;
Expand Down Expand Up @@ -62,12 +68,68 @@ void topology_set_cpu_scale(unsigned int cpu, unsigned long capacity)
per_cpu(cpu_scale, cpu) = capacity;
}

#if IS_ENABLED(CONFIG_CPU_CAPACITY_FIXUP)
static char cpu_cap_fixup_target[TASK_COMM_LEN];

static int proc_cpu_capacity_fixup_target_show(struct seq_file *m, void *data)
{
seq_printf(m, "%s\n", cpu_cap_fixup_target);
return 0;
}

static int proc_cpu_capacity_fixup_target_open(struct inode *inode,
struct file *file)
{
return single_open(file, proc_cpu_capacity_fixup_target_show, NULL);
}

static ssize_t proc_cpu_capacity_fixup_target_write(struct file *file,
const char __user *buf, size_t count, loff_t *offs)
{
char temp[TASK_COMM_LEN];
const size_t maxlen = sizeof(temp) - 1;

memset(temp, 0, sizeof(temp));
if (copy_from_user(temp, buf, count > maxlen ? maxlen : count))
return -EFAULT;

if (temp[strlen(temp) - 1] == '\n')
temp[strlen(temp) - 1] = '\0';

strlcpy(cpu_cap_fixup_target, temp, sizeof(cpu_cap_fixup_target));

return count;
}

static const struct file_operations proc_cpu_capacity_fixup_target_op = {
.open = proc_cpu_capacity_fixup_target_open,
.read = seq_read,
.llseek = seq_lseek,
.write = proc_cpu_capacity_fixup_target_write,
.release = single_release,
};
#endif

static ssize_t cpu_capacity_show(struct device *dev,
struct device_attribute *attr,
char *buf)
{
struct cpu *cpu = container_of(dev, struct cpu, dev);

#if IS_ENABLED(CONFIG_CPU_CAPACITY_FIXUP)
if (strncmp(current->comm, cpu_cap_fixup_target,
strnlen(current->comm, TASK_COMM_LEN)) == 0) {
unsigned long curr, left, right;

curr = topology_get_cpu_scale(NULL, cpu->dev.id);
left = topology_get_cpu_scale(NULL, 0);
right = topology_get_cpu_scale(NULL, num_possible_cpus() - 1);

if (curr != left && curr != right)
return sprintf(buf, "%lu\n", left > right ? left : right);
}
#endif

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

Expand Down Expand Up @@ -126,6 +188,13 @@ static int register_cpu_capacity_sysctl(void)
device_create_file(cpu, &dev_attr_cpu_capacity);
}

#if IS_ENABLED(CONFIG_CPU_CAPACITY_FIXUP)
memset(cpu_cap_fixup_target, 0, sizeof(cpu_cap_fixup_target));
if (!proc_create("cpu_capacity_fixup_target",
0660, NULL, &proc_cpu_capacity_fixup_target_op))
pr_err("Failed to register 'cpu_capacity_fixup_target'\n");
#endif

return 0;
}
subsys_initcall(register_cpu_capacity_sysctl);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ struct rational {

#define CAMERA2_MAX_STRIPE_REGION_NUM 5

#define EV_LIST_SIZE 24

#define OPEN_MAGIC_NUMBER 0x20192014
#define SHOT_MAGIC_NUMBER 0x78923456

Expand All @@ -53,6 +55,7 @@ enum is_subscenario_id {
ISS_SUB_SCENARIO_STILL_PREVIEW_WDR_ON = 1, /* 1: Single preview (HDR On) */
ISS_SUB_SCENARIO_STILL_FULL_PREVIEW_WDR_AUTO = 2, /* TODO: 2: Full resolution Preview (HDR Auto/Off) */
ISS_SUB_SCENARIO_SUPER_NIGHT_SHOT_PREVIEW = 3, /* Super night Preview (HDR Auto) */
ISS_SUB_SCENARIO_STILL_PREVIEW_GALAXY_RAW = 4, /* 4: galaxy raw preview */

ISS_SUB_SCENARIO_STILL_CAPTURE_WDR_AUTO = 10, /* 10: Single/Burst/Snapshot capture (HDR Auto/Off) */
ISS_SUB_SCENARIO_STILL_CAPTURE = 11, /* 11: Single capture (HDR Off) : Pro mode */
Expand Down Expand Up @@ -874,6 +877,7 @@ enum aa_capture_intent {
AA_CAPTURE_INTENT_STILL_CAPTURE_SUPER_NIGHT_SHOT_TRIPOD_MAX = 135,
AA_CAPTURE_INTENT_STILL_CAPTURE_SUPER_NIGHT_SHOT_EXTREME_DARK_MAX = 136,
AA_CAPTURE_INTENT_STILL_CAPTURE_SR_HDR_DYNAMIC_SHOT = 137,
AA_CAPTURE_INTENT_STILL_CAPTURE_GALAXY_RAW_DYNAMIC_SHOT = 138,

AA_CAPTURE_INTENT_VIDEO_RECORD_CHANGE_FPS = 500,

Expand Down Expand Up @@ -959,6 +963,7 @@ enum aa_scene_mode {
AA_SCENE_MODE_BOKEH_VIDEO,
AA_SCENE_MODE_SINGLE_TAKE,
AA_SCENE_MODE_DIRECTORS_VIEW,
AA_SCENE_MODE_GALAXY_RAW,
};

enum aa_effect_mode {
Expand Down Expand Up @@ -1341,6 +1346,7 @@ struct camera2_aa_ctl {
enum aa_ae_extra_mode vendor_aeExtraMode;
enum aa_dynamic_bds_mode vendor_enableDynamicBds;
enum aa_transient_capture_action vendor_transientCaptureAction;
char vendor_multiFrameEvList[EV_LIST_SIZE];
uint32_t vendor_reserved[28];
};

Expand Down
2 changes: 1 addition & 1 deletion drivers/media/platform/exynos/mfc/exynos_mfc_media.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ enum v4l2_mpeg_mfc51_video_frame_type {
#define V4L2_MPEG_VIDEO_MPEG4_LEVEL_6 8

/* new entry for enum v4l2_mpeg_video_h264_level */
#define V4L2_MPEG_VIDEO_H264_LEVEL_5_2 16
#define V4L2_MPEG_VIDEO_H264_LEVEL_6_0 17

/* new entry for enum v4l2_mpeg_video_header_mode */
#define V4L2_MPEG_VIDEO_HEADER_MODE_AT_THE_READY 2
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/platform/exynos/mfc/mfc_enc_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ static struct v4l2_queryctrl controls[] = {
.type = V4L2_CTRL_TYPE_INTEGER,
.name = "H264 level",
.minimum = V4L2_MPEG_VIDEO_H264_LEVEL_1_0,
.maximum = V4L2_MPEG_VIDEO_H264_LEVEL_5_2,
.maximum = V4L2_MPEG_VIDEO_H264_LEVEL_6_0,
.step = 1,
.default_value = V4L2_MPEG_VIDEO_H264_LEVEL_1_0,
},
Expand Down
3 changes: 2 additions & 1 deletion drivers/media/platform/exynos/mfc/mfc_enc_v4l2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1162,7 +1162,7 @@ static int mfc_enc_g_ctrl(struct file *file, void *priv,

static inline int __mfc_enc_h264_level(enum v4l2_mpeg_video_h264_level lvl)
{
static unsigned int t[V4L2_MPEG_VIDEO_H264_LEVEL_5_2 + 1] = {
static unsigned int t[V4L2_MPEG_VIDEO_H264_LEVEL_6_0 + 1] = {
/* V4L2_MPEG_VIDEO_H264_LEVEL_1_0 */ 10,
/* V4L2_MPEG_VIDEO_H264_LEVEL_1B */ 9,
/* V4L2_MPEG_VIDEO_H264_LEVEL_1_1 */ 11,
Expand All @@ -1180,6 +1180,7 @@ static inline int __mfc_enc_h264_level(enum v4l2_mpeg_video_h264_level lvl)
/* V4L2_MPEG_VIDEO_H264_LEVEL_5_0 */ 50,
/* V4L2_MPEG_VIDEO_H264_LEVEL_5_1 */ 51,
/* V4L2_MPEG_VIDEO_H264_LEVEL_5_2 */ 52,
/* V4L2_MPEG_VIDEO_H264_LEVEL_6_0 */ 60,
};
return t[lvl];
}
Expand Down
2 changes: 2 additions & 0 deletions drivers/media/rc/bpf-lirc.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ lirc_mode2_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog)
return &bpf_map_delete_elem_proto;
case BPF_FUNC_ktime_get_ns:
return &bpf_ktime_get_ns_proto;
case BPF_FUNC_ktime_get_boot_ns:
return &bpf_ktime_get_boot_ns_proto;
case BPF_FUNC_tail_call:
return &bpf_tail_call_proto;
case BPF_FUNC_get_prandom_u32:
Expand Down
28 changes: 14 additions & 14 deletions drivers/mmc/core/block.c
Original file line number Diff line number Diff line change
Expand Up @@ -1992,31 +1992,31 @@ static void mmc_blk_read_single(struct mmc_queue *mq, struct request *req)
struct mmc_card *card = mq->card;
struct mmc_host *host = card->host;
blk_status_t error = BLK_STS_OK;
int retries = 0;

do {
u32 status;
int err;
int retries = 0;

mmc_blk_rw_rq_prep(mqrq, card, 1, mq);
while (retries++ <= MMC_READ_SINGLE_RETRIES) {
mmc_blk_rw_rq_prep(mqrq, card, 1, mq);

mmc_wait_for_req(host, mrq);
mmc_wait_for_req(host, mrq);

err = mmc_send_status(card, &status);
if (err)
goto error_exit;

if (!mmc_host_is_spi(host) &&
!mmc_blk_in_tran_state(status)) {
err = mmc_blk_fix_state(card, req);
err = mmc_send_status(card, &status);
if (err)
goto error_exit;
}

if (mrq->cmd->error && retries++ < MMC_READ_SINGLE_RETRIES)
continue;
if (!mmc_host_is_spi(host) &&
!mmc_blk_in_tran_state(status)) {
err = mmc_blk_fix_state(card, req);
if (err)
goto error_exit;
}

retries = 0;
if (!mrq->cmd->error)
break;
}

if (mrq->cmd->error ||
mrq->data->error ||
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/broadcom/bcmdhd_101_16/Kconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2021, Broadcom.
# Copyright (C) 2022, Broadcom.
#
# Unless you and Broadcom execute a separate written software license
# agreement governing use of this software, this software is licensed to you
Expand Down
6 changes: 5 additions & 1 deletion drivers/net/wireless/broadcom/bcmdhd_101_16/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2021, Broadcom.
# Copyright (C) 2022, Broadcom.
#
# Unless you and Broadcom execute a separate written software license
# agreement governing use of this software, this software is licensed to you
Expand Down Expand Up @@ -517,6 +517,8 @@ endif

# NAN-Ranging BW private command
DHDCFLAGS += -DSUPPORT_NAN_RANGING_TEST_BW
# NAN customer discovery cache nubmer
DHDCFLAGS += -DCUSTOM_NAN_MAX_CACHE_DISC_RESULT=160

ifeq ($(CONFIG_ARCH_QCOM),y)
# Due to GKI config, Exynos has ARCH_QCOM & ARCH_EXYNOS, MSM has ARCH_QCOM only, Temporary solution
Expand Down Expand Up @@ -806,6 +808,8 @@ endif
DHDCFLAGS += -DFLOW_RING_PREALLOC
# NAN-Ranging BW private command
DHDCFLAGS += -DSUPPORT_NAN_RANGING_TEST_BW
# NAN customer discovery cache nubmer
DHDCFLAGS += -DCUSTOM_NAN_MAX_CACHE_DISC_RESULT=40

ifeq ($(CONFIG_ARCH_QCOM),y)
# Due to GKI config, Exynos has ARCH_QCOM & ARCH_EXYNOS, MSM has ARCH_QCOM only, Temporary solution
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/broadcom/bcmdhd_101_16/aiutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Misc utility routines for accessing chip-specific features
* of the SiliconBackplane-based Broadcom chips.
*
* Copyright (C) 2021, Broadcom.
* Copyright (C) 2022, Broadcom.
*
* Unless you and Broadcom execute a separate written software license
* agreement governing use of this software, this software is licensed to you
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Contents are wifi-specific, used by any kernel or app-level
* software that might want wifi things as it grows.
*
* Copyright (C) 2021, Broadcom.
* Copyright (C) 2022, Broadcom.
*
* Unless you and Broadcom execute a separate written software license
* agreement governing use of this software, this software is licensed to you
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* L2 Filter handling functions
*
* Copyright (C) 2021, Broadcom.
* Copyright (C) 2022, Broadcom.
*
* Unless you and Broadcom execute a separate written software license
* agreement governing use of this software, this software is licensed to you
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/broadcom/bcmdhd_101_16/bcmbloom.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Bloom filter support
*
* Copyright (C) 2021, Broadcom.
* Copyright (C) 2022, Broadcom.
*
* Unless you and Broadcom execute a separate written software license
* agreement governing use of this software, this software is licensed to you
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/broadcom/bcmdhd_101_16/bcmevent.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* bcmevent read-only data shared by kernel or app layers
*
* Copyright (C) 2021, Broadcom.
* Copyright (C) 2022, Broadcom.
*
* Unless you and Broadcom execute a separate written software license
* agreement governing use of this software, this software is licensed to you
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/broadcom/bcmdhd_101_16/bcmsdh.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* BCMSDH interface glue
* implement bcmsdh API for SDIOH driver
*
* Copyright (C) 2021, Broadcom.
* Copyright (C) 2022, Broadcom.
*
* Unless you and Broadcom execute a separate written software license
* agreement governing use of this software, this software is licensed to you
Expand Down
Loading

0 comments on commit f816c5f

Please sign in to comment.