Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5522742yba; Wed, 10 Apr 2019 23:10:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqwMSzA4a6lehtOUUh2+oGugnTLjdnbkPDw07NQizv2BQIE8iRIu9vv06kecoRPipRSD/DY2 X-Received: by 2002:a62:4d43:: with SMTP id a64mr48540545pfb.157.1554963052587; Wed, 10 Apr 2019 23:10:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554963052; cv=none; d=google.com; s=arc-20160816; b=VHGX5DvWxM0dL+Bd8jMRmN9IvTM10q0l9rVKm6Vj9Aux0iNOhXU4Z2Cpa0L/DKGmXQ O5VWk6c7ODhGII+2617XIHmlhg0FpNjxaJ1+soxXQ8eqcPj6V6oKoTL0aQQmcXzYH5uA x1DIQw129UGVjup3x3hxISd0zPVA3k+vwk/E7W0dwEi4EBB68q8UJEIcP94lktS1lVZz OYlLWmkFCLv7HEIQtCgGB6e/dYCLprsy1S5RKe/qgk4tgAT7pbPqiT6+iUgZ9EO4r67b r+lTir27UWr38OAqk66CgOlnvnC/J+ewmebB2vwmafhv4jlHezoU7Fn8vyhvIRmP/yFM 0BNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=6AixhJbgV8kCY79127rTzWN0QrN5bQ3lStTXaxByaIA=; b=lZdNKWy6IwKQCF0H6CMdOOpWrePe/bkB1fjuKRK3nJ9Fk5KR2eB6Cq3msAg+0NNjF2 qTCdKnCvgnoVwyMP8XQ9SRUOBfSYIkmwb09K4JnHgNTUbLDZQeKk3mrcvxrbh4aB9IE5 Ug/OJheAkMP3Gwtt9PXX+4fXmR1bI7QDMGAoqS6c6zCq2iw1B6NWYbUJaoffyulgM8Q+ 9NjlshpaS7K0Dy/1n+v9a8nGJoF/nCS+OwDzHkuubOEUO7skDjbTUwnR3ks79ZrKtTCA yfcHzBeV4xkJbM9yRid03W3/TI0TohozWgK17+RBSled5HMmoULvGVi92HERubMlRYwC tHjQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c141si34976532pfc.169.2019.04.10.23.10.36; Wed, 10 Apr 2019 23:10:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726615AbfDKGKA (ORCPT + 99 others); Thu, 11 Apr 2019 02:10:00 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:63337 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726017AbfDKGKA (ORCPT ); Thu, 11 Apr 2019 02:10:00 -0400 X-UUID: 85f4980358b94fe799f953aedfac691e-20190411 X-UUID: 85f4980358b94fe799f953aedfac691e-20190411 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 264371904; Thu, 11 Apr 2019 14:09:49 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs01n1.mediatek.inc (172.21.101.68) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 11 Apr 2019 14:09:48 +0800 Received: from [172.21.77.4] (172.21.77.4) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Thu, 11 Apr 2019 14:09:48 +0800 Message-ID: <1554962988.4768.4.camel@mtksdaap41> Subject: Re: [PATCH v2 06/25] drm/mediatek: redefine mtk_ddp_sout_sel From: CK Hu To: CC: , , , , , , , , , , , Date: Thu, 11 Apr 2019 14:09:48 +0800 In-Reply-To: <1553667561-25447-7-git-send-email-yongqiang.niu@mediatek.com> References: <1553667561-25447-1-git-send-email-yongqiang.niu@mediatek.com> <1553667561-25447-7-git-send-email-yongqiang.niu@mediatek.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Yongqiang: On Wed, 2019-03-27 at 14:19 +0800, yongqiang.niu@mediatek.com wrote: > From: Yongqiang Niu > > the format of "mtk_ddp_sout_sel"was not flexible, after we add more > mediatek SOC support, that will be redundant It looks like this patch is part of patch 'add mmsys private data for ddp path config', so I would like you squash this patch into that patch. Regards, CK > > Signed-off-by: Yongqiang Niu > --- > drivers/gpu/drm/mediatek/mtk_drm_ddp.c | 28 ++++++++++++++++++---------- > 1 file changed, 18 insertions(+), 10 deletions(-) > > diff --git a/drivers/gpu/drm/mediatek/mtk_drm_ddp.c b/drivers/gpu/drm/mediatek/mtk_drm_ddp.c > index 80dc91f..e4dafe0 100644 > --- a/drivers/gpu/drm/mediatek/mtk_drm_ddp.c > +++ b/drivers/gpu/drm/mediatek/mtk_drm_ddp.c > @@ -391,20 +391,26 @@ static unsigned int mtk_ddp_sel_in(enum mtk_ddp_comp_id cur, > return value; > } > > -static void mtk_ddp_sout_sel(void __iomem *config_regs, > - enum mtk_ddp_comp_id cur, > - enum mtk_ddp_comp_id next) > +static unsigned int mtk_ddp_sout_sel(enum mtk_ddp_comp_id cur, > + enum mtk_ddp_comp_id next, > + unsigned int *addr) > { > + unsigned int value; > + > if (cur == DDP_COMPONENT_BLS && next == DDP_COMPONENT_DSI0) { > - writel_relaxed(BLS_TO_DSI_RDMA1_TO_DPI1, > - config_regs + DISP_REG_CONFIG_OUT_SEL); > + *addr = DISP_REG_CONFIG_OUT_SEL; > + value = BLS_TO_DSI_RDMA1_TO_DPI1; > } else if (cur == DDP_COMPONENT_BLS && next == DDP_COMPONENT_DPI0) { > - writel_relaxed(BLS_TO_DPI_RDMA1_TO_DSI, > - config_regs + DISP_REG_CONFIG_OUT_SEL); > + *addr = DISP_REG_CONFIG_OUT_SEL; > + value = BLS_TO_DPI_RDMA1_TO_DSI; > } else if (cur == DDP_COMPONENT_RDMA1 && next == DDP_COMPONENT_DSI0) { > - writel_relaxed(DSI_SEL_IN_RDMA, > - config_regs + DISP_REG_CONFIG_DSI_SEL); > + *addr = DISP_REG_CONFIG_DSI_SEL; > + value = DSI_SEL_IN_RDMA; > + } else { > + value = 0; > } > + > + return value; > } > > void mtk_ddp_add_comp_to_path(void __iomem *config_regs, > @@ -419,7 +425,9 @@ void mtk_ddp_add_comp_to_path(void __iomem *config_regs, > writel_relaxed(reg, config_regs + addr); > } > > - mtk_ddp_sout_sel(config_regs, cur, next); > + value = mtk_ddp_sout_sel(cur, next, &addr); > + if (value) > + writel_relaxed(value, config_regs + addr); > > value = mtk_ddp_sel_in(cur, next, &addr); > if (value) {