From c44f2084eb1a6bb722bc1c83010caf8e0a0744e8 Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Tue, 11 Feb 2014 16:03:45 -0800 Subject: video: tegra: host: Move LTC debugfs code Move the LTC debugfs sync code to the gk20a LTC code. Change-Id: I145b04e1e8aade170c2e9c6b3beb60774c6124f2 Signed-off-by: Alex Waterman Reviewed-on: http://git-master/r/366178 (cherry picked from commit c099b4fde779942d7559248c30a2df55aa4fd4f4) Reviewed-on: http://git-master/r/376515 Reviewed-by: Automatic_Commit_Validation_User Tested-by: Terje Bergstrom Reviewed-by: Kevin Huang (Eng-SW) Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c index 7cfb3c24..1570e12c 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c @@ -1416,6 +1416,18 @@ void gk20a_channel_update(struct channel_gk20a *c, int nr_completed) gk20a_idle(c->g->dev); } +void add_wait_cmd(u32 *ptr, u32 id, u32 thresh) +{ + /* syncpoint_a */ + ptr[0] = 0x2001001C; + /* payload */ + ptr[1] = thresh; + /* syncpoint_b */ + ptr[2] = 0x2001001D; + /* syncpt_id, switch_en, wait */ + ptr[3] = (id << 8) | 0x10; +} + static int gk20a_submit_channel_gpfifo(struct channel_gk20a *c, struct nvhost_gpfifo *gpfifo, u32 num_entries, -- cgit v1.2.2