Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp4684470rdb; Fri, 29 Dec 2023 09:43:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IFvCKQpixBvHnQc8OBUcT6c6DMzN8y7rQETsCGv/hya7kauG+PghaSVRWM7TOI5svWu6s8n X-Received: by 2002:a05:622a:452:b0:427:922f:42af with SMTP id o18-20020a05622a045200b00427922f42afmr13448992qtx.46.1703871813857; Fri, 29 Dec 2023 09:43:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703871813; cv=none; d=google.com; s=arc-20160816; b=FdDiO3Gp+XJaqElW4o5ypBbPIrhQCJ8I4/b8Iyt35+HYLblNLcdPfPvY7wugT4hpHZ 09b6VjXQGwiJEwgE0HJoWZ4qr9EEZ/V0xU1kkdQeK2eWGE4KC5/ajr1giViVhCII8sSn a/vVKx9IfKrj7H2XjvnTNJVgu4p/tR/varlCRYOkxMCEWghWKmWT6RyarWPYLLYBrSCx q60heQf3laZ2JJJIzOO09osbo1ulX0Vvn7suYEZJNV1lyYUYYQc+NScbNl4badniBvXc 3fGESZEbO72G2BXzyIUQtKwBMLkEKiN6p/mIvlncAKaC/BOhXJQefs0tR4bioi8RILf2 LHzQ== 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=NksR4Y0NrUvy+Rxpg9VzrCsku+YIs4s2MG0gMgIvcUc=; fh=aOSVRzHd0RYwGlKAPtHTq4zPGELHA6NRSa1YLISev34=; b=N3NGIycDS3J7WT+GzGq1AN2uQDw7tzKaiJZsZli9oY+v9s/7wz7NmW8cNYQyNIu+NS IaXBH5ztR27CUFPcWwCQHrQIEX8kYWuAAm2BQYx14ie4SOY5olCNetL/PNG1A+O2H21D aoqwM9V5p7No06dAGxVMvPf7P7wv2sJrzfbYu8+F8IqXa6oOnhfGbI45MbkNPIFKAz8W 7l+lV9BIxhbaKjNRLvk/cNec1WSbw+oYcTZ7Mrj634uuPXUuE27lwPJuT06PBqdfrUMX DX5HuuFgbq8+SWRHjiz03QFSFOHwtxLHJ4zGx/DDh7tsOuE90jaelIZ+S9Is8b19MCQe nuhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TJotHam+; spf=pass (google.com: domain of linux-kernel+bounces-13189-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13189-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id q17-20020a05622a04d100b004278c136bedsi19950214qtx.229.2023.12.29.09.43.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Dec 2023 09:43:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-13189-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TJotHam+; spf=pass (google.com: domain of linux-kernel+bounces-13189-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13189-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 9C0531C2144B for ; Fri, 29 Dec 2023 17:43:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2671A12B86; Fri, 29 Dec 2023 17:43:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="TJotHam+" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-yb1-f177.google.com (mail-yb1-f177.google.com [209.85.219.177]) (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 D65A412B6B for ; Fri, 29 Dec 2023 17:43:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-yb1-f177.google.com with SMTP id 3f1490d57ef6-da7ea62e76cso5998896276.3 for ; Fri, 29 Dec 2023 09:43:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1703871803; x=1704476603; 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=NksR4Y0NrUvy+Rxpg9VzrCsku+YIs4s2MG0gMgIvcUc=; b=TJotHam+BKNSdFJnwV7PM6HwuRpj02wcB/otHqA6bJQ8WMu3fPZPS9g1BNO5ZzRPdi hvciOwb++SOw9XC8zHz7mte3RqdQNfivLmdKYEP956V0s0QxOGdYBNLBE0Q6WGcPploW OF4wq0gziggD3V4u4PiRcPjv0O3UiLSlrM1s/MjXETJwIX1SYm3OsQAQsKgDZkP/xxge AOexerPioGaeDQI/69TcEQV67LSN4ct51eDYQ+JQDgJ15GAKvuAxn3Ze0pGyZHSscKB9 CLx2qVU9dUA9kNGO9DCh08JdHnMWjoPkvOfhPwCUMtfplVRfbcVNmiGcF1OriBMHloxB pKzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703871803; x=1704476603; 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=NksR4Y0NrUvy+Rxpg9VzrCsku+YIs4s2MG0gMgIvcUc=; b=qA/4TGVdMPYYIyPf4BglCalJC4U+aa8UFn/B6A/R1WkLU1dCXNmV/96jGzaFjr55gv 5uCb0VV+mCtHqv3ll97xhb9tU/J4bVCMsDKpVuh4OrwMpKXKmgg53n2IHCBnCJGI8rjJ rhenbP6jXwvaC23LZJnuU2FEz06tHCwgl7DP6O6uZ5auKSGoTDa5U3ttNxbVtBs4lEcE +JRzzbrDFJSrI24sv0xeoSgYq0jV0HyEY4m0+E2UyDfA+7CZwX6voyVNdopvl/zd824t Hl166hwB5ZQWtbO2HxtOu0skYcneXR9v4tJQ0RKj0xWlq8wcwGz0j2z/Gat6MbGUy/uZ CSjQ== X-Gm-Message-State: AOJu0Yxt80cYn+le6CdEkD2GM9vNaZQScA79Y0s2j9u9wRM9VgjUschQ AqW3Nl1HBOD9BvcOpAeJKRIYhrDAIZRyFt/9hCFfs6bUKJP0GQ== X-Received: by 2002:a25:9f0b:0:b0:dbe:3259:770f with SMTP id n11-20020a259f0b000000b00dbe3259770fmr2678598ybq.71.1703871803682; Fri, 29 Dec 2023 09:43:23 -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: <20231229135154.675946-8-dario.binacchi@amarulasolutions.com> From: Linus Walleij Date: Fri, 29 Dec 2023 18:43:11 +0100 Message-ID: Subject: Re: [PATCH 7/8] drm/panel: nt35510: refactor panel initialization To: Dario Binacchi 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 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 deep 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? Yours, Linus Walleij