Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp2286110rwo; Sun, 23 Jul 2023 11:34:31 -0700 (PDT) X-Google-Smtp-Source: APBJJlGX4QiKbnm8zEpOr+ynzXnOL8YSN46FXkbFEFi5d1NQw7kd/4b8O7RWE3GdMBpEWLeZTwwn X-Received: by 2002:a05:6a00:2196:b0:668:9e7b:a3c1 with SMTP id h22-20020a056a00219600b006689e7ba3c1mr7631155pfi.8.1690137270760; Sun, 23 Jul 2023 11:34:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690137270; cv=none; d=google.com; s=arc-20160816; b=n2PRmzUPPMevHu7MUCrBWIbpG4VATStwY+/iGJk7A6XKHVuUE26Re+nBCD7OL+B/k+ YYdbnP/LPxN4PTyMa2yh/E68aRgSaacIM5i87Mrj1D+bgw+3e58xBKIr3Xvh6/1JCKkm JtEiZv06SamexwdauVdLSdcXNuaW2oJ89qWD34YAR8X4FuKUUIqO6zVgkSUhX6C6N9b7 S71pRMGf9GQg0r/FHnvFkTgTHtrRFH297848pYlZn2cMB0hmv3O0oOPRX8Vm6OuJ7KDl czdhxpd6y4MNCnbd5kQOTBNQw4Xp/U6TamFP8GfzzKJ3GFUhZUxHHWomofGau6zhEYCU 7JeA== 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=3Z4Q/5i212yOfDJHSZ237NJV5w/BOsCv0oJZlIG69OI=; fh=cp6XLUY+ezkAJmKV9u7b7/5J86nadb2pP0QqcnR63F4=; b=HsxYA5KrSchnDEwdiryrhEvMcfVCQo6qX/WNQUdn8xlTKz1hfCP5jrnwwPE3Gqb4YJ vA99nbEuQxRz6ulqY5SRwNkGTWItWD7cp+U1ytzF7PbOSCE2oqBwoI4w+/wTUISLE6ZT CHDRAHYcfkB9qwOdjc4RNBYo++1Ef3y2Lkxhxf0zB9187dYpE4nBc1ElmEQRBLAdatsQ hLwnwVyd/LApjnd5RdjBfCXfzJMmpQ/6zS/4Lv0vZKVixSUzmVgyIHTgJmvabDD6iTr1 GHSGIZ1r5PS3WQQC6FeHCKiMCczUDjPXnozLp4/tqkUscrzqsPB969APCPKCKK4yHTTx J1yA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FNsDYxJQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l186-20020a6388c3000000b005577eec6c6csi7218196pgd.160.2023.07.23.11.34.18; Sun, 23 Jul 2023 11:34:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FNsDYxJQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229608AbjGWQpf (ORCPT + 99 others); Sun, 23 Jul 2023 12:45:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229452AbjGWQpe (ORCPT ); Sun, 23 Jul 2023 12:45:34 -0400 Received: from mail-yb1-xb2e.google.com (mail-yb1-xb2e.google.com [IPv6:2607:f8b0:4864:20::b2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7299D191 for ; Sun, 23 Jul 2023 09:45:33 -0700 (PDT) Received: by mail-yb1-xb2e.google.com with SMTP id 3f1490d57ef6-d066d72eb12so2384216276.1 for ; Sun, 23 Jul 2023 09:45:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690130732; x=1690735532; 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=3Z4Q/5i212yOfDJHSZ237NJV5w/BOsCv0oJZlIG69OI=; b=FNsDYxJQhN4UYlo+NaIAuZ4TSaC1B2tgqtuVqVH3IoE2onNMulPmKxMTcCXNWLO6mV O5jSPzamZfi45jV+9vI2ygWXyo1O4wOko8kVYYuXY7HeXuvoscW1iCrKxS6wrT7iTGsv J+UxYDIM6aPcGKvps3u0qCPY7+BBssLn5Wk6wMk7M9mrXZyM/7GEhpitJHi4oD0G2TqI aeGfLDQ66q11u+wvgjruyRbpAt84zp7O+HhNwRjpAI0gN7mkQzNbzyOezHHQhr1w8dD1 QuU98M1BjjfDwT2Oqig+C1MbetYUISgzbh4r4KvQ7xLni5Kw35f5QfPIqCP/DTxhDmSP GCqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690130732; x=1690735532; 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=3Z4Q/5i212yOfDJHSZ237NJV5w/BOsCv0oJZlIG69OI=; b=Ie0JNZoLAVLJ4J9ssE36r6Z2cL0s4noRIE641IipGjST73Jhhk6zZmut6/oJFhCWCj IVHQTxwOtDjGI8uIqU7haLFPZU73lGreU5+gpemyrwy+aUGE86yaQjaDHjf712G2J1d/ liTaVrbXya0g5N8ggxTvmt3qwIsGayN36Y2DN2U1mIquOYZNWjdgiq9a78aH1NAoA1vZ lka17r/fUJ9QEPs51eKtkvdDhuo5hHTIIZs2f1QpwwQSzzUxWpnoxYUtP4KDsBX/dcWm 1BD+vld5YWXyq+vSGajg6M1un0uqlKEzkRiEa+OfrrI1iDBMUTLidW/sDp0Kh439Esnh ZTDw== X-Gm-Message-State: ABy/qLZTloc74tT69EJUqMRY7fSOSIPAHjQivoBhjWDre0WQaJKLRCD4 lwTrr/xfhO8hnIrBVQxcHyQU69VbGjIkZLb2kaXa2w== X-Received: by 2002:a25:2642:0:b0:d09:b2b1:9771 with SMTP id m63-20020a252642000000b00d09b2b19771mr2708738ybm.14.1690130732609; Sun, 23 Jul 2023 09:45:32 -0700 (PDT) MIME-Version: 1.0 References: <20230719152007.197710-1-arnaud.ferraris@collabora.com> <20230719152007.197710-3-arnaud.ferraris@collabora.com> In-Reply-To: <20230719152007.197710-3-arnaud.ferraris@collabora.com> From: Linus Walleij Date: Sun, 23 Jul 2023 18:45:21 +0200 Message-ID: Subject: Re: [PATCH v5 2/2 RESEND] drm: panel: Add novatek nt35596s panel driver To: Arnaud Ferraris Cc: Neil Armstrong , Sam Ravnborg , David Airlie , Daniel Vetter , Sumit Semwal , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Molly Sophia Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Hi Arnaud & Molly, overall the driver looks very good! On Wed, Jul 19, 2023 at 5:20=E2=80=AFPM Arnaud Ferraris wrote: > From: Molly Sophia > > Novatek NT35596s is a generic DSI IC that drives command and video mode > panels. Add the driver for it. Currently add support for the LCD panel > from JDI connected with this IC, as found on Xiaomi Mi Mix2s phones. > > Signed-off-by: Molly Sophia > Signed-off-by: Arnaud Ferraris (...) > .../gpu/drm/panel/panel-novatek-nt36672a.c | 251 ++++++++++++++++-- So are you sure the nt35596s panel driver is so similar to nt36672a that they should share the same driver? With all the magic number sequences I'm not so sure, do they really share any of the magic numbers? If not, consider creating a new driver, and then base it on the nt35510 instead. > +static const struct nt36672a_panel_cmd jdi_nt35596s_video_on_cmds[] =3D = { > + { .data =3D { 0xff, 0x24 } }, > + { .data =3D { 0x9d, 0x34 } }, (...) These are never nice. Do you have a datasheet so you can provide defines for the magic hex values? The construction with these .data seqence array should be replaces with some open coded sequences I feel, bit this pattern is already in the driver so I guess it's OK. Yours, Linus Walleij