From patchwork Fri Oct 10 12:31:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 5065081 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 322E8C11AC for ; Fri, 10 Oct 2014 12:32:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B9C7E201EC for ; Fri, 10 Oct 2014 12:32:23 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id C365A2025B for ; Fri, 10 Oct 2014 12:32:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 149F36E28D; Fri, 10 Oct 2014 05:32:22 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by gabe.freedesktop.org (Postfix) with ESMTP id 816506E28D for ; Fri, 10 Oct 2014 05:32:20 -0700 (PDT) Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0ND800B3LAYO3X10@mailout1.w1.samsung.com> for dri-devel@lists.freedesktop.org; Fri, 10 Oct 2014 13:35:12 +0100 (BST) X-AuditID: cbfec7f5-b7f776d000003e54-4f-5437d1d23df7 Received: from eusync3.samsung.com ( [203.254.199.213]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id AA.D9.15956.2D1D7345; Fri, 10 Oct 2014 13:32:18 +0100 (BST) Received: from AMDC1061.digital.local ([106.116.147.88]) by eusync3.samsung.com (Oracle Communications Messaging Server 7u4-23.01 (7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0ND800FJ8ATHIJ70@eusync3.samsung.com>; Fri, 10 Oct 2014 13:32:18 +0100 (BST) From: Andrzej Hajda To: Inki Dae Subject: [PATCH 2/4] drm/exynos: init kms poll at the end of initialization Date: Fri, 10 Oct 2014 14:31:54 +0200 Message-id: <1412944316-27737-3-git-send-email-a.hajda@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1412944316-27737-1-git-send-email-a.hajda@samsung.com> References: <1412944316-27737-1-git-send-email-a.hajda@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrCJMWRmVeSWpSXmKPExsVy+t/xq7qXLpqHGEzdKGZxa905VosrX9+z WUy6P4HF4sW9iywWZ5vesFtc3jWHzWLG+X1MFmuP3GW3mDH5JZsDp8f97uNMHn1bVjF6fN4k F8AcxWWTkpqTWZZapG+XwJVxqbmNqWAiT8XBLvUGxr+cXYycHBICJhJr5jcyQdhiEhfurWfr YuTiEBJYyihx5P02Vginj0niXfN/NpAqNgFNib+bb4LZIgLKEqv2tbODFDELfGSSuLL0DXMX IweHsIC3xK6XYiA1LAKqEk9W9jCD2LwCzhIHD/WyQWyTkzh5bDIriM0p4CLx+9YFVpBWIaCa 55eUJzDyLmBkWMUomlqaXFCclJ5rpFecmFtcmpeul5yfu4kRElJfdzAuPWZ1iFGAg1GJh/eC jHmIEGtiWXFl7iFGCQ5mJRHe+XuBQrwpiZVVqUX58UWlOanFhxiZODilGhjdYoQinedfS/gh 0uD1z8jrqrhur4zufeMZCzayVArFmhyzyvi8ueGsTV35ynl39OV9JXtqX9v0zP3w/PkDrffG LA4rpgeVPlA98KVQ7oJJuFuIyG2z62mt+o9/KjQnLT4/Y6LC65tygvpHFu5O1ph9ecaC4Asb f7hN62nMypFd/zuB+dgUgTglluKMREMt5qLiRADtZtwDBwIAAA== Cc: "moderated list:ARM/S5P EXYNOS AR..." , Seung-Woo Kim , open list , dri-devel@lists.freedesktop.org, Andrzej Hajda , Kyungmin Park , Marek Szyprowski X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP HPD events can be generated by components even if drm_dev is not fully initialized, to skip such events kms poll initialization should be performed at the end of load callback followed directly by forced connection detection. Signed-off-by: Andrzej Hajda --- drivers/gpu/drm/exynos/exynos_drm_drv.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c index 322e7bf..ce6c14c 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c @@ -94,9 +94,6 @@ static int exynos_drm_load(struct drm_device *dev, unsigned long flags) goto err_mode_config_cleanup; } - /* init kms poll for handling hpd */ - drm_kms_helper_poll_init(dev); - /* setup possible_clones. */ exynos_drm_encoder_setup(dev); @@ -116,9 +113,6 @@ static int exynos_drm_load(struct drm_device *dev, unsigned long flags) if (ret) goto err_cleanup_vblank; - /* force connectors detection */ - drm_helper_hpd_irq_event(dev); - /* * enable drm irq mode. * - with irq_enabled = true, we can use the vblank feature. @@ -136,6 +130,12 @@ static int exynos_drm_load(struct drm_device *dev, unsigned long flags) */ dev->vblank_disable_allowed = true; + /* init kms poll for handling hpd */ + drm_kms_helper_poll_init(dev); + + /* force connectors detection */ + drm_helper_hpd_irq_event(dev); + return 0; err_cleanup_vblank: