Skip to content

Commit

Permalink
Merge tag 'LA.UM.7.1.r1-16300-sm8150.0' of https://source.codeaurora.…
Browse files Browse the repository at this point in the history
…org/quic/la/kernel/msm-4.14 into aosp/LA.UM.7.1.r1

"LA.UM.7.1.r1-16300-sm8150.0"
  • Loading branch information
tomgus1 committed May 6, 2020
2 parents 500c77e + 4dc5db4 commit 8302f60
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 20 deletions.
22 changes: 11 additions & 11 deletions drivers/media/platform/msm/vidc/venus_hfi.c
Original file line number Diff line number Diff line change
Expand Up @@ -4045,11 +4045,8 @@ static inline void __unprepare_ahb2axi_bridge(struct venus_hfi_device *device,
if (version != (0x5 << 28 | 0x10 << 16))
return;

if (!(device->intr_status & VIDC_WRAPPER_INTR_STATUS_A2HWD_BMSK))
return;

dprintk(VIDC_ERR,
"reset axi cbcr to recover from hung\n");
"reset axi cbcr to recover\n");

/* read registers */
axi0_cbcr_status = __read_gcc_register(device, VIDEO_GCC_AXI0_CBCR);
Expand Down Expand Up @@ -4808,7 +4805,8 @@ static int __venus_power_on(struct venus_hfi_device *device)
return rc;
}

