From 6d8d2c454e835f7cfe34371e07dac173f3153452 Mon Sep 17 00:00:00 2001 From: Chris Johnson Date: Sat, 30 Apr 2011 14:24:44 -0700 Subject: nvrm: move stale wait checking into the kernel The kernel now receives wait tracking data (similar to gathers and relocs) and compares the current syncpt with the threshold value. If it's old, it gets a kernel mapping and rewrites the method data to use a kernel reserved syncpt that is always 0 (so trivially pops when seen by the HW). Bug 519650 Bug 785525 Bug 803452 Note: reset the author in this commit to fix a email addr problem and since from the latest/last cherry pick there was a reworking of the code to be compatible with different user space versions it also seemed reasonable. (cherry picked from commit 4069d8e67665624ad3dceb628e572980dd57acd0) (cherry picked from commit 6e4336408588e348804a62e53386acc9abc06823) (cherry picked from commit 87a9efe751716ca741caac72b9061fdfdcec540a) Change-Id: I9c6076da2384f373d5f402bee4406b09b4ebc4ff Reviewed-on: http://git-master/r/23159 Reviewed-on: http://git-master/r/30281 Tested-by: Chris Johnson Reviewed-by: Ken Adams Reviewed-by: Prajakta Gudadhe --- drivers/video/tegra/host/nvhost_hardware.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'drivers/video/tegra/host/nvhost_hardware.h') diff --git a/drivers/video/tegra/host/nvhost_hardware.h b/drivers/video/tegra/host/nvhost_hardware.h index a7663489727e..d1411b515ea5 100644 --- a/drivers/video/tegra/host/nvhost_hardware.h +++ b/drivers/video/tegra/host/nvhost_hardware.h @@ -141,6 +141,12 @@ enum { NV_CLASS_HOST_INDDATA = 0x2e }; +static inline u32 nvhost_class_host_wait_syncpt( + unsigned indx, unsigned threshold) +{ + return (indx << 24) | (threshold & 0xffffff); +} + static inline u32 nvhost_class_host_wait_syncpt_base( unsigned indx, unsigned base_indx, unsigned offset) { -- cgit v1.2.3