[PATCH v2 0/7] implement 2D acceleration, minor cleanups, doc updates.

2019-03-24 Thread Yifeng Li
also to purchase a Big Endian test platform and add proper support soon. Also, thanks to Miodrag Vallat and other OpenBSD developers, this work would be impossible without their code, that served as a reference implementation for me. Finally, during the development and testing of 2D acceleration, many

[PATCH v2 4/7] fbdev: sm712fb: add 32-bit color modes, drops some other modes.

2019-03-24 Thread Yifeng Li
d 32-bit color modes. They are supported but never listed, and are useful to some users. Signed-off-by: Yifeng Li --- drivers/video/fbdev/sm712fb.c | 158 +++--- 1 file changed, 31 insertions(+), 127 deletions(-) diff --git a/drivers/video/fbdev/sm712fb.c b/drive

[PATCH v2 1/7] fbdev: sm712fb: use type "u8" for 8-bit I/O.

2019-03-24 Thread Yifeng Li
use a different wordsize. Signed-off-by: Yifeng Li --- drivers/video/fbdev/sm712.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/video/fbdev/sm712.h b/drivers/video/fbdev/sm712.h index bb144f038267..89e446db2ac7 100644 --- a/drivers/video/fbdev/sm712.h +++

[PATCH v2 6/7] fbdev: sm712fb: Kconfig: add information about docs.

2019-03-24 Thread Yifeng Li
This commits update the Kconfig description of sm712fb, and inform the user about the existence of documentation. Signed-off-by: Yifeng Li --- Documentation/fb/sm712fb.txt | 44 drivers/video/fbdev/Kconfig | 4 2 files changed, 29 insertions(+), 19

[PATCH v2 3/7] fbdev: sm712fb: support 2D acceleration on SM712 w/ Little-Endian CPU.

2019-03-24 Thread Yifeng Li
nal system hang was a type punning. unsigned char ajRemain[4]; SMTC_write2Ddataport(0, *(unsigned long *)ajRemain); Type punning is undefined behavior in C, and here it caused an unaligned memory access, which is illegal on MIPS, thus crashing the computer. Signed-off-by: Yifeng Li --- drivers/v

[PATCH v2 7/7] MAINTAINERS: sm712fb: list myself as one maintainer.

2019-03-24 Thread Yifeng Li
I have working on the sm712fb driver for a while and have some familiarity with this hardware, I'll be helping working on and testing problems of this driver, so add myself to the MAINTAINERS file. Signed-off-by: Yifeng Li --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --

[PATCH v2 5/7] Documentation: fb: sm712fb: add information mainly about 2D.

2019-03-24 Thread Yifeng Li
This commits add information about 32-bit color, 2D acceleration, as well as adding additional, general information about the hardware and many existing problems of the sm712fb driver. Signed-off-by: Yifeng Li --- Documentation/fb/sm712fb.txt | 123 +++ 1 file

[PATCH v2 2/7] fbdev: sm712fb: add 2D-related I/O headers and functions.

2019-03-24 Thread Yifeng Li
-bit word suitable for 2D Drawing Engine. Yes, we can set info->pixmap.scan_align/buf_align = 4 and forget about padding, but it's incompatible with cfb_imageblit() w/ depth == 1. In case we need to fallback (e.g. debugging), it would be inconvenient, so we pad it manually. Signed-off-by: Y

[PATCH 5/8] fbdev: sm712fb: fix crashes during framebuffer writes by correctly mapping VRAM.

2019-03-18 Thread Yifeng Li
river would probably crash on them. I've never seen one of those machines and cannot fix it, but I have documented these problems in the comments. Signed-off-by: Yifeng Li Cc: sta...@vger.kernel.org # v4.4+ --- drivers/video/fbdev/sm712.h | 5 drivers/video/fbdev/sm71

[PATCH 6/8] fbdev: sm712fb: fix crashes and garbled display during DPMS modesetting.

2019-03-18 Thread Yifeng Li
of clock frequency when unblanking the display, and programs the clock for SM712 to SM720. Fix them by adjusting the order of register writes, and adding an additional check for SM720 for programming the clock frequency. Signed-off-by: Yifeng Li Cc: sta...@vger.kernel.org # v4.4+ --- drivers

[PATCH 8/8] fbdev: sm712fb: use 1024x768 by default on non-MIPS, fix garbled display.

2019-03-18 Thread Yifeng Li
cumented is the comments. Signed-off-by: Yifeng Li Cc: sta...@vger.kernel.org # v4.4+ --- drivers/video/fbdev/sm712.h | 7 +++-- drivers/video/fbdev/sm712fb.c | 53 ++- 2 files changed, 44 insertions(+), 16 deletions(-) diff --git a/drivers/video/fbdev/sm712.h

[PATCH 0/8] fbdev: sm712fb: fix a series of lockups, crashes and gliches.

2019-03-18 Thread Yifeng Li
review and queue them for linux-stable. Thanks, Yifeng Li (8): fbdev: sm712fb: fix white screen of death on reboot, don't set CR3B-CR3F. fbdev: sm712fb: fix brightness control on reboot, don't set SR30. fbdev: sm712fb: fix VRAM detection, don't set SR70/71/74/75. fbdev: sm

[PATCH 2/8] fbdev: sm712fb: fix brightness control on reboot, don't set SR30.

2019-03-18 Thread Yifeng Li
over- writing it is also highly questionable, since it was originally configurated by the motherboard manufacturer by hardwiring pull-down resistors to indicate the type of LCD panel. We should not mess with it. Stop writing to the SR30 (a.k.a FPR30) register. Signed-off-by: Yifeng Li Cc

