All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: daniel@ffwll.ch, noralf@tronnes.org, airlied@linux.ie,
	rong.a.chen@intel.com, feng.tang@intel.com, ying.huang@intel.com,
	sean@poorly.run, maxime.ripard@bootlin.com,
	maarten.lankhorst@linux.intel.com, dave@stgolabs.net,
	kraxel@redhat.com
Cc: Thomas Zimmermann <tzimmermann@suse.de>, dri-devel@lists.freedesktop.org
Subject: [PATCH v3 0/3] Implement lazy unmapping for GEM VRAM buffers
Date: Fri,  6 Sep 2019 10:52:11 +0200	[thread overview]
Message-ID: <20190906085214.11677-1-tzimmermann@suse.de> (raw)

(was: ast, mgag200: Map console BO while it's being displayed)

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.

In v3 of the patch set, this problem is being solved by lazyly unmapping
the buffer as suggested by Gerd. Unmapping with drm_gem_vram_kunmap() only
changes a reference counter. VRAM helpers only perform the unmapping
operation when TTM evicts the buffer object from its current location. If
the buffer is never evicted, the existing mapping is reused by later calls
to drm_gem_vram_kmap().

v3:
	* implement lazy unmapping
v2:
      	* fixed comment typos

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

Thomas Zimmermann (3):
  drm/vram: Add kmap ref-counting to GEM VRAM objects
  drm/vram: Add infrastructure for move_notify()
  drm/vram: Implement lazy unmapping for GEM VRAM buffers

 drivers/gpu/drm/drm_gem_vram_helper.c | 112 +++++++++++++++++++++-----
 drivers/gpu/drm/drm_vram_mm_helper.c  |  12 +++
 include/drm/drm_gem_vram_helper.h     |  23 ++++++
 include/drm/drm_vram_mm_helper.h      |   4 +
 4 files changed, 130 insertions(+), 21 deletions(-)

--
2.23.0

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

             reply	other threads:[~2019-09-06  8:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-06  8:52 Thomas Zimmermann [this message]
2019-09-06  8:52 ` [PATCH v3 1/3] drm/vram: Add kmap ref-counting to GEM VRAM objects Thomas Zimmermann
2019-09-06  9:09   ` Daniel Vetter
2019-09-06  8:52 ` [PATCH v3 2/3] drm/vram: Add infrastructure for move_notify() Thomas Zimmermann
2019-09-06  9:28   ` Daniel Vetter
2019-09-06 10:24     ` Thomas Zimmermann
2019-09-06 13:05       ` Daniel Vetter
2019-09-06 14:01         ` Thomas Zimmermann
2019-09-06  8:52 ` [PATCH v3 3/3] drm/vram: Implement lazy unmapping for GEM VRAM buffers Thomas Zimmermann
2019-09-06  9:39   ` Gerd Hoffmann
2019-09-06 10:37     ` Thomas Zimmermann
2019-09-06 11:18       ` Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190906085214.11677-1-tzimmermann@suse.de \
    --to=tzimmermann@suse.de \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dave@stgolabs.net \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=feng.tang@intel.com \
    --cc=kraxel@redhat.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=maxime.ripard@bootlin.com \
    --cc=noralf@tronnes.org \
    --cc=rong.a.chen@intel.com \
    --cc=sean@poorly.run \
    --cc=ying.huang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.