* [PATCH] staging: sm750fb: fix ASCII graph in comments.
@ 2019-01-26 18:57 Tom Li
0 siblings, 0 replies; only message in thread
From: Tom Li @ 2019-01-26 18:57 UTC (permalink / raw)
To: linux-fbdev
In function sm750_hw_copyarea() of sm750_accel.c, there are
some comments in ASCII graphs, describing 4 possible scenarios
of overlapping areas when copying an area. However, the
formatting is broken and the graphs are confusing.
Previously, in staging/sm7xxfb (now fbdev/sm712fb), 2D ops
were also implemented (later removed due to a critical bug
in 3af805735a2538c38ec16014f19d19030544aaef), it also had
the ASCII graph comments, but were broken in another way.
In other words, all existing versions of these ASCII graphs
are broken.
Currently, I'm working on a re-implementation of 2D ops on
fbdev/sm712fb. Since the entire SiliconMotion SM7xx series
video controllers have similar 2D engines, the comments here
served an important purpose of explaining how copyarea()
works on the entire SM7xx family.
This commit fixes the misleading ASCII graphs.
Signed-off-by: Yifeng Li <tomli@tomli.me>
Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Teddy Wang <teddy.wang@siliconmotion.com>
---
drivers/staging/sm750fb/sm750_accel.c | 32 +++++++++++++--------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/drivers/staging/sm750fb/sm750_accel.c b/drivers/staging/sm750fb/sm750_accel.c
index eed840b251da..dbcbbd1055da 100644
--- a/drivers/staging/sm750fb/sm750_accel.c
+++ b/drivers/staging/sm750fb/sm750_accel.c
@@ -155,26 +155,26 @@ unsigned int rop2) /* ROP value */
if (sBase = dBase && sPitch = dPitch) {
/* Determine direction of operation */
if (sy < dy) {
- /* +----------+
- * |S |
- * | +----------+
- * | | | |
- * | | | |
- * +---|------+ |
- * | D|
- * +----------+
+ /* +----------+
+ * |S |
+ * | +----------+
+ * | | | |
+ * | | | |
+ * +---|------+ |
+ * | D|
+ * +----------+
*/
nDirection = BOTTOM_TO_TOP;
} else if (sy > dy) {
- /* +----------+
- * |D |
- * | +----------+
- * | | | |
- * | | | |
- * +---|------+ |
- * | S|
- * +----------+
+ /* +----------+
+ * |D |
+ * | +----------+
+ * | | | |
+ * | | | |
+ * +---|------+ |
+ * | S|
+ * +----------+
*/
nDirection = TOP_TO_BOTTOM;
--
2.20.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-01-26 18:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-26 18:57 [PATCH] staging: sm750fb: fix ASCII graph in comments Tom Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).