Commit bad09da6 authored by Y.C. Chen's avatar Y.C. Chen Committed by Dave Airlie

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: default avatarJoel Stanley <joel@jms.id.au>
Tested-by: default avatarY.C. Chen <yc_chen@aspeedtech.com>
Signed-off-by: default avatarY.C. Chen <yc_chen@aspeedtech.com>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 9f93c8b3
...@@ -518,6 +518,9 @@ int ast_driver_load(struct drm_device *dev, unsigned long flags) ...@@ -518,6 +518,9 @@ int ast_driver_load(struct drm_device *dev, unsigned long flags)
ast_detect_chip(dev, &need_post); ast_detect_chip(dev, &need_post);
if (need_post)
ast_post_gpu(dev);
if (ast->chip != AST1180) { if (ast->chip != AST1180) {
ret = ast_get_dram_info(dev); ret = ast_get_dram_info(dev);
if (ret) if (ret)
...@@ -528,9 +531,6 @@ int ast_driver_load(struct drm_device *dev, unsigned long flags) ...@@ -528,9 +531,6 @@ int ast_driver_load(struct drm_device *dev, unsigned long flags)
ast->dram_bus_width, ast->vram_size); ast->dram_bus_width, ast->vram_size);
} }
if (need_post)
ast_post_gpu(dev);
ret = ast_mm_init(ast); ret = ast_mm_init(ast);
if (ret) if (ret)
goto out_free; goto out_free;
......
...@@ -79,7 +79,7 @@ ast_set_def_ext_reg(struct drm_device *dev) ...@@ -79,7 +79,7 @@ ast_set_def_ext_reg(struct drm_device *dev)
const u8 *ext_reg_info; const u8 *ext_reg_info;
/* reset scratch */ /* reset scratch */
for (i = 0x81; i <= 0x8f; i++) for (i = 0x81; i <= 0x9f; i++)
ast_set_index_reg(ast, AST_IO_CRTC_PORT, i, 0x00); ast_set_index_reg(ast, AST_IO_CRTC_PORT, i, 0x00);
if (ast->chip == AST2300 || ast->chip == AST2400) { if (ast->chip == AST2300 || ast->chip == AST2400) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment