From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E91F2C433F5 for ; Thu, 7 Apr 2022 01:51:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Date:CC:To:From:Subject:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=aME/oqFQ9z/MfOcFLKzcqYtIsCh5Ajpj/5SmZTaFJpY=; b=hNpkv+Ej8T4NO9 n0ElUOoQAnMIPZNqpwdg2ueHNWZX29n9lIu+MSiyQSssGon81uiB+AcIVBFrhohHzIyLnprG1SClb XySY1wTKuWsV2UeWdSxa/V1rWqp0w5eieATBjK5u5V+pYY8UTrisFpOz3DlgPWuwfrDBRBPEBSBF2 oz5pwhgjkyOCizAbKEOTOBWfdhrtUfgrQHHiErvXceZtV5jL7XoQhmUvvzL2/9hxoAdVPrSd9dYqj QKxEz/WiEzMG/M5MFcdGJA2FC5yCXc3UmFqIe8WF7GWqiuLimUYxhTo5XLeMg4iM2997rvZZqO3k1 MQTXncUSG9Y//pAHr17A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ncHI6-008m7p-0I; Thu, 07 Apr 2022 01:50:30 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ncGum-008btx-9M; Thu, 07 Apr 2022 01:26:25 +0000 X-UUID: 6b667d3885674b6aa163e98e1e0718ac-20220406 X-UUID: 6b667d3885674b6aa163e98e1e0718ac-20220406 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 678146261; Wed, 06 Apr 2022 18:26:18 -0700 Received: from MTKMBS07N2.mediatek.inc (172.21.101.141) by MTKMBS62N2.mediatek.inc (172.29.193.42) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 6 Apr 2022 18:16:16 -0700 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 7 Apr 2022 09:16:15 +0800 Received: from mtksdccf07 (172.21.84.99) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 7 Apr 2022 09:16:15 +0800 Message-ID: <8fbabb83e838169697a06a1b525252c99018a93f.camel@mediatek.com> Subject: Re: [RESEND v4 PATCH] drm/mediatek: Fix mtk_cec_mask() From: CK Hu To: Miles Chen , Chun-Kuang Hu , Philipp Zabel , "David Airlie" , Daniel Vetter , "Matthias Brugger" , Jie Qiu , "Junzhi Zhao" CC: Zhiqiang Lin , AngeloGioacchino Del Regno , , , , Date: Thu, 7 Apr 2022 09:16:15 +0800 In-Reply-To: <20220315232301.2434-1-miles.chen@mediatek.com> References: <20220315232301.2434-1-miles.chen@mediatek.com> X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220406_182624_356214_C7590D8B X-CRM114-Status: GOOD ( 17.57 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, Miles: On Wed, 2022-03-16 at 07:23 +0800, Miles Chen wrote: > 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. Applied to mediatek-drm-next [1], thanks. [1] https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/log/?h=mediatek-drm-next Regards, CK > > Fixes: 8f83f26891e1 ("drm/mediatek: Add HDMI support") > Signed-off-by: Miles Chen > Reviewed-by: Chun-Kuang Hu > Reviewed-by: AngeloGioacchino Del Regno < > angelogioacchino.delregno@collabora.com> > Reviewed-by: Matthias Brugger > Cc: Zhiqiang Lin > Cc: CK Hu > Cc: Matthias Brugger > Cc: AngeloGioacchino Del Regno < > angelogioacchino.delregno@collabora.com> > > --- > > Change since v1: > add Fixes tag > > Change since v2: > add explanation of mtk_cec_mask() > > Change since v3: > change misleading subject and modify the commit message since this is > a bug fix patch > > --- > 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, _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel