From patchwork Wed Nov 12 17:05:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 5290991 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 A1F37C11AC for ; Wed, 12 Nov 2014 17:05:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BF635201F2 for ; Wed, 12 Nov 2014 17:05:27 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 94CAD201C8 for ; Wed, 12 Nov 2014 17:05:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B42AE6E223; Wed, 12 Nov 2014 09:05:25 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qg0-f41.google.com (mail-qg0-f41.google.com [209.85.192.41]) by gabe.freedesktop.org (Postfix) with ESMTP id 59B786E223 for ; Wed, 12 Nov 2014 09:05:24 -0800 (PST) Received: by mail-qg0-f41.google.com with SMTP id q107so9250519qgd.28 for ; Wed, 12 Nov 2014 09:05:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=CXQDXx7MowNHm3UAKpjhcJExhTEEQD+B37s7jmXjMSk=; b=dxxrveSAur8ZFwmucl6p33ctd1aq8oqh7N9ZehlpmppHj6P6WtciPn/Ih9DykujQrC V5D4/truGr/uJyhcydzpTcINk63FjuLDTfJt0t+qaoPGB3H+eXc1q+m58x8zmJZWi1t/ KO32HsjAm8ehJMNaVAFy+cPRb+uZW9t39/3OBNYy8OOcyMFY4AzCxzExX2MLNARNaKnH MBbuXd0F8J1l/tmC9oFwGSMkvMxkAKUkycmLp4jVXM6zx3l499tiDZ2OMB2dM9RPtNz8 NJRTx0fuSzlOCCiUmAA/j8d1XAx7/q7utosSEbC+NqFTVRIPkXtmg8GDSzpq1cfH4LcF nipg== X-Received: by 10.140.44.36 with SMTP id f33mr59013968qga.105.1415811923850; Wed, 12 Nov 2014 09:05:23 -0800 (PST) Received: from localhost ([2601:6:2c00:943:2677:3ff:fed3:ff40]) by mx.google.com with ESMTPSA id e6sm21485922qab.42.2014.11.12.09.05.22 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Nov 2014 09:05:23 -0800 (PST) From: Rob Clark To: dri-devel@lists.freedesktop.org Subject: [RFC] drm/msm: select REGULATOR Date: Wed, 12 Nov 2014 12:05:11 -0500 Message-Id: <1415811911-18646-1-git-send-email-robdclark@gmail.com> X-Mailer: git-send-email 1.9.3 MIME-Version: 1.0 Cc: Felipe Balbi X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 Fixes a potential error, spotted by Felipe with randconfig: ----- drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c: In function ‘mdp4_kms_init’: drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c:384:2: error: implicit declaration \ of function ‘devm_regulator_get_exclusive’ [-Werror=implicit-function-declaration] mdp4_kms->vdd = devm_regulator_get_exclusive(&pdev->dev, "vdd"); ^ drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c:384:16: error: assignment makes \ pointer from integer without a cast [-Werror] mdp4_kms->vdd = devm_regulator_get_exclusive(&pdev->dev, "vdd"); ^ ----- Also add a brief comment explaining the use of _get_exclusive() Reported-by: Felipe Balbi Signed-off-by: Rob Clark --- Was planning to include this for my 3.19 pull req, but wanted to check if anyone had any comments. I tried 'depends on REGULATOR' but that was massive circular dependency hell via fbdev stuff. drivers/gpu/drm/msm/Kconfig | 1 + drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/drivers/gpu/drm/msm/Kconfig b/drivers/gpu/drm/msm/Kconfig index 9d907c5..5b2a1ff 100644 --- a/drivers/gpu/drm/msm/Kconfig +++ b/drivers/gpu/drm/msm/Kconfig @@ -3,6 +3,7 @@ config DRM_MSM tristate "MSM DRM" depends on DRM depends on ARCH_QCOM || (ARM && COMPILE_TEST) + select REGULATOR select DRM_KMS_HELPER select DRM_PANEL select SHMEM diff --git a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c index 79d804e..ac20472 100644 --- a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c +++ b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c @@ -381,6 +381,10 @@ struct msm_kms *mdp4_kms_init(struct drm_device *dev) if (IS_ERR(mdp4_kms->dsi_pll_vddio)) mdp4_kms->dsi_pll_vddio = NULL; + /* NOTE: driver for this regulator still missing upstream.. use + * _get_exclusive() and ignore the error if it does not exist + * (and hope that the bootloader left it on for us) + */ mdp4_kms->vdd = devm_regulator_get_exclusive(&pdev->dev, "vdd"); if (IS_ERR(mdp4_kms->vdd)) mdp4_kms->vdd = NULL;