Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752389AbdHIRiq (ORCPT ); Wed, 9 Aug 2017 13:38:46 -0400 Received: from anholt.net ([50.246.234.109]:45990 "EHLO anholt.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751704AbdHIRip (ORCPT ); Wed, 9 Aug 2017 13:38:45 -0400 From: Eric Anholt To: Boris Brezillon Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] drm/vc4: Add exec flags to allow forcing a specific X/Y tile walk order. In-Reply-To: <20170804115913.01274d01@bbrezillon> References: <20170725162733.28007-1-eric@anholt.net> <20170725162733.28007-2-eric@anholt.net> <20170804115913.01274d01@bbrezillon> User-Agent: Notmuch/0.22.2+1~gb0bcfaa (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) Date: Tue, 08 Aug 2017 13:27:36 -0700 Message-ID: <87d185g5zb.fsf@eliezer.anholt.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4684 Lines: 121 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Boris Brezillon writes: > On Tue, 25 Jul 2017 09:27:33 -0700 > Eric Anholt wrote: > >> This is useful to allow GL to provide defined results for overlapping >> glBlitFramebuffer, which X11 in turn uses to accelerate uncomposited >> window movement without first blitting to a temporary. x11perf >> -copywinwin100 goes from 1850/sec to 4850/sec. >>=20 >> Signed-off-by: Eric Anholt >> --- >>=20 >> The work-in-progress userspace is at: >>=20 >> https://github.com/anholt/xserver/commits/glamor-draw-bounds-overlap >> https://github.com/anholt/mesa/commits/vc4-overlapping-blit >>=20 >> and the next step is to build the GL extension spec and piglit tests >> for it. >>=20 >> drivers/gpu/drm/vc4/vc4_drv.c | 1 + >> drivers/gpu/drm/vc4/vc4_gem.c | 5 ++++- >> drivers/gpu/drm/vc4/vc4_render_cl.c | 21 ++++++++++++++++----- >> include/uapi/drm/vc4_drm.h | 11 +++++++++++ >> 4 files changed, 32 insertions(+), 6 deletions(-) >>=20 >> diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv= .c >> index c6b487c3d2b7..b5c2c28289ed 100644 >> --- a/drivers/gpu/drm/vc4/vc4_drv.c >> +++ b/drivers/gpu/drm/vc4/vc4_drv.c >> @@ -99,6 +99,7 @@ static int vc4_get_param_ioctl(struct drm_device *dev,= void *data, >> case DRM_VC4_PARAM_SUPPORTS_BRANCHES: >> case DRM_VC4_PARAM_SUPPORTS_ETC1: >> case DRM_VC4_PARAM_SUPPORTS_THREADED_FS: >> + case DRM_VC4_PARAM_SUPPORTS_FIXED_RCL_ORDER: >> args->value =3D true; >> break; >> default: >> diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem= .c >> index a3e45e67f417..ba0782ebda34 100644 >> --- a/drivers/gpu/drm/vc4/vc4_gem.c >> +++ b/drivers/gpu/drm/vc4/vc4_gem.c >> @@ -1008,7 +1008,10 @@ vc4_submit_cl_ioctl(struct drm_device *dev, void = *data, >> struct ww_acquire_ctx acquire_ctx; >> int ret =3D 0; >>=20=20 >> - if ((args->flags & ~VC4_SUBMIT_CL_USE_CLEAR_COLOR) !=3D 0) { >> + if ((args->flags & ~(VC4_SUBMIT_CL_USE_CLEAR_COLOR | >> + VC4_SUBMIT_CL_FIXED_RCL_ORDER | >> + VC4_SUBMIT_CL_RCL_ORDER_INCREASING_X | >> + VC4_SUBMIT_CL_RCL_ORDER_INCREASING_Y)) !=3D 0) { >> DRM_DEBUG("Unknown flags: 0x%02x\n", args->flags); >> return -EINVAL; >> } >> diff --git a/drivers/gpu/drm/vc4/vc4_render_cl.c b/drivers/gpu/drm/vc4/v= c4_render_cl.c >> index da3bfd53f0bd..c3b064052147 100644 >> --- a/drivers/gpu/drm/vc4/vc4_render_cl.c >> +++ b/drivers/gpu/drm/vc4/vc4_render_cl.c >> @@ -261,8 +261,17 @@ static int vc4_create_rcl_bo(struct drm_device *dev= , struct vc4_exec_info *exec, >> uint8_t max_y_tile =3D args->max_y_tile; >> uint8_t xtiles =3D max_x_tile - min_x_tile + 1; >> uint8_t ytiles =3D max_y_tile - min_y_tile + 1; >> - uint8_t x, y; >> + uint8_t xi, yi; >> uint32_t size, loop_body_size; >> + bool positive_x =3D false; >> + bool positive_y =3D false; >> + >> + if (args->flags & VC4_SUBMIT_CL_FIXED_RCL_ORDER) { >> + if (args->flags & VC4_SUBMIT_CL_RCL_ORDER_INCREASING_X) >> + positive_x =3D true; >> + if (args->flags & VC4_SUBMIT_CL_RCL_ORDER_INCREASING_Y) >> + positive_y =3D true; >> + } > > Are you sure you want the default value of positive_x/y to be false? It > seems to me that before this patch you were always iterating in > ascending order, but now, when VC4_SUBMIT_CL_FIXED_RCL_ORDER is not > set you do the opposite. Maybe you really want to change the default > behavior, just wanted to point this out. > > Otherwise, > > Reviewed-by: Boris Brezillon I was undecided as well, but if you also thought it was funny to change the default, that's convinced me to keep it the same. Thanks! --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE/JuuFDWp9/ZkuCBXtdYpNtH8nugFAlmKHrkACgkQtdYpNtH8 nuhFOw//QalxNHmiaxcg1DEOTeGMZxoFnVVXlq8zDTEqBH1/Ra+AxGX2neBXynOZ RD7JlSVLHtOKDYgQ1KHLbOMpg4dI/fRiOYOj7aRas2GxuraWanSXLvs0Qq8HaJ2z 1Bb8YAOb/LjOvlM+GIDsWXoQ7+KaxyAdDmXqj4cg89kbomOY+qHAFB+zroGbQFCR 89Iod2KnHMhhnfwmpP68WOXaykj9QBPMwcgTls3M0alJftg/bgEY8u0N59/xl7l6 L4fDUxuVo9dpfwUNjmHOssBbIHGHda3qauACM0ajnrnpof1/OpMkC0Ts2y2ykPZt 6vMZkRJ7cosKgxTjBgpHIgjIfjCo2lRF46KGmLW+lgNf6+ez9+4EQeo4qv4CIL7g I3pxLRTIk5dg4gD+WlYH5/0pcOTt7mBkxtJp7ewlPo/HtdVwSvqblPI/oPIuLQWl RuZWuZLw0O8d/a+Pi7BZ7FKiYkQYaCICnMbVC86PdIbhV5664jbUQmZrnQZBaMBW Wgat4Pt+4XS8yPszTwN67sJvXwIEf2KSfp58k1QZKYvdcfxlkZeVGNjdKfMHSfY6 yNpVAEWz5hNB+d7nufk+e6EV+e4sdu0+uxk8RCbJPvuJ3vWPiH6blICzwmb4/RL/ BzMGlp2PNni6/Dy3LwpxyWvXwZ+XYvnaIEft4nIvotB5fqM6Iks= =jU8W -----END PGP SIGNATURE----- --=-=-=--