From patchwork Fri Feb 28 20:05:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 11413753 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 8E1371395 for ; Sat, 29 Feb 2020 10:14:30 +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 76DFA2469C for ; Sat, 29 Feb 2020 10:14:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 76DFA2469C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=atomide.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 3B7EF6E30E; Sat, 29 Feb 2020 10:14:19 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from muru.com (muru.com [72.249.23.125]) by gabe.freedesktop.org (Postfix) with ESMTP id 73CA06E0F8 for ; Fri, 28 Feb 2020 20:05:38 +0000 (UTC) Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 5ED0C806C; Fri, 28 Feb 2020 20:06:22 +0000 (UTC) Date: Fri, 28 Feb 2020 12:05:34 -0800 From: Tony Lindgren To: Tomi Valkeinen , Laurent Pinchart , Sebastian Reichel Subject: [RFC] drm/omap: Create only one primary plane for CRTC Message-ID: <20200228200534.GO37466@atomide.com> MIME-Version: 1.0 Content-Disposition: inline X-Mailman-Approved-At: Sat, 29 Feb 2020 10:13:17 +0000 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: Merlijn Wajer , Ivaylo Dimitrov , ruleh , dri-devel@lists.freedesktop.org, linux-omap@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi, Looks like sway and wlroots won't work with omaprdrm because of the following error: backend/drm/drm.c:86: add_plane: Assertion !(type == DRM_PLANE_TYPE_PRIMARY && crtc->primary) Looks like there should only be one primary plane per CRTC? There's some discussion about that for a wlroots bug at: https://github.com/swaywm/wlroots/issues/1943 And there's a link pointing to the kms docs: https://01.org/linuxgraphics/gfx-docs/drm/gpu/drm-kms.html#plane-abstraction Below is a quick hack fix I used to get sway started. Not sure how the primary plane should be picked? I just used 0 as the primary plane to get things working :) I can start xterm on sway, but so far no fonts only the borders. Regards, Tony 8< ---------------------- diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c index d2750f60f519..122f8c4cf45b 100644 --- a/drivers/gpu/drm/omapdrm/omap_drv.c +++ b/drivers/gpu/drm/omapdrm/omap_drv.c @@ -268,7 +268,7 @@ static int omap_modeset_init(struct drm_device *dev) plane_crtc_mask = (1 << priv->num_pipes) - 1; for (i = 0; i < num_ovls; i++) { - enum drm_plane_type type = i < priv->num_pipes + enum drm_plane_type type = i == 0 ? DRM_PLANE_TYPE_PRIMARY : DRM_PLANE_TYPE_OVERLAY; struct drm_plane *plane;