hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/media/platform/qcom/venus/pm_helpers.c
....@@ -304,9 +304,9 @@
304304 void __iomem *ctrl;
305305
306306 if (session_type == VIDC_SESSION_TYPE_DEC)
307
- ctrl = core->base + WRAPPER_VDEC_VCODEC_POWER_CONTROL;
307
+ ctrl = core->wrapper_base + WRAPPER_VDEC_VCODEC_POWER_CONTROL;
308308 else
309
- ctrl = core->base + WRAPPER_VENC_VCODEC_POWER_CONTROL;
309
+ ctrl = core->wrapper_base + WRAPPER_VENC_VCODEC_POWER_CONTROL;
310310
311311 if (enable)
312312 writel(0, ctrl);
....@@ -381,11 +381,11 @@
381381 int ret;
382382
383383 if (coreid == VIDC_CORE_ID_1) {
384
- ctrl = core->base + WRAPPER_VCODEC0_MMCC_POWER_CONTROL;
385
- stat = core->base + WRAPPER_VCODEC0_MMCC_POWER_STATUS;
384
+ ctrl = core->wrapper_base + WRAPPER_VCODEC0_MMCC_POWER_CONTROL;
385
+ stat = core->wrapper_base + WRAPPER_VCODEC0_MMCC_POWER_STATUS;
386386 } else {
387
- ctrl = core->base + WRAPPER_VCODEC1_MMCC_POWER_CONTROL;
388
- stat = core->base + WRAPPER_VCODEC1_MMCC_POWER_STATUS;
387
+ ctrl = core->wrapper_base + WRAPPER_VCODEC1_MMCC_POWER_CONTROL;
388
+ stat = core->wrapper_base + WRAPPER_VCODEC1_MMCC_POWER_STATUS;
389389 }
390390
391391 if (enable) {
....@@ -764,8 +764,8 @@
764764 for (i = 0; i < res->vcodec_pmdomains_num; i++) {
765765 pd = dev_pm_domain_attach_by_name(dev,
766766 res->vcodec_pmdomains[i]);
767
- if (IS_ERR(pd))
768
- return PTR_ERR(pd);
767
+ if (IS_ERR_OR_NULL(pd))
768
+ return PTR_ERR(pd) ? : -ENODATA;
769769 core->pmdomains[i] = pd;
770770 }
771771