From patchwork Thu Apr 2 10:40:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 11470453 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 67586159A for ; Thu, 2 Apr 2020 10:40:51 +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 45F092077D for ; Thu, 2 Apr 2020 10:40:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="OeuZRPgs" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 45F092077D 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 34ACF6EA47; Thu, 2 Apr 2020 10:40:50 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by gabe.freedesktop.org (Postfix) with ESMTPS id C38456EA47 for ; Thu, 2 Apr 2020 10:40:48 +0000 (UTC) Received: from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 155D580E; Thu, 2 Apr 2020 12:40:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1585824047; bh=zexcxHTvs3Clc1+zo3EKPdnRieJB95Z8ud4HjoyHT3s=; h=From:To:Cc:Subject:Date:From; b=OeuZRPgsmlNzJ1fT6o3P8Gd1xuZb6wNJjI6Ar2p6Ovvb+gmnxrIifidOCWpmqSm3t YG04L19YX0ZMmmpVcuytQXr4tW6VkNbu6iQjpETFz0Qp3scXDy8pzHmTZqwuSjR47u jVXDO4Gw243ZkmVXDl1CtS1Xc5Jdg/J3J7Pn1ulI= From: Laurent Pinchart To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm: rcar-du: Create immutable zpos property for primary planes Date: Thu, 2 Apr 2020 13:40:35 +0300 Message-Id: <20200402104035.13497-1-laurent.pinchart+renesas@ideasonboard.com> X-Mailer: git-send-email 2.24.1 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: linux-renesas-soc@vger.kernel.org, Kuninori Morimoto Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The R-Car DU driver creates a zpos property, ranging from 1 to 7, for all the overlay planes, but leaves the primary plane without a zpos property. The DRM/KMS API doesn't clearly specify if this is acceptable, of it the property is mandatory for all planes when exposed for some of the planes. Nonetheless, weston v8.0 has been reported to have trouble handling this situation. The DRM core offers support for immutable zpos properties. Creating an immutable zpos property set to 0 for the primary planes seems to be a good way forward, as it shouldn't introduce any regression, and can fix the issue. Do so. Reported-by: Kuninori Morimoto Signed-off-by: Laurent Pinchart Reviewed-by: Daniel Stone --- drivers/gpu/drm/rcar-du/rcar_du_plane.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/rcar-du/rcar_du_plane.c b/drivers/gpu/drm/rcar-du/rcar_du_plane.c index c6430027169f..a0021fc25b27 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_plane.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_plane.c @@ -785,13 +785,15 @@ int rcar_du_planes_init(struct rcar_du_group *rgrp) drm_plane_create_alpha_property(&plane->plane); - if (type == DRM_PLANE_TYPE_PRIMARY) - continue; - - drm_object_attach_property(&plane->plane.base, - rcdu->props.colorkey, - RCAR_DU_COLORKEY_NONE); - drm_plane_create_zpos_property(&plane->plane, 1, 1, 7); + if (type == DRM_PLANE_TYPE_PRIMARY) { + drm_plane_create_zpos_immutable_property(&plane->plane, + 0); + } else { + drm_object_attach_property(&plane->plane.base, + rcdu->props.colorkey, + RCAR_DU_COLORKEY_NONE); + drm_plane_create_zpos_property(&plane->plane, 1, 1, 7); + } } return 0;