From patchwork Mon Aug 18 20:43:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre Moreau X-Patchwork-Id: 4739841 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 19DBBC0338 for ; Tue, 19 Aug 2014 00:56:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 245A920123 for ; Tue, 19 Aug 2014 00:56:41 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 04C0E2013A for ; Tue, 19 Aug 2014 00:56:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3D7546E532; Mon, 18 Aug 2014 17:56:34 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from smtp1-g21.free.fr (smtp1-g21.free.fr [212.27.42.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 922C26E25D; Mon, 18 Aug 2014 13:43:32 -0700 (PDT) Received: from localhost.localdomain (unknown [80.110.26.244]) (Authenticated sender: pierre.morrow) by smtp1-g21.free.fr (Postfix) with ESMTPSA id ECE66940131; Mon, 18 Aug 2014 22:43:27 +0200 (CEST) From: Pierre Moreau To: nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Ben Skeggs Subject: [PATCH] drm: Display Nouveau boot options at launch Date: Mon, 18 Aug 2014 22:43:24 +0200 Message-Id: <1408394604-7611-1-git-send-email-pierre.morrow@free.fr> X-Mailer: git-send-email 2.0.4 X-Mailman-Approved-At: Mon, 18 Aug 2014 17:56:29 -0700 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=-4.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, 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 It can help to remove any ambiguity about which options were passed to Nouveau, especially in case the user had some options set in /etc/modprobe.d/*.conf that he forgot about, as they won't appear in a dmesg. Signed-off-by: Pierre Moreau --- drm/nouveau_chan.c | 2 +- drm/nouveau_chan.h | 2 ++ drm/nouveau_connector.c | 6 +++--- drm/nouveau_connector.h | 4 ++++ drm/nouveau_drm.c | 20 ++++++++++++++++++++ drm/nouveau_fbcon.c | 2 +- drm/nouveau_fbcon.h | 3 +++ drm/nouveau_sysfs.c | 2 +- drm/nouveau_sysfs.h | 2 ++ 9 files changed, 37 insertions(+), 6 deletions(-) diff --git a/drm/nouveau_chan.c b/drm/nouveau_chan.c index 99cd9e4..9a362dd 100644 --- a/drm/nouveau_chan.c +++ b/drm/nouveau_chan.c @@ -36,7 +36,7 @@ #include "nouveau_abi16.h" MODULE_PARM_DESC(vram_pushbuf, "Create DMA push buffers in VRAM"); -static int nouveau_vram_pushbuf; +int nouveau_vram_pushbuf; module_param_named(vram_pushbuf, nouveau_vram_pushbuf, int, 0400); int diff --git a/drm/nouveau_chan.h b/drm/nouveau_chan.h index 2016370..8309c24 100644 --- a/drm/nouveau_chan.h +++ b/drm/nouveau_chan.h @@ -47,4 +47,6 @@ int nouveau_channel_new(struct nouveau_drm *, struct nvif_device *, void nouveau_channel_del(struct nouveau_channel **); int nouveau_channel_idle(struct nouveau_channel *); +extern int nouveau_vram_pushbuf; + #endif diff --git a/drm/nouveau_connector.c b/drm/nouveau_connector.c index 1ec44c8..c8ac948 100644 --- a/drm/nouveau_connector.c +++ b/drm/nouveau_connector.c @@ -45,15 +45,15 @@ #include MODULE_PARM_DESC(tv_disable, "Disable TV-out detection"); -static int nouveau_tv_disable = 0; +int nouveau_tv_disable = 0; module_param_named(tv_disable, nouveau_tv_disable, int, 0400); MODULE_PARM_DESC(ignorelid, "Ignore ACPI lid status"); -static int nouveau_ignorelid = 0; +int nouveau_ignorelid = 0; module_param_named(ignorelid, nouveau_ignorelid, int, 0400); MODULE_PARM_DESC(duallink, "Allow dual-link TMDS (default: enabled)"); -static int nouveau_duallink = 1; +int nouveau_duallink = 1; module_param_named(duallink, nouveau_duallink, int, 0400); struct nouveau_encoder * diff --git a/drm/nouveau_connector.h b/drm/nouveau_connector.h index 68029d0..629a380 100644 --- a/drm/nouveau_connector.h +++ b/drm/nouveau_connector.h @@ -105,4 +105,8 @@ nouveau_crtc_connector_get(struct nouveau_crtc *nv_crtc) struct drm_connector * nouveau_connector_create(struct drm_device *, int index); +extern int nouveau_tv_disable; +extern int nouveau_ignorelid; +extern int nouveau_duallink; + #endif /* __NOUVEAU_CONNECTOR_H__ */ diff --git a/drm/nouveau_drm.c b/drm/nouveau_drm.c index 606cc6b..aaccb25 100644 --- a/drm/nouveau_drm.c +++ b/drm/nouveau_drm.c @@ -51,6 +51,7 @@ #include "nouveau_fence.h" #include "nouveau_debugfs.h" #include "nouveau_usif.h" +#include "nouveau_connector.h" MODULE_PARM_DESC(config, "option string to pass to driver core"); static char *nouveau_config; @@ -1025,6 +1026,23 @@ static int nouveau_pmops_runtime_idle(struct device *dev) return 1; } +static void nouveau_display_options(void) +{ + DRM_DEBUG_DRIVER("Loading Nouveau with parameters:\n"); + + DRM_DEBUG_DRIVER("... tv_disable : %d\n", nouveau_tv_disable); + DRM_DEBUG_DRIVER("... ignorelid : %d\n", nouveau_ignorelid); + DRM_DEBUG_DRIVER("... duallink : %d\n", nouveau_duallink); + DRM_DEBUG_DRIVER("... nofbaccel : %d\n", nouveau_nofbaccel); + DRM_DEBUG_DRIVER("... config : %s\n", nouveau_config); + DRM_DEBUG_DRIVER("... debug : %s\n", nouveau_debug); + DRM_DEBUG_DRIVER("... noaccel : %d\n", nouveau_noaccel); + DRM_DEBUG_DRIVER("... modeset : %d\n", nouveau_modeset); + DRM_DEBUG_DRIVER("... runpm : %d\n", nouveau_runtime_pm); + DRM_DEBUG_DRIVER("... vram_pushbuf : %d\n", nouveau_vram_pushbuf); + DRM_DEBUG_DRIVER("... pstate : %d\n", nouveau_pstate); +} + static const struct dev_pm_ops nouveau_pm_ops = { .suspend = nouveau_pmops_suspend, .resume = nouveau_pmops_resume, @@ -1085,6 +1103,8 @@ EXPORT_SYMBOL(nouveau_platform_device_create_); static int __init nouveau_drm_init(void) { + nouveau_display_options(); + if (nouveau_modeset == -1) { #ifdef CONFIG_VGA_CONSOLE if (vgacon_text_force()) diff --git a/drm/nouveau_fbcon.c b/drm/nouveau_fbcon.c index 8bdd270..f0ae10c 100644 --- a/drm/nouveau_fbcon.c +++ b/drm/nouveau_fbcon.c @@ -52,7 +52,7 @@ #include "nouveau_crtc.h" MODULE_PARM_DESC(nofbaccel, "Disable fbcon acceleration"); -static int nouveau_nofbaccel = 0; +int nouveau_nofbaccel = 0; module_param_named(nofbaccel, nouveau_nofbaccel, int, 0400); static void diff --git a/drm/nouveau_fbcon.h b/drm/nouveau_fbcon.h index 34658cf..1e2e9e2 100644 --- a/drm/nouveau_fbcon.h +++ b/drm/nouveau_fbcon.h @@ -72,5 +72,8 @@ void nouveau_fbcon_accel_save_disable(struct drm_device *dev); void nouveau_fbcon_accel_restore(struct drm_device *dev); void nouveau_fbcon_output_poll_changed(struct drm_device *dev); + +extern int nouveau_nofbaccel; + #endif /* __NV50_FBCON_H__ */ diff --git a/drm/nouveau_sysfs.c b/drm/nouveau_sysfs.c index 3c6962d..8fbbf30 100644 --- a/drm/nouveau_sysfs.c +++ b/drm/nouveau_sysfs.c @@ -29,7 +29,7 @@ #include "nouveau_sysfs.h" MODULE_PARM_DESC(pstate, "enable sysfs pstate file, which will be moved in the future"); -static int nouveau_pstate; +int nouveau_pstate; module_param_named(pstate, nouveau_pstate, int, 0400); static inline struct drm_device * diff --git a/drm/nouveau_sysfs.h b/drm/nouveau_sysfs.h index f973378..4e5ea92 100644 --- a/drm/nouveau_sysfs.h +++ b/drm/nouveau_sysfs.h @@ -16,4 +16,6 @@ nouveau_sysfs(struct drm_device *dev) int nouveau_sysfs_init(struct drm_device *); void nouveau_sysfs_fini(struct drm_device *); +extern int nouveau_pstate; + #endif