Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp441157iog; Mon, 13 Jun 2022 06:04:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy7jBXciPsBWSeWsNEKs9aIR01b8WzLwd0UyQ+7kgl3+PSsqFDwale0kEMDwntPmBf2YclV X-Received: by 2002:a17:906:4e89:b0:711:c64d:ca4a with SMTP id v9-20020a1709064e8900b00711c64dca4amr38256267eju.203.1655125383440; Mon, 13 Jun 2022 06:03:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655125383; cv=none; d=google.com; s=arc-20160816; b=NwY+npseG5vD/DU2SYKIG/79DZkFzSquRQs39ZBXDg3WoSGgtE1He5F4ziBv3rSIkF ookJYUWLWCGfNMCloMCa04cO8uq3yUML++qJuKmX8vsvSUPckBLFu5d2dQF7bwIfIe1I MJ9LK2CkXszFSc2gak07eOawg1lIcdpif4mGFclxf/nWVYbuFxKlaguOYMV7hC5uuyu+ f9y3V8mrbeDzXquyh03YLIr6kiXp4lprhsqbpImAyf395HpAafu9dQepMC+PAS6d6ALQ HSLST+CjQZUq5xPfIK85EsE8He31DsuFmL1CQF5Ud0e7RemusKQEANvExdD4nv1EggJd TgHg== 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=HGl7HHhVV6a1XPxkMl6gYb/2ZavPjVVr3l7/paf17tBjhDTsCZF5cHyE8mxd6OOOnI oVFjRdpqKRcFey8XJWU7vX0m3fau1NqeofXd4ulpyIVJ9MHbaxUlulAJ/bqnDkPSIW+n V+IAxdk0scmxsLEOeb5RaJOMw2vrI9NHYQVTY0ClaA0QfaGrqx8dbNLfCrqGlD0WyEcR FYENuiojSJgHLxU6AhkWJUNhhy+No1tQdhBh3SjV5zN+4pRrNR5+aeXG5ECRDkuEEC4z xzMFZviVg18c8R1BJsCIIJZC6CzQlyOnJgT4EINj9a4PNe7+ObbpuFAK9OIfRCIiOtNn PcBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Kz4Zba+D; 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 o6-20020a170906974600b006ff22be82f4si8000936ejy.61.2022.06.13.06.02.36; Mon, 13 Jun 2022 06:03:03 -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=Kz4Zba+D; 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 S1352237AbiFMLJi (ORCPT + 99 others); Mon, 13 Jun 2022 07:09:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351803AbiFMLFF (ORCPT ); Mon, 13 Jun 2022 07:05:05 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9195C27CE6; Mon, 13 Jun 2022 03:34:05 -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 F06E0B80E5C; Mon, 13 Jun 2022 10:34:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 68A3DC34114; Mon, 13 Jun 2022 10:34:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655116442; bh=a8W1Xyi5UJaRH3cOEV6KFlvHU+44TiyfFTT5jZ3JfqY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Kz4Zba+De0GvwXV9oCD/9HgS3mU51H0vAerO5IpMnMhRCPZvIbEFM1I9MKOGhxZLS 5yJvxGEhKkcvNYpb1Elq0yYUBm4ys3qfo4JPA7X9KbaL4b4N3WReF/tRYCRp5hXIMm 6fJMpENBc/A/xtHioBcenpA+oMttF3Ip6zwfKuvY= 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.4 087/411] drm/mediatek: Fix mtk_cec_mask() Date: Mon, 13 Jun 2022 12:06:00 +0200 Message-Id: <20220613094931.290014397@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613094928.482772422@linuxfoundation.org> References: <20220613094928.482772422@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=-8.3 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: 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