public inbox for linux-arm-msm@vger.kernel.org
 help / color / mirror / Atom feed
From: Jordan Crouse <jcrouse-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
To: freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: bzwang-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org,
	linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	sam-uyr5N9Q2VtJg9hUCZPvPmw@public.gmane.org
Subject: [PATCH v2 0/9] drm/msm: separate iova allocation and mapping
Date: Wed,  7 Nov 2018 15:35:45 -0700	[thread overview]
Message-ID: <20181107223554.27308-1-jcrouse@codeaurora.org> (raw)

Currently in the msm driver iova addresses are mapped in the IOMMU at
allocation time and stay there for the life of the buffer. This may not
be desirable for long lived user space buffers that could be temporarily
swapped or moved.

This first set of patches breaks up the allocation and mapping into
distinct steps and adds reference counting for pinning and unpinning
the memory. Future code can use this information to manipulate the
memory when it isn't in use.

Revision 2 adds an additional 2 patches to add a description to each
buffer object so the output from the debugfs file gives a clue as to
what the buffer is used for. This is useful for debugging leaks and
will also be helpful when we start to figure out how to shrink or
move memory around.

The last patch fixes an annoyance where the ringbuffer iova was
refcounted every time the GPU started. It isn't harmful but it
sticks out like a sore thumb when debugging.

Jordan Crouse (9):
  drm/msm: Add a common function to free kernel buffer objects
  drm/msm: Remove sgt from the mmu unmap function
  drm/msm: Split msm_gem_get_iova into two steps
  drm/msm: Clean up and enhance the output of the 'gem' debugfs node
  drm/msm: Add msm_gem_get_and_pin_iova()
  drm/msm: Count how many times iova memory is pinned
  drm/msm: Add a name field for gem objects
  drm/msm: Add a name field to struct drm_msm_gem_new
  drm/msm/gpu: Map the ringbuffer in the iova at create time

 drivers/gpu/drm/msm/adreno/a5xx_debugfs.c |   6 +-
 drivers/gpu/drm/msm/adreno/a5xx_gpu.c     |  33 ++--
 drivers/gpu/drm/msm/adreno/a5xx_power.c   |  15 +-
 drivers/gpu/drm/msm/adreno/a5xx_preempt.c |  16 +-
 drivers/gpu/drm/msm/adreno/a6xx_gpu.c     |   5 +-
 drivers/gpu/drm/msm/adreno/adreno_gpu.c   |   8 -
 drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c |   6 +-
 drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c  |   4 +-
 drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c |   4 +-
 drivers/gpu/drm/msm/dsi/dsi_host.c        |   6 +-
 drivers/gpu/drm/msm/msm_drv.c             |   9 +-
 drivers/gpu/drm/msm/msm_drv.h             |  20 ++-
 drivers/gpu/drm/msm/msm_fb.c              |   6 +-
 drivers/gpu/drm/msm/msm_fbdev.c           |   2 +-
 drivers/gpu/drm/msm/msm_gem.c             | 193 ++++++++++++++++------
 drivers/gpu/drm/msm/msm_gem.h             |   4 +
 drivers/gpu/drm/msm/msm_gem_submit.c      |   4 +-
 drivers/gpu/drm/msm/msm_gem_vma.c         |  95 ++++++++---
 drivers/gpu/drm/msm/msm_gpu.c             |  18 +-
 drivers/gpu/drm/msm/msm_iommu.c           |   3 +-
 drivers/gpu/drm/msm/msm_mmu.h             |   3 +-
 drivers/gpu/drm/msm/msm_ringbuffer.c      |  14 +-
 include/uapi/drm/msm_drm.h                |   1 +
 23 files changed, 302 insertions(+), 173 deletions(-)

-- 
2.18.0

_______________________________________________
Freedreno mailing list
Freedreno@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/freedreno

             reply	other threads:[~2018-11-07 22:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-07 22:35 Jordan Crouse [this message]
     [not found] ` <20181107223554.27308-1-jcrouse-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-11-07 22:35   ` [PATCH 1/9] drm/msm: Add a common function to free kernel buffer objects Jordan Crouse
2018-11-07 22:35   ` [PATCH 2/9] drm/msm: Remove sgt from the mmu unmap function Jordan Crouse
2018-11-07 22:35   ` [PATCH 3/9] drm/msm: Split msm_gem_get_iova into two steps Jordan Crouse
2018-11-07 22:35   ` [PATCH 4/9] drm/msm: Clean up and enhance the output of the 'gem' debugfs node Jordan Crouse
2018-11-07 22:35   ` [PATCH 5/9] drm/msm: Add msm_gem_get_and_pin_iova() Jordan Crouse
2018-11-07 22:35   ` [PATCH 7/9] drm/msm: Add a name field for gem objects Jordan Crouse
2018-11-07 22:35   ` [PATCH 8/9] drm/msm: Add a name field to struct drm_msm_gem_new Jordan Crouse
2018-11-07 22:35   ` [PATCH 9/9] drm/msm/gpu: Map the ringbuffer in the iova at create time Jordan Crouse
2018-11-07 22:35 ` [PATCH 6/9] drm/msm: Count how many times iova memory is pinned Jordan Crouse

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=20181107223554.27308-1-jcrouse@codeaurora.org \
    --to=jcrouse-sgv2jx0feol9jmxxk+q4oq@public.gmane.org \
    --cc=bzwang-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=freedreno-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=sam-uyr5N9Q2VtJg9hUCZPvPmw@public.gmane.org \
    --cc=seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox