All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>,
	igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t v7 4/5] i915/gem_render_copy.c: Simplify code by switch to rendercopy bufmgr
Date: Mon, 13 Jan 2020 16:07:19 +0000	[thread overview]
Message-ID: <157893163936.27314.8748595118150843253@skylake-alporthouse-com> (raw)
In-Reply-To: <20200113091908.11983-5-zbigniew.kempczynski@intel.com>

Quoting Zbigniew Kempczyński (2020-01-13 09:19:07)
> @@ -209,13 +94,13 @@ copy_from_linear_buf(data_t *data, struct igt_buf *src, struct igt_buf *dst)
>  
>         gem_set_domain(data->drm_fd, src->bo->handle,
>                        I915_GEM_DOMAIN_CPU, 0);
> -       linear = gem_mmap__cpu(data->drm_fd, src->bo->handle, 0,
> -                              src->bo->size, PROT_READ);
> +       linear = __gem_mmap_offset__cpu(data->drm_fd, src->bo->handle, 0,
> +                                       src->bo->size, PROT_READ);
> +       if (!linear)
> +               linear = gem_mmap__cpu(data->drm_fd, src->bo->handle, 0,
> +                                      src->bo->size, PROT_READ);

There's an argument here for
gem_mmap__cache_coherent() or (gem_mmap__cpu_coherent)

We may want something like:

linear = gem_mmap__cache_coherent();
if (!linear) {
	linear = gem_mmap__device_coherent();
	for_each_page(linear) {
		igt_memcpy_from_wc(tmp, linear + page, PAGE_SIZE);
		copy_linear_to_yt(data, dst + page, tmp);
	}
}

For complete belt and braces.
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2020-01-13 16:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-13  9:19 [igt-dev] [PATCH i-g-t v7 0/5] Simplify working on tiled surfaces over GenX Zbigniew Kempczyński
2020-01-13  9:19 ` [igt-dev] [PATCH i-g-t v7 1/5] lib/intel_bufops: Introduce buffer operations Zbigniew Kempczyński
2020-01-13 15:59   ` Chris Wilson
2020-01-13  9:19 ` [igt-dev] [PATCH i-g-t v7 2/5] lib/intel_batchbuffer: Add CCS width/height functions for Intel igt_buf Zbigniew Kempczyński
2020-01-13  9:19 ` [igt-dev] [PATCH i-g-t v7 3/5] lib/rendercopy_bufmgr: Add rendercopy buffer manager Zbigniew Kempczyński
2020-01-13  9:19 ` [igt-dev] [PATCH i-g-t v7 4/5] i915/gem_render_copy.c: Simplify code by switch to rendercopy bufmgr Zbigniew Kempczyński
2020-01-13 16:07   ` Chris Wilson [this message]
2020-01-13  9:19 ` [igt-dev] [PATCH i-g-t v7 5/5] HAX: run gem_render_copy tests in BAT Zbigniew Kempczyński
2020-01-13  9:46 ` [igt-dev] ✗ Fi.CI.BAT: failure for Simplify working on tiled surfaces over GenX (rev3) Patchwork
2020-01-13 16:09   ` Chris Wilson
2020-01-13 14:28 ` [igt-dev] ✗ GitLab.Pipeline: warning " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=157893163936.27314.8748595118150843253@skylake-alporthouse-com \
    --to=chris@chris-wilson.co.uk \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=zbigniew.kempczynski@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.