linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Archit Taneja <architt@codeaurora.org>
To: Jordan Crouse <jcrouse@codeaurora.org>, freedreno@lists.freedesktop.org
Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 05/11] drm/msm: get an iova from the address space instead of an id
Date: Thu, 9 Feb 2017 10:31:17 +0530	[thread overview]
Message-ID: <c2ae1030-cb83-bba8-d2e9-419b24b7a5de@codeaurora.org> (raw)
In-Reply-To: <1486402779-9024-6-git-send-email-jcrouse@codeaurora.org>



On 02/06/2017 11:09 PM, Jordan Crouse wrote:
> In the future we won't have a fixed set of addresses spaces.
> Instead of going through the effort of assigning a ID for each
> address space just use the address space itself as a token for
> getting / putting an iova.
>
> This forces a few changes in the gem object however: instead
> of using a simple index into a list of domains, we need to
> maintain a list of them. Luckily the list will be pretty small;
> even with dynamic address spaces we wouldn't ever see more than
> two or three.
>
> Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
> ---
>  drivers/gpu/drm/msm/adreno/a5xx_gpu.c     |   8 +-
>  drivers/gpu/drm/msm/adreno/a5xx_power.c   |   5 +-
>  drivers/gpu/drm/msm/adreno/adreno_gpu.c   |   6 +-
>  drivers/gpu/drm/msm/dsi/dsi_host.c        |  15 +++-
>  drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c  |   8 +-
>  drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c   |  18 ++---
>  drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.h   |   3 -
>  drivers/gpu/drm/msm/mdp/mdp4/mdp4_plane.c |  13 ++--
>  drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c  |   5 +-
>  drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c   |  11 +--
>  drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.h   |   4 -
>  drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c |  13 ++--
>  drivers/gpu/drm/msm/msm_drv.c             |  14 ----
>  drivers/gpu/drm/msm/msm_drv.h             |  25 +++---
>  drivers/gpu/drm/msm/msm_fb.c              |  15 ++--
>  drivers/gpu/drm/msm/msm_fbdev.c           |  10 ++-
>  drivers/gpu/drm/msm/msm_gem.c             | 124 +++++++++++++++++++++---------
>  drivers/gpu/drm/msm/msm_gem.h             |   4 +-
>  drivers/gpu/drm/msm/msm_gem_submit.c      |   4 +-
>  drivers/gpu/drm/msm/msm_gpu.c             |   8 +-
>  drivers/gpu/drm/msm/msm_gpu.h             |   1 -
>  drivers/gpu/drm/msm/msm_kms.h             |   3 +
>  22 files changed, 184 insertions(+), 133 deletions(-)
>

<snip>

