mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
drm/tegra: Export active signal to actmon
As long as the subcomponents in the engine are active, we consider the engine as active and the engine should export active signal to the actmon. Bug 4179140 Signed-off-by: Johnny Liu <johnliu@nvidia.com> Change-Id: Ic4cccf29e8ac87da24f6fe3bf1f1e93a11511762 Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2930445 Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: Rajkumar Kasirajan <rkasirajan@nvidia.com> Reviewed-by: Bibek Basu <bbasu@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
38c963de57
commit
4241a7c976
@@ -3,6 +3,7 @@
|
||||
* Copyright (c) 2021-2023, NVIDIA CORPORATION & AFFILIATES. All Rights Reserved.
|
||||
*/
|
||||
|
||||
#include <linux/bitops.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/devfreq.h>
|
||||
@@ -27,9 +28,16 @@
|
||||
#include "util.h"
|
||||
|
||||
#define NVENC_TFBIF_TRANSCFG 0x1844
|
||||
#define NVENC_TFBIF_ACTMON_ACTIVE_MASK 0x184c
|
||||
#define NVENC_TFBIF_ACTMON_ACTIVE_BORPS 0x1850
|
||||
#define NVENC_TFBIF_ACTMON_ACTIVE_WEIGHT 0x1854
|
||||
#define NVENC_AXI_RW_BANDWIDTH 512
|
||||
|
||||
#define NVENC_TFBIF_ACTMON_ACTIVE_MASK_STARVED BIT(0)
|
||||
#define NVENC_TFBIF_ACTMON_ACTIVE_MASK_STALLED BIT(1)
|
||||
#define NVENC_TFBIF_ACTMON_ACTIVE_MASK_DELAYED BIT(2)
|
||||
#define NVENC_TFBIF_ACTMON_ACTIVE_BORPS_ACTIVE BIT(7)
|
||||
|
||||
struct nvenc_config {
|
||||
const char *firmware;
|
||||
unsigned int version;
|
||||
@@ -444,6 +452,16 @@ static __maybe_unused int nvenc_runtime_resume(struct device *dev)
|
||||
if (err < 0)
|
||||
goto disable;
|
||||
|
||||
nvenc_writel(nvenc,
|
||||
NVENC_TFBIF_ACTMON_ACTIVE_MASK_DELAYED |
|
||||
NVENC_TFBIF_ACTMON_ACTIVE_MASK_STALLED |
|
||||
NVENC_TFBIF_ACTMON_ACTIVE_MASK_STARVED,
|
||||
NVENC_TFBIF_ACTMON_ACTIVE_MASK);
|
||||
|
||||
nvenc_writel(nvenc,
|
||||
NVENC_TFBIF_ACTMON_ACTIVE_BORPS_ACTIVE,
|
||||
NVENC_TFBIF_ACTMON_ACTIVE_BORPS);
|
||||
|
||||
devfreq_resume_device(nvenc->devfreq);
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user