Skip to content

Commit

Permalink
drm/ast: Initialize DRAM type before posting GPU
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Sam Ravnborg <[email protected]>
Acked-by: Benjamin Herrenschmidt <[email protected]>
Fixes: bad09da ("drm/ast: Fixed vram size incorrect issue on POWER")
Cc: Joel Stanley <[email protected]>
Cc: Y.C. Chen <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Dave Airlie <[email protected]>
Cc: Thomas Zimmermann <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Sam Ravnborg <[email protected]>
Cc: Emil Velikov <[email protected]>
Cc: "Y.C. Chen" <[email protected]>
Cc: <[email protected]> # v4.11+
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
  • Loading branch information
Thomas Zimmermann committed Jul 20, 2020
1 parent 0149e78 commit 244d012
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/gpu/drm/ast/ast_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 244d012

Please sign in to comment.