From: "Souza, Jose" Subject: Re: [PATCH] drm/i915: Add not fenceable reason to not enable FBC Date: Fri, 22 Mar 2019 00:47:11 +0000 Message-ID: References: <20190322004259.24425-1-jose.souza@intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1225604958==" Return-path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8EDD16E202 for ; Fri, 22 Mar 2019 00:47:13 +0000 (UTC) In-Reply-To: <20190322004259.24425-1-jose.souza@intel.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" Cc: "Zanoni, Paulo R" List-Id: intel-gfx@lists.freedesktop.org --===============1225604958== Content-Language: en-US Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="=-vS+S6hPL5BPNE3uQINyI" --=-vS+S6hPL5BPNE3uQINyI Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable After sent I notice that the commit descriptions feels strange to read, maybe changing to "drm/i915: Add 'not fenceable' reason to not enable FBC" makes it better, any tips? On Thu, 2019-03-21 at 17:42 -0700, Jos=C3=A9 Roberto de Souza wrote: > 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)) { > + /* Requirements not meet see > __i915_vma_set_map_and_fenceable() */ > + fbc->no_fbc_reason =3D "framebuffer is not fenceable"; > + return false; > + } > + > if (!(cache->flags & PLANE_HAS_FENCE)) { > + /* > + * If framebuffer can have fence but don't has it, it > is > + * because buffer is not tiled. > + */ > fbc->no_fbc_reason =3D "framebuffer not tiled or fenced"; > return false; > } > + > if (INTEL_GEN(dev_priv) <=3D 4 && !IS_G4X(dev_priv) && > cache->plane.rotation !=3D DRM_MODE_ROTATE_0) { > fbc->no_fbc_reason =3D "rotation unsupported"; --=-vS+S6hPL5BPNE3uQINyI 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/mOWkkFAlyUMI0ACgkQVenbO/mO WklNpAf/T6nz+VfEM4VojgkduDGFkgraRcjHbOUmuRz9CXEndzQT4BEsSuws6E0l 1/qIQTh08JdScsq+CU2uLHFXyfQR0mySAwWixb7yeiNfNWLZ/9/Xvj5/CbQX80+E uwfL+4F1I8VraMIxoF951kOlRMw4p4PiBa22LPx67ACMaj8ncyaFLMEim2tpyeQz JhGNCAIyFr5OxKcImXpU3JqjS9mhmZpqaXI3aykvWza+UnZo+eEGTWvp6DQxAqp0 j1s+VXI9vrtwo6WyhDajmKQLQGylfB70XKQLWFssHpKqioYVmZCpXfLwBgTDIyte Sef6X3T3PAOyovPdbsrCYo98Ds0w5A== =FmcQ -----END PGP SIGNATURE----- --=-vS+S6hPL5BPNE3uQINyI-- --===============1225604958== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KSW50ZWwtZ2Z4 IG1haWxpbmcgbGlzdApJbnRlbC1nZnhAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vaW50ZWwtZ2Z4 --===============1225604958==--