Skip to content

Commit

Permalink
Merge tag 'tag-venus-for-v6.2' of git://linuxtv.org/svarbanov/media_t…
Browse files Browse the repository at this point in the history
…ree into media_stage

Venus updates for v6.2

* tag 'tag-venus-for-v6.2' of git://linuxtv.org/svarbanov/media_tree:
  venus: pm_helpers: Fix error check in vcodec_domains_get()
  venus: firmware: Correct assertion of reset bit on remote processor
  venus: firmware: Correct non-pix start and end addresses
  venus: firmware: Correct reset bit
  MAINTAINERS: Change email for Venus driver
  MAINTAINERS: Add Vikash as VENUS video driver co-maintainer
  • Loading branch information
mchehab committed Nov 15, 2022
2 parents 1e284ea + 0f6e8d8 commit 997149b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
3 changes: 2 additions & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -17175,7 +17175,8 @@ F: Documentation/devicetree/bindings/thermal/qcom-tsens.yaml
F: drivers/thermal/qcom/

QUALCOMM VENUS VIDEO ACCELERATOR DRIVER
M: Stanimir Varbanov <[email protected]>
M: Stanimir Varbanov <[email protected]>
M: Vikash Garodia <[email protected]>
L: [email protected]
L: [email protected]
S: Maintained
Expand Down
20 changes: 10 additions & 10 deletions drivers/media/platform/qcom/venus/firmware.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ static void venus_reset_cpu(struct venus_core *core)
writel(fw_size, wrapper_base + WRAPPER_FW_END_ADDR);
writel(0, wrapper_base + WRAPPER_CPA_START_ADDR);
writel(fw_size, wrapper_base + WRAPPER_CPA_END_ADDR);
writel(fw_size, wrapper_base + WRAPPER_NONPIX_START_ADDR);
writel(fw_size, wrapper_base + WRAPPER_NONPIX_END_ADDR);
writel(0, wrapper_base + WRAPPER_NONPIX_START_ADDR);
writel(0, wrapper_base + WRAPPER_NONPIX_END_ADDR);

if (IS_V6(core)) {
/* Bring XTSS out of reset */
Expand Down Expand Up @@ -68,9 +68,11 @@ int venus_set_hw_state(struct venus_core *core, bool resume)
venus_reset_cpu(core);
} else {
if (IS_V6(core))
writel(1, core->wrapper_tz_base + WRAPPER_TZ_XTSS_SW_RESET);
writel(WRAPPER_XTSS_SW_RESET_BIT,
core->wrapper_tz_base + WRAPPER_TZ_XTSS_SW_RESET);
else
writel(1, core->wrapper_base + WRAPPER_A9SS_SW_RESET);
writel(WRAPPER_A9SS_SW_RESET_BIT,
core->wrapper_base + WRAPPER_A9SS_SW_RESET);
}

return 0;
Expand Down Expand Up @@ -179,17 +181,15 @@ static int venus_shutdown_no_tz(struct venus_core *core)

if (IS_V6(core)) {
/* Assert the reset to XTSS */
reg = readl_relaxed(wrapper_tz_base + WRAPPER_TZ_XTSS_SW_RESET);
reg = readl(wrapper_tz_base + WRAPPER_TZ_XTSS_SW_RESET);
reg |= WRAPPER_XTSS_SW_RESET_BIT;
writel_relaxed(reg, wrapper_tz_base + WRAPPER_TZ_XTSS_SW_RESET);
writel(reg, wrapper_tz_base + WRAPPER_TZ_XTSS_SW_RESET);
} else {
/* Assert the reset to ARM9 */
reg = readl_relaxed(wrapper_base + WRAPPER_A9SS_SW_RESET);
reg = readl(wrapper_base + WRAPPER_A9SS_SW_RESET);
reg |= WRAPPER_A9SS_SW_RESET_BIT;
writel_relaxed(reg, wrapper_base + WRAPPER_A9SS_SW_RESET);
writel(reg, wrapper_base + WRAPPER_A9SS_SW_RESET);
}
/* Make sure reset is asserted before the mapping is removed */
mb();

iommu = core->fw.iommu_domain;

Expand Down
4 changes: 2 additions & 2 deletions drivers/media/platform/qcom/venus/pm_helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -869,8 +869,8 @@ static int vcodec_domains_get(struct venus_core *core)
for (i = 0; i < res->vcodec_pmdomains_num; i++) {
pd = dev_pm_domain_attach_by_name(dev,
res->vcodec_pmdomains[i]);
if (IS_ERR(pd))
return PTR_ERR(pd);
if (IS_ERR_OR_NULL(pd))
return PTR_ERR(pd) ? : -ENODATA;
core->pmdomains[i] = pd;
}

Expand Down

0 comments on commit 997149b

Please sign in to comment.