Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp120370ybg; Mon, 8 Jun 2020 18:10:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzteRJg/CaKNro/4NlCdEZyV5sqXKTw0J0FSZ3lnjJqXBwv0R66OK3mF5AeRG+4swEhJt9O X-Received: by 2002:a05:6402:39a:: with SMTP id o26mr25249421edv.10.1591665044611; Mon, 08 Jun 2020 18:10:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591665044; cv=none; d=google.com; s=arc-20160816; b=NEL16Z8fi8TL/U1YfjRUWc7jYj2ZzFQIcy8n9bmQQagybGk3I0KwqAl2W2G2anl2dr TZGMDGoirXF3f+r4Wbhxj9uwtulSuIxTWvwbuxbYHl2LhJm9rsAKQBAVRE6wJMQT58Ss DZCOPFWhKeq/iWLRjWyjDTutTCLw8UKV+J7hpHILfW0fmCjCP+up2v2fWjFR2eF2rLXh 2oCtATB9+n2lRyXdoUV5WVBM7k06vSsiVEyqmU2gsao9/68EvRCNJrVgbLXrHJv+YPDw zPa9VmyMxwQsUE6bpSPbgp1yVJbw9M/mLGw98aPr0AV/0MBl7ea04V+4UOG3lEn+IMWb s8hQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=641iXkbOnqvN8dz9r3Lzflk8EeVaoDfVnRPPKSu90D4=; b=Nrr3vEHnNsq9kqupOLaAy1PpZD7iNO/m+O9QAjlVOscT8GRdIylV1jizCbH8VkxuSi TUqCtz3sGtUqlxvDqLDRBvKS2jXacMzdiWakQHqYimRBGdTrOEwDtZH1CTNd2Fzcvmkf mnRq465hqlRh2XaUtLrvMbO920zQw2hAfqP7AXU6NhXCtGymRREDSAN25le/XrPysL5T FwT4VJiN9LC7xOSKkw2vTtEZI44q8FpCviG6yboJWPfapBfRC1pVDE1EuIuZnpETNc4K wf1Y2xD1MPOlQ9K5Q4u665a+UlOSA3TsKNnAW7MzAYYvMTQZ2oOgWqcPO8M5ptUp3nOQ Fh1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Mbx6w96Z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id du1si14026373ejc.616.2020.06.08.18.10.21; Mon, 08 Jun 2020 18:10:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Mbx6w96Z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730221AbgFIBGr (ORCPT + 99 others); Mon, 8 Jun 2020 21:06:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:50826 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727797AbgFHXHH (ORCPT ); Mon, 8 Jun 2020 19:07:07 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 71BB520E65; Mon, 8 Jun 2020 23:07:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591657626; bh=vqpwzmqgPum7xJcl5MJ2NPLpxEZEaPhP2tB5CEtYRks=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Mbx6w96Z4cmh5Gfw70rt7gu75XExqtWtB0QTHvxWBs1rvA6ksDQxik/AP2k6sSNu3 do57LiRDahAAf3fddaY94Bak3241hftJmkNomEJVhjzn6rHgUTLJ9CBRblTfGBDJrc 4I13GiUevcIR/tmSytux5JOpjYDJz0D6FIFJRXDw= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Tomohito Esaki , Yoshihito Ogawa , Koji Matsuoka , Laurent Pinchart , Daniel Stone , Sasha Levin , dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org Subject: [PATCH AUTOSEL 5.7 046/274] drm: rcar-du: Set primary plane zpos immutably at initializing Date: Mon, 8 Jun 2020 19:02:19 -0400 Message-Id: <20200608230607.3361041-46-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200608230607.3361041-1-sashal@kernel.org> References: <20200608230607.3361041-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tomohito Esaki [ Upstream commit 7982471d01aac33994276bf567c8f1f3a137648a ] According to drm_plane_create_zpos_property() function documentation, all planes zpos range should be set if zpos property is supported. However, the rcar-du driver didn't set primary plane zpos range. Since the primary plane's zpos is fixed, set it immutably. Reported-by: Yoshihito Ogawa Reported-by: Koji Matsuoka Signed-off-by: Tomohito Esaki Reviewed-by: Laurent Pinchart Reviewed-by: Daniel Stone [Turn continue into if ... else ...] Signed-off-by: Laurent Pinchart Signed-off-by: Sasha Levin --- drivers/gpu/drm/rcar-du/rcar_du_plane.c | 16 +++++++++------- drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 14 ++++++++------ 2 files changed, 17 insertions(+), 13 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; diff --git a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c index 5e4faf258c31..f1a81c9b184d 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c @@ -392,12 +392,14 @@ int rcar_du_vsp_init(struct rcar_du_vsp *vsp, struct device_node *np, drm_plane_helper_add(&plane->plane, &rcar_du_vsp_plane_helper_funcs); - if (type == DRM_PLANE_TYPE_PRIMARY) - continue; - - drm_plane_create_alpha_property(&plane->plane); - drm_plane_create_zpos_property(&plane->plane, 1, 1, - vsp->num_planes - 1); + if (type == DRM_PLANE_TYPE_PRIMARY) { + drm_plane_create_zpos_immutable_property(&plane->plane, + 0); + } else { + drm_plane_create_alpha_property(&plane->plane); + drm_plane_create_zpos_property(&plane->plane, 1, 1, + vsp->num_planes - 1); + } } return 0; -- 2.25.1