From: "Souza, Jose" Subject: Re: [PATCH] drm/i915: Add not fenceable reason to not enable FBC Date: Tue, 26 Mar 2019 01:11:06 +0000 Message-ID: References: <20190322004259.24425-1-jose.souza@intel.com> <155323836208.26447.7033200965287682560@skylake-alporthouse-com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1809542812==" Return-path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4C7A76E72E for ; Tue, 26 Mar 2019 01:11:09 +0000 (UTC) In-Reply-To: <155323836208.26447.7033200965287682560@skylake-alporthouse-com> Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: "intel-gfx@lists.freedesktop.org" , "chris@chris-wilson.co.uk" Cc: "Zanoni, Paulo R" List-Id: intel-gfx@lists.freedesktop.org --===============1809542812== Content-Language: en-US Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="=-Vwm1AAH+60MDnrvQKFXM" --=-Vwm1AAH+60MDnrvQKFXM Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, 2019-03-22 at 07:06 +0000, Chris Wilson wrote: > Quoting Jos=C3=A9 Roberto de Souza (2019-03-22 00:42:59) > > There is some kms_frontbuffer_tracking failures due FBC being > > disabled with the reason "framebuffer not tiled or fenced". > > Although the test is setting up everything correctly to have > > FBC enabled sporadically it is failing, due the alignment and size > > restrictions in __i915_vma_set_map_and_fenceable(). > >=20 > > So lets add another FBC failure reason and skip tests when that is > > set and keep "framebuffer not tiled or fenced" as error as it > > indicates that buffer is not tiled due wrong setup of the test. > >=20 > > Also fixing close typos. > >=20 > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=3D108040 > > Cc: Paulo Zanoni > > Signed-off-by: Jos=C3=A9 Roberto de Souza > > --- > > drivers/gpu/drm/i915/intel_fbc.c | 15 +++++++++++++-- > > 1 file changed, 13 insertions(+), 2 deletions(-) > >=20 > > diff --git a/drivers/gpu/drm/i915/intel_fbc.c > > b/drivers/gpu/drm/i915/intel_fbc.c > > index 656e684e7c9a..2980a3b579e0 100644 > > --- a/drivers/gpu/drm/i915/intel_fbc.c > > +++ b/drivers/gpu/drm/i915/intel_fbc.c > > @@ -726,19 +726,30 @@ static bool intel_fbc_can_activate(struct > > intel_crtc *crtc) > > * by the CPU to the scanout and trigger updates to the > > FBC. > > * > > * Note that is possible for a tiled surface to be > > unmappable (and > > - * so have no fence associated with it) due to aperture > > constaints > > + * so have no fence associated with it) due to aperture > > constraints > > * at the time of pinning. > > * > > * FIXME with 90/270 degree rotation we should use the > > fence on > > * the normal GTT view (the rotated view doesn't even have > > a > > * fence). Would need changes to the FBC fence Y offset as > > well. > > - * For now this will effecively disable FBC with 90/270 > > degree > > + * For now this will effectively disable FBC with 90/270 > > degree > > * rotation. > > */ > > + if (!(cache->vma->flags & I915_VMA_CAN_FENCE)) { >=20 > if (!i915_vma_is_map_and_fenceable(cache->vma)) { Thanks >=20 > > + /* Requirements not meet see > > __i915_vma_set_map_and_fenceable() */ >=20 > I would suggest pointing at intel_pin_and_fence_fb and > i915_gem_object_pin_to_display_plane as to why it chose not to > require > a fence. Oh so even if i915_vma_is_map_and_fenceable() returns true in intel_pin_and_fence_fb_obj() it could still fail to set the fence in i915_vma_pin_fence() because there is no fences available. So I guess is better not add 'framebuffer is not fenceable' and skip tests when 'framebuffer not tiled or fenced' is set, what do you think? > -Chris --=-Vwm1AAH+60MDnrvQKFXM Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEVNG051EijGa0MiaQVenbO/mOWkkFAlyZfCkACgkQVenbO/mO Wkn1vQf/ddV0ODgw68L7jxS2UgYBtavAEoSykajIorkB+dyrE/XcwOQG/i5DtXJG Pp6Ux/qijf+7MjrS5UeJ14O/leY8YCMaGdpOGU3T79Fu6r+rYvsj8Ekv3f0jYQpe vbt1RbHIB9NQIB4nZGBX2p3gcLztwFgeU29fr2qVWnVGExKXbI0L7uEq2GX7XZFZ v7N8z4Gs1j9YndethO4G3ftLTPjzfksZXTh2wX78kgNPEhjRJvf1pyxPyZoxph6h I/LYCRxosVfhyB7Lu3Rco2UHcPzMZyac7p4JtskyDGaPva57beAMbcSBxza8FNIG 1+U0uvpakTmAgTUjzEmU+mdoVeOlvA== =gVme -----END PGP SIGNATURE----- --=-Vwm1AAH+60MDnrvQKFXM-- --===============1809542812== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KSW50ZWwtZ2Z4 IG1haWxpbmcgbGlzdApJbnRlbC1nZnhAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vaW50ZWwtZ2Z4 --===============1809542812==--