[PATCH v2 6/6] drm/gud: Enable synchronous flushing by default

Thomas Zimmermann tzimmermann at suse.de
Thu Dec 1 08:57:42 UTC 2022



Am 30.11.22 um 20:26 schrieb Noralf Trønnes via B4 Submission Endpoint:
> From: Noralf Trønnes <noralf at tronnes.org>
> 
> gud has a module parameter that controls whether framebuffer flushing
> happens synchronously during the commit or asynchronously in a worker.
> 
> GNOME before version 3.38 handled all displays in the same rendering loop.
> This lead to gud slowing down the refresh rate for a faster monitor. This
> has now been fixed so lets change the default.
> 
> The plan is to remove async flushing in the future. The code is now
> structured in a way that makes it easy to do this.
> 
> Link: https://blogs.gnome.org/shell-dev/2020/07/02/splitting-up-the-frame-clock/
> Suggested-by: Thomas Zimmermann <tzimmermann at suse.de>
> Signed-off-by: Noralf Trønnes <noralf at tronnes.org>

Reviewed-by: Thomas Zimmermann <tzimmermann at suse.de>

> ---
>   drivers/gpu/drm/gud/gud_pipe.c | 12 ++++--------
>   1 file changed, 4 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/gud/gud_pipe.c b/drivers/gpu/drm/gud/gud_pipe.c
> index 92189474a7ed..62c43d3632d4 100644
> --- a/drivers/gpu/drm/gud/gud_pipe.c
> +++ b/drivers/gpu/drm/gud/gud_pipe.c
> @@ -25,17 +25,13 @@
>   #include "gud_internal.h"
>   
>   /*
> - * Some userspace rendering loops runs all displays in the same loop.
> + * Some userspace rendering loops run all displays in the same loop.
>    * This means that a fast display will have to wait for a slow one.
> - * For this reason gud does flushing asynchronous by default.
> - * The down side is that in e.g. a single display setup userspace thinks
> - * the display is insanely fast since the driver reports back immediately
> - * that the flush/pageflip is done. This wastes CPU and power.
> - * Such users might want to set this module parameter to false.
> + * Such users might want to enable this module parameter.
>    */
> -static bool gud_async_flush = true;
> +static bool gud_async_flush;
>   module_param_named(async_flush, gud_async_flush, bool, 0644);
> -MODULE_PARM_DESC(async_flush, "Enable asynchronous flushing [default=true]");
> +MODULE_PARM_DESC(async_flush, "Enable asynchronous flushing [default=0]");
>   
>   /*
>    * FIXME: The driver is probably broken on Big Endian machines.
> 

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20221201/e3e5b314/attachment.sig>


More information about the dri-devel mailing list