Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp3608747ima; Mon, 4 Feb 2019 02:02:48 -0800 (PST) X-Google-Smtp-Source: ALg8bN6CgOGQHaU0QWteHR/bDVwAkIGEE/D0imIqq94LjcoI0sHWvIXYD+jzLqfL9Y2L0IfL0nFO X-Received: by 2002:a62:190e:: with SMTP id 14mr50116078pfz.70.1549274568659; Mon, 04 Feb 2019 02:02:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549274568; cv=none; d=google.com; s=arc-20160816; b=Jz4gkF7nl6/L22k3gvQ6l9AmJGAWzOZK1iP2YkizHhnfql6tvEjvzdawMJt3lQE12m z6ZiSukT/xrHRRLQKaCy7GTNC/71z88luAU643XVDUgLBAWFuvTiTHp3HpExS4USpR+w HVBYrZAgwvNUcKANls322SRCObYqym1+8IR+barGcwBiFijhtb3+poHXauWSU7sS/rrj Rly1UMbeBpTN5HW3eU/dpzdeHLxpyZji19UXcv1wt7jQjP7HoM9wO6Xqi05VOxl/3hlQ ghAmiJ2qzgcyk5OBSUhzvPfMAKldaMo8uM1NVog8LvFYEMENzae0Ba7QHx36ZoqWPrxt qBQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature; bh=HCk6Cker7EnaqG4lRZ4AvMxXN47boaQMquZ5+xe/jYk=; b=GjsaDFbEOHBNT9B8lvtxYO7Ax6DzzYqLCx9K8ohmls1JPN3TY6dD85BFhtpjYbuSTy oI5RphrCasb1tXFZAtIsirqDKXm+q9Ppe/EeE8eLAR4yAd+U16p1Up0QpmwH983WUUEk CsvLSCaAZum2ruRn5SDjMG5qk9OY3en8yqEk0LBdA9H46wMKWYhvUQU8Wb6Zt8UG0j4p qJXBIVWKdSJKnlQX8NPvqIVppp6+umiyeuzW5kvMQaEC6ErcTaJ6ZZQ56wVdSiVIJ4JG IWNtzeRGnLyS/MWJORbaDHrz+D+rIjZ9P/ik+VkUhD1EJV7hHWiglXEf0t5GEhR+vhcM 3KFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@ffwll.ch header.s=google header.b=Du6PMVwz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 33si4345663plu.169.2019.02.04.02.01.54; Mon, 04 Feb 2019 02:02:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@ffwll.ch header.s=google header.b=Du6PMVwz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728692AbfBDJ0Y (ORCPT + 99 others); Mon, 4 Feb 2019 04:26:24 -0500 Received: from mail-ed1-f68.google.com ([209.85.208.68]:44963 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726928AbfBDJ0X (ORCPT ); Mon, 4 Feb 2019 04:26:23 -0500 Received: by mail-ed1-f68.google.com with SMTP id y56so10585291edd.11 for ; Mon, 04 Feb 2019 01:26:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=HCk6Cker7EnaqG4lRZ4AvMxXN47boaQMquZ5+xe/jYk=; b=Du6PMVwzIgSQ53vnpOupZdNTSnriu0zadfMIjv3MuL04LxYHFeMqYjsvz/B2N+cORu D4TIsnFLi3bE7HWvltEg6m4O1zeSatuaO8k4YldvIEf/ZeFWczFT4OrIwAEG8/3f8+22 YglGGOIpqDEa2XX78/VMX2OuYp/kJkLzfwchE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=HCk6Cker7EnaqG4lRZ4AvMxXN47boaQMquZ5+xe/jYk=; b=OxHnX8gwft8t1lWpMdl5v7Hc7p/x49loc3aNTJtFcwIJvphhDdJri9GXv7GPzqS6UD g4ZWwShQSvCWWlIucXLcyh8J9Egv3J7jQq17KRLSrLgl1d2I7F6enx/5+h5g+sKulJH1 JotBg+ZESG7C6x61oLFPrG9M+ACoDxjDZwSnmCmTD0ZOdDeDjKnk2oxQr7Lr3kV8lgwu 0jKyo+qi/M5IcPmOxT056om2/7vaMkJVHevXQpUAE+m87BSOMJSld3nKnfhFH1KvXshr p55f8tEi0RtO3b6Ps32G01zlbxhbDTInfcpLXytW+dUvnG+yYHZeE+hf3zcHR4kdZ4o1 0YFA== X-Gm-Message-State: AJcUukfEvA3wyf7BSqeIxqApmK9RFW9v5Dc/QSDys+pfBodhp/QfoXJ/ sdfDkA1NI8CbuTEngoYrmO2HsQ== X-Received: by 2002:a50:8b26:: with SMTP id l35mr48215172edl.146.1549272381471; Mon, 04 Feb 2019 01:26:21 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:569e:0:3106:d637:d723:e855]) by smtp.gmail.com with ESMTPSA id g20sm3927496edr.47.2019.02.04.01.26.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Feb 2019 01:26:20 -0800 (PST) Date: Mon, 4 Feb 2019 10:26:18 +0100 From: Daniel Vetter To: Yifeng Li Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Bartlomiej Zolnierkiewicz , Sudip Mukherjee , Teddy Wang Subject: Re: [PATCH 0/8] fbdev: sm712fb: implement 2D acceleration w/ cleanups. Message-ID: <20190204092618.GM3271@phenom.ffwll.local> Mail-Followup-To: Yifeng Li , linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Bartlomiej Zolnierkiewicz , Sudip Mukherjee , Teddy Wang References: <20190202061648.30374-1-tomli@tomli.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190202061648.30374-1-tomli@tomli.me> X-Operating-System: Linux phenom 4.19.0-1-amd64 User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Feb 02, 2019 at 02:16:40PM +0800, Yifeng Li wrote: > Previously, in staging/sm7xxfb (now fbdev/sm712fb), 2D acceleration > was implemented, but after its submission, a critical bug that causes > total system hang was discovered, as a stopgap measure, 2D ops was > completele removed in commit 3af805735a25 ("staging: sm7xx: remove the > buggy 2D acceleration support") and never implemented again. > > It created a massive usability problem - on YeeLoong 8089, a notable > MIPS platform which uses SM712 - even scrolling a single line of text > on the console required an unaccelerated screen redraw, running "dmesg" > typically takes 8-11 seconds, and absurdly, printf(), became a significant > performance bottleneck that slows down GCC and "make", make the computer > largely unusable. > > So I decided to take a look. Most of the my actual development was done > in 2014 in a personal out-of-tree driver, I did not mainline it because > 2D acceleration was not working properly in 24-bit color. I discovered > the solution in early 2019 and now it's ready to be mainlined. > > This commit reimplements the 2D acceleration for sm712fb. Unlike the > original implementation, which was messy and unnecessarily complicated > by calling a 2D acceleration wrapper file with many unneeded functions, > this is a minimum and (relatively) clean implementation. My tests have > shown that running "dmesg" only takes 0.9 seconds, a performance boost > of 950%. System hangs did not occur in my tests. > > Currently, 2D acceleration is only supported on SM712 with little-endian > CPUs, it's disabled on Big Endian systems and SM720 chips as a safety > measure, since I code for myself without any monetary or hardware support > from any company or OEMs, I don't have the hardware and it's completely > untested. I should be also to purchase a Big Endian test platform and add > proper support soon. If you have a Big-Endian platform with SM7xx > available for testing, please send an E-mail to me immediately! Thanks! > > 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, 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 copyright headers. > fbdev: sm712fb: use type "u8" for 8-bit I/O. > fbdev: sm712fb: add 2D-related I/O headers and functions. > fbdev: sm712fb: support 2D acceleration on SM712 w/ Little-Endian CPU. > fbdev: sm712fb: add 32-bit color modes, drops some other modes. > Documentation: fb: sm712fb: add information mainly about 2D. > fbdev: sm712fb: Kconfig: add information about docs. > MAINTAINERS: sm712fb: list myself as one maintainer. Since you care about this driver, considered converting it to a drm display driver? You can still have all the acceleration and stuff, the fbdev compat mode in drm is rather flexible. -Daniel > > Documentation/fb/sm712fb.txt | 123 +++++++- > MAINTAINERS | 1 + > drivers/video/fbdev/Kconfig | 4 + > drivers/video/fbdev/sm712.h | 129 +++++++- > drivers/video/fbdev/sm712fb.c | 574 ++++++++++++++++++++++++++-------- > 5 files changed, 679 insertions(+), 152 deletions(-) > > -- > 2.20.1 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch