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=-3.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 3A690C2BA15 for ; Sat, 4 Apr 2020 18:25:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 09D68206F5 for ; Sat, 4 Apr 2020 18:25:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="JR2f8h6i" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726207AbgDDSZv (ORCPT ); Sat, 4 Apr 2020 14:25:51 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:37898 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726187AbgDDSZv (ORCPT ); Sat, 4 Apr 2020 14:25:51 -0400 Received: from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 59DB6312; Sat, 4 Apr 2020 20:25:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1586024749; bh=PTvG/2khhxzZNEwEyrtZBzHyBxkv0ac/83/7I+tYhbM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JR2f8h6iYWY6ClzcUb+sEA1UtC1yRBJOVANHPgrx0pb73Kn9CCUFBafCsUUIocB/p xeMUol5K41vluJiKD/kFX38+rRQIn3HJSAiY/z36cjwo0wUZsAm6cD1z9iTr7muSq3 ght3/2QROPC0lx53IXQLIAbSJtIou58XVoz35s/g= Date: Sat, 4 Apr 2020 21:25:40 +0300 From: Laurent Pinchart To: Geert Uytterhoeven Cc: Laurent Pinchart , DRI Development , Linux-Renesas , Kuninori Morimoto , Tomohito Esaki Subject: Re: [PATCH] drm: rcar-du: Create immutable zpos property for primary planes Message-ID: <20200404182540.GC4875@pendragon.ideasonboard.com> References: <20200402104035.13497-1-laurent.pinchart+renesas@ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org Hi Geert, On Thu, Apr 02, 2020 at 01:12:51PM +0200, Geert Uytterhoeven wrote: > On Thu, Apr 2, 2020 at 12:42 PM Laurent Pinchart wrote: > > 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 > > Thanks for your patch! > > > --- 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; > > This is very similar to Esaki-san's patch[*] posted yesterday. Thank you for pointing me to it, I had missed that patch. > However, there's one big difference: your patch doesn't update > rcar_du_vsp_init(). Isn't that needed? > > [*] "[PATCH] drm: rcar-du: Set primary plane zpos immutably at initializing" > https://lore.kernel.org/linux-renesas-soc/20200401061100.7379-1-etom@igel.co.jp/ My bad. I've sent a v2 of Esaki-san's patch to CC the dri-devel mailing list, and have applied it to my tree. -- Regards, Laurent Pinchart 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=-3.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no 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 85B90C2BA1A for ; Sat, 4 Apr 2020 18:25:52 +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 5D1A2206F5 for ; Sat, 4 Apr 2020 18:25:52 +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="JR2f8h6i" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5D1A2206F5 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 872846E186; Sat, 4 Apr 2020 18:25:51 +0000 (UTC) Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by gabe.freedesktop.org (Postfix) with ESMTPS id D547F6E186 for ; Sat, 4 Apr 2020 18:25:50 +0000 (UTC) Received: from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 59DB6312; Sat, 4 Apr 2020 20:25:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1586024749; bh=PTvG/2khhxzZNEwEyrtZBzHyBxkv0ac/83/7I+tYhbM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JR2f8h6iYWY6ClzcUb+sEA1UtC1yRBJOVANHPgrx0pb73Kn9CCUFBafCsUUIocB/p xeMUol5K41vluJiKD/kFX38+rRQIn3HJSAiY/z36cjwo0wUZsAm6cD1z9iTr7muSq3 ght3/2QROPC0lx53IXQLIAbSJtIou58XVoz35s/g= Date: Sat, 4 Apr 2020 21:25:40 +0300 From: Laurent Pinchart To: Geert Uytterhoeven Subject: Re: [PATCH] drm: rcar-du: Create immutable zpos property for primary planes Message-ID: <20200404182540.GC4875@pendragon.ideasonboard.com> References: <20200402104035.13497-1-laurent.pinchart+renesas@ideasonboard.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: 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 , Laurent Pinchart , Kuninori Morimoto , DRI Development , Tomohito Esaki Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Geert, On Thu, Apr 02, 2020 at 01:12:51PM +0200, Geert Uytterhoeven wrote: > On Thu, Apr 2, 2020 at 12:42 PM Laurent Pinchart wrote: > > 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 > > Thanks for your patch! > > > --- 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; > > This is very similar to Esaki-san's patch[*] posted yesterday. Thank you for pointing me to it, I had missed that patch. > However, there's one big difference: your patch doesn't update > rcar_du_vsp_init(). Isn't that needed? > > [*] "[PATCH] drm: rcar-du: Set primary plane zpos immutably at initializing" > https://lore.kernel.org/linux-renesas-soc/20200401061100.7379-1-etom@igel.co.jp/ My bad. I've sent a v2 of Esaki-san's patch to CC the dri-devel mailing list, and have applied it to my tree. -- Regards, Laurent Pinchart _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel