Skip to contentSkip to conversation

Patch "drm/ast: Fixed system hanged if disable P2A" has been added to the 4.4-stable tree

PATCH [email protected] 1 participant 1 message Jun 15, 2017

Subsystems (4)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

drm/ast: Fixed system hanged if disable P2A

to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
drm-ast-fixed-system-hanged-if-disable-p2a.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Thu Jun 15 15:01:15 CEST 2017

From: "Y.C. Chen" <[email protected]>
Date: Thu, 26 Jan 2017 09:45:40 +0800
Subject: drm/ast: Fixed system hanged if disable P2A

From: "Y.C. Chen" <[email protected]>

[ Upstream commit 6c971c09f38704513c426ba6515f22fb3d6c87d5 ]

The original ast driver will access some BMC configuration through P2A bridge that can be disabled since AST2300 and after.
It will cause system hanged if P2A bridge is disabled.
Here is the update to fix it.

---
 drivers/gpu/drm/ast/ast_drv.h  |    1 
 drivers/gpu/drm/ast/ast_main.c |  157 +++++++++++++++++++++--------------------
 drivers/gpu/drm/ast/ast_post.c |   18 +++-
 3 files changed, 97 insertions(+), 79 deletions(-)
drivers/gpu/drm/ast/ast_drv.h +1 -0
@@ -113,6 +113,7 @@ struct ast_private {
 	struct ttm_bo_kmap_obj cache_kmap;
 	int next_cursor;
 	bool support_wide_screen;
+	bool DisableP2A;
 
 	enum ast_tx_chip tx_chip_type;
 	u8 dp501_maxclk;
drivers/gpu/drm/ast/ast_main.c +83 -74

184 lines not on this page · raw message

drivers/gpu/drm/ast/ast_post.c +13 -5
@@ -375,12 +375,20 @@ void ast_post_gpu(struct drm_device *dev
 	ast_enable_mmio(dev);
 	ast_set_def_ext_reg(dev);
 
-	if (ast->chip == AST2300 || ast->chip == AST2400)
-		ast_init_dram_2300(dev);
-	else
-		ast_init_dram_reg(dev);
+	if (ast->DisableP2A == false)
+	{
+		if (ast->chip == AST2300 || ast->chip == AST2400)
+			ast_init_dram_2300(dev);
+		else
+			ast_init_dram_reg(dev);
 
-	ast_init_3rdtx(dev);
+		ast_init_3rdtx(dev);
+	}
+	else
+	{
+		if (ast->tx_chip_type != AST_TX_NONE)
+			ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xa3, 0xcf, 0x80);	/* Enable DVO */
+	}
 }
 
 /* AST 2300 DRAM settings */

Patches currently in stable-queue which might be from [email protected] are

queue-4.4/drm-ast-fixed-system-hanged-if-disable-p2a.patch