]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
UBUNTU: SAUCE: drm/ast: Fixed vram size incorrect issue on POWER
authorY.C. Chen <yc_chen@aspeedtech.com>
Fri, 17 Feb 2017 02:56:47 +0000 (10:56 +0800)
committerSeth Forshee <seth.forshee@canonical.com>
Fri, 24 Feb 2017 15:11:24 +0000 (09:11 -0600)
BugLink: http://bugs.launchpad.net/bugs/1667424
The default value of VGA scratch may incorrect.
Should initial h/w before get vram info.

Signed-off-by: Y.C. Chen <yc_chen@aspeedtech.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/gpu/drm/ast/ast_main.c
drivers/gpu/drm/ast/ast_post.c

index 5a83d37930001e77fc7157f18884a2527f9ed7fd..eefc5124eeb3f953a1f12df2454f297270a9e710 100644 (file)
@@ -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;
index 719763573df55abed72431f8fb21276f0901221d..7571e95db2b08b5038f3473a04d6d47982a82ec6 100644 (file)
@@ -79,7 +79,7 @@ ast_set_def_ext_reg(struct drm_device *dev)
        const u8 *ext_reg_info;
 
        /* 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);
 
        if (ast->chip == AST2300 || ast->chip == AST2400) {