[PATCH 0/3] drm/vram-helper: Fix performance regression in fbdev

Thomas Zimmermann tzimmermann at suse.de
Thu Aug 1 11:56:39 UTC 2019


Generic fbdev emulation maps and unmaps the console BO for updating it's
content from the shadow buffer. Drivers using VRAM helpers may see reduced
performance as the mapping operations can create significant overhead.
A report of this problem is at [1].

This patch set fixes the problem by adding a ref counter to the GEM
VRAM buffers' kmap operation, and keeping the fbdev's console buffer
mapped while the console is being displayed. These changes avoids the
frequent mappings in the fbdev code. The drivers, ast and mgag200,
maps the console's buffer when it becomes visible and the fbdev code
reuses this mapping. The original fbdev code in ast and mgag200 used
the same optimization.

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

Thomas Zimmermann (3):
  drm/vram-helpers: Add kmap ref-counting to GEM VRAM objects
  drm/ast: Map fbdev framebuffer while it's being displayed
  drm/mgag200: Map fbdev framebuffer while it's being displayed

 drivers/gpu/drm/ast/ast_mode.c         | 20 +++++++
 drivers/gpu/drm/drm_gem_vram_helper.c  | 74 +++++++++++++++++++-------
 drivers/gpu/drm/mgag200/mgag200_mode.c | 21 ++++++++
 include/drm/drm_gem_vram_helper.h      | 13 +++++
 4 files changed, 110 insertions(+), 18 deletions(-)

--
2.22.0



More information about the dri-devel mailing list