[PATCH 4/8] fbdev: sm712fb: fix boot screen glitch when sm712fb replaces VGA.

2019-03-18 Thread Yifeng Li
when it's ready. Signed-off-by: Yifeng Li Cc: sta...@vger.kernel.org # v4.4+ --- drivers/video/fbdev/sm712fb.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/video/fbdev/sm712fb.c b/drivers/video/fbdev/sm712fb.c index 1a3d232c2916..e8149f0f47d5 100644

[PATCH 1/8] fbdev: sm712fb: fix white screen of death on reboot, don't set CR3B-CR3F.

2019-03-18 Thread Yifeng Li
these registers don't have side-effect on other systems, writing to them is also highly questionable. Signed-off-by: Yifeng Li Cc: sta...@vger.kernel.org # v4.4+ --- drivers/video/fbdev/sm712fb.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/video/fbdev/s

[PATCH 7/8] fbdev: sm712fb: fix support for 1024x768-16 mode.

2019-03-18 Thread Yifeng Li
mode. Signed-off-by: Yifeng Li Cc: sta...@vger.kernel.org # v4.4+ --- drivers/video/fbdev/sm712fb.c | 59 +++ 1 file changed, 59 insertions(+) diff --git a/drivers/video/fbdev/sm712fb.c b/drivers/video/fbdev/sm712fb.c index a40d0ae7cb66..c39a2641182a 100644 --- a

[PATCH 3/8] fbdev: sm712fb: fix VRAM detection, don't set SR70/71/74/75.

2019-03-18 Thread Yifeng Li
Registers, including GPR70/74/75, don't have the same side-effect, but overwriting to them is still questionable, as they are not related to modesetting. Stop writing to SR70/71/74/75 (a.k.a GPR70/71/74/75). Signed-off-by: Yifeng Li Cc: sta...@vger.kernel.org # v4.4+ --- drivers/video/fbdev/sm71

[PATCH 6/8] Documentation: fb: sm712fb: add information mainly about 2D.

2019-02-03 Thread Yifeng Li
This commits add information about 32-bit color, 2D acceleration, as well as adding additional, general information about the hardware and many existing problems of the sm712fb driver. Signed-off-by: Yifeng Li --- Documentation/fb/sm712fb.txt | 123 +++ 1 file

[PATCH 2/8] fbdev: sm712fb: use type "u8" for 8-bit I/O.

2019-02-03 Thread Yifeng Li
use a different wordsize. Signed-off-by: Yifeng Li --- drivers/video/fbdev/sm712.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/video/fbdev/sm712.h b/drivers/video/fbdev/sm712.h index 99077e91ae10..942019dc816a 100644 --- a/drivers/video/fbdev/sm712.h +++

[PATCH 5/8] fbdev: sm712fb: add 32-bit color modes, drops some other modes.

2019-02-03 Thread Yifeng Li
t never listed, and are useful to some users. Signed-off-by: Yifeng Li --- drivers/video/fbdev/sm712fb.c | 158 +++--- 1 file changed, 31 insertions(+), 127 deletions(-) diff --git a/drivers/video/fbdev/sm712fb.c b/drivers/video/fbdev/sm712fb.c index 133e31f75d67..0cc

[PATCH 3/8] fbdev: sm712fb: add 2D-related I/O headers and functions.

2019-02-03 Thread Yifeng Li
-bit word suitable for 2D Drawing Engine. Yes, we can set info->pixmap.scan_align/buf_align = 4 and forget about padding, but it's incompatible with cfb_imageblit() w/ depth == 1. In case we need to fallback (e.g. debugging), it would be inconvenient, so we pad it manually. Signed-off-by: Y

[PATCH 7/8] fbdev: sm712fb: Kconfig: add information about docs.

2019-02-03 Thread Yifeng Li
This commits update the Kconfig description of sm712fb, and inform the user about the existence of documentation. Signed-off-by: Yifeng Li --- drivers/video/fbdev/Kconfig | 4 1 file changed, 4 insertions(+) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index

[PATCH 1/8] fbdev: sm712fb: update copyright headers.

2019-02-03 Thread Yifeng Li
tions are taken verbatim. This commit appends my name to the list of authors, and included Miodrag Vallat's name and the ISC license of the original smfb.c driver. Signed-off-by: Yifeng Li --- drivers/video/fbdev/sm712.h | 20 drivers/video/fbdev/sm71

[PATCH 8/8] MAINTAINERS: sm712fb: list myself as one maintainer.

2019-02-03 Thread Yifeng Li
I have working on the sm712fb driver for a while and have some familiarity with this hardware, I'll be helping working on and testing problems of this driver, so add myself to the MAINTAINERS file. Signed-off-by: Yifeng Li --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --

[PATCH 0/8] fbdev: sm712fb: implement 2D acceleration w/ cleanups.

2019-02-03 Thread Yifeng Li
ence implementation for me. Finally, during the development and testing of 2D acceleration, the modesetting code of this driver received a minor cleanup, and many issues about issues about the modesetting code and this driver in general have been documented. Yifeng Li (8): fbdev: sm712fb: update co

[PATCH 4/8] fbdev: sm712fb: support 2D acceleration on SM712 w/ Little-Endian CPU.

2019-02-03 Thread Yifeng Li
re it caused an unaligned memory access, which is illegal on MIPS, thus crashing the computer. Signed-off-by: Yifeng Li --- drivers/video/fbdev/sm712.h | 3 + drivers/video/fbdev/sm712fb.c | 396 +- 2 files changed, 392 insertions(+), 7 deletions(-) diff --git