* [PATCH 5/6] drm/ast: Initialize DRAM type before posting GPU [not found] <20200708074912.25422-1-tzimmermann@suse.de> @ 2020-07-08 7:49 ` Thomas Zimmermann 2020-07-08 8:23 ` Benjamin Herrenschmidt 0 siblings, 1 reply; 2+ messages in thread From: Thomas Zimmermann @ 2020-07-08 7:49 UTC (permalink / raw) To: airlied, daniel, sam, noralf, emil.l.velikov, yc_chen Cc: dri-devel, Thomas Zimmermann, Joel Stanley, Benjamin Herrenschmidt, Gerd Hoffmann, Daniel Vetter, stable 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. 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> Cc: 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; -- 2.27.0 ^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 5/6] drm/ast: Initialize DRAM type before posting GPU 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 0 siblings, 0 replies; 2+ messages in thread From: Benjamin Herrenschmidt @ 2020-07-08 8:23 UTC (permalink / raw) To: Thomas Zimmermann, airlied, daniel, sam, noralf, emil.l.velikov, yc_chen Cc: dri-devel, Joel Stanley, Gerd Hoffmann, Daniel Vetter, stable 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; ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-08 8:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20200708074912.25422-1-tzimmermann@suse.de>
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 is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox