Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ville Syrjala <ville.syrjala@intel.com>,
	Rafael Antognolli <rafael.antognolli@intel.com>,
	intel-gfx@lists.freedesktop.org,
	Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>,
	Nanley G Chery <nanley.g.chery@intel.com>,
	Shashank Sharma <shashank.sharma@intel.com>
Subject: Re: [Intel-gfx] [PATCH 2/2] drm/i915/tgl: Add Clear Color support for TGL Render Decompression
Date: Tue, 1 Dec 2020 22:50:21 +0200	[thread overview]
Message-ID: <20201201205021.GD2849269@ideak-desk.fi.intel.com> (raw)
In-Reply-To: <160682607520.4024.5213539229190522123@build.alporthouse.com>

On Tue, Dec 01, 2020 at 12:34:35PM +0000, Chris Wilson wrote:
> [...]
> > @@ -16647,6 +16697,20 @@ static int intel_plane_pin_fb(struct intel_plane_state *plane_state)
> >  
> >         plane_state->vma = vma;
> >  
> > +       if (fb->modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC) {
> > +               void *map = kmap_atomic(i915_gem_object_get_page(intel_fb_obj(fb),
> > +                                                                fb->offsets[2] >> PAGE_SHIFT));
> 
> So at this point in time, we have only queued the wait for render
> completion (asynchronous waits) and not actually waited on either the
> explicit or implicit fences.
> 
> Only at intel_atomic_commit_tail do we know that the GPU [+ccs]
> writes will have been flushed.

Ok, so after intel_atomic_commit_fence_wait(). One problem is that
atomic state should not really get modified any more in commit_tail().
But I introduced that already earlier with the TC/TBT PLL selection, so
now I'd add one more exception.

> There's also the matter of coherency. Is the object coherent for reads
> from the CPU? -- in most cases it will not be, but you should check
> obj->cache_coherency to see if the read requires a preceding
> cache_clflush_range() / drm_clflush_virt_range().

Ok, at this point for the TGL-only modifier, we could then just
warn_on(!bo_cache_coherent_for_read) due to HAS_LLC.

> Also the page may not exist, not all scanout objects are backed by struct
> page. In which case, pulling it from a vmap (i915_gem_object_pin_map, or
> iomap) may be required. (A i915_gem_object_read may be very useful for
> such small accesses.)

Ok. Afaiu on TGL this would need the io/vmap special casing for stolen
memory only. That's only used for BIOS FBs, which is unlikely to be
fast-cleared and we haven't even added support to initial_fb for that.
Could we get away with that assumption and keep using kmap_atomic at
least for now?

Thanks for the explanation!

--Imre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2020-12-01 20:50 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-23 18:26 [Intel-gfx] [PATCH 1/2] drm/framebuffer: Format modifier for Intel Gen 12 render compression with Clear Color Imre Deak
2020-11-23 18:26 ` [Intel-gfx] [PATCH 2/2] drm/i915/tgl: Add Clear Color support for TGL Render Decompression Imre Deak
2020-11-27  9:27   ` Kahola, Mika
2020-12-01 12:34   ` Chris Wilson
2020-12-01 20:50     ` Imre Deak [this message]
2020-12-01 21:10       ` Chris Wilson
2020-12-01 21:31         ` Imre Deak
2020-11-23 20:54 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] drm/framebuffer: Format modifier for Intel Gen 12 render compression with Clear Color Patchwork
2020-11-23 20:56 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2020-11-23 21:24 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2020-11-24 15:12   ` Imre Deak
2020-11-24 17:15     ` Vudum, Lakshminarayana
2020-11-24 17:12 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-11-24 21:57 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2020-11-26  8:24 ` [Intel-gfx] [PATCH 1/2] " Kahola, Mika
2020-11-27 14:31 ` Imre Deak
2020-11-27 15:19   ` Daniel Vetter
2020-11-27 18:06     ` Imre Deak
2020-12-01  0:18       ` Chery, Nanley G
2020-12-01 12:04         ` Imre Deak
2020-12-11  7:04           ` Chery, Nanley G
2020-12-14 16:22             ` Imre Deak
2020-11-30 10:00     ` Jani Nikula

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=20201201205021.GD2849269@ideak-desk.fi.intel.com \
    --to=imre.deak@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=dhinakaran.pandiyan@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=nanley.g.chery@intel.com \
    --cc=rafael.antognolli@intel.com \
    --cc=shashank.sharma@intel.com \
    --cc=ville.syrjala@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox