From patchwork Fri Aug 4 10:48:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 131112 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:44a:b0:3f2:4152:657d with SMTP id ez10csp190620vqb; Fri, 4 Aug 2023 04:24:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGGtZj33c/37ntxwQsmMdMN3qGyoBBlHuAFDsUKhMopgS/nU4neRn48lml/qw7kbQE1iyrK X-Received: by 2002:a05:6a20:9195:b0:116:d935:f742 with SMTP id v21-20020a056a20919500b00116d935f742mr1815144pzd.20.1691148269000; Fri, 04 Aug 2023 04:24:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691148268; cv=none; d=google.com; s=arc-20160816; b=gpqBGgTG2Ut+r7mKYceEbk6b4K8sZRxTLscMr1HAyTshfEs2Q/Qa7fkiBEHleF6xcM HGoe+QMUsuX8qq+66syJzIDyT7+CjOdjrUWAof1QADsVFP6hE5XSvdVmktzLFVKciMvR jZ+zCONATrOYuX/cxSzXXDDppc32fAabEPoYW1e1guE8YPB2E1vPYbeliRidKrBoMPVs wB8AuFbyntgQilVmMXdk5ZGNTlnL6EKOGyGqZGWc2REvwbKehYjGPUakH0E7wEg8aic2 A6LwU5M+hu70sMz343ORbPvfaxU6w+5PQgRWSyc2zW20zyyly1dkynyNNrqAzomNg8P9 9+0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=CZ4BHuba7nfFpUezW5r4e20Z0nYnquwFs/qUQVyhMPQ=; fh=ZOGtXHfkWMH/uI/XcDfhJQNKxcvOVtHiIbcBRd7ipUs=; b=B5sGGf6JRs199noe3lBoSsN/9l7Dzfvs4gDyRL5oq76iPxRNSnwORbiAA7S5dr57p/ wUHsq3Ij9Rno8Hdac/tn1cjLcDWtKIrulcyKEf3MEl5rYkLELov2D2SjGtj5aexba53S UZsDSD9MGcQWkapJk469J/yQ74weyp9F3VLzcaJPwRTpdTfheE9DFCyQrREPYD7rHxsG QNiZpRNk/zxNZJum3M267Lfbf7BVk/5xEWcU/z/kjoAMtgCWGmf1HDlf8LGm0xteVa1u J8//EIqPIBmFYxWeaJyEXaXKugpv4EUuQeXClEO/l8BNSvPDkzb7Jf7W9FTkwiivFygR wGHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=oujl1umh; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z38-20020a631926000000b0056416221daesi1593265pgl.283.2023.08.04.04.24.15; Fri, 04 Aug 2023 04:24:28 -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 (test mode) header.i=@ideasonboard.com header.s=mail header.b=oujl1umh; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231656AbjHDKvJ (ORCPT + 99 others); Fri, 4 Aug 2023 06:51:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230042AbjHDKuh (ORCPT ); Fri, 4 Aug 2023 06:50:37 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 163A25B85 for ; Fri, 4 Aug 2023 03:48:37 -0700 (PDT) Received: from [127.0.1.1] (91-154-35-171.elisa-laajakaista.fi [91.154.35.171]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 584FF1AB3; Fri, 4 Aug 2023 12:47:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1691146047; bh=Saj/S8br2Pn8J3bw6L6o8aOvLR2HwJ6wjYN6KAzMzkU=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=oujl1umhGiLwwXTZQbcxslb/R63Z5anKl0neAqDGW1DS5Gd2f+c6yewLw7lziR3Oh h6pAmu2zFKS0/ktx/Nr9Ql6+vWxZn8t3n53Px7QEwaUfdCYq/b+oyDnM7bhIRykHuw eCMcRojAZn6A9kM4+KU5RXGL48sbXCRgLMNMRDjM= From: Tomi Valkeinen Date: Fri, 04 Aug 2023 13:48:12 +0300 Subject: [PATCH 3/4] drm/bridge: lt8912b: Manually disable HPD only if it was enabled MIME-Version: 1.0 Message-Id: <20230804-lt8912b-v1-3-c542692c6a2f@ideasonboard.com> References: <20230804-lt8912b-v1-0-c542692c6a2f@ideasonboard.com> In-Reply-To: <20230804-lt8912b-v1-0-c542692c6a2f@ideasonboard.com> To: Adrien Grassein , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Francesco Dolcini , Stefan Eichenberger Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Tomi Valkeinen X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=1180; i=tomi.valkeinen@ideasonboard.com; h=from:subject:message-id; bh=Saj/S8br2Pn8J3bw6L6o8aOvLR2HwJ6wjYN6KAzMzkU=; b=owEBbQKS/ZANAwAIAfo9qoy8lh71AcsmYgBkzNd6liHCPx0ghKBP8t9JRvjgyQWiphU0oyD/m t9DegCFRgyJAjMEAAEIAB0WIQTEOAw+ll79gQef86f6PaqMvJYe9QUCZMzXegAKCRD6PaqMvJYe 9Zc7D/9FlNRiienw4V23B/lNpiOjKqmz7DNA6PdgZUnUnITvIoMehOP1f4ohGTivF9vewrvcPEy I0yY+lrHwzGJJM4H3PhbxlxjWtkHk3cjSfwquFrXXpCoS7eXr06zOK9yqSppAnylU5Ua6PAzegA LkpkfmyOFKJPvxbeL+rEM85MFIm4kbdx1TTYgS8wYI0ZDbk725VfDIMqK9t3xCL7IbN/TDpi+az l36QgZFRabDgyjTVC1/sij878thJr96JSXySEZtbtW/3WqPGDUXARxrkypmdEwaP8YNRuBNUrGl u6ya75o07hZQhkI/fIoOMCp+CavALCs4v9KiRShRh79otuwrKvnL9eXTboMBFDF0IOLHs7/spOi i8rD/onkTUW72a7RAmrgmW4PEwAgSsFXMxA/7BJOQDcDiph0re0aC26/VQko7EGCBlIcht8RRf+ 1nldp4Ik0lTGetaMKY3DoRLNshQ/3l1cVubAAVfyvYYozMkcAAK/THri3yuWeen/VZxfgsXdJT6 CiXkylVveds9/wckOyaq4F1TO0zQlEGqfrP4MLbY+lo1P81YpDFTVbWSjjxPn8eTpbie8h3TsPJ yWhuJ0UcOxF6vL5+E04Peolih8Z7ZCtqJ6c6awI4SsXstywT1Kw10kbdvJykKHhKWe2hccWPX7D Kicpr2fJcnyk0nA== X-Developer-Key: i=tomi.valkeinen@ideasonboard.com; a=openpgp; fpr=C4380C3E965EFD81079FF3A7FA3DAA8CBC961EF5 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_PASS,SPF_PASS,URIBL_BLOCKED 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773297486957232585 X-GMAIL-MSGID: 1773297486957232585 lt8912b only calls drm_bridge_hpd_enable() if it creates a connector and the next bridge has DRM_BRIDGE_OP_HPD set. However, when calling drm_bridge_hpd_disable() it misses checking if a connector was created, calling drm_bridge_hpd_disable() even if HPD was nenver enabled. I don't see any issues causing by this wrong call, though. Add the check to avoid wrongly calling drm_bridge_hpd_disable(). Fixes: 3b0a01a6a522 ("drm/bridge: lt8912b: Add hot plug detection") Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/bridge/lontium-lt8912b.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/lontium-lt8912b.c b/drivers/gpu/drm/bridge/lontium-lt8912b.c index 2d752e083433..9ee639e75a1c 100644 --- a/drivers/gpu/drm/bridge/lontium-lt8912b.c +++ b/drivers/gpu/drm/bridge/lontium-lt8912b.c @@ -587,7 +587,7 @@ static void lt8912_bridge_detach(struct drm_bridge *bridge) lt8912_hard_power_off(lt); - if (lt->hdmi_port->ops & DRM_BRIDGE_OP_HPD) + if (lt->connector.dev && lt->hdmi_port->ops & DRM_BRIDGE_OP_HPD) drm_bridge_hpd_disable(lt->hdmi_port); }