diff options
author | Y.C. Chen <yc_chen@aspeedtech.com> | 2017-02-16 21:56:47 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2017-02-27 22:16:14 -0500 |
commit | bad09da6deab157440a3f0dd5e6c03cdc60c0a91 (patch) | |
tree | 432a0db6a7854c8f2d0d3a05416ae9f2ba5e0cdc /drivers/gpu/drm/ast/ast_main.c | |
parent | 9f93c8b3c08f8c456aad86fd05caa6a1688320ff (diff) |
drm/ast: Fixed vram size incorrect issue on POWER
The default value of VGA scratch may incorrect.
Should initial h/w before get vram info.
Acked-by: Joel Stanley <joel@jms.id.au>
Tested-by: Y.C. Chen <yc_chen@aspeedtech.com>
Signed-off-by: Y.C. Chen <yc_chen@aspeedtech.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/ast/ast_main.c')
-rw-r--r-- | drivers/gpu/drm/ast/ast_main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/ast/ast_main.c b/drivers/gpu/drm/ast/ast_main.c index 8e8c0310245f..262c2c0e43b4 100644 --- a/drivers/gpu/drm/ast/ast_main.c +++ b/drivers/gpu/drm/ast/ast_main.c | |||
@@ -518,6 +518,9 @@ int ast_driver_load(struct drm_device *dev, unsigned long flags) | |||
518 | 518 | ||
519 | ast_detect_chip(dev, &need_post); | 519 | ast_detect_chip(dev, &need_post); |
520 | 520 | ||
521 | if (need_post) | ||
522 | ast_post_gpu(dev); | ||
523 | |||
521 | if (ast->chip != AST1180) { | 524 | if (ast->chip != AST1180) { |
522 | ret = ast_get_dram_info(dev); | 525 | ret = ast_get_dram_info(dev); |
523 | if (ret) | 526 | if (ret) |
@@ -528,9 +531,6 @@ int ast_driver_load(struct drm_device *dev, unsigned long flags) | |||
528 | ast->dram_bus_width, ast->vram_size); | 531 | ast->dram_bus_width, ast->vram_size); |
529 | } | 532 | } |
530 | 533 | ||
531 | if (need_post) | ||
532 | ast_post_gpu(dev); | ||
533 | |||
534 | ret = ast_mm_init(ast); | 534 | ret = ast_mm_init(ast); |
535 | if (ret) | 535 | if (ret) |
536 | goto out_free; | 536 | goto out_free; |