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=-13.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=unavailable 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 98DE5FA372C for ; Thu, 7 Nov 2019 01:39:07 +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 6971521848 for ; Thu, 7 Nov 2019 01:39:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="jdlRbBhX" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6971521848 Authentication-Results: mail.kernel.org; dmarc=fail (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=5qiznswJkb6bwqTlpe7HxSBnjlm6mIZp+/6VGywSVms=; b=jdlRbBhX+nbUq9 /VABeamZQto/s6Wlum7yos8xUFAA3ImqDP1k2JQrgsgMPslSplb7twbwKXd4H3lQHyCwMU2zgi4lV dGuNn9l/GZViY4FDrAmdnPZ63PiA3pBM/7f3n4n9Ircm5Qte35TjvFQPdAaWGhMFUtETaYksNUHP4 a+DCEXYiKDF15x36pAm9GqQxWLG5Ta4hXkpcVWKROW8j7RDEcnVYD2OXrU3LxOvo3bMklgZV8kTAo UZIWY3s7cHnGuVZcxcpa+mkH913/kMe+sN3Acc+Cl6ELjWjaItRh9Q1FDV+Rl3N0GCVBHAQMWJefF X0Dbd9kJdWUHpycOwhlg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iSWlN-00024S-4d; Thu, 07 Nov 2019 01:39:05 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iSWlI-00022f-Tg; Thu, 07 Nov 2019 01:39:02 +0000 X-UUID: 00a288d9aea24c51ba17f96ea3ff195f-20191106 X-UUID: 00a288d9aea24c51ba17f96ea3ff195f-20191106 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 2054697862; Wed, 06 Nov 2019 17:39:04 -0800 Received: from MTKMBS01N1.mediatek.inc (172.21.101.68) by MTKMBS62N2.mediatek.inc (172.29.193.42) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 6 Nov 2019 17:38:33 -0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs01n1.mediatek.inc (172.21.101.68) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 7 Nov 2019 09:38:32 +0800 Received: from [172.21.77.4] (172.21.77.4) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Thu, 7 Nov 2019 09:38:32 +0800 Message-ID: <1573090713.30408.3.camel@mtksdaap41> Subject: Re: [PATCH v2 7/7] drm/mediatek: Support 180 degree rotation From: CK Hu To: Sean Paul Date: Thu, 7 Nov 2019 09:38:33 +0800 In-Reply-To: References: <20191105211034.123937-1-sean@poorly.run> <20191105211034.123937-8-sean@poorly.run> <1573031243.15410.2.camel@mtksdaap41> 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-20191106_173900_959850_1EE17B1C X-CRM114-Status: GOOD ( 22.42 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniele Castagna , dri-devel , Fritz Koenig , Miguel Casas , "moderated list:ARM/Mediatek SoC support" , Philipp Zabel , Matthias Brugger , Sean Paul , linux-arm-kernel , Mark Yacoub 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, Sean: On Wed, 2019-11-06 at 09:42 -0500, Sean Paul wrote: > On Wed, Nov 6, 2019 at 4:07 AM CK Hu wrote: > > > > Hi, Sean: > > > > On Tue, 2019-11-05 at 16:10 -0500, Sean Paul wrote: > > > From: Sean Paul > > > > > > Now that we support both reflections, we can expose 180 degree rotation > > > and rely on the simplify routine to convert that into REFLECT_X | > > > REFLECT_Y > > > > > > > Patch 1 ~ 6 of this series looks good to me. > > For this one, I think the rotation check in mtk_ovl_layer_check() should > > be modified. > > > > Thanks for the quick reviews, CK! > > In what way would you like the check to be modified? I'm guessing > you're asking that I add it to the bitmask passed to the > simplify_rotation function? > > If that's the case, we don't actually want to modify the > simplify_rotation bitmask since that bitmask is supposed to be only > the rotations that the hardware can achieve. So if you pass ROTATE_180 > into simplify_rotation, it will return REFLECT_X | REFLECT_Y, which is > what we want. Does that make sense, or am I missing something? drm_rotation_simplify() is really hard to understand. You're right, so apply this series to mediatek-drm-next-5.5-2 [1], thanks. [1] https://github.com/ckhu-mediatek/linux.git-tags/commits/mediatek-drm-next-5.5-2 Regards, CK > > Thanks, > > Sean > > > Regards, > > CK > > > > > Signed-off-by: Sean Paul > > > --- > > > drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 4 ++-- > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c > > > index f4c4d3fedc5f..4a55bb6e2213 100644 > > > --- a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c > > > +++ b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c > > > @@ -143,8 +143,8 @@ static unsigned int mtk_ovl_layer_nr(struct mtk_ddp_comp *comp) > > > > > > static unsigned int mtk_ovl_supported_rotations(struct mtk_ddp_comp *comp) > > > { > > > - return DRM_MODE_ROTATE_0 | DRM_MODE_REFLECT_Y | > > > - DRM_MODE_REFLECT_X; > > > + return DRM_MODE_ROTATE_0 | DRM_MODE_ROTATE_180 | > > > + DRM_MODE_REFLECT_X | DRM_MODE_REFLECT_Y; > > > } > > > > > > static int mtk_ovl_layer_check(struct mtk_ddp_comp *comp, unsigned int idx, > > > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel