Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3029929rwb; Mon, 15 Aug 2022 16:28:53 -0700 (PDT) X-Google-Smtp-Source: AA6agR6/+i4zsyPXR4TtKoSwWy2yoG6FQ82F7XnHj6FiDKSzbfWdZb7EZHtI9K/ujC5Pcgbob6h4 X-Received: by 2002:a17:907:69b0:b0:730:a1f0:63e7 with SMTP id ra48-20020a17090769b000b00730a1f063e7mr11497128ejc.364.1660606132903; Mon, 15 Aug 2022 16:28:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660606132; cv=none; d=google.com; s=arc-20160816; b=e25WNttqoecTfDUUWpzDBfWeO3ehOVzGj5UCuOKQPNU0aiHJNZqFR5ty5TdEDKSzBR g25N+RsyiL0rC02REiTwO5HvkFKLdd+JxBtNaRR23cXAdJcO/DwYV905FMEIxncMW+dg 8NDkMp39F+znDVYI63s6PztE2qefz194bK00oWFYoCBC/wzO6MYGIJHS4RX2eBaKUfOA eVkcLmrZr3xRir2T9n7eprvX+l8f4LEkJiUBn9EhrNl6GXg21jl56aWr7yq1hF7aWwE/ wAxE6QL2PChkg9YzwRNTuZ15CVvG7OyxTE2NDX7k8buuBsRRx93XAERa0q7tnOa6sgkX /fAw== 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=N6+o7QzcmZV63tkFh/2D2SKB4QuCUEwjmxiFdV3zZKI=; b=Awt226IMXGvSfGyGkpxNpUkwzH+arSjaTiFpLiiAYYo2hWRxB0qaCPWkFiCM3N9xKt 0kjJtxMPes3jBd35xzlL4oBeeYyVdHvwrPAagGJarWm+wMQOxWA2PtO8nap2zcoMKmXi bgF/PXqyfI+wQRKLUowwKNTwIJXafpVog+oQTzXRKI2AtLXMG48s0nl2ZwagbtlfQ1QC jPVGluB2LKuKu7U4qWP2SKZaQrxWYrDUCU1V0w8S679WhW624o90wbAQsWyyvk2kkdj1 6LKCXsuSL5OfvJ+iFKvOUGqvRX+tkm9HrQOBbxWThW7Pj626qhI309yuQdN2JVdRC89A hPrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=y24WTeGb; 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 hb12-20020a170907160c00b0072ab5d0fc33si9453771ejc.863.2022.08.15.16.28.21; Mon, 15 Aug 2022 16:28:52 -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=y24WTeGb; 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 S1343610AbiHOXS2 (ORCPT + 99 others); Mon, 15 Aug 2022 19:18:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347117AbiHOXP2 (ORCPT ); Mon, 15 Aug 2022 19:15:28 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9820863F1B; Mon, 15 Aug 2022 13:02:28 -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 49343B80EAD; Mon, 15 Aug 2022 20:02:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 82431C433D6; Mon, 15 Aug 2022 20:02:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660593746; bh=gvSIMGbmbfaO0pJ10scnlFNqhCzkzrou4UE2ChCzTow=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=y24WTeGbvDw8UVod1UL/D8y44yvVcsuv36DDDmVpC+1Vq27wyTzxXBmrW5awo4K0V P1hRMZRUscJsQgM1ob0z7SUCVXj3MA7QkYBvmemmdCQHJQYOsGZV/rdbNyY53CYPwO 4RJe5jhuI73LA9YAUpNECVW7YuROW4lbcB3c7W0U= 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.19 0319/1157] drm/bridge: lt9611: Use both bits for HDMI sensing Date: Mon, 15 Aug 2022 19:54:35 +0200 Message-Id: <20220815180452.403736490@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@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 7ef8fe5abc12..c0b182d1374e 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