Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3014835rwb; Mon, 15 Aug 2022 16:10:55 -0700 (PDT) X-Google-Smtp-Source: AA6agR4GbC3jF+6Htu4g+mDmUlkE8DsTGudIZ9TPZdHRvCGrDOo6ovWar3Rir75TPj9mpgFoh2BK X-Received: by 2002:a17:907:a056:b0:730:ce15:842d with SMTP id gz22-20020a170907a05600b00730ce15842dmr11764514ejc.275.1660605054740; Mon, 15 Aug 2022 16:10:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605054; cv=none; d=google.com; s=arc-20160816; b=FHyZI0POAoqC6CqX5vfsPywL0cxqOG0MefX1S+HHbTxi/6RQtRymrXZmGLMakqNvb8 oNWk7QBbofpIR7oPUUKx3Rha5aTB3KwJ3X36+OsTYs09vBDnAAqYMiN0cPMfat1yQ9sq MYk36YqnqEHDBCFxBuE7Psj96pIfb468z9xAKV5Agbv7z7/bTT/0LuX+kDAuKIlUp3FW SmHcgY0IhB1YtBXlwVNdu8vEfy7qqSjqSuGeCAAdgZdvXhMTyYVfRW1ztyCI7oW1bz0B FbvGgjcSFifMqrtUTT0dnLn1+JQHYM7e946GKBUG6l42XhDwZSxJRLhngnRmvZnWTprm MuzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=edIE4oqgD+429eKvtR/vMvoD9QRb5dWcCkcZHp8TVko=; b=NgUNHHz1Yjp2DK4lGv5UzND2YFOfN5sXiz60TGmz0pqahR0WoGFv9Gyj6Y+GrH4hvi VDtqxzCF7mOIa9luEEA/JJu058exUGQKvk0mVBJKqdx+moS1gdl1oJe59SPf/zddPrdc W6R/pUtDp5pKRDqVCtY/xIA/swrlYJBMYlhxJYoAbbq+/4W61BHQPUmWIPQOR/i6QZyf b6GQhSA3a3xWKUXvlfvz4nvxBGdxvGyCTdo66el9gS+FyfxThjj627x7h/E2zyZqOqsj MiFfnUaNE3uh4BazJEX6iEuUV7or8MqXUFhs76YFMAOnlEaKtAw36qFeakhJIpYapH19 5Trg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VWgiNop7; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sd5-20020a1709076e0500b007330a081f1fsi8531883ejc.679.2022.08.15.16.10.29; Mon, 15 Aug 2022 16:10:54 -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=@linuxfoundation.org header.s=korg header.b=VWgiNop7; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346464AbiHOUws (ORCPT + 99 others); Mon, 15 Aug 2022 16:52:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346622AbiHOUuv (ORCPT ); Mon, 15 Aug 2022 16:50:51 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A5CABB03D; Mon, 15 Aug 2022 12:09:49 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 6F4EFB81113; Mon, 15 Aug 2022 19:09:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5E001C433C1; Mon, 15 Aug 2022 19:09:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660590586; bh=ru6vFrd9wIut4anM86CYO7qaBPUlxfhQhV5tiIGlSqU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VWgiNop76vltyU7v3bY2QR6aP1vegm5PpMTzebfvtyfETwfekeSNIG601gW4fA60r CDRccjDMjGXBXcZgAeuDVWmk4MLhMIbxMXziIrRkbhIn5iCFFUy+JBGtXTWKGy2Hix TuGtgNsauHgSCnMWAXYnQo4pUT2Q6zd8xvqL2RD4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yongqin Liu , Amit Pundir , Peter Collingbourne , Vinod Koul , Bjorn Andersson , Robert Foss , kernel-team@android.com, John Stultz , Sasha Levin Subject: [PATCH 5.18 0307/1095] drm/bridge: lt9611: Use both bits for HDMI sensing Date: Mon, 15 Aug 2022 19:55:06 +0200 Message-Id: <20220815180442.506681558@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 From: John Stultz [ Upstream commit 649eb3828fb22e829e222ebd83f4e11dc503a565 ] In commit 19cf41b64e3b ("lontium-lt9611: check a different register bit for HDMI sensing"), the bit flag used to detect HDMI cable connect was switched from BIT(2) to BIT(0) to improve compatibility with some monitors that didn't seem to set BIT(2). However, with that change, I've seen occasional issues where the detection failed, because BIT(2) was set, but not BIT(0). Unfortunately, as I understand it, the bits and their function was never clearly documented. So lets instead check both (BIT(2) | BIT(0)) when checking the register. Cc: Yongqin Liu Cc: Amit Pundir Cc: Peter Collingbourne Cc: Vinod Koul Cc: Bjorn Andersson Cc: Robert Foss Cc: kernel-team@android.com Fixes: 19cf41b64e3b ("lontium-lt9611: check a different register bit for HDMI sensing") Signed-off-by: John Stultz Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220511012612.3297577-2-jstultz@google.com Signed-off-by: Sasha Levin --- drivers/gpu/drm/bridge/lontium-lt9611.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/lontium-lt9611.c b/drivers/gpu/drm/bridge/lontium-lt9611.c index 63df2e8a8abc..21d1e1465981 100644 --- a/drivers/gpu/drm/bridge/lontium-lt9611.c +++ b/drivers/gpu/drm/bridge/lontium-lt9611.c @@ -586,7 +586,7 @@ lt9611_connector_detect(struct drm_connector *connector, bool force) int connected = 0; regmap_read(lt9611->regmap, 0x825e, ®_val); - connected = (reg_val & BIT(0)); + connected = (reg_val & (BIT(2) | BIT(0))); lt9611->status = connected ? connector_status_connected : connector_status_disconnected; -- 2.35.1