dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Thomas Zimmermann <tzimmermann@suse.de>,
	airlied@redhat.com, daniel@ffwll.ch, sam@ravnborg.org,
	noralf@tronnes.org, emil.l.velikov@gmail.com,
	yc_chen@aspeedtech.com
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	stable@vger.kernel.org, Joel Stanley <joel@jms.id.au>,
	dri-devel@lists.freedesktop.org,
	Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [PATCH 5/6] drm/ast: Initialize DRAM type before posting GPU
Date: Wed, 08 Jul 2020 18:23:11 +1000	[thread overview]
Message-ID: <39fe1480891453839e257cd85e1070cde05866f0.camel@kernel.crashing.org> (raw)
In-Reply-To: <20200708074912.25422-6-tzimmermann@suse.de>

On Wed, 2020-07-08 at 09:49 +0200, Thomas Zimmermann wrote:
> Posting the GPU requires the correct DRAM type to be stored in
> struct ast_private. Therefore first initialize the DRAM info and
> then post the GPU. This restores the original order of instructions
> in this function.

I no longer have access to the relevant test POWER systems,
however the patch looks good to me.

> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> Fixes: bad09da6deab ("drm/ast: Fixed vram size incorrect issue on
> POWER")
> Cc: Joel Stanley <joel@jms.id.au>
> Cc: Y.C. Chen <yc_chen@aspeedtech.com>

Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

> Cc: Dave Airlie <airlied@redhat.com>
> Cc: Thomas Zimmermann <tzimmermann@suse.de>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: Emil Velikov <emil.l.velikov@gmail.com>
> Cc: "Y.C. Chen" <yc_chen@aspeedtech.com>
> Cc: <stable@vger.kernel.org> # v4.11+
> ---
>  drivers/gpu/drm/ast/ast_main.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/ast/ast_main.c
> b/drivers/gpu/drm/ast/ast_main.c
> index b162cc82204d..87e5baded2a7 100644
> --- a/drivers/gpu/drm/ast/ast_main.c
> +++ b/drivers/gpu/drm/ast/ast_main.c
> @@ -418,15 +418,15 @@ int ast_driver_load(struct drm_device *dev,
> unsigned long flags)
>  
>  	ast_detect_chip(dev, &need_post);
>  
> -	if (need_post)
> -		ast_post_gpu(dev);
> -
>  	ret = ast_get_dram_info(dev);
>  	if (ret)
>  		goto out_free;
>  	drm_info(dev, "dram MCLK=%u Mhz type=%d bus_width=%d\n",
>  		 ast->mclk, ast->dram_type, ast->dram_bus_width);
>  
> +	if (need_post)
> +		ast_post_gpu(dev);
> +
>  	ret = ast_mm_init(ast);
>  	if (ret)
>  		goto out_free;

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

  reply	other threads:[~2020-07-08  8:39 UTC|newest]

Thread overview: 11+ 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
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  8:23   ` Benjamin Herrenschmidt [this message]
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=39fe1480891453839e257cd85e1070cde05866f0.camel@kernel.crashing.org \
    --to=benh@kernel.crashing.org \
    --cc=airlied@redhat.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.l.velikov@gmail.com \
    --cc=joel@jms.id.au \
    --cc=kraxel@redhat.com \
    --cc=noralf@tronnes.org \
    --cc=sam@ravnborg.org \
    --cc=stable@vger.kernel.org \
    --cc=tzimmermann@suse.de \
    --cc=yc_chen@aspeedtech.com \
    /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).