Skip to contentSkip to conversation

Fix newport con crashes

PATCH In review Thomas Bogendoerfer 3 participants 3 messages Jul 30, 2012 – Aug 1, 2012

Subsystems (3)
lore
Share & tools
lore

Thomas Bogendoerfer

author maintainer
#0 lore raw

PATCH 1/1 Fix newport con crashes

Because of commit e84de0c61905030a0fe66b7210b6f1bb7c3e1eab [MIPS: GIO bus support for SGI IP22/28] newport con is now taking over console from dummy con, therefore it's necessary to resize the VC to the correct size to avoid crashes and garbage on console

---

 drivers/video/console/newport_con.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)
drivers/video/console/newport_con.c +9 -2
index 6d15966..b05afd0 100644
@@ -327,9 +327,16 @@ out_unmap:
 
 static void newport_init(struct vc_data *vc, int init)
 {
-	vc->vc_cols = newport_xsize / 8;
-	vc->vc_rows = newport_ysize / 16;
+	int cols, rows;
+
+	cols = newport_xsize / 8;
+	rows = newport_ysize / 16;
 	vc->vc_can_do_color = 1;
+	if (init) {
+		vc->vc_cols = cols;
+		vc->vc_rows = rows;
+	} else
+		vc_resize(vc, cols, rows);
 }
 
 static void newport_deinit(struct vc_data *c)
#1 lore raw
Quoted 6 lines · Thomas Bogendoerfer

Because of commit e84de0c61905030a0fe66b7210b6f1bb7c3e1eab [MIPS: GIO bus support for SGI IP22/28] newport con is now taking over console from dummy con, therefore it's necessary to resize the VC to the correct size to avoid crashes and garbage on console

I've applied your patch to master and the affected -stable branches of the lmo git tree.

Florian, since this is a driver specific to certain MIPS platforms I'd like to merge it through the MIPS tree with your ack, if that's ok?

Thanks folks,

Ralf

#2 lore raw
Quoted 7 lines · Ralf Baechle
Quoted 5 lines · Thomas Bogendoerfer

Because of commit e84de0c61905030a0fe66b7210b6f1bb7c3e1eab [MIPS: GIO bus support for SGI IP22/28] newport con is now taking over console from dummy con, therefore it's necessary to resize the VC to the correct size to avoid crashes and garbage on console

Quoted 7 lines
Quoted 1 line

I've applied your patch to master and the affected -stable branches of the lmo git tree.

Florian, since this is a driver specific to certain MIPS platforms I'd like to merge it through the MIPS tree with your ack, if that's ok?

Yes, sounds good to me. The patch looks good.

Best regards,

Florian Tobias Schandinat