From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7F745C43468 for ; Mon, 21 Sep 2020 17:04:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4C7B5206BE for ; Mon, 21 Sep 2020 17:04:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728293AbgIUREV (ORCPT ); Mon, 21 Sep 2020 13:04:21 -0400 Received: from honk.sigxcpu.org ([24.134.29.49]:39684 "EHLO honk.sigxcpu.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730109AbgIUREU (ORCPT ); Mon, 21 Sep 2020 13:04:20 -0400 Received: from localhost (localhost [127.0.0.1]) by honk.sigxcpu.org (Postfix) with ESMTP id F3B25FB06; Mon, 21 Sep 2020 18:55:54 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at honk.sigxcpu.org Received: from honk.sigxcpu.org ([127.0.0.1]) by localhost (honk.sigxcpu.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PwhMdxTLLlij; Mon, 21 Sep 2020 18:55:53 +0200 (CEST) Received: by bogon.sigxcpu.org (Postfix, from userid 1000) id EFE46457CC; Mon, 21 Sep 2020 18:55:52 +0200 (CEST) From: =?UTF-8?q?Guido=20G=C3=BCnther?= To: Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , Rob Herring , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH v1 0/3] drm/panel: mantix panel reset fixes Date: Mon, 21 Sep 2020 18:55:49 +0200 Message-Id: X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Posting as RFC since I'm not sure how to handle the bindings, please see below. The first patch in this series fixes dereferencing a NULL mode in the error path. The second one extends the resets to not only reset RESX but also TP_RSTN since otherwise the display will stay completely blank. I didn't spot that before initial submission since the reset line was bound to the touch controller and although that failed to probe it came far enough to deassert the reset line (at an arbitrary point in time during boot) and hence we got a picture. Since touch and panel are on the same IC they're not completely independent and i might have to turn the whole thing into an MFD at some point but this series gets the panel to a reliably working state on boot and on fb blank/unblank. Since the reset-gpios are active low we can deassert in prepare and assert in unprepare simplifying the code making sure lines are kept low when the panel is off. As for the bindings it seems I can't override the maxItems of reset-gpios since that is already set in bindings/display/panel/panel-common.yaml to maxItems: 1`. Is there a way to do that instead of side stepping the issue and using a different name or using enable-gpios for one of them or forcing everyone else to set `maxItems: 1`? The binding were not part of a stable kernel so I hope it's okay to not worry about backward compatibility. Guido Günther (3): drm/panel: mantix: Don't dereference NULL mode drm/panel: mantix: Fix panel reset dt-binding: display: Require two rests on mantix panel .../display/panel/mantix,mlaf057we51-x.yaml | 7 +++- .../gpu/drm/panel/panel-mantix-mlaf057we51.c | 39 ++++++++++++------- 2 files changed, 30 insertions(+), 16 deletions(-) -- 2.26.2 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 806CFC43465 for ; Mon, 21 Sep 2020 16:56:02 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DDE9A206FB for ; Mon, 21 Sep 2020 16:56:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DDE9A206FB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sigxcpu.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BBE4F89DA8; Mon, 21 Sep 2020 16:56:00 +0000 (UTC) Received: from honk.sigxcpu.org (honk.sigxcpu.org [24.134.29.49]) by gabe.freedesktop.org (Postfix) with ESMTPS id EEC496E06D for ; Mon, 21 Sep 2020 16:55:57 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by honk.sigxcpu.org (Postfix) with ESMTP id F3B25FB06; Mon, 21 Sep 2020 18:55:54 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at honk.sigxcpu.org Received: from honk.sigxcpu.org ([127.0.0.1]) by localhost (honk.sigxcpu.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PwhMdxTLLlij; Mon, 21 Sep 2020 18:55:53 +0200 (CEST) Received: by bogon.sigxcpu.org (Postfix, from userid 1000) id EFE46457CC; Mon, 21 Sep 2020 18:55:52 +0200 (CEST) From: =?UTF-8?q?Guido=20G=C3=BCnther?= To: Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , Rob Herring , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH v1 0/3] drm/panel: mantix panel reset fixes Date: Mon, 21 Sep 2020 18:55:49 +0200 Message-Id: X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" ClBvc3RpbmcgYXMgUkZDIHNpbmNlIEknbSBub3Qgc3VyZSBob3cgdG8gaGFuZGxlIHRoZSBiaW5k aW5ncywgcGxlYXNlIHNlZSBiZWxvdy4KClRoZSBmaXJzdCBwYXRjaCBpbiB0aGlzIHNlcmllcyBm aXhlcyBkZXJlZmVyZW5jaW5nIGEgTlVMTCBtb2RlIGluIHRoZSBlcnJvcgpwYXRoLiBUaGUgc2Vj b25kIG9uZSBleHRlbmRzIHRoZSByZXNldHMgdG8gbm90IG9ubHkgcmVzZXQgUkVTWCBidXQgYWxz byBUUF9SU1ROCnNpbmNlIG90aGVyd2lzZSB0aGUgZGlzcGxheSB3aWxsIHN0YXkgY29tcGxldGVs eSBibGFuay4gSSBkaWRuJ3Qgc3BvdCB0aGF0CmJlZm9yZSBpbml0aWFsIHN1Ym1pc3Npb24gc2lu Y2UgdGhlIHJlc2V0IGxpbmUgd2FzIGJvdW5kIHRvIHRoZSB0b3VjaApjb250cm9sbGVyIGFuZCBh bHRob3VnaCB0aGF0IGZhaWxlZCB0byBwcm9iZSBpdCBjYW1lIGZhciBlbm91Z2ggdG8gZGVhc3Nl cnQgdGhlCnJlc2V0IGxpbmUgKGF0IGFuIGFyYml0cmFyeSBwb2ludCBpbiB0aW1lIGR1cmluZyBi b290KSBhbmQgaGVuY2Ugd2UgZ290IGEKcGljdHVyZS4gU2luY2UgdG91Y2ggYW5kIHBhbmVsIGFy ZSBvbiB0aGUgc2FtZSBJQyB0aGV5J3JlIG5vdCBjb21wbGV0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