From patchwork Thu Apr 5 15:34:56 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 7682 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id CCF3323ED0 for ; Thu, 5 Apr 2012 15:40:35 +0000 (UTC) Received: from mail-yx0-f180.google.com (mail-yx0-f180.google.com [209.85.213.180]) by fiordland.canonical.com (Postfix) with ESMTP id 91659A180C9 for ; Thu, 5 Apr 2012 15:40:35 +0000 (UTC) Received: by yenl4 with SMTP id l4so944167yen.11 for ; Thu, 05 Apr 2012 08:40:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf :dkim-signature:sender:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=GdMZgQO4x7we9K8Q3EAEfYtGlpvljpg1UQ42/syyjBI=; b=dmBluA71gI5Wjx6cZJGp5pbOPXMHUS5oALOLp8OFpITlI4KQadlZnBRPqRKMcorx3D 8vgzDMEO8bgftaOAKadrKnX7fYxSat3gRBsRxZyJV9bnGxKm3EONCfQAAqEdfmKiJQiM +GKFep/5G69TJ5UjIMZri7NurBQp74ORJAHmONa5Dbv7dQmFuvekyh0V0IQuYpKjGFsJ JI+kPrl2FNRSX2h314jzTb02R4dnCf8oA2vnp3l51TScmVzpi8Ya9SRS4unp4/Gi8L+A 64E/N51GAel7zCrAZ42jlF4pKApkflDXmzaO2ZbvqxrfaDuZuu7TYf/PTAocK72Ahcsf Rwiw== Received: by 10.50.194.232 with SMTP id hz8mr2455490igc.38.1333640434550; Thu, 05 Apr 2012 08:40:34 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.164.217 with SMTP id f25csp66191iby; Thu, 5 Apr 2012 08:40:33 -0700 (PDT) Received: by 10.50.149.131 with SMTP id ua3mr5409315igb.41.1333640433358; Thu, 05 Apr 2012 08:40:33 -0700 (PDT) Received: from mail-ob0-f178.google.com (mail-ob0-f178.google.com [209.85.214.178]) by mx.google.com with ESMTPS id te7si2733574obc.18.2012.04.05.08.40.33 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 05 Apr 2012 08:40:33 -0700 (PDT) Received-SPF: pass (google.com: domain of robdclark@gmail.com designates 209.85.214.178 as permitted sender) client-ip=209.85.214.178; Authentication-Results: mx.google.com; spf=pass (google.com: domain of robdclark@gmail.com designates 209.85.214.178 as permitted sender) smtp.mail=robdclark@gmail.com; dkim=pass header.i=@gmail.com Received: by obfk16 with SMTP id k16so2572815obf.37 for ; Thu, 05 Apr 2012 08:40:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer; bh=GdMZgQO4x7we9K8Q3EAEfYtGlpvljpg1UQ42/syyjBI=; b=wYLPLYQaBuRM+M1xmDr9d6AgbWFwt/jpnzBSfOxLtQlhTZZXqVdb/3lhFg4f+/RgCM /ApL7cu8ptHnO52kiO5gFGtwMFavsWUmacqhbUKSxoXMZ24sSN4XR0+zgaJmqBaNPUjP rKryyHg7ok6/VJuILEOI++nxM0/oJr9HkfoaGq5n8JOuRd6uC5GLUuLCCccDMYwx+eGx Y/y9zzv0tSvwTgvXpP9xXkI8QNsJGCCsT613LujRB2x0yv/+H9P2tmGMPX2LMC/573me 5GHD+ViNt6G16itCoGTnxgsSTefkYIRfRHbmihN4FFM2CthKE/mrLi3LuarlU2Al0oFH YkMA== Received: by 10.60.3.34 with SMTP id 2mr4526547oez.27.1333640107110; Thu, 05 Apr 2012 08:35:07 -0700 (PDT) Received: from localhost (dragon.ti.com. [192.94.94.33]) by mx.google.com with ESMTPS id ch5sm4370735obb.16.2012.04.05.08.35.01 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 05 Apr 2012 08:35:02 -0700 (PDT) Sender: Rob Clark From: Rob Clark To: dri-devel@lists.freedesktop.org, linux-omap@vger.kernel.org Cc: patches@linaro.org, Greg KH , Tomi Valkeinen , Andy Gross , Rob Clark Subject: [PATCH] staging: drm/omap: move where DMM driver is registered Date: Thu, 5 Apr 2012 10:34:56 -0500 Message-Id: <1333640096-24142-1-git-send-email-rob.clark@linaro.org> X-Mailer: git-send-email 1.7.9.1 X-Gm-Message-State: ALoCoQlTAKjyqg+14mjSwR4seIVgqJa4Nehq/g7ongWndVxmiiJ/8kdttUn9x1YFVW+x3dB72Srt From: Rob Clark Not sure what triggered the change in behavior, but seems to result in recursively acquiring a mutex and hanging on boot. But omap_drm_init() seems a much more sane place to register the driver for the DMM sub-device. --- drivers/staging/omapdrm/omap_drv.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/staging/omapdrm/omap_drv.c b/drivers/staging/omapdrm/omap_drv.c index 3df5b4c..620b8d5 100644 --- a/drivers/staging/omapdrm/omap_drv.c +++ b/drivers/staging/omapdrm/omap_drv.c @@ -803,9 +803,6 @@ static void pdev_shutdown(struct platform_device *device) static int pdev_probe(struct platform_device *device) { DBG("%s", device->name); - if (platform_driver_register(&omap_dmm_driver)) - dev_err(&device->dev, "DMM registration failed\n"); - return drm_platform_init(&omap_drm_driver, device); } @@ -833,6 +830,10 @@ struct platform_driver pdev = { static int __init omap_drm_init(void) { DBG("init"); + if (platform_driver_register(&omap_dmm_driver)) { + /* we can continue on without DMM.. so not fatal */ + dev_err(NULL, "DMM registration failed\n"); + } return platform_driver_register(&pdev); }