Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2106072iof; Tue, 7 Jun 2022 19:57:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyiUlkeyLnZ3xlXm6/SUG32RrC5U84DeXb/sq4di+JCj7BvSfEBtYnn7WdqqmNTj7J3odLN X-Received: by 2002:a65:580f:0:b0:3fc:ffa7:9a66 with SMTP id g15-20020a65580f000000b003fcffa79a66mr24250980pgr.332.1654657045754; Tue, 07 Jun 2022 19:57:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654657045; cv=none; d=google.com; s=arc-20160816; b=Bu5MkHffr00xaWmRN920g+r6H855ipGqPv85K/Faoc3qLLFiP50twxoLYPZvCzNzRS feeMSEMoyRuWmVUlklKTncZFWSisnw8tLccaVrLgd9dmJo10TyXXGsk+dcnNLhSMl5Rp DKEQhz1pMSd/R+nfnLdaDcFDKtx+QlWTLTklP4ucsDOdOt9Thy/S3UlSzVWihH6p6JBc ZPi6konS8FM7ndx0bZmHz+AgoD/BVGFsXRRd3WvRYPsXV1ftZ6ehdn8iAgCvNpegnjTY 5aeTbosjkPBqJoR5duyb9uBeTJZf9vPTMJhF0PvPHaE/jzslTpWKgcAhOqPo4BniXffu eMww== 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=F/456wTLkKbxEiUypx2UfeHOT1aLRVsncRqEzDWQ7T0=; b=ZmYLoHdaZNhsHVCc1ZYdv1vW0GiCv3PsdqzY2KKIWAdgoGOsj7p53+So5lsMFMtFxV jRA+xth3KFcXaQ/TZpRAYFh9ZqzW/c2zb3Ym/8sLwzdltpuS+ggBX/rDomNm33jHPWlD NaEVbUC+yN3ePZYv13orUwsv43gj3TQcbq0WwTMLkKAdxQudftQVvnIUjls2e7HoW9f+ aOV9dyrtXIIi/BBdilnQ3I8qrPccxxZ6ZvsQbtZ0vR8bM9JjetiBKemhqf6cMgaMxXHt XsS6zPv2W7EvXI/zc8buhFpQj3utq7Grs/I/LcQjfqvI3t2uoxHv+AIy5/aoDY24N7Qv xCdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=AesRTMkg; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id y134-20020a62648c000000b0050d5b4ee692si24968489pfb.106.2022.06.07.19.57.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 19:57:25 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=AesRTMkg; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6538719D600; Tue, 7 Jun 2022 18:50:57 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1383875AbiFGWfg (ORCPT + 99 others); Tue, 7 Jun 2022 18:35:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378074AbiFGVX2 (ORCPT ); Tue, 7 Jun 2022 17:23:28 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63E36227344; Tue, 7 Jun 2022 12:00:41 -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 79A43B8239C; Tue, 7 Jun 2022 19:00:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DDEEAC34115; Tue, 7 Jun 2022 19:00:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654628440; bh=JqfzZlWXzIpjCYyfXxBmymB6QuLGjqABK8mina/XokU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AesRTMkgv46lsnI/iYND7Lu3AwlhGvOGU7Ou6IpBo9Y/Luz/NgQafU/jYOmGGBHM5 ZwaCJwJQ9fNL9qtGZWsRP5kqAeIUw32OEixeN+/HygeghxZIGzQpknqmDKQVrG1NhO DV4L3P83LOVhbPU8TfhcMbluTBS8Ro/p/UwfG9jo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miles Chen , AngeloGioacchino Del Regno , Matthias Brugger , Zhiqiang Lin , CK Hu , Chun-Kuang Hu , Sasha Levin Subject: [PATCH 5.18 290/879] drm/mediatek: Fix mtk_cec_mask() Date: Tue, 7 Jun 2022 18:56:48 +0200 Message-Id: <20220607165011.265035809@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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: Miles Chen [ Upstream commit 2c5d69b0a141e1e98febe3111e6f4fd8420493a5 ] In current implementation, mtk_cec_mask() writes val into target register and ignores the mask. After talking to our hdmi experts, mtk_cec_mask() should read a register, clean only mask bits, and update (val | mask) bits to the register. Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220315232301.2434-1-miles.chen@mediatek.com/ Fixes: 8f83f26891e1 ("drm/mediatek: Add HDMI support") Signed-off-by: Miles Chen Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Matthias Brugger Cc: Zhiqiang Lin Cc: CK Hu Cc: Matthias Brugger Cc: AngeloGioacchino Del Regno Signed-off-by: Chun-Kuang Hu Signed-off-by: Sasha Levin --- drivers/gpu/drm/mediatek/mtk_cec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mediatek/mtk_cec.c b/drivers/gpu/drm/mediatek/mtk_cec.c index e9cef5c0c8f7..cdfa648910b2 100644 --- a/drivers/gpu/drm/mediatek/mtk_cec.c +++ b/drivers/gpu/drm/mediatek/mtk_cec.c @@ -85,7 +85,7 @@ static void mtk_cec_mask(struct mtk_cec *cec, unsigned int offset, u32 tmp = readl(cec->regs + offset) & ~mask; tmp |= val & mask; - writel(val, cec->regs + offset); + writel(tmp, cec->regs + offset); } void mtk_cec_set_hpd_event(struct device *dev, -- 2.35.1