All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: airlied@redhat.com, daniel@ffwll.ch,
	maarten.lankhorst@linux.intel.com, mripard@kernel.org,
	hdegoede@redhat.com, christian.koenig@amd.com
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 0/8] drm/vram-helper: Lock GEM BOs while they are mapped
Date: Mon, 30 Nov 2020 13:45:28 +0100	[thread overview]
Message-ID: <1d8874bf-3683-0b53-da69-d39dc6fd5d1d@suse.de> (raw)
In-Reply-To: <20201130120433.7205-1-tzimmermann@suse.de>


[-- Attachment #1.1.1: Type: text/plain, Size: 2877 bytes --]

Hi

Am 30.11.20 um 13:04 schrieb Thomas Zimmermann:
> GEM VRAM helpers used to pin the BO in their implementation of vmap, so
> that they could not be relocated. In a recent discussion, [1] it became

[1] was supposed to point to the discussion at

   https://patchwork.freedesktop.org/patch/400054/?series=83765&rev=1



> clear that this is incorrect and that vmap should rather repend on the
> reservation lock to prevent relocation. This patchset addresses the issue.
> Besides the vram helpers, this affects ast, vboxvideo and the generic
> fbdev emulation.
> 
> Patch 1 adds a few more rules to vmap internfaces. With VRAM, it is
> necessary to keep the BO evictable, which requires soem care when mapping
> the memory. Patch 2 changes ast's cursor code accordingly.
> 
> Patch 3 adds vram helpers that acquires the reservation lock and vmap the
> memory buffer. Same for vunmap in reverse. Patches 4 and 5 convert ast
> and vboxvideo to the new helper.
> 
> Patch 6 removes pinning and locking from VRAM helper's vmap and vunmap.
> The affected users in ast and fbdev emulation acquire the reservation
> locks of the GEM objects before vmapping BOs. VRAM helpers don't support
> to export the buffer, so there are no other users of these functions.
> 
> The the pinning and locking removed, vmap can be simplified as done in
> patches 7 and 8.
> 
> Tested on ast with GEM VRAM and also on mgag200 to verify that the fbdev
> change does not interfere with GEM SHMEM.
> 
> Thomas Zimmermann (8):
>    drm/gem: Write down some rules for vmap usage
>    drm/ast: Only map cursor BOs during updates
>    drm/vram-helper: Provide drm_gem_vram_vmap_unlocked()
>    drm/ast: Use drm_gem_vram_vmap_unlocked() in ast_cursor_show()
>    drm/vboxvideo: Use drm_gem_vram_vmap_unlocked() in cursor update
>    drm/vram-helper: Remove pinning and locking from drm_gem_vram_vmap()
>    drm/vram-helper: Remove vmap reference counting
>    drm/vram-helper: Simplify vmap implementation
> 
>   drivers/gpu/drm/ast/ast_cursor.c      |  63 +++++++++-------
>   drivers/gpu/drm/ast/ast_drv.h         |   2 -
>   drivers/gpu/drm/drm_client.c          |  31 ++++++++
>   drivers/gpu/drm/drm_fb_helper.c       |  10 ++-
>   drivers/gpu/drm/drm_gem_vram_helper.c | 101 +++++++++++++-------------
>   drivers/gpu/drm/drm_prime.c           |   6 ++
>   drivers/gpu/drm/vboxvideo/vbox_mode.c |   7 +-
>   include/drm/drm_client.h              |   2 +
>   include/drm/drm_gem.h                 |  16 ++++
>   include/drm/drm_gem_vram_helper.h     |  21 ++----
>   10 files changed, 159 insertions(+), 100 deletions(-)
> 
> --
> 2.29.2
> 

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

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

      parent reply	other threads:[~2020-11-30 12:45 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-30 12:04 [PATCH 0/8] drm/vram-helper: Lock GEM BOs while they are mapped Thomas Zimmermann
2020-11-30 12:04 ` [PATCH 1/8] drm/gem: Write down some rules for vmap usage Thomas Zimmermann
2020-11-30 15:30   ` Daniel Vetter
2020-11-30 15:33     ` Christian König
2020-12-01  8:32       ` Thomas Zimmermann
2020-12-01  9:10         ` Daniel Vetter
2020-12-01  9:40           ` Thomas Zimmermann
2020-12-01 10:00             ` Daniel Vetter
2020-12-01 10:27               ` Thomas Zimmermann
2020-12-01 10:34                 ` Christian König
2020-12-01 11:30                   ` Thomas Zimmermann
2020-12-01 12:14                     ` Christian König
2020-12-01 12:33                       ` Thomas Zimmermann
2020-12-01 12:38                         ` Christian König
2020-12-01 12:51                           ` Thomas Zimmermann
2020-12-01 12:53                             ` Thomas Zimmermann
2020-12-01 13:05                               ` Christian König
2020-12-01 16:54                 ` Daniel Vetter
2020-12-01 12:05               ` Thomas Zimmermann
2020-12-01  9:13         ` Christian König
2020-12-01  9:30           ` Thomas Zimmermann
2020-12-01  8:15     ` Thomas Zimmermann
2020-11-30 12:04 ` [PATCH 2/8] drm/ast: Only map cursor BOs during updates Thomas Zimmermann
2020-11-30 12:04 ` [PATCH 3/8] drm/vram-helper: Provide drm_gem_vram_vmap_unlocked() Thomas Zimmermann
2020-11-30 12:04 ` [PATCH 4/8] drm/ast: Use drm_gem_vram_vmap_unlocked() in ast_cursor_show() Thomas Zimmermann
2020-11-30 12:04 ` [PATCH 5/8] drm/vboxvideo: Use drm_gem_vram_vmap_unlocked() in cursor update Thomas Zimmermann
2020-11-30 12:04 ` [PATCH 6/8] drm/vram-helper: Remove pinning and locking from drm_gem_vram_vmap() Thomas Zimmermann
2020-11-30 12:04 ` [PATCH 7/8] drm/vram-helper: Remove vmap reference counting Thomas Zimmermann
2020-11-30 12:04 ` [PATCH 8/8] drm/vram-helper: Simplify vmap implementation Thomas Zimmermann
2020-11-30 12:27 ` [PATCH 0/8] drm/vram-helper: Lock GEM BOs while they are mapped Christian König
2020-11-30 12:45 ` Thomas Zimmermann [this message]

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=1d8874bf-3683-0b53-da69-d39dc6fd5d1d@suse.de \
    --to=tzimmermann@suse.de \
    --cc=airlied@redhat.com \
    --cc=christian.koenig@amd.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hdegoede@redhat.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    /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.