> diff --git a/drivers/gpu/drm/msm/msm_fbdev.c b/drivers/gpu/drm/msm/msm_fbdev.c
> index e8f41eb..0b5b839 100644
> --- a/drivers/gpu/drm/msm/msm_fbdev.c
> +++ b/drivers/gpu/drm/msm/msm_fbdev.c
> @@ -20,6 +20,7 @@
>  #include "drm_crtc.h"
>  #include "drm_fb_helper.h"
>  #include "msm_gem.h"
> +#include "msm_kms.h"
>
>  extern int msm_gem_mmap_obj(struct drm_gem_object *obj,
>  					struct vm_area_struct *vma);
> @@ -78,6 +79,7 @@ static int msm_fbdev_create(struct drm_fb_helper *helper,
>  {
>  	struct msm_fbdev *fbdev = to_msm_fbdev(helper);
>  	struct drm_device *dev = helper->dev;
> +	struct msm_drm_private *priv = dev->dev_private;
>  	struct drm_framebuffer *fb = NULL;
>  	struct fb_info *fbi = NULL;
>  	struct drm_mode_fb_cmd2 mode_cmd = {0};
> @@ -129,7 +131,13 @@ static int msm_fbdev_create(struct drm_fb_helper *helper,
>  	 * in panic (ie. lock-safe, etc) we could avoid pinning the
>  	 * buffer now:
>  	 */
> -	ret = msm_gem_get_iova_locked(fbdev->bo, 0, &paddr);
> +
> +	if (!priv->kms) {
> +		ret = -ENODEV;
> +		goto fail_unlock;
> +	}

This check isn't needed. As of now, we don't create a fbdev device if we don't
have kms initialized.

Otherwise,

Reviewed-by: Archit Taneja <architt@codeaurora.org>

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2017-02-09  5:01 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-06 17:39 [PATCH 00/11] drm/msm: A5XX preemption Jordan Crouse
     [not found] ` <1486402779-9024-1-git-send-email-jcrouse-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2017-02-06 17:39   ` [PATCH 01/11] drm/msm: Make sure to detach the MMU during GPU cleanup Jordan Crouse
2017-02-06 17:39   ` [PATCH 02/11] drm/msm: Improve the zap shader Jordan Crouse
2017-03-07 16:58   ` [v2] [PATCH 00/11] drm/msm: A5XX preemption Jordan Crouse
2017-03-07 16:58     ` [PATCH 01/11] drm/msm: Make sure to detach the MMU during GPU cleanup Jordan Crouse
     [not found]     ` <1488905900-6603-1-git-send-email-jcrouse-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2017-03-07 16:58       ` [PATCH 02/11] drm/msm: Improve the zap shader Jordan Crouse
2017-03-07 16:58       ` [PATCH 03/11] drm/msm: Remove idle function hook Jordan Crouse
2017-03-07 16:58       ` [PATCH 04/11] drm/msm: Add hint to DRM_IOCTL_MSM_GEM_INFO to return an object IOVA Jordan Crouse
2017-03-07 16:58       ` [PATCH 05/11] drm/msm: get an iova from the address space instead of an id Jordan Crouse
2017-03-07 16:58       ` [PATCH 06/11] drm/msm: Add a struct to pass configuration to msm_gpu_init() Jordan Crouse
2017-03-07 16:58       ` [PATCH 07/11] drm/msm: Remove memptrs->wptr Jordan Crouse
2017-03-07 16:58       ` [PATCH 08/11] drm/msm: Support multiple ringbuffers Jordan Crouse
2017-03-07 16:58       ` [PATCH 09/11] drm/msm: Shadow current pointer in the ring until command is complete Jordan Crouse
2017-03-07 16:58       ` [PATCH 10/11] drm/msm: Make the value of RB_CNTL (almost) generic Jordan Crouse
2017-03-07 16:58       ` [PATCH 11/11] drm/msm: Implement preemption for A5XX targets Jordan Crouse
2017-02-06 17:39 ` [PATCH 03/11] drm/msm: Add hint to DRM_IOCTL_MSM_GEM_INFO to return an object IOVA Jordan Crouse
2017-02-06 19:20   ` Emil Velikov
     [not found]     ` <CACvgo513+d19O2rzZ8NXEFgojUQkm2XPae-AdOXXReLM_a1euw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-02-06 19:57       ` Rob Clark
     [not found]         ` <CAF6AEGvUoW2695_HjgfGbpbPaSnOB2gfPa=3UMTDGvom+DxcwA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-02-06 20:24           ` Emil Velikov
2017-02-06 21:01             ` Rob Clark
2017-02-06 17:39 ` [PATCH 04/11] drm/msm: Remove idle function hook Jordan Crouse
2017-02-06 17:39 ` [PATCH 05/11] drm/msm: get an iova from the address space instead of an id Jordan Crouse
2017-02-09  5:01   ` Archit Taneja [this message]
2017-02-06 17:39 ` [PATCH 06/11] drm/msm: Add a struct to pass configuration to msm_gpu_init() Jordan Crouse
2017-02-06 17:39 ` [PATCH 07/11] drm/msm: Remove memptrs->wptr Jordan Crouse
2017-02-06 17:39 ` [PATCH 08/11] drm/msm: Support multiple ringbuffers Jordan Crouse
2017-02-06 17:39 ` [PATCH 09/11] drm/msm: Shadow current pointer in the ring until command is complete Jordan Crouse
2017-02-06 17:39 ` [PATCH 10/11] drm/msm: Make the value of RB_CNTL (almost) generic Jordan Crouse
2017-02-06 17:39 ` [PATCH 11/11] drm/msm: Implement preemption for A5XX targets Jordan Crouse
     [not found]   ` <1486402779-9024-12-git-send-email-jcrouse-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2017-02-08 20:30     ` Stephen Boyd
     [not found]       ` <8696f3b7-1fbd-309a-1d68-b2f8ad89a30c-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2017-02-08 23:00         ` Jordan Crouse
2017-02-09  0:03           ` Stephen Boyd
2017-02-06 17:59 ` [PATCH 00/11] drm/msm: A5XX preemption Daniel Vetter
2017-02-06 18:23   ` Daniel Stone
2017-02-06 18:29     ` [Intel-gfx] " Rob Clark
2017-02-06 18:29   ` Alex Deucher

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=c2ae1030-cb83-bba8-d2e9-419b24b7a5de@codeaurora.org \
    --to=architt@codeaurora.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=jcrouse@codeaurora.org \
    --cc=linux-arm-msm@vger.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 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).