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=-8.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,URIBL_BLOCKED,USER_AGENT_SANE_2 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 17553C33CB2 for ; Fri, 31 Jan 2020 03:27:14 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 D92D520CC7 for ; Fri, 31 Jan 2020 03:27:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="oq1C/cr+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D92D520CC7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 35AC56E1E2; Fri, 31 Jan 2020 03:27:13 +0000 (UTC) Received: from mailgw01.mediatek.com (unknown [210.61.82.183]) by gabe.freedesktop.org (Postfix) with ESMTP id 80F2E6E1E2 for ; Fri, 31 Jan 2020 03:27:11 +0000 (UTC) X-UUID: 7cb84e490a184cbc8ed08f62664eaa56-20200131 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=aM+4JU8dbdbMJaZA71HRgLbTyLydRZ9ekqagS3/8Hfk=; b=oq1C/cr+Upfy6bCwi4U6zbj5f8qDxol4f9UmScXh3GmV1sPrONyZ1GLCMR2iQWdxDO+YNFnHXg79SLfFnfspzmZKQs2uCKcdLqD6QhBZ2nldgOQEExu9Jv80EQNZ+N82JMlKUDAmQAc5+lqlfITnEZRv9cgJ5K5/Cojm7LJpWn0=; X-UUID: 7cb84e490a184cbc8ed08f62664eaa56-20200131 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 15410640; Fri, 31 Jan 2020 11:27:08 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 31 Jan 2020 11:26:12 +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; Fri, 31 Jan 2020 11:26:05 +0800 Message-ID: <1580441226.9516.1.camel@mtksdaap41> Subject: Re: [PATCH] drm/mediatek: Ensure the cursor plane is on top of other overlays From: CK Hu To: Sean Paul Date: Fri, 31 Jan 2020 11:27:06 +0800 In-Reply-To: <20200130192511.81205-1-sean@poorly.run> References: <20200130192511.81205-1-sean@poorly.run> X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-TM-SNTS-SMTP: 810A1D44145352546047498F0C8DF1C0A427603B091BFE8EAD7B2B7BBFEFBB822000:8 X-MTK: N X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dcastagna@chromium.org, dri-devel@lists.freedesktop.org, Sean Paul , Matthias Brugger , linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi, Sean: On Thu, 2020-01-30 at 14:24 -0500, Sean Paul wrote: > From: Sean Paul > > Currently the cursor is placed on the first overlay plane, which means > it will be at the bottom of the stack when the hw does the compositing > with anything other than primary plane. Since mtk doesn't support plane > zpos, change the cursor location to the top-most plane. > Reviewed-by: CK Hu > Signed-off-by: Sean Paul > --- > drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c > index 0dfcd1787e651..4ac76b9613926 100644 > --- a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c > +++ b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c > @@ -689,11 +689,12 @@ static int mtk_drm_crtc_num_comp_planes(struct mtk_drm_crtc *mtk_crtc, > } > > static inline > -enum drm_plane_type mtk_drm_crtc_plane_type(unsigned int plane_idx) > +enum drm_plane_type mtk_drm_crtc_plane_type(unsigned int plane_idx, > + unsigned int num_planes) > { > if (plane_idx == 0) > return DRM_PLANE_TYPE_PRIMARY; > - else if (plane_idx == 1) > + else if (plane_idx == (num_planes - 1)) > return DRM_PLANE_TYPE_CURSOR; > else > return DRM_PLANE_TYPE_OVERLAY; > @@ -712,7 +713,8 @@ static int mtk_drm_crtc_init_comp_planes(struct drm_device *drm_dev, > ret = mtk_plane_init(drm_dev, > &mtk_crtc->planes[mtk_crtc->layer_nr], > BIT(pipe), > - mtk_drm_crtc_plane_type(mtk_crtc->layer_nr), > + mtk_drm_crtc_plane_type(mtk_crtc->layer_nr, > + num_planes), > mtk_ddp_comp_supported_rotations(comp)); > if (ret) > return ret; _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel