drm/nouveau/tmr: type-safe PTIMER-based delay/wait macros

These require an explicit struct nvkm_device pointer, unlike the previous
macros which take a void *, and work for (almost) anything derived from
nvkm_object by using some heuristics.

These macros are more general than the previous ones, and can be used to
handle PTIMER-based busy-waits (will be used in later devinit fixes) as
well as more complicated wait conditions.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Этот коммит содержится в:
Ben Skeggs
2015-08-20 14:54:10 +10:00
родитель 2ebfa1bc6f
Коммит 56f67dc196
5 изменённых файлов: 83 добавлений и 62 удалений

Просмотреть файл

@@ -24,6 +24,12 @@
#include <nvif/device.h>
u64
nvif_device_time(struct nvif_device *device)
{
return nvxx_timer(device)->read(nvxx_timer(device));
}
void
nvif_device_fini(struct nvif_device *device)
{