mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 10:11:26 +03:00
host1x_emu: Fix NvHost Interface and IOCTL
1. The nvhost interface like syncpoint offset/aperture were taking "pdev" of Host1x device, but emulated syncpoint driver implementd the interface with "pdev" of clinet device. This was done to align all other interface input parameter. This patch revert the above alignment of intput parameter change. 2. This patch modify SyncpointWait IOCTL handler to return timestamp of signal observed by KMD to UMD Bug 4895937 Change-Id: I61ba02992963ba272e5c2514ffe8c24fff510c3a Signed-off-by: amitabhd <amitabhd@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3226744 GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com> Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: Santosh BS <santoshb@nvidia.com> Reviewed-by: Raghavendra Vishnu Kumar <rvk@nvidia.com>
This commit is contained in:
@@ -218,19 +218,27 @@ static int host1x_ioctl_syncpoint_wait(
|
||||
struct host1x_emu_ctrl_syncpt_wait_args *args)
|
||||
|
||||
{
|
||||
signed long timeout_jiffies;
|
||||
struct host1x_syncpt *sp;
|
||||
struct host1x *host = ctx->host;
|
||||
signed long timeout_jiffies;
|
||||
struct host1x_syncpt *sp;
|
||||
struct host1x *host = ctx->host;
|
||||
ktime_t ts;
|
||||
int err;
|
||||
|
||||
sp = HOST1X_EMU_EXPORT_CALL(host1x_syncpt_get_by_id_noref(host, args->id));
|
||||
if (!sp)
|
||||
return -EINVAL;
|
||||
timeout_jiffies = timeout_abs_to_jiffies(args->timeout_ns);
|
||||
sp = HOST1X_EMU_EXPORT_CALL(host1x_syncpt_get_by_id_noref(host, args->id));
|
||||
if (!sp)
|
||||
return -EINVAL;
|
||||
|
||||
return HOST1X_EMU_EXPORT_CALL(host1x_syncpt_wait(sp,
|
||||
args->threshold,
|
||||
timeout_jiffies,
|
||||
&args->value));
|
||||
timeout_jiffies = timeout_abs_to_jiffies(args->timeout_ns);
|
||||
err = HOST1X_EMU_EXPORT_CALL(host1x_syncpt_wait_ts(sp,
|
||||
args->threshold,
|
||||
timeout_jiffies,
|
||||
&args->value,
|
||||
&ts));
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
args->timestamp = ktime_to_ns(ts);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static long host1x_ctrlctl(struct file *filp, unsigned int cmd, unsigned long arg)
|
||||
|
||||
Reference in New Issue
Block a user