From patchwork Mon Mar 26 16:17:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Grzeschik X-Patchwork-Id: 10309983 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2222A60212 for ; Tue, 27 Mar 2018 13:20:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0EBF42989F for ; Tue, 27 Mar 2018 13:20:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 02D32298F8; Tue, 27 Mar 2018 13:20:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 78B472989F for ; Tue, 27 Mar 2018 13:20:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 263AA6E611; Tue, 27 Mar 2018 13:20:13 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0428F6E4C3 for ; Mon, 26 Mar 2018 16:17:59 +0000 (UTC) Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1f0Uon-0002a8-K3; Mon, 26 Mar 2018 18:17:57 +0200 Received: from mgr by dude.hi.pengutronix.de with local (Exim 4.90_1) (envelope-from ) id 1f0Uom-0007GN-NX; Mon, 26 Mar 2018 18:17:56 +0200 From: Michael Grzeschik To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm/mxsfb: add poll_changed event handler to set_par on startup Date: Mon, 26 Mar 2018 18:17:44 +0200 Message-Id: <20180326161744.27878-1-m.grzeschik@pengutronix.de> X-Mailer: git-send-email 2.16.1 X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: mgr@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: dri-devel@lists.freedesktop.org X-Mailman-Approved-At: Tue, 27 Mar 2018 13:19:58 +0000 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: marex@denx.de, airlied@linux.ie, kernel@pengutronix.de MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP We move drm_kms_helper_poll_init behind the drm_fbdev_cma_init so the set_par will be called and fb will be active. Signed-off-by: Michael Grzeschik Reviewed-by: Daniel Vetter --- drivers/gpu/drm/mxsfb/mxsfb_drv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c b/drivers/gpu/drm/mxsfb/mxsfb_drv.c index 1207ffe362505..a047a729af6b8 100644 --- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c +++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c @@ -94,6 +94,7 @@ void mxsfb_disable_axi_clk(struct mxsfb_drm_private *mxsfb) static const struct drm_mode_config_funcs mxsfb_mode_config_funcs = { .fb_create = drm_gem_fb_create, + .output_poll_changed = drm_fb_helper_output_poll_changed, .atomic_check = drm_atomic_helper_check, .atomic_commit = drm_atomic_helper_commit, }; @@ -221,8 +222,6 @@ static int mxsfb_load(struct drm_device *drm, unsigned long flags) goto err_irq; } - drm_kms_helper_poll_init(drm); - mxsfb->fbdev = drm_fbdev_cma_init(drm, 32, drm->mode_config.num_connector); if (IS_ERR(mxsfb->fbdev)) { @@ -232,6 +231,8 @@ static int mxsfb_load(struct drm_device *drm, unsigned long flags) goto err_cma; } + drm_kms_helper_poll_init(drm); + platform_set_drvdata(pdev, drm); drm_helper_hpd_irq_event(drm);