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: 211606 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=-8.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED 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 087AEC3F2CD for ; Fri, 28 Feb 2020 20:05:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BCF6F24677 for ; Fri, 28 Feb 2020 20:05:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725900AbgB1UFi (ORCPT ); Fri, 28 Feb 2020 15:05:38 -0500 Received: from muru.com ([72.249.23.125]:58318 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725769AbgB1UFi (ORCPT ); Fri, 28 Feb 2020 15:05:38 -0500 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 Cc: Ivaylo Dimitrov , Merlijn Wajer , ruleh , dri-devel@lists.freedesktop.org, linux-omap@vger.kernel.org Subject: [RFC] drm/omap: Create only one primary plane for CRTC Message-ID: <20200228200534.GO37466@atomide.com> MIME-Version: 1.0 Content-Disposition: inline Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org 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;