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 X-Spam-Level: X-Spam-Status: No, score=-7.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,UNPARSEABLE_RELAY,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E732EC43387 for ; Thu, 27 Dec 2018 04:27:02 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id AFC0921741 for ; Thu, 27 Dec 2018 04:27:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ZQTLLjC9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AFC0921741 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Date: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=39Xjs9qRkZ4sGmafM2eQy09Jv3JX6CaU39hfch7t3KM=; b=ZQTLLjC9kac4e4 /KPkTyxnfuRe2+mZNvOWphrq4bYbj4zOgWdRBH7nSuCmu/d1NFX4OiZM2lTlBhe0Rl2NI3+gw9/w+ FBdsflZnUoC5tesEPsLae45sG3pe/3oUuzI/EkneO15xig2/YGE8hSNbzOH2uf4KJOJpJ8DG3hi94 YMdeoDS3BSkg9OdKDRGrwVW0iLMwPxiTp1BK1/RmuYc18CPc7HpLnlefUc99C/Oz9p4iCcEwUGCdj d5Zd1Utj/oxaYByilqIlJyoS1NqTAivo8UIc9t/AJYBU4OQK9rTsL5+2kSEEbE5946EwlRNkImFNB Dc7wZJ4jcjYEFTfi+K1A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gcNG8-0004Ag-Qa; Thu, 27 Dec 2018 04:27:00 +0000 Received: from [1.203.163.81] (helo=mailgw02.mediatek.com) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gcNG2-00042Z-TM; Thu, 27 Dec 2018 04:26:58 +0000 X-UUID: 2ba5b45eb5224a44a7c1ae143cbddafe-20181227 X-UUID: 2ba5b45eb5224a44a7c1ae143cbddafe-20181227 Received: from mtkcas36.mediatek.inc [(172.27.4.250)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 544729285; Thu, 27 Dec 2018 12:26:29 +0800 Received: from mtkcas09.mediatek.inc (172.21.101.178) by MTKMBS31DR.mediatek.inc (172.27.6.102) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 27 Dec 2018 12:26:28 +0800 Received: from [172.21.77.4] (172.21.77.4) by mtkcas09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Thu, 27 Dec 2018 12:26:22 +0800 Message-ID: <1545884782.31506.4.camel@mtksdaap41> Subject: Re: [PATCH 13/18] drm/mediatek: add ddp write register common api From: CK Hu To: Yongqiang Niu Date: Thu, 27 Dec 2018 12:26:22 +0800 In-Reply-To: <1545638931-24938-14-git-send-email-yongqiang.niu@mediatek.com> References: <1545638931-24938-1-git-send-email-yongqiang.niu@mediatek.com> <1545638931-24938-14-git-send-email-yongqiang.niu@mediatek.com> X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181226_202655_165495_B9125806 X-CRM114-Status: GOOD ( 13.57 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, David Airlie , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Rob Herring , linux-mediatek@lists.infradead.org, Philipp Zabel , Matthias Brugger , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, Yongqiang: On Mon, 2018-12-24 at 16:08 +0800, Yongqiang Niu wrote: > This patch add ddp write register common api > I could not see anywhere you use these function. If the function is useless, drop this patch. Regards, CK > Signed-off-by: Yongqiang Niu > --- > drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 24 ++++++++++++++++++++++++ > drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h | 9 +++++++++ > 2 files changed, 33 insertions(+) > > diff --git a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c > index a97e27b..1c0f9cc 100644 > --- a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c > +++ b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c > @@ -84,6 +84,30 @@ > #define DITHER_ADD_LSHIFT_G(x) (((x) & 0x7) << 4) > #define DITHER_ADD_RSHIFT_G(x) (((x) & 0x7) << 0) > > +void mtk_ddp_write(unsigned int value, struct mtk_ddp_comp *comp, > + unsigned int offset) > +{ > + writel(value, comp->regs + offset); > +} > + > +void mtk_ddp_write_relaxed(unsigned int value, > + struct mtk_ddp_comp *comp, > + unsigned int offset) > +{ > + writel_relaxed(value, comp->regs + offset); > +} > + > +void mtk_ddp_write_mask(unsigned int value, > + struct mtk_ddp_comp *comp, > + unsigned int offset, > + unsigned int mask) > +{ > + unsigned int tmp = readl(comp->regs + offset); > + > + tmp = (tmp & ~mask) | (value & mask); > + writel(tmp, comp->regs + offset); > +} > + > void mtk_dither_set(struct mtk_ddp_comp *comp, unsigned int bpc, > unsigned int CFG) > { > diff --git a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h > index f2ab0b3..b908172 100644 > --- a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h > +++ b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h > @@ -189,5 +189,14 @@ int mtk_ddp_comp_init(struct device *dev, struct device_node *comp_node, > void mtk_ddp_comp_unregister(struct drm_device *drm, struct mtk_ddp_comp *comp); > void mtk_dither_set(struct mtk_ddp_comp *comp, unsigned int bpc, > unsigned int CFG); > +void mtk_ddp_write(unsigned int value, struct mtk_ddp_comp *comp, > + unsigned int offset); > +void mtk_ddp_write_relaxed(unsigned int value, > + struct mtk_ddp_comp *comp, > + unsigned int offset); > +void mtk_ddp_write_mask(unsigned int value, > + struct mtk_ddp_comp *comp, > + unsigned int offset, > + unsigned int mask); > > #endif /* MTK_DRM_DDP_COMP_H */ _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel