From patchwork Sat Jan 26 18:57:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yifeng Li X-Patchwork-Id: 10782561 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BD112139A for ; Sat, 26 Jan 2019 19:04:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9CA88290DC for ; Sat, 26 Jan 2019 19:04:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 791A52936C; Sat, 26 Jan 2019 19:04:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AE6F9290DC for ; Sat, 26 Jan 2019 19:04:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726189AbfAZTEB (ORCPT ); Sat, 26 Jan 2019 14:04:01 -0500 Received: from tomli.me ([153.92.126.73]:44498 "EHLO tomli.me" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726174AbfAZTEA (ORCPT ); Sat, 26 Jan 2019 14:04:00 -0500 X-Greylist: delayed 400 seconds by postgrey-1.27 at vger.kernel.org; Sat, 26 Jan 2019 14:03:59 EST Received: from tomli.me (localhost [127.0.0.1]) by tomli.me (OpenSMTPD) with ESMTP id af6da14b; Sat, 26 Jan 2019 18:57:18 +0000 (UTC) X-HELO: localhost.localdomain Authentication-Results: tomli.me; auth=pass (login) smtp.auth=tomli Received: from Unknown (HELO localhost.localdomain) (2402:f000:1:1501:200:5efe:7b76:77ab) by tomli.me (qpsmtpd/0.95) with ESMTPSA (DHE-RSA-CHACHA20-POLY1305 encrypted); Sat, 26 Jan 2019 18:57:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=tomli.me; h=date:from:to:cc:subject:message-id:mime-version:content-type; s=1490979754; bh=CzYzYrvGRHlwi50ILESB9R272tJ3yD/CTa2iaL2HFvk=; b=vR+CjlyZ1oWCGtjhucZgfh2kJGQR7DrL7Mb1csynlY3b0LG926Hui19CtPPBn8P0l8cMSYpamVXKRDJEJvxqqUGMyBu0X/GqxUOtLX8i7NZP7i++4ryFO5344cisADTvR4/KHXEtDE0qoSKDPzmYMbE652D7UJ/SQfPeL47Qoa27oBoPqNfr5ufJL84Hb8m9FlJImNfZFe8Unbc0U8maod1SaBCiKiT1xDKKtb4kq3/sDC5ryFwEr7/cryZFvheBXMaxydKjz8X8/DaM4soidPUjyXbLOhITC2qKTEDeh3BEQHnGBxjZClV1QjtiG4pCxXgK23QgDVtZaxYk9RNZTw== Date: Sun, 27 Jan 2019 02:57:10 +0800 From: Tom Li To: linux-fbdev@vger.kernel.org Cc: linux-embedded@vger.kernel.org, sudipm.mukherjee@gmail.com, teddy.wang@siliconmotion.com Subject: [PATCH] staging: sm750fb: fix ASCII graph in comments. Message-ID: <20190126185710.GA13855@localhost.localdomain> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Cc: Sudip Mukherjee Cc: Teddy Wang --- 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;