mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: use updated APIs to get/put syncpoint
Pass host1x device pointer for below APIs : nvhost_get_syncpt_host_managed() nvhost_syncpt_put_ref_ext() Also, compose a name for syncpoints in GPU driver itself. This name will be created as combination of device name and channel index Bug 1611482 Change-Id: Id1ddd0e87e0272ddb0758713d6b6c2544bc36bf4 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/751908 Reviewed-by: Arto Merilainen <amerilainen@nvidia.com> Tested-by: Arto Merilainen <amerilainen@nvidia.com>
This commit is contained in:
committed by
Arto Merilainen
parent
b8aa486109
commit
ef8fa4999f
@@ -286,7 +286,7 @@ static void gk20a_channel_syncpt_destroy(struct gk20a_channel_sync *s)
|
||||
struct gk20a_channel_syncpt *sp =
|
||||
container_of(s, struct gk20a_channel_syncpt, ops);
|
||||
nvhost_syncpt_set_min_eq_max_ext(sp->host1x_pdev, sp->id);
|
||||
nvhost_syncpt_put_ref_ext(sp->id);
|
||||
nvhost_syncpt_put_ref_ext(sp->host1x_pdev, sp->id);
|
||||
kfree(sp);
|
||||
}
|
||||
|
||||
@@ -294,6 +294,7 @@ static struct gk20a_channel_sync *
|
||||
gk20a_channel_syncpt_create(struct channel_gk20a *c)
|
||||
{
|
||||
struct gk20a_channel_syncpt *sp;
|
||||
char syncpt_name[16];
|
||||
|
||||
sp = kzalloc(sizeof(*sp), GFP_KERNEL);
|
||||
if (!sp)
|
||||
@@ -301,14 +302,19 @@ gk20a_channel_syncpt_create(struct channel_gk20a *c)
|
||||
|
||||
sp->c = c;
|
||||
sp->host1x_pdev = c->g->host1x_dev;
|
||||
sp->id = nvhost_get_syncpt_host_managed(c->g->dev, c->hw_chid);
|
||||
nvhost_syncpt_set_min_eq_max_ext(sp->host1x_pdev, sp->id);
|
||||
|
||||
sprintf(syncpt_name, "%s_%d", dev_name(&c->g->dev->dev), c->hw_chid);
|
||||
|
||||
sp->id = nvhost_get_syncpt_host_managed(sp->host1x_pdev,
|
||||
c->hw_chid, syncpt_name);
|
||||
if (!sp->id) {
|
||||
kfree(sp);
|
||||
gk20a_err(&c->g->dev->dev, "failed to get free syncpt");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
nvhost_syncpt_set_min_eq_max_ext(sp->host1x_pdev, sp->id);
|
||||
|
||||
sp->ops.wait_syncpt = gk20a_channel_syncpt_wait_syncpt;
|
||||
sp->ops.wait_fd = gk20a_channel_syncpt_wait_fd;
|
||||
sp->ops.incr = gk20a_channel_syncpt_incr;
|
||||
|
||||
Reference in New Issue
Block a user