From patchwork Fri Sep 30 12:20:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomeu Vizoso X-Patchwork-Id: 9358147 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 D97AC6077B for ; Fri, 30 Sep 2016 12:21:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CBC6629FB9 for ; Fri, 30 Sep 2016 12:21:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C018429F76; Fri, 30 Sep 2016 12:21:00 +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_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7CB7129F76 for ; Fri, 30 Sep 2016 12:21:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CF6FB6EA03; Fri, 30 Sep 2016 12:20:58 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id EEFFF6EA00; Fri, 30 Sep 2016 12:20:56 +0000 (UTC) Received: by mail-wm0-x243.google.com with SMTP id b184so3206112wma.3; Fri, 30 Sep 2016 05:20:56 -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; bh=+3HgHGeYSoSONPnDf8GKK2yd6US0W2C9yYkLLrtjhcE=; b=0mZ23Xa+PHjHWMRJs0UFNB1Mni0jdt9kyjV4tVJS1aeiAVNyz55z+B4+oUoxwuEuNL SGuWk/c5kvy49NDHPmjtP7iKvUGOb/NFmaWQyKfAnJU1bg2Y2dZK1tPX1VmskcnLeOCD h2tH6oWmsYImaYfygL0JI4TRIhNxE95G0il2q5C9Stg0G22i2M57DloInTzt5USV+aIe zY1ko4z5wB5EK+/8KU/sJXwly9rlz+0tG7GlPSux0wije/S9eFlU+SsnZd44xqtfpzhs siGaOi9HzovA6gzOssSVU5he9hxglCxEHy88f8g5Vy1SavpSjQNBN3aNnYLOT0gg1NAb 4K9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=+3HgHGeYSoSONPnDf8GKK2yd6US0W2C9yYkLLrtjhcE=; b=j38sLTbR8iQhvHXQXN383nkbom4lKBBOmIiAcLN+fbiuRI14/Zg4cc32zhnjOYHqbf lAuQ/u3bSa2M/UYHSDqCtagiTMvxKThK9qETOeEXto2hAoh9g5KqDeS9or4I+23QhP9E Oh6j69CGQYZgA3XW2fnrKPKhRkaIODgrTJdNFnWRjB/qaHWvoAJZXO020vIcuvYpkWad JKT2oGmA8T7vLx48GzT6vhr/mzqfTEXvwm9abZQz/uJEQihtIpViG16mmnIbmfUyE832 gRPa5LBSEhtE43qs3bFGTH9vSrM6JxDWsHrplqd06cO5zDclN9u5AeZYs6ZHh0gl1vRW GCNQ== X-Gm-Message-State: AA6/9Rk8W7oWuHBru5kMKG50ryZOMDY/OI3kjPpv0Tdxj9Oy5QlOuoW3NZcqeG8dHkO5vg== X-Received: by 10.28.107.22 with SMTP id g22mr3451146wmc.31.1475238055609; Fri, 30 Sep 2016 05:20:55 -0700 (PDT) Received: from cizrna.lan ([109.72.12.232]) by smtp.gmail.com with ESMTPSA id n28sm3931109wmi.2.2016.09.30.05.20.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Sep 2016 05:20:54 -0700 (PDT) From: Tomeu Vizoso To: linux-kernel@vger.kernel.org Subject: [PATCH v2] drm/i915: Fix build when !CONFIG_DEBUG_FS Date: Fri, 30 Sep 2016 14:20:30 +0200 Message-Id: <1475238030-3060-1-git-send-email-tomeu.vizoso@collabora.com> X-Mailer: git-send-email 2.7.4 Cc: Tomeu Vizoso , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Daniel Vetter 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-Virus-Scanned: ClamAV using ClamSMTP Add stub for intel_crtc_set_crc_source() and fix arguments of intel_display_crc_init(). Signed-off-by: Tomeu Vizoso Fixes: 21165bd933ac ("drm/i915/debugfs: Move out pipe CRC code") Fixes: 13fa0253d97a ("drm/i915: Use new CRC debugfs API") --- drivers/gpu/drm/i915/i915_drv.c | 2 +- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/intel_drv.h | 6 ++++++ drivers/gpu/drm/i915/intel_pipe_crc.c | 3 +-- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 31b2b6300d8d..9c1543240e27 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -847,7 +847,7 @@ static int i915_driver_init_early(struct drm_i915_private *dev_priv, intel_init_audio_hooks(dev_priv); i915_gem_load_init(&dev_priv->drm); - intel_display_crc_init(&dev_priv->drm); + intel_display_crc_init(dev_priv); intel_device_info_dump(dev_priv); diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 91ff3d735c45..d1195f4ffd29 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -3524,7 +3524,7 @@ static inline bool i915_gem_object_needs_bit17_swizzle(struct drm_i915_gem_objec int i915_debugfs_register(struct drm_i915_private *dev_priv); void i915_debugfs_unregister(struct drm_i915_private *dev_priv); int i915_debugfs_connector_add(struct drm_connector *connector); -void intel_display_crc_init(struct drm_device *dev); +void intel_display_crc_init(struct drm_i915_private *dev_priv); #else static inline int i915_debugfs_register(struct drm_i915_private *dev_priv) {return 0;} static inline void i915_debugfs_unregister(struct drm_i915_private *dev_priv) {} diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index c49a11ed70be..73bab745c855 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -1842,8 +1842,14 @@ void intel_color_load_luts(struct drm_crtc_state *crtc_state); /* intel_pipe_crc.c */ int intel_pipe_crc_create(struct drm_minor *minor); void intel_pipe_crc_cleanup(struct drm_minor *minor); +#ifdef CONFIG_DEBUG_FS int intel_crtc_set_crc_source(struct drm_crtc *crtc, const char *source_name, size_t *values_cnt); +#else +static inline int intel_crtc_set_crc_source(struct drm_crtc *crtc, + const char *source_name, + size_t *values_cnt) { return 0; } +#endif extern const struct file_operations i915_display_crc_ctl_fops; #endif /* __INTEL_DRV_H__ */ diff --git a/drivers/gpu/drm/i915/intel_pipe_crc.c b/drivers/gpu/drm/i915/intel_pipe_crc.c index a3f3f45645ac..1a51e174e9e5 100644 --- a/drivers/gpu/drm/i915/intel_pipe_crc.c +++ b/drivers/gpu/drm/i915/intel_pipe_crc.c @@ -915,9 +915,8 @@ const struct file_operations i915_display_crc_ctl_fops = { .write = display_crc_ctl_write }; -void intel_display_crc_init(struct drm_device *dev) +void intel_display_crc_init(struct drm_i915_private *dev_priv) { - struct drm_i915_private *dev_priv = dev->dev_private; enum pipe pipe; for_each_pipe(dev_priv, pipe) {