summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/ast/ast_main.c
diff options
context:
space:
mode:
authorY.C. Chen2017-02-17 03:56:47 +0100
committerDave Airlie2017-02-28 04:16:14 +0100
commitbad09da6deab157440a3f0dd5e6c03cdc60c0a91 (patch)
tree432a0db6a7854c8f2d0d3a05416ae9f2ba5e0cdc /drivers/gpu/drm/ast/ast_main.c
parentdrm/ast: Base support for AST2500 (diff)
downloadkernel-qcow2-linux-bad09da6deab157440a3f0dd5e6c03cdc60c0a91.tar.gz
kernel-qcow2-linux-bad09da6deab157440a3f0dd5e6c03cdc60c0a91.tar.xz
kernel-qcow2-linux-bad09da6deab157440a3f0dd5e6c03cdc60c0a91.zip
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.c6
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)
ast_detect_chip(dev, &need_post);
+ if (need_post)
+ ast_post_gpu(dev);
+
if (ast->chip != AST1180) {
ret = ast_get_dram_info(dev);
if (ret)
@@ -528,9 +531,6 @@ int ast_driver_load(struct drm_device *dev, unsigned long flags)
ast->dram_bus_width, ast->vram_size);
}
- if (need_post)
- ast_post_gpu(dev);
-
ret = ast_mm_init(ast);
if (ret)
goto out_free;