Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2156383iof; Tue, 7 Jun 2022 21:38:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwM3iLzGYa8SBJBdyCOM9GlsB+92Ei9Ytsb5rX/PXhORKEtn8W/pjLPF6bf1ah2+Za0NLHD X-Received: by 2002:a17:90b:1e0e:b0:1e3:2eee:3ab9 with SMTP id pg14-20020a17090b1e0e00b001e32eee3ab9mr47660614pjb.158.1654663114374; Tue, 07 Jun 2022 21:38:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654663114; cv=none; d=google.com; s=arc-20160816; b=VlmdGG6axU1DgnlGrQug/aibBWsxwCZmmdC9XqRMt+hti4LB0GxeU8Rt5eQopFn6Sg ln8vCGh3w4ut/3rOOR/C8MomoAtWC8H+LOXJeRQHVEfDVyqijl01cGC3GdUEsJGMCP19 ljpKGkLdzW49ZGaNkdgDQYNtwDNrOqew3YNRyKV/JuLZYoETcsQRDxBTJw/2M1WOtgTx eFZxYZX7pmVQ6huETC0gCx19mqacYm05JaY77Fxy1erubFAHCGlPdMxU+RjCLOE5nhAA o9Vz0cGxeW9Vqvi0jJNJ4nk3sDDqALtFnMqN7FHFfCtgTGSXr4hB1CZ8uwuLlZH0jOnl Y57Q== 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=rLmoA94w+hrCiGEENdvTJf9bnkDAeEIVrTWjN2rNn2M=; b=KQ0D37H4/JrnAiozTJKssBZCp8avCISgMhuUFx4qszAv2R+cZAsbRSjsT0Uu/t2KzH nNkx6KIM8EPY4vIkZppAMfKHwvKQgH9a0CQ5ekDfFgaFeCTiRUGLD9ptNWMC2UxbFAqC ISi8s6rw8YuBBVao2+QwHz11medzvKe3s+rZ3SaK9lKGkSyErYdAsIcSIcGoFpP5b3Iw mw2qyr6uLcEBlWieJKiLht+qpsy+SZB8WhmqAXEsTLEkUpTtUt/lSLAEjDrs4688hWcj NziAit1gyGfGjL8jqANDJzs9tlW77dZxloM4blyHJsvgYH9FSYWgKtX6kOcWIZCujm7c ckAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=JsdUg888; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id z6-20020a656646000000b003f617cc0cd9si28141059pgv.651.2022.06.07.21.38.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 21:38:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=JsdUg888; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6C7D429B2E0; Tue, 7 Jun 2022 21:07:41 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232378AbiFGRdz (ORCPT + 99 others); Tue, 7 Jun 2022 13:33:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347023AbiFGRZi (ORCPT ); Tue, 7 Jun 2022 13:25:38 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10E65113A18; Tue, 7 Jun 2022 10:23:59 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 6E28A60DB7; Tue, 7 Jun 2022 17:23:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 821DFC385A5; Tue, 7 Jun 2022 17:23:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654622638; bh=a8W1Xyi5UJaRH3cOEV6KFlvHU+44TiyfFTT5jZ3JfqY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JsdUg888WuWasYehweHYFr9Q9a01UKX6YKCjDoYHcbPGeza4pVCrhHD3xPJ/uyIo+ k1uLC4IGirNSgB9jwxmuXsn3vgSsDFyuqx5UwnTH21+DAfuNdtL5Ldo7TAGAZ5gjSb peF2mK3Ypy8WvECai83yDknjsGSYzK0SK4xMzdz8= 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.10 131/452] drm/mediatek: Fix mtk_cec_mask() Date: Tue, 7 Jun 2022 18:59:48 +0200 Message-Id: <20220607164912.462816952@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607164908.521895282@linuxfoundation.org> References: <20220607164908.521895282@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 cb29b649fcdb..12bf93769497 100644 --- a/drivers/gpu/drm/mediatek/mtk_cec.c +++ b/drivers/gpu/drm/mediatek/mtk_cec.c @@ -84,7 +84,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