mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
drm/tegra: Enable job timestamping for NVJPG
NVJPG firmware now supports timestamping, so enable use of it. Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com> Change-Id: I5a21f51e29ac19a95d36bb435dc884a440095ac2 Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3070327 Reviewed-by: Satvik Raj Gupta <satvikrajg@nvidia.com> Tested-by: Satvik Raj Gupta <satvikrajg@nvidia.com>
This commit is contained in:
committed by
Satvik Raj Gupta
parent
01ab1b46c3
commit
6025535763
@@ -43,6 +43,7 @@ struct nvjpg_config {
|
|||||||
unsigned int version;
|
unsigned int version;
|
||||||
bool supports_sid;
|
bool supports_sid;
|
||||||
unsigned int num_instances;
|
unsigned int num_instances;
|
||||||
|
bool supports_timestamping;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct nvjpg {
|
struct nvjpg {
|
||||||
@@ -554,12 +555,22 @@ static int nvjpg_can_use_memory_ctx(struct tegra_drm_client *client, bool *suppo
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int nvjpg_has_job_timestamping(struct tegra_drm_client *client, bool *supported)
|
||||||
|
{
|
||||||
|
struct nvjpg *nvjpg = to_nvjpg(client);
|
||||||
|
|
||||||
|
*supported = nvjpg->config->supports_timestamping;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static const struct tegra_drm_client_ops nvjpg_ops = {
|
static const struct tegra_drm_client_ops nvjpg_ops = {
|
||||||
.open_channel = nvjpg_open_channel,
|
.open_channel = nvjpg_open_channel,
|
||||||
.close_channel = nvjpg_close_channel,
|
.close_channel = nvjpg_close_channel,
|
||||||
.submit = tegra_drm_submit,
|
.submit = tegra_drm_submit,
|
||||||
.get_streamid_offset = tegra_drm_get_streamid_offset_thi,
|
.get_streamid_offset = tegra_drm_get_streamid_offset_thi,
|
||||||
.can_use_memory_ctx = nvjpg_can_use_memory_ctx,
|
.can_use_memory_ctx = nvjpg_can_use_memory_ctx,
|
||||||
|
.has_job_timestamping = nvjpg_has_job_timestamping,
|
||||||
};
|
};
|
||||||
|
|
||||||
#define NVIDIA_TEGRA_210_NVJPG_FIRMWARE "nvidia/tegra210/nvjpg.bin"
|
#define NVIDIA_TEGRA_210_NVJPG_FIRMWARE "nvidia/tegra210/nvjpg.bin"
|
||||||
@@ -596,6 +607,7 @@ static const struct nvjpg_config nvjpg_t234_config = {
|
|||||||
.version = 0x23,
|
.version = 0x23,
|
||||||
.supports_sid = true,
|
.supports_sid = true,
|
||||||
.num_instances = 2,
|
.num_instances = 2,
|
||||||
|
.supports_timestamping = true,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct of_device_id tegra_nvjpg_of_match[] = {
|
static const struct of_device_id tegra_nvjpg_of_match[] = {
|
||||||
|
|||||||
@@ -122,17 +122,7 @@ static int virt_engine_can_use_memory_ctx(struct tegra_drm_client *client, bool
|
|||||||
|
|
||||||
static int virt_engine_has_job_timestamping(struct tegra_drm_client *client, bool *supported)
|
static int virt_engine_has_job_timestamping(struct tegra_drm_client *client, bool *supported)
|
||||||
{
|
{
|
||||||
struct virt_engine *virt = to_virt_engine(client);
|
|
||||||
|
|
||||||
switch (virt->client.base.class) {
|
|
||||||
case HOST1X_CLASS_NVJPG:
|
|
||||||
case HOST1X_CLASS_NVJPG1:
|
|
||||||
*supported = false;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
*supported = true;
|
*supported = true;
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user