linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jordan Crouse <jcrouse@codeaurora.org>
To: freedreno@lists.freedesktop.org
Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
	Sushmita Susheelendra <ssusheel@codeaurora.org>
Subject: [PATCH 3/6] drm/msm: Map command buffers to kernel only if required
Date: Tue,  3 Oct 2017 09:27:03 -0600	[thread overview]
Message-ID: <1507044426-4042-4-git-send-email-jcrouse@codeaurora.org> (raw)
In-Reply-To: <1507044426-4042-1-git-send-email-jcrouse@codeaurora.org>

From: Sushmita Susheelendra <ssusheel@codeaurora.org>

Map command buffers to the kernel address space only if
relocs are specified for the submission. This reduces some
overhead on the submission path.

Signed-off-by: Sushmita Susheelendra <ssusheel@codeaurora.org>
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
---
 drivers/gpu/drm/msm/msm_gem_submit.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/msm/msm_gem_submit.c b/drivers/gpu/drm/msm/msm_gem_submit.c
index 2708d3a..2d2aa65 100644
--- a/drivers/gpu/drm/msm/msm_gem_submit.c
+++ b/drivers/gpu/drm/msm/msm_gem_submit.c
@@ -320,6 +320,9 @@ static int submit_reloc(struct msm_gem_submit *submit, struct msm_gem_object *ob
 		return -EINVAL;
 	}
 
+	if (nr_relocs == 0)
+		return 0;
+
 	/* For now, just map the entire thing.  Eventually we probably
 	 * to do it page-by-page, w/ kmap() if not vmap()d..
 	 */
-- 
1.9.1

  parent reply	other threads:[~2017-10-03 15:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-03 15:27 [PATCH 0/6] drm/msm: Fixes and updates for 4.15 Jordan Crouse
     [not found] ` <1507044426-4042-1-git-send-email-jcrouse-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2017-10-03 15:27   ` [PATCH 1/6] drm/msm: Fix race condition in the submit path Jordan Crouse
2017-10-03 15:27   ` [PATCH 2/6] drm/msm: dump a rd GPUADDR header for all buffers in the command Jordan Crouse
2017-10-03 15:27   ` [PATCH 5/6] drm/msm: Change MSM_DRM_SUBMITQUEUE_CLOSE Jordan Crouse
2017-10-03 15:27 ` Jordan Crouse [this message]
2017-10-03 15:27 ` [PATCH 4/6] drm/msm: Map buffers on demand on the submit path Jordan Crouse
2017-10-03 15:27 ` [PATCH 6/6] drm/msm: Do priority checking during submitqueue create 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=1507044426-4042-4-git-send-email-jcrouse@codeaurora.org \
    --to=jcrouse@codeaurora.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=ssusheel@codeaurora.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;
as well as URLs for NNTP newsgroup(s).