static void __venus_power_off(struct venus_hfi_device *device)
static void __venus_power_off(struct venus_hfi_device *device,
bool axi_reset)
{
u32 version;

Expand All @@ -4818,11 +4816,13 @@ static void __venus_power_off(struct venus_hfi_device *device)
if (!(device->intr_status & VIDC_WRAPPER_INTR_STATUS_A2HWD_BMSK))
disable_irq_nosync(device->hal_data->irq);

version = __read_register(device, VIDC_WRAPPER_HW_VERSION);
if (axi_reset)
version = __read_register(device, VIDC_WRAPPER_HW_VERSION);

__disable_unprepare_clks(device);

__unprepare_ahb2axi_bridge(device, version);
if (axi_reset)
__unprepare_ahb2axi_bridge(device, version);

device->intr_status = 0;

Expand Down Expand Up @@ -4860,7 +4860,7 @@ static inline int __suspend(struct venus_hfi_device *device)

__disable_subcaches(device);

__venus_power_off(device);
__venus_power_off(device, false);
dprintk(VIDC_PROF, "Venus power off\n");
return rc;

Expand Down Expand Up @@ -4935,7 +4935,7 @@ static inline int __resume(struct venus_hfi_device *device)
err_reset_core:
__tzbsp_set_video_state(TZBSP_VIDEO_STATE_SUSPEND);
err_set_video_state:
__venus_power_off(device);
__venus_power_off(device, false);
err_venus_power_on:
dprintk(VIDC_ERR, "Failed to resume from power collapse\n");
return rc;
Expand Down Expand Up @@ -4994,7 +4994,7 @@ static int __load_fw(struct venus_hfi_device *device)
subsystem_put(device->resources.fw.cookie);
device->resources.fw.cookie = NULL;
fail_load_fw:
__venus_power_off(device);
__venus_power_off(device, true);
fail_venus_power_on:
fail_init_pkt:
__deinit_resources(device);
Expand All @@ -5015,7 +5015,7 @@ static void __unload_fw(struct venus_hfi_device *device)
__vote_buses(device, NULL, 0);
subsystem_put(device->resources.fw.cookie);
__interface_queues_release(device);
__venus_power_off(device);
__venus_power_off(device, true);
device->resources.fw.cookie = NULL;
__deinit_resources(device);

Expand Down
6 changes: 4 additions & 2 deletions drivers/misc/qseecom.c
Original file line number Diff line number Diff line change
Expand Up @@ -6881,9 +6881,11 @@ static int __qseecom_update_qteec_req_buf(struct qseecom_qteec_modfd_req *req,
for (i = 0; i < MAX_ION_FD; i++) {
if (req->ifd_data[i].fd > 0) {
ion_fd = req->ifd_data[i].fd;
if ((req->req_len < sizeof(uint32_t)) ||
if ((req->req_len <
sizeof(struct qseecom_param_memref)) ||
(req->ifd_data[i].cmd_buf_offset >
req->req_len - sizeof(uint32_t))) {
req->req_len -
sizeof(struct qseecom_param_memref))) {
pr_err("Invalid offset/req len 0x%x/0x%x\n",
req->req_len,
req->ifd_data[i].cmd_buf_offset);
Expand Down
4 changes: 4 additions & 0 deletions drivers/pci/pci-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -855,13 +855,17 @@ static int pci_pm_resume(struct device *dev)
const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;
int error = 0;

if (pci_dev->no_d3hot)
goto skip_pci_pm_restore;

/*
* This is necessary for the suspend error path in which resume is
* called without restoring the standard config registers of the device.
*/
if (pci_dev->state_saved)
pci_restore_standard_config(pci_dev);

skip_pci_pm_restore:
if (pci_has_legacy_pm_support(pci_dev))
return pci_legacy_resume(dev);

Expand Down
8 changes: 4 additions & 4 deletions drivers/power/supply/qcom/fg-alg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1167,7 +1167,7 @@ static int get_step_chg_current_window(struct ttf *ttf)
struct range_data *step_chg_cfg = ttf->step_chg_cfg;
int i, rc, curr_window, vbatt;

if (ttf->mode == TTF_MODE_V_STEP_CHG) {
if (ttf->mode == TTF_MODE_VBAT_STEP_CHG) {
rc = ttf->get_ttf_param(ttf->data, TTF_VBAT, &vbatt);
if (rc < 0) {
pr_err("failed to get battery voltage, rc=%d\n", rc);
Expand Down Expand Up @@ -1293,7 +1293,7 @@ static int get_time_to_full_locked(struct ttf *ttf, int *val)
/* estimated battery current at the CC to CV transition */
switch (ttf->mode) {
case TTF_MODE_NORMAL:
case TTF_MODE_V_STEP_CHG:
case TTF_MODE_VBAT_STEP_CHG:
case TTF_MODE_OCV_STEP_CHG:
i_cc2cv = ibatt_avg * vbatt_avg /
max(MILLI_UNIT, float_volt_uv / MILLI_UNIT);
Expand Down Expand Up @@ -1351,7 +1351,7 @@ static int get_time_to_full_locked(struct ttf *ttf, int *val)
ibatt_this_step, t_predicted_this_step);
}
break;
case TTF_MODE_V_STEP_CHG:
case TTF_MODE_VBAT_STEP_CHG:
case TTF_MODE_OCV_STEP_CHG:
if (!step_chg_data || !step_chg_cfg)
break;
Expand Down Expand Up @@ -1392,7 +1392,7 @@ static int get_time_to_full_locked(struct ttf *ttf, int *val)
MILLI_UNIT);
}

if (ttf->mode == TTF_MODE_V_STEP_CHG)
if (ttf->mode == TTF_MODE_VBAT_STEP_CHG)
step_chg_data[i].ocv =
step_chg_cfg[i].high_threshold -
(rbatt * i_step);
Expand Down
2 changes: 1 addition & 1 deletion drivers/power/supply/qcom/fg-alg.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ struct cap_learning {
enum ttf_mode {
TTF_MODE_NORMAL = 0,
TTF_MODE_QNOVO,
TTF_MODE_V_STEP_CHG,
TTF_MODE_VBAT_STEP_CHG,
TTF_MODE_OCV_STEP_CHG,
};

Expand Down
2 changes: 1 addition & 1 deletion drivers/power/supply/qcom/qpnp-fg-gen4.c
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,7 @@ static int fg_gen4_get_ttf_param(void *data, enum ttf_param param, int *val)
if (is_qnovo_en(fg))
*val = TTF_MODE_QNOVO;
else if (chip->ttf->step_chg_cfg_valid)
*val = TTF_MODE_V_STEP_CHG;
*val = TTF_MODE_VBAT_STEP_CHG;
else if (chip->ttf->ocv_step_chg_cfg_valid)
*val = TTF_MODE_OCV_STEP_CHG;
else
Expand Down
2 changes: 1 addition & 1 deletion drivers/power/supply/qcom/qpnp-qg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1615,7 +1615,7 @@ static int qg_get_ttf_param(void *data, enum ttf_param param, int *val)
break;
case TTF_MODE:
if (chip->ttf->step_chg_cfg_valid)
*val = TTF_MODE_V_STEP_CHG;
*val = TTF_MODE_VBAT_STEP_CHG;
else
*val = TTF_MODE_NORMAL;
break;
Expand Down

0 comments on commit 8302f60

Please sign in to comment.