All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/4] Rate-limit shadow-FB-to-console-update to screen refresh
@ 2019-12-05 16:01 Thomas Zimmermann
  2019-12-05 16:01 ` [PATCH v3 1/4] drm/mgag200: Create fbdev console after registering device Thomas Zimmermann
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Thomas Zimmermann @ 2019-12-05 16:01 UTC (permalink / raw)
  To: daniel, airlied, noralf, rong.a.chen, ying.huang, ville.syrjala,
	sam, emil.velikov, maarten.lankhorst, mripard
  Cc: Thomas Zimmermann, dri-devel

A full-screen memcpy() moves the console's shadow buffer to hardware; with
possibly significant runtime overhead. [1] Synchronizing the screen update
with VBLANK events can hopefully reduce the number of screen updates.

The patchset first adds vblank support to mgag200 as the problem was
initially reported for Matrox hardware.

The console's dirty worker now waits for the vblank to rate limit the
output frequency. Screen output can pile up while waiting and there's a
chance that multiple screen updates can be handled with a single memcpy().
Note that this has no effect on tearing: while the dirty worker updates
the hardware buffer, new data can still arrive in the shadow buffer. This
can create a tearing effcet, even though console output is synchronized
to vblank.

In version 2 of this patchset, fbdev emulation missed the first vblank
event because mgag200 initialized the fbdev console before the irq.
Initializing fbdev last fixes this problem. If other drivers now start
reporting a missed vblank during boot, this might be the reason.

The patchset was tested by running fbdev emulation and Gnome (X11) on
mgag200 HW.

v3:
	* fbdev: hold helper->mutex
	* fbdev: acquire DRM master so other masters cannot interfere
	* mgag200: init fbdev after irq avoids missing first vblank
	* mgag200: trigger irq at <vdisplay> + 1 matches vblank
v2:
	* remove locking from fbdev patch
	* use constants for mgag200 register names and fields
	* double-check that VLINE irq is active on mgag200
	* only signal vblank on CRTC 0 of mgag200
	* coding-style fixes

[1] https://lists.freedesktop.org/archives/dri-devel/2019-July/228663.html

Thomas Zimmermann (4):
  drm/mgag200: Create fbdev console after registering device
  drm/mgag200: Rename constant MGAREG_Status to MGAREG_STATUS
  drm/mgag200: Add vblank support
  drm/fb-helper: Synchronize dirty worker with vblank

 drivers/gpu/drm/drm_fb_helper.c        | 21 ++++++++++
 drivers/gpu/drm/mgag200/mgag200_drv.c  |  7 ++++
 drivers/gpu/drm/mgag200/mgag200_drv.h  |  1 +
 drivers/gpu/drm/mgag200/mgag200_main.c | 38 +++++++++++++++++-
 drivers/gpu/drm/mgag200/mgag200_mode.c | 54 ++++++++++++++++++++++----
 drivers/gpu/drm/mgag200/mgag200_reg.h  |  7 +++-
 6 files changed, 119 insertions(+), 9 deletions(-)

--
2.23.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-12-09 14:13 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-05 16:01 [PATCH v3 0/4] Rate-limit shadow-FB-to-console-update to screen refresh Thomas Zimmermann
2019-12-05 16:01 ` [PATCH v3 1/4] drm/mgag200: Create fbdev console after registering device Thomas Zimmermann
2019-12-05 16:01 ` [PATCH v3 2/4] drm/mgag200: Rename constant MGAREG_Status to MGAREG_STATUS Thomas Zimmermann
2019-12-05 16:01 ` [PATCH v3 3/4] drm/mgag200: Add vblank support Thomas Zimmermann
2019-12-05 17:25   ` Sam Ravnborg
2019-12-05 18:28     ` Thomas Zimmermann
2019-12-05 18:56       ` Emil Velikov
2019-12-05 16:01 ` [PATCH v3 4/4] drm/fb-helper: Synchronize dirty worker with vblank Thomas Zimmermann
2019-12-09 14:11   ` Emil Velikov
2019-12-05 17:31 ` [PATCH v3 0/4] Rate-limit shadow-FB-to-console-update to screen refresh Sam Ravnborg

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.