From patchwork Mon Feb 12 09:44:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 127970 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp3040816ljc; Mon, 12 Feb 2018 01:46:41 -0800 (PST) X-Google-Smtp-Source: AH8x226tO8QP5WnulfdwBzy8Uo+IYMafVWwKRr6ZPfnU0DXvYANO2bnm+mlNKakz8Mej0EgFwJMI X-Received: by 2002:a17:902:51e9:: with SMTP id y96-v6mr10163058plh.344.1518428800984; Mon, 12 Feb 2018 01:46:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518428800; cv=none; d=google.com; s=arc-20160816; b=KJtfnFuvC8rDnPWTJEtI84Gbg2pR4Dz9xrVD4/pK3IZAO7VAVtalmv/8WUjjkUsZ+o 8Mq3eWb4LIc1cOmw6UedYZqxyaBz+SXqoCGarBnqCkxPKGE9RueR2ixL26THWVr29Ycp nQ4fUNSl3lFaUebJGVc0gRusesQbsB5swhtbm6aOqmiLe3tToYIEr+Evnuz0aPUz9P9Y E1q6qPfzQaDxQwjxYyuYBmzsTVjvaGIE8+5U630mg5OBAtHEKd0l25WHPACsOGaqyP20 xS8CcfuTSjQ6rn6l/LJRXRqqebPhCq4s9PPR4x+Q25FQv3ykTsEF0lIq7eV3L7Jrw0dt bdCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:delivered-to :arc-authentication-results; bh=V5c2VLgiF8SXn7QDSW5tYvUcFuVecUndZk7NLnyTxS4=; b=lPa1+18vs1/8NAvsb68p8BANHyfagKsUK6k2vd4GmjHjY3GuhMKQdjxWCSlWkSjkXt OF+dZa3/Trp2gYpT5JBJiRqdO1/q4z//xvcm5MEoq/AjN4CAK/dDupom8winYxYNgUSd XFD2fSLoUMNOt/oGqMunwhVVovqO4lUIXONQGD2wueCfHy9+NDsNyXfVio3hCrIRoZnv VgHMJo+EYblwM+TZs/GEAYEtPsJ4t1FPpdzBXH4O6lb+cbOcgfLX9XXidgGQCYzU4Ikk 1MV4UMKXlOVlhEfEsKjbqggDyGnM0qUdyiqO9LzO2XGt9/05JXZnYCQTQ21R04wuUIXx hYeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=ytKEKuOk; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id c74si6085531pfj.339.2018.02.12.01.46.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 12 Feb 2018 01:46:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=ytKEKuOk; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 353EF6E1B0; Mon, 12 Feb 2018 09:45:29 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from lelnx194.ext.ti.com (lelnx194.ext.ti.com [198.47.27.80]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4BF276E1AE for ; Mon, 12 Feb 2018 09:45:27 +0000 (UTC) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id w1C9jPrx007857; Mon, 12 Feb 2018 03:45:25 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1518428725; bh=XTNRtdIrQtp2bblpzUDIDKS9twjwi+0XD7XtM/+hm5I=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ytKEKuOk7xcUm3i0WZGJpcV6DNfXsh3vKnuky6WepaQjMepXyT5gI7Adhy5d3hzY+ lQnKoBPG/cyWQgC118BIC+r9EcwP5+dJn6LOA25LwTfrF5+km+L7BMOVbbF1P3Mj56 62eal745/EmKYEoxlOyQco46AzOOmTlb+xynx6sM= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w1C9jP7d018930; Mon, 12 Feb 2018 03:45:25 -0600 Received: from DFLE115.ent.ti.com (10.64.6.36) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Mon, 12 Feb 2018 03:45:24 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Mon, 12 Feb 2018 03:45:24 -0600 Received: from deskari.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w1C9j0N9003439; Mon, 12 Feb 2018 03:45:23 -0600 From: Tomi Valkeinen To: , Laurent Pinchart , Peter Ujfalusi , Jyri Sarha , Benoit Parrot Subject: [PATCH 12/24] drm/omap: Init fbdev emulation only when we have displays Date: Mon, 12 Feb 2018 11:44:42 +0200 Message-ID: <1518428694-18018-13-git-send-email-tomi.valkeinen@ti.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518428694-18018-1-git-send-email-tomi.valkeinen@ti.com> References: <1518428694-18018-1-git-send-email-tomi.valkeinen@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tomi Valkeinen Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Peter Ujfalusi Do not try to init the fbdev if either num_crtcs or num_connectors is 0. In this case we do not have display so the fbdev init would fail anyways. Signed-off-by: Peter Ujfalusi Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/omap_fbdev.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/omapdrm/omap_fbdev.c b/drivers/gpu/drm/omapdrm/omap_fbdev.c index 30ce3d562414..509283af5b0c 100644 --- a/drivers/gpu/drm/omapdrm/omap_fbdev.c +++ b/drivers/gpu/drm/omapdrm/omap_fbdev.c @@ -249,6 +249,9 @@ void omap_fbdev_init(struct drm_device *dev) struct drm_fb_helper *helper; int ret = 0; + if (!priv->num_crtcs || !priv->num_connectors) + return; + fbdev = kzalloc(sizeof(*fbdev), GFP_KERNEL); if (!fbdev) goto fail;