[PATCH v2 0/3] ast, mgag200: Map console BO while it's being displayed

Thomas Zimmermann tzimmermann at suse.de
Wed Sep 4 11:56:41 UTC 2019


(was: drm/vram-helper: Fix performance regression in fbdev)

Generic fbdev emulation maps and unmaps the console BO for updating it's
content from the shadow buffer. If this involves an actual mapping
operation (instead of reusing an existing mapping), lots of debug messages
may be printed, such as

  x86/PAT: Overlap at 0xd0000000-0xd1000000
  x86/PAT: reserve_memtype added [mem 0xd0000000-0xd02fffff], track write-combining, req write-combining, ret write-combining
  x86/PAT: free_memtype request [mem 0xd0000000-0xd02fffff]

as reported at [1]. Drivers using VRAM helpers may also see reduced
performance as the mapping operations can create overhead.

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 avoid the
frequent mappings in the fbdev code. The drivers, ast and mgag200,
map 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 strategy.

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

v2:
	* fixed comment typos

Thomas Zimmermann (3):
  drm/vram: 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         | 19 +++++++
 drivers/gpu/drm/drm_gem_vram_helper.c  | 74 +++++++++++++++++++-------
 drivers/gpu/drm/mgag200/mgag200_mode.c | 20 +++++++
 include/drm/drm_gem_vram_helper.h      | 19 +++++++
 4 files changed, 114 insertions(+), 18 deletions(-)

--
2.23.0



More information about the dri-devel mailing list