drm/ast: Call open_key before enable_mmio in POST code
authorY.C. Chen <yc_chen@aspeedtech.com>
Wed, 22 Feb 2017 04:14:19 +0000 (15:14 +1100)
committerDave Airlie <airlied@redhat.com>
Tue, 28 Feb 2017 03:25:32 +0000 (13:25 +1000)
open_key enables access the registers used by enable_mmio

Signed-off-by: Y.C. Chen <yc_chen@aspeedtech.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Joel Stanley <joel@jms.id.au>
Tested-by: Y.C. Chen <yc_chen@aspeedtech.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/ast/ast_post.c

index a5a780921553ef66926249746b5797f16885745c..f7d421359d564756ff86d78c64293e37eea74c7e 100644 (file)
@@ -374,8 +374,8 @@ void ast_post_gpu(struct drm_device *dev)
        pci_write_config_dword(ast->dev->pdev, 0x04, reg);
 
        ast_enable_vga(dev);
-       ast_enable_mmio(dev);
        ast_open_key(ast);
+       ast_enable_mmio(dev);
        ast_set_def_ext_reg(dev);
 
        if (ast->config_mode == ast_use_p2a) {