[Intel-gfx] [PATCH 1/2] drm/framebuffer: Format modifier for Intel Gen 12 render compression with Clear Color
Chery, Nanley G
nanley.g.chery at intel.com
Fri Dec 11 07:04:02 UTC 2020
> -----Original Message-----
> From: Imre Deak <imre.deak at intel.com>
> Sent: Tuesday, December 1, 2020 4:05 AM
> To: Chery, Nanley G <nanley.g.chery at intel.com>; Chris Wilson <chris at chris-
> wilson.co.uk>; Ville Syrjälä <ville.syrjala at linux.intel.com>
> Cc: Daniel Vetter <daniel at ffwll.ch>; intel-gfx at lists.freedesktop.org; Nikula,
> Jani <jani.nikula at intel.com>; Daniel Vetter <daniel.vetter at ffwll.ch>;
> Kondapally, Kalyan <kalyan.kondapally at intel.com>; Pandiyan, Dhinakaran
> <dhinakaran.pandiyan at intel.com>; dri-devel at lists.freedesktop.org
> Subject: Re: [Intel-gfx] [PATCH 1/2] drm/framebuffer: Format modifier for
> Intel Gen 12 render compression with Clear Color
>
> Hi Nanley,
>
> thanks for the review.
>
> +Ville, Chris.
>
> On Tue, Dec 01, 2020 at 02:18:26AM +0200, Chery, Nanley G wrote:
> > Hi Imre,
> >
> > I have a question and a couple comments:
> >
> > Is the map of the clear color address creating a new synchronization
> > point between the GPU and CPU? If so, I wonder how this will impact
> > performance.
>
> The kmap to read the clear value is not adding any sync overhead if
> that's what you mean. But the clear value must be in place before we
> read it out and that should be guaranteed by the flush we do anyway to wait
> for the render result (even considering the explicit L3/RT flush, depth
> stall the spec requires for fast clears).
>
> However now that you mention: atm the kmap/readout happens after the
> explicit but before the implicit fence-wait. I think it should happen
> after the implicit fence-wait.
>
> Ville, Chris, could you confirm the above and also that the above flush
> is enough to ensure the CPU read is coherent?
>
> > There was some talk of asynchronously updating the clear color
> > register a while back.
>
> Couldn't find anything with a quick search, do you have a pointer? Just
> before the flip we must wait for the render results anyway, as we do
> now, so not sure how it could be optimized.
>
There were some offline discussions, so I don't have a reference unfortunately.
Though, given what you shared above it seems like it's actually not an issue.
> > We probably don't have to update the header, but we noticed in our
> > testing that the clear color prefers an alignment greater than 64B.
> > Unfortunately, I can't find any bspec note about this. As long as the
> > buffer creators are aware though, I think we should be fine. I don't
> > know if this is the best forum to bring it up, but I thought I'd
> > share.
>
> Yes, would be good to clarify this and get it also to the spec. Then the
> driver should also check the alignment of the 3rd FB plane.
>
I plan to run some more tests and file a bug in the spec.
I see that the IGT test only clears the fb once. Just to confirm, is the
clear color offset read from on every frame? Userspace would like to be
able to pass different clear colors for an fb.
-Nanley
> > Seems like the upper converted clear color is untested due to the lack
> > of RGBX16 support. I suppose that if there are any issues there, they
> > can be fixed later...
>
> Yes, a 64bpp RC-CC subtest in IGT is missing, should be easy to add
> that.
>
> --Imre
More information about the Intel-gfx
mailing list