From patchwork Tue Jun 7 15:26:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 9161669 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 EE70B60801 for ; Tue, 7 Jun 2016 15:26:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E08AF264F4 for ; Tue, 7 Jun 2016 15:26:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D53602723E; Tue, 7 Jun 2016 15:26:58 +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.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9607126E1A for ; Tue, 7 Jun 2016 15:26:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AA6226E7EC; Tue, 7 Jun 2016 15:26:49 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id 88CE06E7E7; Tue, 7 Jun 2016 15:26:46 +0000 (UTC) Received: by mail-wm0-x241.google.com with SMTP id n184so25128073wmn.1; Tue, 07 Jun 2016 08:26:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=E/VRvmBfONq0Sntd+yHL6yY86ASfhKzzMqpOOisJOY4=; b=bDqXdWwaY/6V+qaZooAJN2vONsQWipC18eUci3q3vukYQtEB1dzuPAmk84TV4Yva4J yPy7y5zrlKs+NpQRrtacNqU9VDefJn+HKvddLWTMXZzkpAeYwhipysWx9g+vatMMPcz8 K8XfQilY7Bk7mAMaR4ObjPo+iLxcT9N+8xkQRKZr7ArdGkuXUucMcbmAELrR2kychOSS 0Dp3CdGpFkGY1KAEOEPmg5e3LKLYqGk4olfriX0uHHEWdAjwXWU9OIhj9HBas6Rf2Nqm c/orhKG4RmodxbbAYRSlNSe+LUOz2kGo3RH78r1lPj/FCgZ3Py9QoEJ08q5Od67t61ie mLjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=E/VRvmBfONq0Sntd+yHL6yY86ASfhKzzMqpOOisJOY4=; b=D5Shug/n4E88b/gOdPD6Myek4VljDs+Onpkd9GxF+hyeQqAq6heb5CGflgubznP6dK 5nNjKZKlk2nOrexscnrBLdF+FORGzAFrAdvtOBz6kI2ayUbSVdS+MvT9L8mg5MmKwyPF FunGn+yEQB5oy5ujqjKQNY8Df+Hx2bgy40IvjfXznCvH0CAvBjJneg3o6DjulwFeNowZ 3lBu+AuQ1t3hGK2xvwlZoVzGpGupHGEPCcsu2peXqJWeURCHPgo+OACt6/f8s8m6lSuA 9byklfDNVc5EYETag73rNEH0inJdaqFM7xMdHcOtD+/CapfDD5pG6X6owIohwyRt6vMH hZ0w== X-Gm-Message-State: ALyK8tIzk5Uq00ggyG5cyJomcU7ixxDHj0y0SolZCdzR+erAxg2pLiFfLJcIwYGRfyS9cw== X-Received: by 10.194.79.168 with SMTP id k8mr33314wjx.52.1465313204188; Tue, 07 Jun 2016 08:26:44 -0700 (PDT) Received: from localhost (port-9435.pppoe.wtnet.de. [84.46.36.255]) by smtp.gmail.com with ESMTPSA id f1sm20046532wmf.22.2016.06.07.08.26.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Jun 2016 08:26:43 -0700 (PDT) From: Thierry Reding To: Daniel Vetter Date: Tue, 7 Jun 2016 17:26:25 +0200 Message-Id: <20160607152625.9511-10-thierry.reding@gmail.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20160607152625.9511-1-thierry.reding@gmail.com> References: <20160607152625.9511-1-thierry.reding@gmail.com> Cc: Boris Brezillon , Joonyoung Shim , Xinliang Liu , Chen Feng , intel-gfx@lists.freedesktop.org, Seung-Woo Kim , Xinwei Kong , dri-devel@lists.freedesktop.org, Inki Dae , Kyungmin Park , Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= Subject: [Intel-gfx] [PATCH v2 9/9] drm/hisilicon: Remove custom FB helper deferred setup X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP From: Thierry Reding The FB helper core now supports deferred setup, so the driver's custom implementation can be removed. Signed-off-by: Thierry Reding --- drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c index 3f94785fbcca..0e0bd77e4499 100644 --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c @@ -54,15 +54,7 @@ static void kirin_fbdev_output_poll_changed(struct drm_device *dev) { struct kirin_drm_private *priv = dev->dev_private; - if (priv->fbdev) { - drm_fbdev_cma_hotplug_event(priv->fbdev); - } else { - priv->fbdev = drm_fbdev_cma_init(dev, 32, - dev->mode_config.num_crtc, - dev->mode_config.num_connector); - if (IS_ERR(priv->fbdev)) - priv->fbdev = NULL; - } + drm_fbdev_cma_hotplug_event(priv->fbdev); } #endif @@ -129,11 +121,19 @@ static int kirin_drm_kms_init(struct drm_device *dev) /* init kms poll for handling hpd */ drm_kms_helper_poll_init(dev); - /* force detection after connectors init */ - (void)drm_helper_hpd_irq_event(dev); + priv->fbdev = drm_fbdev_cma_init(dev, 32, dev->mode_config.num_crtc, + dev->mode_config.num_connector); + if (IS_ERR(priv->fbdev)) { + DRM_ERROR("failed to initialize fbdev.\n"); + ret = PTR_ERR(priv->fbdev); + goto err_cleanup_poll; + } return 0; +err_cleanup_poll: + drm_kms_helper_poll_fini(dev); + drm_vblank_cleanup(dev); err_unbind_all: component_unbind_all(dev->dev, dev); err_dc_cleanup: