Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp5037265rdb; Sat, 30 Dec 2023 03:29:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IHn9/q0ufL3gWIZx+u0y4cW4dgl4SUAG86VHbmnr//Z8vMw1uOOPvaFiFktVsfaCcxIPh3b X-Received: by 2002:a05:6402:17d7:b0:556:c61:2938 with SMTP id s23-20020a05640217d700b005560c612938mr306623edy.12.1703935786555; Sat, 30 Dec 2023 03:29:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703935786; cv=none; d=google.com; s=arc-20160816; b=yKcvZIgvzP2RQ0oXPGNQUjC2XrOamtEusZIyFJLuTL4f+1VW2meLX1xOwHAQn391K9 /cR7NRKP17eAZV2Jj2iV72WSe2atrC4HeFQxJ4ZEkdfJf27rlI7R2rDhfxNZOyUNxX91 SiICB79YFTXRZlMo//Ksk53PWv7zUlfXRvyXmWdx399SbhX7jop2mN+JuZ/MgO7tRZfo 001I1UXXRCb5BjuPqU+bFhO/JN032A98Euem8Tmyi1iv7W3btMdtRQQo7LwAmP7jZJ5Z J76X1SA+LzM5OImkqzFXypfgk0qXnIz8Y98mDYmbPOt9UiZC+HLGgjw6LPkrH5lcBC2E m1sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=rdHRZOJmLihwmundfIYh/Hz760M3I/Nde2Bk7xxTT8A=; fh=PWfsmAeIVhjN7IPZeQwW2FkF7kRlGadaBE0mqyc58+c=; b=Tpt4cnOtLb3BXApe0JX6gNB/vzLeeTElhCZjexMSW58EmpRvBRJsJCTdklm5L+yDY0 yOGfxNrHKgrRJpQsgzJ0fL9LbTJUgukgeSWODMyV5HWzoQYfhdkMz10XWYXp6j5Bc2Ag +KWccdy9WhJc+psbfZVfCh47pmdhZ0gq0dNLRGaRCYRK4qCQcKD50N2g55/rXCguuRxA NqXERhLuAyxDFRKOqDQ4J7vPhzUoUNzusmdtNEt1qQu9SFrLrA4Bpd/XCiCmVzUJ/7EU 9pRXZs6u1dBuEXAh3g15XiZiPERmBadZLzYtjey9nXVyBT2xWooYhifEMgfFh3BGu1YI 0+tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ZS1dVcc5; spf=pass (google.com: domain of linux-kernel+bounces-13400-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13400-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id q13-20020a056402248d00b005558e0f997esi2267681eda.676.2023.12.30.03.29.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Dec 2023 03:29:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-13400-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ZS1dVcc5; spf=pass (google.com: domain of linux-kernel+bounces-13400-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13400-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 285C21F2196C for ; Sat, 30 Dec 2023 11:29:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 05FA979CC; Sat, 30 Dec 2023 11:29:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="ZS1dVcc5" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-qt1-f170.google.com (mail-qt1-f170.google.com [209.85.160.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C2F677481 for ; Sat, 30 Dec 2023 11:29:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amarulasolutions.com Received: by mail-qt1-f170.google.com with SMTP id d75a77b69052e-4280bd41317so5601851cf.3 for ; Sat, 30 Dec 2023 03:29:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1703935776; x=1704540576; 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=rdHRZOJmLihwmundfIYh/Hz760M3I/Nde2Bk7xxTT8A=; b=ZS1dVcc5xSN5J+8wM562Zu//LTlPPJLJM2U4IetRSufRMbA01mMVsgrr5mY7f+B2Ul BUAQZXAuHVZmen6u+6VhFAq/QfZqZH0W39gmMZaPPB0yYIVYIYPpE5RIbMVVO4pPTN3D Ppe/z+1/QialIU00YhmQip3YpCYuN9BBNw7Rs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703935776; x=1704540576; 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=rdHRZOJmLihwmundfIYh/Hz760M3I/Nde2Bk7xxTT8A=; b=csos+pIrFjbyHRjUNGBIy9gkHlI5FnBDuMJlu6lAeVR4oZpaQwIclv2SzYeG//6JQa 2hMuiHWu2Sr4Ef0tKtcbdq+oiXVglSBRR4qpKO9bZATvBZMorXzXkGVhZbIpoifuTzxB qGgrigSgCyiebJbbMRvYn94ubx/Jg4//eoEOVNGmrqv4bNEPdAnSPn24/hN2AsWWs8TX LNZpWJC4q4YWr+GIlnjeXK9ZxCQnakPMGoriHHn+L79+8VqyfJtutuFnJuJ5967/EJfE royWyh0cRjn0vhfm9l7ireb5i9fA36hYLZy8Ac4e5RWXh3ieytKrAe7i3D5gpQHtOlVa eLVA== X-Gm-Message-State: AOJu0YyfCOMttQZNdt1ebVREmGwnic5vo/eAgKy+wDTJBhEdeGujAHPU /PCn7Otlymwjhfqb9ggBl33F9s6mB3Z8K4hU1IF8TKu9Lhp8kw== X-Received: by 2002:a05:622a:1393:b0:428:c11:47aa with SMTP id o19-20020a05622a139300b004280c1147aamr1958131qtk.57.1703935775771; Sat, 30 Dec 2023 03:29:35 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20231229135154.675946-1-dario.binacchi@amarulasolutions.com> <20231229135154.675946-8-dario.binacchi@amarulasolutions.com> In-Reply-To: From: Dario Binacchi Date: Sat, 30 Dec 2023 12:29:25 +0100 Message-ID: Subject: Re: [PATCH 7/8] drm/panel: nt35510: refactor panel initialization To: Linus Walleij Cc: linux-kernel@vger.kernel.org, linux-amarula@amarulasolutions.com, Alexandre Torgue , Daniel Vetter , David Airlie , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Neil Armstrong , Sam Ravnborg , Thomas Zimmermann , dri-devel@lists.freedesktop.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Linus, On Fri, Dec 29, 2023 at 6:43=E2=80=AFPM Linus Walleij wrote: > > On Fri, Dec 29, 2023 at 2:52=E2=80=AFPM Dario Binacchi > wrote: > > > The previous implementation did not make it easy to support new > > NT35510-based panels with different initialization sequences. > > This patch, preparatory for future developmentes, simplifies the > > addition of new NT35510-based displays and also avoids the risk of > > creating regressions on already managed panels. > > > > Signed-off-by: Dario Binacchi > > The idea is to have the driver adapt to different panels, and encode a de= ep > understanding just like we do with all hardware drivers. > > NAK. > > This patch: > > - Deletes a lot of useful documentation on how the panel works. > > - Deletes defines and replaces them with magic numbers > > All it achieves is a bit of "magic sequences because we are used to > magic sequences" and that doesn't look like an improvement at all, > instead it creates a dumber driver which has no explanations at all > to what is going on. > > Please rewrite the patch in the same style as the original driver. > The fact that you (probably) are not used to writing display drivers > in this way is not an excuse to destroy this nice structure. > > There are things that can be done, like create an abstraction for > sequence encoding with less open coded command issue > statements, by adding helpers to the DRM core, so if that is what > you want to do, then do that instead? Thanks for your explanations and suggestions. I will rewrite the patch following your suggestions. Thanks and regards, Dario > > Yours, > Linus Walleij --=20 Dario Binacchi Senior Embedded Linux Developer dario.binacchi@amarulasolutions.com __________________________________ Amarula Solutions SRL Via Le Canevare 30, 31100 Treviso, Veneto, IT T. +39 042 243 5310 info@amarulasolutions.com www.amarulasolutions.com