* [PATCH 1/2] drm/gud: Add Raspberry Pi Pico ID
@ 2021-07-03 14:13 Noralf Trønnes
2021-07-03 14:13 ` [PATCH 2/2] drm/gud: Add async_flush module parameter Noralf Trønnes
2021-07-03 19:24 ` [PATCH 1/2] drm/gud: Add Raspberry Pi Pico ID Peter Stuge
0 siblings, 2 replies; 5+ messages in thread
From: Noralf Trønnes @ 2021-07-03 14:13 UTC (permalink / raw)
To: dri-devel; +Cc: Noralf Trønnes, Peter Stuge
Add VID/PID for the Raspberry Pi Pico implementation.
Source: https://github.com/notro/gud-pico
Cc: Peter Stuge <peter@stuge.se>
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
---
drivers/gpu/drm/gud/gud_drv.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/gud/gud_drv.c b/drivers/gpu/drm/gud/gud_drv.c
index d02f8e968aad..eb4e08846da4 100644
--- a/drivers/gpu/drm/gud/gud_drv.c
+++ b/drivers/gpu/drm/gud/gud_drv.c
@@ -660,6 +660,7 @@ static int gud_resume(struct usb_interface *intf)
static const struct usb_device_id gud_id_table[] = {
{ USB_DEVICE_INTERFACE_CLASS(0x1d50, 0x614d, USB_CLASS_VENDOR_SPEC) },
+ { USB_DEVICE_INTERFACE_CLASS(0x16d0, 0x10a9, USB_CLASS_VENDOR_SPEC) },
{ }
};
--
2.23.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] drm/gud: Add async_flush module parameter
2021-07-03 14:13 [PATCH 1/2] drm/gud: Add Raspberry Pi Pico ID Noralf Trønnes
@ 2021-07-03 14:13 ` Noralf Trønnes
2021-07-03 19:29 ` Peter Stuge
2021-07-03 19:24 ` [PATCH 1/2] drm/gud: Add Raspberry Pi Pico ID Peter Stuge
1 sibling, 1 reply; 5+ messages in thread
From: Noralf Trønnes @ 2021-07-03 14:13 UTC (permalink / raw)
To: dri-devel; +Cc: Noralf Trønnes, Peter Stuge
Provide a way for userspace to choose synchronous flushing/pageflips.
This helps save CPU and power.
It is also useful for test scripts since userspace can know when a flush
has happended and wait before doing the next visual test.
Cc: Peter Stuge <peter@stuge.se>
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
---
drivers/gpu/drm/gud/gud_pipe.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/drivers/gpu/drm/gud/gud_pipe.c b/drivers/gpu/drm/gud/gud_pipe.c
index e0fb6cc969a3..8f56bf618ac2 100644
--- a/drivers/gpu/drm/gud/gud_pipe.c
+++ b/drivers/gpu/drm/gud/gud_pipe.c
@@ -23,6 +23,19 @@
#include "gud_internal.h"
+/*
+ * Some userspace rendering loops runs 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.
+ */
+static bool gud_async_flush = true;
+module_param_named(async_flush, gud_async_flush, bool, 0644);
+MODULE_PARM_DESC(async_flush, "Enable asynchronous flushing [default=true]");
+
/*
* FIXME: The driver is probably broken on Big Endian machines.
* See discussion:
@@ -578,6 +591,8 @@ void gud_pipe_update(struct drm_simple_display_pipe *pipe,
if (gdrm->flags & GUD_DISPLAY_FLAG_FULL_UPDATE)
drm_rect_init(&damage, 0, 0, fb->width, fb->height);
gud_fb_queue_damage(gdrm, fb, &damage);
+ if (!gud_async_flush)
+ flush_work(&gdrm->work);
}
if (!crtc->state->enable)
--
2.23.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] drm/gud: Add Raspberry Pi Pico ID
2021-07-03 14:13 [PATCH 1/2] drm/gud: Add Raspberry Pi Pico ID Noralf Trønnes
2021-07-03 14:13 ` [PATCH 2/2] drm/gud: Add async_flush module parameter Noralf Trønnes
@ 2021-07-03 19:24 ` Peter Stuge
2021-07-08 13:41 ` Noralf Trønnes
1 sibling, 1 reply; 5+ messages in thread
From: Peter Stuge @ 2021-07-03 19:24 UTC (permalink / raw)
To: Noralf Trønnes; +Cc: dri-devel
Hi Noralf,
Noralf Trønnes wrote:
> Add VID/PID for the Raspberry Pi Pico implementation.
> Source: https://github.com/notro/gud-pico
>
> +++ b/drivers/gpu/drm/gud/gud_drv.c
> @@ -660,6 +660,7 @@ static int gud_resume(struct usb_interface *intf)
>
> static const struct usb_device_id gud_id_table[] = {
> { USB_DEVICE_INTERFACE_CLASS(0x1d50, 0x614d, USB_CLASS_VENDOR_SPEC) },
> + { USB_DEVICE_INTERFACE_CLASS(0x16d0, 0x10a9, USB_CLASS_VENDOR_SPEC) },
> { }
> };
A VID/PID isn't neccessarily tied to one implementation; as long as an
implementation is in fact compatible with the driver I consider it okay
to reuse a VID/PID, and the 0x1d50 conditions are met by gud-pico too.
That said, there's no harm in adding another id. :)
Reviewed-by: Peter Stuge <peter@stuge.se>
//Peter
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] drm/gud: Add async_flush module parameter
2021-07-03 14:13 ` [PATCH 2/2] drm/gud: Add async_flush module parameter Noralf Trønnes
@ 2021-07-03 19:29 ` Peter Stuge
0 siblings, 0 replies; 5+ messages in thread
From: Peter Stuge @ 2021-07-03 19:29 UTC (permalink / raw)
To: Noralf Trønnes; +Cc: dri-devel
Noralf Trønnes wrote:
> Provide a way for userspace to choose synchronous flushing/pageflips.
> This helps save CPU and power.
>
> It is also useful for test scripts since userspace can know when a flush
> has happended and wait before doing the next visual test.
>
> Cc: Peter Stuge <peter@stuge.se>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Peter Stuge <peter@stuge.se>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] drm/gud: Add Raspberry Pi Pico ID
2021-07-03 19:24 ` [PATCH 1/2] drm/gud: Add Raspberry Pi Pico ID Peter Stuge
@ 2021-07-08 13:41 ` Noralf Trønnes
0 siblings, 0 replies; 5+ messages in thread
From: Noralf Trønnes @ 2021-07-08 13:41 UTC (permalink / raw)
To: Peter Stuge; +Cc: dri-devel
Den 03.07.2021 21.24, skrev Peter Stuge:
> Hi Noralf,
>
> Noralf Trønnes wrote:
>> Add VID/PID for the Raspberry Pi Pico implementation.
>> Source: https://github.com/notro/gud-pico
>>
>> +++ b/drivers/gpu/drm/gud/gud_drv.c
>> @@ -660,6 +660,7 @@ static int gud_resume(struct usb_interface *intf)
>>
>> static const struct usb_device_id gud_id_table[] = {
>> { USB_DEVICE_INTERFACE_CLASS(0x1d50, 0x614d, USB_CLASS_VENDOR_SPEC) },
>> + { USB_DEVICE_INTERFACE_CLASS(0x16d0, 0x10a9, USB_CLASS_VENDOR_SPEC) },
>> { }
>> };
>
> A VID/PID isn't neccessarily tied to one implementation; as long as an
> implementation is in fact compatible with the driver I consider it okay
> to reuse a VID/PID, and the 0x1d50 conditions are met by gud-pico too.
> That said, there's no harm in adding another id. :)
>
> Reviewed-by: Peter Stuge <peter@stuge.se>
>
Both patches applied, thanks for reviewing.
Noralf.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-07-08 13:41 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-03 14:13 [PATCH 1/2] drm/gud: Add Raspberry Pi Pico ID Noralf Trønnes
2021-07-03 14:13 ` [PATCH 2/2] drm/gud: Add async_flush module parameter Noralf Trønnes
2021-07-03 19:29 ` Peter Stuge
2021-07-03 19:24 ` [PATCH 1/2] drm/gud: Add Raspberry Pi Pico ID Peter Stuge
2021-07-08 13:41 ` Noralf Trønnes
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.