diff --git a/drivers/gpu/drm/msm/sde/sde_crtc.c b/drivers/gpu/drm/msm/sde/sde_crtc.c index 0c52d8645fb03..da3cf01e91ba7 100644 --- a/drivers/gpu/drm/msm/sde/sde_crtc.c +++ b/drivers/gpu/drm/msm/sde/sde_crtc.c @@ -1413,11 +1413,6 @@ static u32 _sde_crtc_get_displays_affected(struct drm_crtc *crtc, int i; bool is_ppsplit = false; - if (!crtc || !state) { - pr_err("Invalid crtc or state\n"); - return 0; - } - sde_crtc = to_sde_crtc(crtc); crtc_state = to_sde_crtc_state(state); diff --git a/drivers/media/platform/msm/vidc/venus_hfi.c b/drivers/media/platform/msm/vidc/venus_hfi.c index 7024e23d29fba..0f26c491a1d74 100644 --- a/drivers/media/platform/msm/vidc/venus_hfi.c +++ b/drivers/media/platform/msm/vidc/venus_hfi.c @@ -4259,11 +4259,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); @@ -5091,7 +5088,7 @@ static inline int __suspend(struct venus_hfi_device *device) __disable_subcaches(device); - __venus_power_off(device, true); + __venus_power_off(device, false); dprintk(VIDC_PROF, "Venus power off\n"); return rc; @@ -5166,7 +5163,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, true); + __venus_power_off(device, false); err_venus_power_on: dprintk(VIDC_ERR, "Failed to resume from power collapse\n"); return rc; @@ -5246,7 +5243,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, false); + __venus_power_off(device, true); device->resources.fw.cookie = NULL; __deinit_resources(device); diff --git a/drivers/misc/qseecom.c b/drivers/misc/qseecom.c index bfede3b686acf..782efee718e55 100644 --- a/drivers/misc/qseecom.c +++ b/drivers/misc/qseecom.c @@ -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); diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index a394ebdc258c0..a3e1b5d127f1e 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c @@ -853,6 +853,9 @@ 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. @@ -860,6 +863,7 @@ static int pci_pm_resume(struct device *dev) 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); diff --git a/drivers/power/supply/qcom/fg-alg.c b/drivers/power/supply/qcom/fg-alg.c index dcb5ff97f9489..e60d73e267fef 100644 --- a/drivers/power/supply/qcom/fg-alg.c +++ b/drivers/power/supply/qcom/fg-alg.c @@ -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); @@ -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); @@ -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; @@ -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); diff --git a/drivers/power/supply/qcom/fg-alg.h b/drivers/power/supply/qcom/fg-alg.h index 5b37abc583000..8e144d5fe8e6e 100644 --- a/drivers/power/supply/qcom/fg-alg.h +++ b/drivers/power/supply/qcom/fg-alg.h @@ -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, }; diff --git a/drivers/power/supply/qcom/qpnp-fg-gen4.c b/drivers/power/supply/qcom/qpnp-fg-gen4.c index 5d9fa9baac775..a1d6e793c24b3 100644 --- a/drivers/power/supply/qcom/qpnp-fg-gen4.c +++ b/drivers/power/supply/qcom/qpnp-fg-gen4.c @@ -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 diff --git a/drivers/power/supply/qcom/qpnp-qg.c b/drivers/power/supply/qcom/qpnp-qg.c index 13c3fca11e9a1..4debea696ef75 100644 --- a/drivers/power/supply/qcom/qpnp-qg.c +++ b/drivers/power/supply/qcom/qpnp-qg.c @@ -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;