Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

VIDEO: Newport Fix console 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

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: linux-mips@linux-mips.org
Cc: linux-fbdev@vger.kernel.org
Cc: FlorianSchandinat@gmx.de
Patchwork: https://patchwork.linux-mips.org/patch/4138/
Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Thomas Bogendoerfer and committed by
Ralf Baechle
fa4dbbc6 5613d482

+9 -2
+9 -2
drivers/video/console/newport_con.c
··· 327 327 328 328 static void newport_init(struct vc_data *vc, int init) 329 329 { 330 - vc->vc_cols = newport_xsize / 8; 331 - vc->vc_rows = newport_ysize / 16; 330 + int cols, rows; 331 + 332 + cols = newport_xsize / 8; 333 + rows = newport_ysize / 16; 332 334 vc->vc_can_do_color = 1; 335 + if (init) { 336 + vc->vc_cols = cols; 337 + vc->vc_rows = rows; 338 + } else 339 + vc_resize(vc, cols, rows); 333 340 } 334 341 335 342 static void newport_deinit(struct vc_data *c)