Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp793539pxb; Fri, 22 Apr 2022 11:16:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwu/xkUaoV6u9gZ8g+Mq/32qUzw/jCO4taSf1wtWkshtI+i5hiEdtjF124bz/TBtfgnPC7I X-Received: by 2002:a17:902:ba98:b0:15a:44ee:9e91 with SMTP id k24-20020a170902ba9800b0015a44ee9e91mr5822775pls.3.1650651360174; Fri, 22 Apr 2022 11:16:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650651360; cv=none; d=google.com; s=arc-20160816; b=kpkjPt+L6MduyUeU50LJQdvNN9m/vpzofLzQ9ewQtYdLcF/ttoHZJKjxG5GHkZAFxd mf2dbiY0b/Lv1W8hDYyDvqEFdkuMLnov7F7fuXmKzIDe7OlqKK9C0zeGQVF8BreUBQGc l1MsCR0QQFLqcw6bQTyzhR+YRm6H+IoI9nAiiWlRblIDo6SboQsSZANtOXz8jmD1vP/m MY3P/C/lgPM47WpGdrWOfOuebEyfRXf5Rdat4jrcz+7R7bqM6WDbh6/oxv4NKl96z24r fSQlm/dzDUHVQVZ89jGowzaYhdENS10pIHk6rJSjvfAKh2Jo7gl59xhCHIZJP7qlaVt5 fBEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=xkg/9fBx91D98nGOM7iMUznlEWdi4zGYGgMCknbS6fg=; b=xA0ts7P4HSZScrJwVDAhxC0qR7yn8hicS8U6xISFLOkofde6CY7nhV647vm5ARpXdg TsFqNy4QcJ2umnYW9Aj4QX4XXi0tkYivAiXtZBV2X4B+iTeO/b8KHkFUPdTJsopFbhN9 j90tDyGcirmTsyC3SntV8Viy8KcPllRml5D3eUFKx90pNGkCgASqTDghIPJP8aMvCOCr 0Wqzz+LpHR35T7PliwGIaAEjpsC84xu43FtwMe3UqF/hh0J6S7G1q5WH3iIzQRN0LJZE S6xbMC/DBPtaf2d03dRgaO5lYLrlD2O4fTq3lEOVSEHqVn5LMeypR+zDUqY4VBcCCxSC j/ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kemnade.info header.s=20180802 header.b=HhAjS2WK; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id c15-20020a056a00248f00b004fae70007c5si9448395pfv.78.2022.04.22.11.15.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 11:16:00 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=fail header.i=@kemnade.info header.s=20180802 header.b=HhAjS2WK; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A96141344C4; Fri, 22 Apr 2022 10:50:00 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236503AbiDUGs1 (ORCPT + 99 others); Thu, 21 Apr 2022 02:48:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1385195AbiDUGrb (ORCPT ); Thu, 21 Apr 2022 02:47:31 -0400 Received: from mail.andi.de1.cc (mail.andi.de1.cc [IPv6:2a01:238:4321:8900:456f:ecd6:43e:202c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46A5D1581C; Wed, 20 Apr 2022 23:44:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kemnade.info; s=20180802; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=xkg/9fBx91D98nGOM7iMUznlEWdi4zGYGgMCknbS6fg=; b=HhAjS2WKe9oB9WWs9KZtnCFVXr C1N/qwuSD8n5GT+YN72L1mkOrQl9ENF0LWI38XgbUSgUXGIQS2kOLp8/3vloH4sZOeLoiUfHWWSNz c+kOjPTQbRAwailjS/Ma3fUu1rRgd6z4ySOdlIUtXvK6yEDscEO8f04w3y/UlZdp0BT4=; Received: from p200300ccff1491001a3da2fffebfd33a.dip0.t-ipconnect.de ([2003:cc:ff14:9100:1a3d:a2ff:febf:d33a] helo=aktux) by mail.andi.de1.cc with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1nhQXU-0002cN-3m; Thu, 21 Apr 2022 08:43:40 +0200 Date: Thu, 21 Apr 2022 08:43:38 +0200 From: Andreas Kemnade To: Samuel Holland Cc: Heiko =?UTF-8?B?U3TDvGJuZXI=?= , Sandy Huang , dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org, Alistair Francis , =?UTF-8?B?T25kxZllag==?= Jirman , Daniel Vetter , David Airlie , Geert Uytterhoeven , Krzysztof Kozlowski , Liang Chen , Maarten Lankhorst , Maxime Ripard , Michael Riesch , Nicolas Frattaroli , Peter Geis , Rob Herring , Sam Ravnborg , Thierry Reding , Thomas Zimmermann , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 00/16] drm/rockchip: Rockchip EBC ("E-Book Controller") display driver Message-ID: <20220421084338.084c4d6e@aktux> In-Reply-To: <20220413221916.50995-1-samuel@sholland.org> References: <20220413221916.50995-1-samuel@sholland.org> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -1.0 (-) X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 13 Apr 2022 17:19:00 -0500 Samuel Holland wrote: [...] > Waveform Selection From Userspace > ================================= > EPDs use different waveforms for different purposes: high-quality > grayscale vs. monochrome text vs. dithered monochrome video. How can > userspace select which waveform to use? Should this be a plane property? > Or does userspace rather select a QoS, like low-latency vs. high quality. Or this will not change for a longer time: like doing full refreshes. > It is also likely that userspace will want to use different waveforms at > the same time for different parts of the screen, for example a fast > monochrome waveform for the drawing area of a note-taking app, but a > grayscale waveform for surrounding UI and window manager. > > I believe the i.MX6 EPDC supports multiple planes, each with their own > waveform choice. That seems like a good abstraction, but the EBC only > supports one plane in hardware. So using this abstraction with the EBC > would require blending pixels and doing waveform lookups in software. > The iMX6 EPDC has one working buffer containing the old+new state of the pixel. That is 16bpp. Then for each update you can specify a rectangle in an independant 8bpp buffer as a source. For now I am just using a single buffer. But yes, that construction could be used to do some multi plane stuff. > Blitting/Blending in Software > ============================= > There are multiple layers to this topic (pun slightly intended): > 1) Today's userspace does not expect a grayscale framebuffer. > Currently, the driver advertises XRGB8888 and converts to Y4 > in software. This seems to match other drivers (e.g. repaper). > > 2) Ignoring what userspace "wants", the closest existing format is > DRM_FORMAT_R8. Geert sent a series[4] adding DRM_FORMAT_R1 through > DRM_FORMAT_R4 (patch 9), which I believe are the "correct" formats > to use. > hmm R=red? That sounds strange. I am unsure whether doing things with lower bit depths actually really helps. > 3) The RK356x SoCs have an "RGA" hardware block that can do the > RGB-to-grayscale conversion, and also RGB-to-dithered-monochrome > which is needed for animation/video. Currently this is exposed with > a V4L2 platform driver. Can this be inserted into the pipeline in a > way that is transparent to userspace? Or must some userspace library > be responsible for setting up the RGA => EBC pipeline? hmm, we have other drivers with some hardware block doing rotation, but in that cases it is not exposed as v4l2 mem2mem device. On IMX6 there is also the PXP doing RGB-to-grayscale and rotation but exposed as v4l2 device. But it can also be used to do undocumented stuff writing to the 16bpp working buffer. So basically it is similar. But I would do thoso things in a second step and just have the basic stuff upstreamed Regards, Andreas