Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: venus: core: add shutdown callback for venus

After the SMMU translation is disabled in the
arm-smmu shutdown callback during reboot, if
any subsystem are still alive then IOVAs they
are using will become PAs on bus, which may
lead to crash.

So implemented shutdown callback, which detach iommu maps.

Signed-off-by: Mansur Alisha Shaik <mansur@codeaurora.org>
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

authored by

Mansur Alisha Shaik and committed by
Mauro Carvalho Chehab
7399139b de15e623

+9
+9
drivers/media/platform/qcom/venus/core.c
··· 345 345 return ret; 346 346 } 347 347 348 + static void venus_core_shutdown(struct platform_device *pdev) 349 + { 350 + struct venus_core *core = platform_get_drvdata(pdev); 351 + 352 + venus_shutdown(core); 353 + venus_firmware_deinit(core); 354 + } 355 + 348 356 static __maybe_unused int venus_runtime_suspend(struct device *dev) 349 357 { 350 358 struct venus_core *core = dev_get_drvdata(dev); ··· 628 620 .of_match_table = venus_dt_match, 629 621 .pm = &venus_pm_ops, 630 622 }, 623 + .shutdown = venus_core_shutdown, 631 624 }; 632 625 module_platform_driver(qcom_venus_driver); 633 626