All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Thomas Zimmermann <tzimmermann@suse.de>
Cc: emil.l.velikov@gmail.com, dri-devel@lists.freedesktop.org,
	airlied@redhat.com
Subject: Re: [PATCH 3/6] drm/ast: Use managed VRAM-helper initialization
Date: Wed, 8 Jul 2020 19:20:39 +0200	[thread overview]
Message-ID: <20200708172039.GB121132@ravnborg.org> (raw)
In-Reply-To: <20200708074912.25422-4-tzimmermann@suse.de>

On Wed, Jul 08, 2020 at 09:49:09AM +0200, Thomas Zimmermann wrote:
> As a first step to managed MM code in ast, switch over VRAM MM helpers.
> 
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
>  drivers/gpu/drm/ast/ast_mm.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/ast/ast_mm.c b/drivers/gpu/drm/ast/ast_mm.c
> index 9c3788a4c1c5..c0bbcfed9c43 100644
> --- a/drivers/gpu/drm/ast/ast_mm.c
> +++ b/drivers/gpu/drm/ast/ast_mm.c
> @@ -39,9 +39,8 @@ int ast_mm_init(struct ast_private *ast)
>  	int ret;
>  	struct drm_device *dev = ast->dev;
>  
> -	vmm = drm_vram_helper_alloc_mm(
> -		dev, pci_resource_start(dev->pdev, 0),
> -		ast->vram_size);
> +	vmm = drmm_vram_helper_alloc_mm(dev, pci_resource_start(dev->pdev, 0),
> +					ast->vram_size);
>  	if (IS_ERR(vmm)) {
>  		ret = PTR_ERR(vmm);
>  		drm_err(dev, "Error initializing VRAM MM; %d\n", ret);

This would be a little simpler if drmm_vram_helper_alloc_mm() return an
int error code as suggested in previous patch.

	Sam

> @@ -60,8 +59,6 @@ void ast_mm_fini(struct ast_private *ast)
>  {
>  	struct drm_device *dev = ast->dev;
>  
> -	drm_vram_helper_release_mm(dev);
> -
>  	arch_phys_wc_del(ast->fb_mtrr);
>  	arch_io_free_memtype_wc(pci_resource_start(dev->pdev, 0),
>  				pci_resource_len(dev->pdev, 0));
> -- 
> 2.27.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2020-07-08 17:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-08  7:49 [PATCH 0/6] drm/ast: Managed MM Thomas Zimmermann
2020-07-08  7:49 ` [PATCH 1/6] drm/vram-helper: Managed vram helpers Thomas Zimmermann
2020-07-08 17:19   ` Sam Ravnborg
2020-07-16 11:00     ` Thomas Zimmermann
2020-07-08  7:49 ` [PATCH 2/6] drm/ast: Rename ast_ttm.c to ast_mm.c Thomas Zimmermann
2020-07-08  7:49 ` [PATCH 3/6] drm/ast: Use managed VRAM-helper initialization Thomas Zimmermann
2020-07-08 17:20   ` Sam Ravnborg [this message]
2020-07-08  7:49 ` [PATCH 4/6] drm/ast: Move VRAM size detection to ast_mm.c Thomas Zimmermann
2020-07-08  7:49 ` [PATCH 5/6] drm/ast: Initialize DRAM type before posting GPU Thomas Zimmermann
2020-07-08  7:49   ` Thomas Zimmermann
2020-07-08  8:23   ` Benjamin Herrenschmidt
2020-07-08  8:23     ` Benjamin Herrenschmidt
2020-07-08  7:49 ` [PATCH 6/6] drm/ast: Use managed MM initialization Thomas Zimmermann

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=20200708172039.GB121132@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=airlied@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.l.velikov@gmail.com \
    --cc=tzimmermann@suse.de \
    /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.