Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1082175ybt; Wed, 1 Jul 2020 18:24:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6UWpWZFQxTgtR941wnx1t+tckTfq4W0D79wWuYZ4QfuqIZ+DlOcHfor/6TWQ7C7xaiWCL X-Received: by 2002:a05:6402:8da:: with SMTP id d26mr24018761edz.109.1593653060741; Wed, 01 Jul 2020 18:24:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593653060; cv=none; d=google.com; s=arc-20160816; b=x/giwb9AxKMynJJpYLEd8HYIFfvqtfqp6DGG4vyDs7CQyC80b2t2sY7bkOpFiWfGne 1RgzJJWcRBzIRDS1MR5dC64m0QRV0JAKGbf20DkSloXn3jozWy+d70SPSoID6SLUom4U +g9v1umFq6Xp9C8npkU7VFZM6qlMW+1qexNYkb+Tt5ageGX6ZW59yhafufvS+FLgDof8 F8kjd/jKJQ8xi2SAdRv+xW+X9nawTIW3+Eyo4mQ0lcuK3aizF4Cg5GBjWRGA6vc9aMUi QZg1N/guSlO1yBlN2rOFjvAV3CXHPueO4gT8x32muUvTVAUeObXd1EmxOSSHOJShgwr9 gWYw== 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=GdfNC89gUy9vVdxaRCD+y4uUzEbg7kPEWMqbeEcEI6E=; b=V5EPEhcbVdPHj6v0yras+n8fZfDC7f33QWiQ/Rubt8TV1yT8Ufo1f/7PRjlyUkkoFV UEbBD3bXgbRiECefjfTGkrbrzUgsXiiHy/br0AcCBD1w8RsCSgM1LtX8KBMJSEE+OuoF UqXbo6ujpdH+cGg1tdEka1mqP7EnQiNORdU2tZ5gleGpDd9g5dE4kQFftrm2dFtCFqLg NTMrCaCN7APm9m7O1UPZL6l1UhER7oVvAwQhMXpK9G5MomAIRHEaa4DvfsAADFwdstBQ bdHa2m6Q3n7C4anPzn5ehVcH4dqj+vkN47Vb2J7psXd6VBY5Xv7MKFP5vzW+yzI+ekyc VxZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=sOyXRqU6; 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 g20si4715187edq.447.2020.07.01.18.23.57; Wed, 01 Jul 2020 18:24:20 -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=sOyXRqU6; 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 S1728294AbgGBBXW (ORCPT + 99 others); Wed, 1 Jul 2020 21:23:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:53548 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728226AbgGBBXL (ORCPT ); Wed, 1 Jul 2020 21:23:11 -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 24F272085B; Thu, 2 Jul 2020 01:23:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593652990; bh=RE38XazNYCwzs9eu9smfOGnUknFmGMxPfCedVsBQs2U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sOyXRqU6oVghyN/Yq3Pef1bJsItqTZRNe79SJ6M+SUs9pILRnyn9KTwYXaEAEr+5p H54yetBa/gOwzSJcFUY8n8Jvtb0EQ9eHNHsDuESu3boZOrrXmw2o32sJVlsc0AVE85 aKPwhikx28eVPysWNY2XZ7lIcxqhkXcAhVWlKYDY= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Linus Walleij , Sam Ravnborg , Sasha Levin , dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 5.7 13/53] drm: mcde: Fix display initialization problem Date: Wed, 1 Jul 2020 21:21:22 -0400 Message-Id: <20200702012202.2700645-13-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200702012202.2700645-1-sashal@kernel.org> References: <20200702012202.2700645-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: Linus Walleij [ Upstream commit b984b6d8b52372b98cce0a6ff6c2787f50665b87 ] The following bug appeared in the MCDE driver/display initialization during the recent merge window. First the place we call drm_fbdev_generic_setup() in the wrong place: this needs to be called AFTER calling drm_dev_register() else we get this splat: ------------[ cut here ]------------ WARNING: CPU: 0 PID: 1 at ../drivers/gpu/drm/drm_fb_helper.c:2198 drm_fbdev_generic_setup+0x164/0x1a8 mcde a0350000.mcde: Device has not been registered. Modules linked in: Hardware name: ST-Ericsson Ux5x0 platform (Device Tree Support) [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (dump_stack+0x9c/0xb0) [] (dump_stack) from [] (__warn+0xb8/0xd0) [] (__warn) from [] (warn_slowpath_fmt+0x74/0xb8) [] (warn_slowpath_fmt) from [] (drm_fbdev_generic_setup+0x164/0x1a8) [] (drm_fbdev_generic_setup) from [] (mcde_drm_bind+0xc4/0x160) [] (mcde_drm_bind) from [] (try_to_bring_up_master+0x15c/0x1a4) (...) Signed-off-by: Linus Walleij Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200613223027.4189309-1-linus.walleij@linaro.org Signed-off-by: Sasha Levin --- drivers/gpu/drm/mcde/mcde_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mcde/mcde_drv.c b/drivers/gpu/drm/mcde/mcde_drv.c index f28cb7a576ba4..1e7c5aa4d5e62 100644 --- a/drivers/gpu/drm/mcde/mcde_drv.c +++ b/drivers/gpu/drm/mcde/mcde_drv.c @@ -208,7 +208,6 @@ static int mcde_modeset_init(struct drm_device *drm) drm_mode_config_reset(drm); drm_kms_helper_poll_init(drm); - drm_fbdev_generic_setup(drm, 32); return 0; @@ -275,6 +274,8 @@ static int mcde_drm_bind(struct device *dev) if (ret < 0) goto unbind; + drm_fbdev_generic_setup(drm, 32); + return 0; unbind: -- 2.25.1