mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-25 02:32:08 +03:00
drivers: pva: skip vpu load reading when suspended
WHen PVA is already suspended, there is no need to resume the device through nvhost_module_busy and send mailbox request to PVA for VPU load reading. It avoids switching CV power domain on and off. Bug 4168798 Signed-off-by: Johnny Liu <johnliu@nvidia.com> Change-Id: Ib9ec4d4ded2b96ee8f76267e190087612d1e0468 Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2946818 Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: Ninad Malwade <nmalwade@nvidia.com> Reviewed-by: Omar Nemri <onemri@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
edf9d114e1
commit
c983eec625
@@ -5,18 +5,21 @@
|
||||
* PVA Debug Information file
|
||||
*/
|
||||
|
||||
#include <linux/debugfs.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/debugfs.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/nvhost.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/slab.h>
|
||||
#include "pva.h"
|
||||
#include <linux/types.h>
|
||||
#include <linux/uaccess.h>
|
||||
|
||||
#include <uapi/linux/nvpva_ioctl.h>
|
||||
|
||||
#include "pva.h"
|
||||
#include "pva_vpu_ocd.h"
|
||||
#include "pva-fw-address-map.h"
|
||||
|
||||
@@ -249,8 +252,13 @@ static void update_vpu_stats(struct pva *pva, bool stats_enabled)
|
||||
pva->vpu_util_info.stats_fw_buffer_va;
|
||||
u64 *vpu_stats = pva->vpu_util_info.vpu_stats;
|
||||
|
||||
if (vpu_stats == 0)
|
||||
goto err_out;
|
||||
#ifdef CONFIG_PM
|
||||
if (pm_runtime_suspended(&pva->pdev->dev)) {
|
||||
vpu_stats[0] = 0;
|
||||
vpu_stats[1] = 0;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
err = nvhost_module_busy(pva->pdev);
|
||||
if (err < 0) {
|
||||
|
||||
Reference in New Issue
Block a user