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=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 DA33EC433DB for ; Sun, 7 Mar 2021 04:09:07 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 6D74B64D99 for ; Sun, 7 Mar 2021 04:09:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6D74B64D99 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+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=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=klGCS5FHXVOmUMGTU6Bqmfs7lsB+WeGMsbTiowQqivY=; b=O3EK/fXyRhXHLOGM99VMoIBrv 7jfA2cA+/Sl3yq8e8otDUE79ECCh2SSRAruCBaAl+/5la6fWI0J/pGEwvTmaSQ6V0Xyz+JNFm6DmI oOegwbE14OJNkL8MnrOHsPcmXnBDYRI3EPCac/V4eNXqoGeiY4omWb7BFLVRkG0uqigQduObrNivP RZucWc6ectGfv0XESFUwta7Pqkd90glVZP3v56Ai4LXm9B5ioc3+OUyNuabXOW/CoXTNB+hTgKFMp zaBqNbuoo/OJxuMWWPvuWkiN5d33FnhaXRY05OnsP+SeMUGtJYovxAVhftj0Vh9O/Ff80M/9hgIuv htb1GmXcg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lIkh6-007uJ1-MV; Sun, 07 Mar 2021 04:07:04 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lIkgs-007u7C-FP for linux-arm-kernel@lists.infradead.org; Sun, 07 Mar 2021 04:06:52 +0000 Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 3B5973F5; Sun, 7 Mar 2021 05:06:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1615090008; bh=2zWPeqERQPCnpjsNQtCE+XOTo+M9nNH2/DENaDSWYho=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mmYm6bvBCF4XmIl0cDdZAljSKXZgZptGbApFXsR6bkNRtyiuRNxwDhoQXse2gl/Aa K/VooyU/WPwcTqB/A8hFuMx63exIMIQNsnji47XP+1vTRqIBoMSM71EdKf+JxrJHVJ zNHkqEAf1fJljlVyW+0wmFW4kyYv6f++fz4c2C4U= From: Laurent Pinchart To: dri-devel@lists.freedesktop.org Cc: linux-arm-kernel@lists.infradead.org, Michal Simek , Rohit Visavalia Subject: [PATCH 1/3] drm: xlnx: zynqmp_dpsub: Fix plane ordering Date: Sun, 7 Mar 2021 06:06:09 +0200 Message-Id: <20210307040611.29246-2-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210307040611.29246-1-laurent.pinchart@ideasonboard.com> References: <20210307040611.29246-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210307_040651_399877_D184E8A1 X-CRM114-Status: GOOD ( 12.31 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The DPSUB has a fixed plane order, with the video plane being at the bottom and the graphics plane at the top. Register the video plane as the primary plane, as a bottom overlay plane doesn't make sense. While at it, add immutable zorder properties to the planes to report this information to userspace. Signed-off-by: Laurent Pinchart --- drivers/gpu/drm/xlnx/zynqmp_disp.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/xlnx/zynqmp_disp.c b/drivers/gpu/drm/xlnx/zynqmp_disp.c index 148add0ca1d6..6296f6d5acbc 100644 --- a/drivers/gpu/drm/xlnx/zynqmp_disp.c +++ b/drivers/gpu/drm/xlnx/zynqmp_disp.c @@ -1236,8 +1236,11 @@ static int zynqmp_disp_create_planes(struct zynqmp_disp *disp) for (j = 0; j < layer->info->num_formats; ++j) drm_formats[j] = layer->info->formats[j].drm_fmt; - /* Graphics layer is primary, and video layer is overlay. */ - type = i == ZYNQMP_DISP_LAYER_GFX + /* + * The video layer is at the bottom of the stack and the + * graphics layer at the top. + */ + type = i == ZYNQMP_DISP_LAYER_VID ? DRM_PLANE_TYPE_PRIMARY : DRM_PLANE_TYPE_OVERLAY; ret = drm_universal_plane_init(disp->drm, &layer->plane, 0, &zynqmp_disp_plane_funcs, @@ -1249,6 +1252,8 @@ static int zynqmp_disp_create_planes(struct zynqmp_disp *disp) drm_plane_helper_add(&layer->plane, &zynqmp_disp_plane_helper_funcs); + + drm_plane_create_zpos_immutable_property(&layer->plane, i); } return 0; @@ -1573,7 +1578,7 @@ static const struct drm_crtc_funcs zynqmp_disp_crtc_funcs = { static int zynqmp_disp_create_crtc(struct zynqmp_disp *disp) { - struct drm_plane *plane = &disp->layers[ZYNQMP_DISP_LAYER_GFX].plane; + struct drm_plane *plane = &disp->layers[ZYNQMP_DISP_LAYER_VID].plane; int ret; ret = drm_crtc_init_with_planes(disp->drm, &disp->crtc, plane, -- Regards, Laurent Pinchart _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 B337CC433DB for ; Sun, 7 Mar 2021 04:06:57 +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 1B6AF64FEB for ; Sun, 7 Mar 2021 04:06:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1B6AF64FEB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.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 D05626E0F8; Sun, 7 Mar 2021 04:06:52 +0000 (UTC) Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by gabe.freedesktop.org (Postfix) with ESMTPS id 656346E0DE for ; Sun, 7 Mar 2021 04:06:50 +0000 (UTC) Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 3B5973F5; Sun, 7 Mar 2021 05:06:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1615090008; bh=2zWPeqERQPCnpjsNQtCE+XOTo+M9nNH2/DENaDSWYho=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mmYm6bvBCF4XmIl0cDdZAljSKXZgZptGbApFXsR6bkNRtyiuRNxwDhoQXse2gl/Aa K/VooyU/WPwcTqB/A8hFuMx63exIMIQNsnji47XP+1vTRqIBoMSM71EdKf+JxrJHVJ zNHkqEAf1fJljlVyW+0wmFW4kyYv6f++fz4c2C4U= From: Laurent Pinchart To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/3] drm: xlnx: zynqmp_dpsub: Fix plane ordering Date: Sun, 7 Mar 2021 06:06:09 +0200 Message-Id: <20210307040611.29246-2-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20210307040611.29246-1-laurent.pinchart@ideasonboard.com> References: <20210307040611.29246-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 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: Rohit Visavalia , Michal Simek , 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" The DPSUB has a fixed plane order, with the video plane being at the bottom and the graphics plane at the top. Register the video plane as the primary plane, as a bottom overlay plane doesn't make sense. While at it, add immutable zorder properties to the planes to report this information to userspace. Signed-off-by: Laurent Pinchart --- drivers/gpu/drm/xlnx/zynqmp_disp.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/xlnx/zynqmp_disp.c b/drivers/gpu/drm/xlnx/zynqmp_disp.c index 148add0ca1d6..6296f6d5acbc 100644 --- a/drivers/gpu/drm/xlnx/zynqmp_disp.c +++ b/drivers/gpu/drm/xlnx/zynqmp_disp.c @@ -1236,8 +1236,11 @@ static int zynqmp_disp_create_planes(struct zynqmp_disp *disp) for (j = 0; j < layer->info->num_formats; ++j) drm_formats[j] = layer->info->formats[j].drm_fmt; - /* Graphics layer is primary, and video layer is overlay. */ - type = i == ZYNQMP_DISP_LAYER_GFX + /* + * The video layer is at the bottom of the stack and the + * graphics layer at the top. + */ + type = i == ZYNQMP_DISP_LAYER_VID ? DRM_PLANE_TYPE_PRIMARY : DRM_PLANE_TYPE_OVERLAY; ret = drm_universal_plane_init(disp->drm, &layer->plane, 0, &zynqmp_disp_plane_funcs, @@ -1249,6 +1252,8 @@ static int zynqmp_disp_create_planes(struct zynqmp_disp *disp) drm_plane_helper_add(&layer->plane, &zynqmp_disp_plane_helper_funcs); + + drm_plane_create_zpos_immutable_property(&layer->plane, i); } return 0; @@ -1573,7 +1578,7 @@ static const struct drm_crtc_funcs zynqmp_disp_crtc_funcs = { static int zynqmp_disp_create_crtc(struct zynqmp_disp *disp) { - struct drm_plane *plane = &disp->layers[ZYNQMP_DISP_LAYER_GFX].plane; + struct drm_plane *plane = &disp->layers[ZYNQMP_DISP_LAYER_VID].plane; int ret; ret = drm_crtc_init_with_planes(disp->drm, &disp->crtc, plane, -- Regards, Laurent Pinchart _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel