Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp2142199rdb; Mon, 9 Oct 2023 14:13:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG/ysMWx0F4E3l4jr/hsEyztjy7NtPnwLQF4zVDfiUX8GE6CZ8Ogh9jerMxaeCVjvddPhdD X-Received: by 2002:a05:6a00:1255:b0:690:d718:8c6d with SMTP id u21-20020a056a00125500b00690d7188c6dmr16639708pfi.15.1696885997813; Mon, 09 Oct 2023 14:13:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696885997; cv=none; d=google.com; s=arc-20160816; b=c/alK8frUuX7ILcxSju7KAVXZvhjZVMZoKzh9tA89lwoVr6DZd1mX6aUmotSCnsU38 mtM/XTh0QdPgmIr8RRy4kYhsS30rN37ZiKzblUlcs+c28PQj2WPxBBfK/UDfPJZDmoAv BKB/lCt3YFrTlzBbkfEwqboJ1JMqWeBqKpYVp17kAOmlTkwAxWDMDj1DfgsNmXVFXhNM EUIDql0Bv8t6hotRe5XI1AZyb9+/8lHBGlELaLv2BzDuvEKb3AKseO2kJiLN58NQWUxy CWRLNY98gubhlQDdp2jNfOyp0H201P5BJ91g/wU6HI17vYGDFIE0tvxCYBJvj89YInqm UvDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=QqbHq0ttFKvzPDwgSW9g3cAaws+68PDkrZBukLsrYPg=; fh=qPErRk33Z8WDeCceZ37jlTsqYf7VAzKLZJQGhZH2zj4=; b=HqAyCAJsbIfPsqAQuMhELVwl9Qkmj1FxkHK31S57nEq9mmj160/uxQ9UAm9Yd27+zJ G9AhDl9STrpKJ5mtKJs76W9o3M4uDqswTzmRB6GT02aiI+kxkKKQmqp4civ5uBAba6h3 m0q7Vl4l93KKoHMGLh9SArFPZnaWitker6QNZldUatp5sA3uJmi+tApDzmH3zyhr98O7 8NwduiwkdqjmVtDder4AtPE9F6+t5c7zbXPLs4Ke0nt3SJ2vKtrnj6j5DBrwGGxhhtFC AS0eOux/2Fcou0iPIiBODlSSquvD8+onQmxqt+M2R0eHu04l7VTcS4SgtGLlLENeT85I x+dA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=DHBCRYD1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id y22-20020a056a00191600b00690c0051dcdsi8482445pfi.143.2023.10.09.14.13.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 14:13:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=DHBCRYD1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 7A45F8047DA4; Mon, 9 Oct 2023 14:13:14 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378597AbjJIVNG (ORCPT + 99 others); Mon, 9 Oct 2023 17:13:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378151AbjJIVNE (ORCPT ); Mon, 9 Oct 2023 17:13:04 -0400 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA008A3 for ; Mon, 9 Oct 2023 14:13:03 -0700 (PDT) Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-40662119cd0so133165e9.1 for ; Mon, 09 Oct 2023 14:13:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1696885982; x=1697490782; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=QqbHq0ttFKvzPDwgSW9g3cAaws+68PDkrZBukLsrYPg=; b=DHBCRYD1GpZ8BuBLvYBRa2hJglIPijQ2KiY7S6hTL2AYMrkC1yaz4lmVULicDw1Y5f an3fRQW4XwjJAEZyLRwNVS6IZO1paYcNO+PN5TWqZt+xd8QKSSwAAqQJWyXEbuljJ6ZC Q0wkMXWx2hRWaqnQIgIy2w8/9nE7qfcWcdNwMH0jifx7amFU/DA4K3SnBmwpHN5GTx1Y 6St0P5ym7YfKaNyDQZjTQwinOSviAj/WQE3/M1DgvyHoL+kyrWqV1oQByGAavxR3gbdW itvOlWH3OXxkz3MjER4fkKGWXi4juBqhu+RcDqiHusqSHYGu+506gRAQ8qJKhpfrlD+Y emnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696885982; x=1697490782; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QqbHq0ttFKvzPDwgSW9g3cAaws+68PDkrZBukLsrYPg=; b=uSIhtl5iXLH3VMRqwqUO/zEpGlpJgiSqpzRUAacwyDtInrc7Mh1aH7Y6wuZIuFvSV7 7l8O8pKqmSjglQey25dlKUFiIKHks18QKnMmqa1dWZb5YixtGvGA9IP677XxYw/+Azsb zNH+bcF4DhxajMHERuWeabz4YS4vUnZ0ahLmPwNPZ4+YrRj//1j0akNtunFztU2I1SSH yLpKEax7I25cYr6mo1JozQR91ClLme5T/D6SVTt48SHu5xp5cgDXT5nZkTF5OeZ6atWd PapScdRJT/OrSfDRWV+jFBfhnGR5EPhLSDFTtMcfKcYqUelsCyX0T5lfF9o5ZvfwVLDY KgbQ== X-Gm-Message-State: AOJu0YyxJKpi3B0ICguXbjAR2lBw2Q8wnrpRVJN4gaGyPXLZeBtkc+Kh GA/VQnPii/caB7O9w4RveDMQH++5j2yYNnpHtWs1Jw== X-Received: by 2002:a05:600c:1e25:b0:406:5779:181d with SMTP id ay37-20020a05600c1e2500b004065779181dmr383034wmb.2.1696885981988; Mon, 09 Oct 2023 14:13:01 -0700 (PDT) MIME-Version: 1.0 References: <20231007060639.725350-1-yangcong5@huaqin.corp-partner.google.com> In-Reply-To: From: Doug Anderson Date: Mon, 9 Oct 2023 14:12:45 -0700 Message-ID: Subject: Re: [v1 0/2] Break out as separate driver from boe-tv101wum-nl6 panel driver To: Linus Walleij Cc: Cong Yang , sam@ravnborg.org, neil.armstrong@linaro.org, daniel@ffwll.ch, hsinyi@google.com, swboyd@chromium.org, airlied@gmail.com, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.8 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Mon, 09 Oct 2023 14:13:15 -0700 (PDT) Hi, On Mon, Oct 9, 2023 at 2:02=E2=80=AFPM Linus Walleij wrote: > > On Mon, Oct 9, 2023 at 10:53=E2=80=AFPM Doug Anderson wrote: > > > Also: just as a heads up, Hsin-Yi measured the impact of removing the > > "command table" for init and replacing it with a whole pile of direct > > function calls. She found that it added over 100K to the driver (!!!). > > I believe it went from a 45K driver to a 152K driver. Something to > > keep in mind. ;-) > > Sounds like Aarch64 code. I would love a comparison of the same > driver compiled to ARMv7t thumb code. Just for the academic > interest. Because I have heard about people running ARM32 > kernels on Aarch64 hardware for this exact reason: so they can > have thumb, which is compact. Yeah, thumb2 was the best. I suspect that in addition to the aarch64 vs thumb2 part of the problem is that mipi_dsi_dcs_write_seq() is a macro, so this wasn't just a whole ton of function calls, but a whole ton of inline function calls. ;-) Still, even if we fixed that, I'm not sure it we'll ever be able to beat the space efficiency of command sequence tables. > OK OK we definitely need command sequence tables in the core, > what we have now is each driver rolling its own which is looking bad. Agreed. I'd love to see someone tackle this (though not blocking Cong's series on it). Hsin-Yi took a quick look at it and noticed that some drivers have slightly different cases for how they handle command sequences, which is a bit annoying. For instance, at least one driver had an extra NOP between commands and said it was important not to remove that. ...so we'd have to figure out how to abstract some of these differences without it getting too ugly... -Doug