From patchwork Thu Dec 17 10:44:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 7871801 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 728A8BEEE5 for ; Thu, 17 Dec 2015 10:44:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 770242041F for ; Thu, 17 Dec 2015 10:44:28 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id D6E662041C for ; Thu, 17 Dec 2015 10:44:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 146C86E11D; Thu, 17 Dec 2015 02:44:26 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pa0-f43.google.com (mail-pa0-f43.google.com [209.85.220.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5CF276E11D for ; Thu, 17 Dec 2015 02:44:25 -0800 (PST) Received: by mail-pa0-f43.google.com with SMTP id wq6so40522073pac.1 for ; Thu, 17 Dec 2015 02:44:25 -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:in-reply-to:references; bh=7BN2N7KKhJtE9Rgl7/W1g88xF5kahsswH2rDDdAH54c=; b=dyDCWoEG5t1W/DZPgZMTDHGaMyoTTaKx815XyGquFIQ0WkDO9za6FeY1k9yBfIi02c CyXZWeGNjFmKncyIfPekEnrGepWStUYeHsccAznEIt8AYrsyAIOYyq784/mJji6+GVGz 4ZloxAYmrzYQ0Fu3YfkMbV2gUxClSP08bXNqiFXn3VGA8WDxIzx+CD1gHAJOsgv5mBkS PkiYbYiYruYRRFd2Gn7uKTWbVDokmarC/X7hI3hp0xYhT5F5FJeKUmk2YzxDKhFKwGl/ PklrYKafuiimrJE8kn0wNirCC8rpiECSvdy/0srLzndX8Iys5a6MH1sBeqO6Tp5T8yaM yhQg== X-Received: by 10.66.150.228 with SMTP id ul4mr71288880pab.15.1450349064974; Thu, 17 Dec 2015 02:44:24 -0800 (PST) Received: from sudip-pc.vectortproxy.org ([49.206.205.82]) by smtp.gmail.com with ESMTPSA id n26sm4379585pfb.39.2015.12.17.02.44.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 17 Dec 2015 02:44:24 -0800 (PST) From: Sudip Mukherjee To: David Airlie Subject: [PATCH v2 2/2] drm/vc4: use CONFIG_PM_SLEEP Date: Thu, 17 Dec 2015 16:14:14 +0530 Message-Id: <1450349054-1295-1-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1450348738-1178-1-git-send-email-sudipm.mukherjee@gmail.com> References: <1450348738-1178-1-git-send-email-sudipm.mukherjee@gmail.com> Cc: rjw@rjwysocki.net, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Sudip Mukherjee 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: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_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 If CONFIG_PM_SLEEP is not defined then the functions are defined as NULL. And as a result we are getting build failure with alpha allmodconfig with the error: drivers/gpu/drm/vc4/vc4_v3d.c: In function 'vc4_v3d_set_power': include/linux/stddef.h:7:14: error: called object is not a function or function pointer #define NULL ((void *)0) ^ include/linux/pm.h:776:30: note: in expansion of macro 'NULL' #define pm_generic_poweroff NULL ^ drivers/gpu/drm/vc4/vc4_v3d.c:157:10: note: in expansion of macro 'pm_generic_poweroff' return pm_generic_poweroff(&vc4->v3d->pdev->dev); ^ include/linux/stddef.h:7:14: error: called object is not a function or function pointer #define NULL ((void *)0) ^ include/linux/pm.h:764:28: note: in expansion of macro 'NULL' #define pm_generic_resume NULL ^ drivers/gpu/drm/vc4/vc4_v3d.c:159:10: note: in expansion of macro 'pm_generic_resume' return pm_generic_resume(&vc4->v3d->pdev->dev); ^ Fixes: d5b1a78a772f ("drm/vc4: Add support for drawing 3D frames.") Cc: Eric Anholt Signed-off-by: Sudip Mukherjee --- Previous patch discussion at https://lkml.org/lkml/2015/12/16/159 build log of next-20151216 at: https://travis-ci.org/sudipm-mukherjee/parport/jobs/97149763 build log of next-20151217 at: https://travis-ci.org/sudipm-mukherjee/parport/jobs/97388456 drivers/gpu/drm/vc4/vc4_v3d.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/vc4/vc4_v3d.c b/drivers/gpu/drm/vc4/vc4_v3d.c index fc81412..9bc62b4 100644 --- a/drivers/gpu/drm/vc4/vc4_v3d.c +++ b/drivers/gpu/drm/vc4/vc4_v3d.c @@ -153,10 +153,12 @@ int vc4_v3d_debugfs_ident(struct seq_file *m, void *unused) void vc4_v3d_set_power(struct vc4_dev *vc4, bool on) { +#ifdef CONFIG_PM_SLEEP if (on) pm_generic_poweroff(&vc4->v3d->pdev->dev); else pm_generic_resume(&vc4->v3d->pdev->dev); +#endif } static void vc4_v3d_init_hw(struct drm_device *dev)