summaryrefslogtreecommitdiff
path: root/tests/i915/i915_query.c
AgeCommit message (Collapse)Author
2022-07-09lib/vm_bind: Add interface to support VM_BINDAdam Miszczak
Add required library interfaces to support VM_BIND functionality. Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
2022-07-07tests/i915_query: tweak the unallocated tracking testMatthew Auld
Make sure we always print the seed. Also make sure we use the correct helpers for the igt_assert when comparing values of type uint64. v2:(Nirmoy) - Fix broken conversion with s/lt/lte/ in a couple places. Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Nirmoy Das <nirmoy.das@linux.intel.com> Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
2022-06-30tests/i915/query: sanity check the unallocated trackingMatthew Auld
Sanity both the unallocated_size & unallocated_cpu_visible_size tracking. v2(Petri): always use from_user_pointer() v3: Make it play nice on older kernels Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com> Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
2022-06-30tests/i915/query: sanity check the probed_cpu_visible_sizeMatthew Auld
Add some basic sanity checks for this, like checking if this falls within the probed_size. On older kernels the value reported here should be zero. Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com> Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
2022-06-14tests/i915/query: Query, parse and validate the hwconfig tableRodrigo Vivi
Newer platforms have an embedded table giving details about that platform's hardware configuration. This table can be retrieved from the KMD via the existing query API. So add a test for it as both an example of how to fetch the table and to validate the contents as much as is possible. Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: John Harrison <John.C.Harrison@Intel.com> Cc: Slawomir Milczarek <slawomir.milczarek@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com>
2022-06-14tests/i915/query: Add descriptions to existing testsJohn Harrison
None of the query tests had a description. So make some up. Signed-off-by: John Harrison <John.C.Harrison@Intel.com> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
2022-04-14tests/i915_query: Test new DRM_I915_QUERY_GEOMETRY_SUBSLICES queryMatt Roper
Ensure we get sensible responses for both valid and invalid usage of this query item. Note that unlike the traditional topology query we do not try to compare the values returned against the old I915_PARAM ioctl. Xe_HP already uses a full 32-bit mask for subslices and we expect upcoming platforms to increase the mask size to 64 or beyond (i.e., the hardware starts using multiple registers to express the mask); since the old I915_PARAM ioctl can only return a 32-bit value it will be unable to express the full mask for upcoming platforms. Cc: Matt Atwood <matthew.s.atwood@intel.com> Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
2021-07-26tests/i915_query: add some sanity checking around regions queryMatthew Auld
Ensure if we feed garbage into DRM_I915_QUERY_MEMORY_REGIONS it does indeed fail as expected. Also add some asserts for the invariants with the probed regions, for example we should always have at least system memory. Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Ville Syrjala <ville.syrjala@linux.intel.com> Reviewed-by: Ramalingam C <ramalingam.c@intel.com>
2021-07-26tests/i915_query: extract query_garbage_itemsMatthew Auld
We should be able to re-use this for other queries. Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Ville Syrjala <ville.syrjala@linux.intel.com> Reviewed-by: Ramalingam C <ramalingam.c@intel.com>
2021-07-08tests/i915/i915_query: Convert to intel_ctx_tJason Ekstrand
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2020-12-08i915/query: Directly check query results against GETPARAMChris Wilson
Simplify the cross-check by asserting that the existence of an engine in the list matches the existence of the engine as reported by GETPARAM. By using the comparison, we check both directions at once. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2020-12-08i915/query: Cross-check engine list against execbuf interfaceChris Wilson
Check that every engine listed can be used in execbuf. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Andi Shyti <andi.shyti@intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Andi Shyti <andi.shyti@intel.com>
2020-03-05tests/i915/query: Do not assert engine info rsvd being zeroTvrtko Ursulin
These are not input fields and i915 currently leaves them untouched. In the spirit of trusting the query as the authoritative source of information, stop asserting these output only reserved fields are zero. This should prevent the test from auto-failing if we extend the data in the future. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Brian Welty <brian.welty@intel.com> Reviewed-by: Brian Welty <brian.welty@intel.com>
2019-11-23tests/i915/query: Check no buffer overwriteTvrtko Ursulin
Check that the engine query is not polluting the buffer past the size it indicated it would write. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2019-05-22tests/i915_query: Engine discovery testsTvrtko Ursulin
Test the new engine discovery query. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Andi Shyti <andi.shyti@intel.com>
2019-02-20tests/i915: Rename files so they correspond to binary namesArkadiusz Hiler
So we do not have to do any rename shenanigans in the build system and the .c files are easier to find. Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>