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.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, 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=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 AB446C352A4 for ; Tue, 11 Feb 2020 01:19:41 +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 52A9320708 for ; Tue, 11 Feb 2020 01:19:41 +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="Tktp5Tts" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 52A9320708 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 AEE576E279; Tue, 11 Feb 2020 01:19:40 +0000 (UTC) Received: from mailgw01.mediatek.com (unknown [210.61.82.183]) by gabe.freedesktop.org (Postfix) with ESMTP id 22DE06E279 for ; Tue, 11 Feb 2020 01:19:38 +0000 (UTC) X-UUID: bb4be0dbcae848f58523fcadeed9470f-20200211 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=mxKXHpMsJ5tja8hbUWbIbhD1W2Y9D1qbD+njzeGZeLo=; b=Tktp5Ttsa726dao3RTS7GoXNd3YZYVkBSmBNjTBUHKgRcmtOlWHLtbpvTeZ0H+EMYjJVOfPSXOkbwQX8qcIzttInXfMIfiR9XW6jUSLcpkveZBE6B7qJcZXuFuhFpsrbnepqeSobKjpdZefnXWfoCuKQ1OBPbbkV4FsBfRWGU3s=; X-UUID: bb4be0dbcae848f58523fcadeed9470f-20200211 Received: from mtkcas09.mediatek.inc [(172.21.101.178)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 772415810; Tue, 11 Feb 2020 09:19:35 +0800 Received: from mtkcas09.mediatek.inc (172.21.101.178) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 11 Feb 2020 09:18:52 +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; Tue, 11 Feb 2020 09:20:00 +0800 Message-ID: <1581383974.3194.1.camel@mtksdaap41> Subject: Re: [PATCH] drm/mediatek: Find the cursor plane instead of hard coding it From: CK Hu To: Sean Paul Date: Tue, 11 Feb 2020 09:19:34 +0800 In-Reply-To: References: <20200206140140.GA18465@art_vandelay> <20200207152348.1.Ie0633018fc787dda6e869cae23df76ae30f2a686@changeid> <1581064499.590.0.camel@mtksdaap41> <1581303187.951.2.camel@mtksdaap41> X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 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: David Airlie , LKML , dri-devel , "moderated list:ARM/Mediatek SoC support" , Matthias Brugger , Evan Benn , linux-arm-kernel Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Mon, 2020-02-10 at 09:10 -0500, Sean Paul wrote: > On Sun, Feb 9, 2020 at 9:53 PM CK Hu wrote: > > > > Hi, Evan: > > > > On Fri, 2020-02-07 at 16:34 +0800, CK Hu wrote: > > > Hi, Evan: > > > > > > On Fri, 2020-02-07 at 15:23 +1100, Evan Benn wrote: > > > > The cursor and primary planes were hard coded. > > > > Now search for them for passing to drm_crtc_init_with_planes > > > > > > > > > > Reviewed-by: CK Hu > > > > Applied to mediatek-drm-fixes-5.6 [1], thanks. > > > > Hi CK, > Thanks for picking this up. Before you send the pull, could you please > reverse the order of these 2 patches? Evan's should come before mine > to prevent a regression. > > Sean > Hi, Sean: Thanks for your notice. I've reversed the order. Regards, CK > > [1] > > https://github.com/ckhu-mediatek/linux.git-tags/commits/mediatek-drm-fixes-5.6 > > > > Regards, > > CK > > > > > > > > > Signed-off-by: Evan Benn > > > > --- > > > > > > > > drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 18 ++++++++++++------ > > > > 1 file changed, 12 insertions(+), 6 deletions(-) > > > > > > > > diff --git a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c > > > > index 7b392d6c71cc..935652990afa 100644 > > > > --- a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c > > > > +++ b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c > > > > @@ -658,10 +658,18 @@ static const struct drm_crtc_helper_funcs mtk_crtc_helper_funcs = { > > > > > > > > static int mtk_drm_crtc_init(struct drm_device *drm, > > > > struct mtk_drm_crtc *mtk_crtc, > > > > - struct drm_plane *primary, > > > > - struct drm_plane *cursor, unsigned int pipe) > > > > + unsigned int pipe) > > > > { > > > > - int ret; > > > > + struct drm_plane *primary = NULL; > > > > + struct drm_plane *cursor = NULL; > > > > + int i, ret; > > > > + > > > > + for (i = 0; i < mtk_crtc->layer_nr; i++) { > > > > + if (mtk_crtc->planes[i].type == DRM_PLANE_TYPE_PRIMARY) > > > > + primary = &mtk_crtc->planes[i]; > > > > + else if (mtk_crtc->planes[i].type == DRM_PLANE_TYPE_CURSOR) > > > > + cursor = &mtk_crtc->planes[i]; > > > > + } > > > > > > > > ret = drm_crtc_init_with_planes(drm, &mtk_crtc->base, primary, cursor, > > > > &mtk_crtc_funcs, NULL); > > > > @@ -830,9 +838,7 @@ int mtk_drm_crtc_create(struct drm_device *drm_dev, > > > > return ret; > > > > } > > > > > > > > - ret = mtk_drm_crtc_init(drm_dev, mtk_crtc, &mtk_crtc->planes[0], > > > > - mtk_crtc->layer_nr > 1 ? &mtk_crtc->planes[1] : > > > > - NULL, pipe); > > > > + ret = mtk_drm_crtc_init(drm_dev, mtk_crtc, pipe); > > > > if (ret < 0) > > > > return ret; > > > > > > > > > > > _______________________________________________ > > dri-devel mailing list > > dri-devel@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/dri-devel _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel