[igt-dev] [PATCH i-g-t 1/1] lib/i915/gem_ring : set the engine to default context

Chris Wilson chris at chris-wilson.co.uk
Mon Feb 17 11:12:49 UTC 2020


Quoting Bommu Krishnaiah (2020-02-17 05:50:19)
> Copy the existing engine map from default context to
> newly created  default context
> 
> Signed-off-by: Bommu Krishnaiah <krishnaiah.bommu at intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> ---
>  lib/i915/gem_ring.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/i915/gem_ring.c b/lib/i915/gem_ring.c
> index 99f4741c..c2eae836 100644
> --- a/lib/i915/gem_ring.c
> +++ b/lib/i915/gem_ring.c
> @@ -143,11 +143,13 @@ __gem_measure_ring_inflight(int fd, unsigned int engine, enum measure_ring_flags
>   * Number of batches that fit in the ring
>   */
>  unsigned int
> -gem_measure_ring_inflight(int fd, unsigned int engine, enum measure_ring_flags flags)
> +gem_measure_ring_inflight(int sfd, unsigned int engine, enum measure_ring_flags flags)
>  {
>         unsigned int min = ~0u;
> +       uint32_t fd;
>  
> -       fd = gem_reopen_driver(fd);
> +       fd = gem_reopen_driver(sfd);
> +       gem_context_copy_engines(sfd, 0, fd, 0);

Hah, what happens if engine was ring as intended?
-Chris


More information about the igt-dev mailing list