summaryrefslogtreecommitdiff
path: root/taia.c
blob: 34d53473e5f3c12ffc09bfa1c06a9bc7cdd47fdc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <stdbool.h>

#include "taia.h"

static const struct taia tolerance_taia = {
	.sec.x = 0,
	.nano = 700000000ULL,	/* 700ms acceptance window */
	.atto = 0,
};

bool taia_looks_good(struct taia *arr_taia, struct taia *pkt_taia)
{
	bool good = false;
	struct taia tmp;

	if (taia_less(arr_taia, pkt_taia)) {
		taia_sub(&tmp, pkt_taia, arr_taia);
		if (taia_less(&tmp, &tolerance_taia))
			good = true;
	} else {
		taia_sub(&tmp, arr_taia, pkt_taia);
		if (taia_less(&tmp, &tolerance_taia))
			good = true;
	}

	return good;
}
5d64165f37c6448fe624d835c5adf17b9'>patch) tree5b90cb846f7f24747a8aac8d1efcb42d1e9ccf1d parent6d9deb910c8eee8728129326dc88ec109b03b135 (diff)
drm/i915: Remove two invalid warns
Objects can have multiple VMAs used for display in which case assertion that objects must not be pinned for display more times than the current VMA is incorrect. v2: Commit message update. (Chris Wilson) Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Fixes: 058d88c4330f ("drm/i915: Track pinned VMA") Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Link: http://patchwork.freedesktop.org/patch/msgid/1477413635-3876-1-git-send-email-tvrtko.ursulin@linux.intel.com (cherry picked from commit 3299e7e43484a85eeb5c7ec09958bff05c9d0543) Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Diffstat