From patchwork Wed Feb 12 22:11:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jesse Barnes X-Patchwork-Id: 3641231 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 36D959F369 for ; Wed, 12 Feb 2014 22:19:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 48F5F20145 for ; Wed, 12 Feb 2014 22:19:12 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 429F820142 for ; Wed, 12 Feb 2014 22:19:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4C407FB04D; Wed, 12 Feb 2014 14:18:55 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 396 seconds by postgrey-1.32 at gabe; Wed, 12 Feb 2014 14:18:29 PST Received: from alt-proxy15.mail.unifiedlayer.com (alt-proxy15.mail.unifiedlayer.com [70.40.196.49]) by gabe.freedesktop.org (Postfix) with SMTP id 59A16FB04A for ; Wed, 12 Feb 2014 14:18:29 -0800 (PST) Received: (qmail 14748 invoked by uid 0); 12 Feb 2014 22:11:49 -0000 Received: from unknown (HELO box514.bluehost.com) (74.220.219.114) by oproxy4.mail.unifiedlayer.com with SMTP; 12 Feb 2014 22:11:49 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuousgeek.org; s=default; h=Content-Transfer-Encoding:Content-Type:Mime-Version:Message-ID:Subject:To:From:Date; bh=29S6BkiDXP5vp/tXF5uepSB9r/RsjM3ZCvxbXUCUp8w=; b=P9POEqRf+aNT4LtkK6E4H214TAky1qlC4jMj70rke/cT1b3adRchhfiPPxlsnc/+NNWq0FTrEws1KBcK2O5VjHhhGFsNS1ARQ2ehMu9GxPGt/mejjAJ7J0GPQEou8Mwc; Received: from [67.161.37.189] (port=37610 helo=jbarnes-desktop) by box514.bluehost.com with esmtpsa (UNKNOWN:CAMELLIA128-SHA:128) (Exim 4.80) (envelope-from ) id 1WDi21-0006kG-GI for dri-devel@lists.freedesktop.org; Wed, 12 Feb 2014 15:11:49 -0700 Date: Wed, 12 Feb 2014 14:11:51 -0800 From: Jesse Barnes To: dri-devel@lists.freedesktop.org Subject: Fw: [Intel-gfx] [PATCH 1/6] drm: export cmdline and preferred mode functions from fb helper Message-ID: <20140212141151.29f115c0@jbarnes-desktop> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 X-Identified-User: {10642:box514.bluehost.com:virtuous:virtuousgeek.org} {sentby:smtp auth 67.161.37.189 authed with jbarnes@virtuousgeek.org} X-Mailman-Approved-At: Wed, 12 Feb 2014 14:18:51 -0800 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham 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 Begin forwarded message: Date: Wed, 12 Feb 2014 12:26:24 -0800 From: Jesse Barnes To: intel-gfx@lists.freedesktop.org Subject: [Intel-gfx] [PATCH 1/6] drm: export cmdline and preferred mode functions from fb helper This allows drivers to use them in custom initial_config functions. Signed-off-by: Jesse Barnes --- drivers/gpu/drm/drm_fb_helper.c | 6 ++++-- include/drm/drm_fb_helper.h | 6 ++++++ 2 files changed, 10 insertions(+), 2 deletions(-) #endif diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index 98a0363..d99df15 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -1136,7 +1136,7 @@ static int drm_fb_helper_probe_connector_modes(struct drm_fb_helper *fb_helper, return count; } -static struct drm_display_mode *drm_has_preferred_mode(struct drm_fb_helper_connector *fb_connector, int width, int height) +struct drm_display_mode *drm_has_preferred_mode(struct drm_fb_helper_connector *fb_connector, int width, int height) { struct drm_display_mode *mode; @@ -1149,6 +1149,7 @@ static struct drm_display_mode *drm_has_preferred_mode(struct drm_fb_helper_conn } return NULL; } +EXPORT_SYMBOL(drm_has_preferred_mode); static bool drm_has_cmdline_mode(struct drm_fb_helper_connector *fb_connector) { @@ -1157,7 +1158,7 @@ static bool drm_has_cmdline_mode(struct drm_fb_helper_connector *fb_connector) return cmdline_mode->specified; } -static struct drm_display_mode *drm_pick_cmdline_mode(struct drm_fb_helper_connector *fb_helper_conn, +struct drm_display_mode *drm_pick_cmdline_mode(struct drm_fb_helper_connector *fb_helper_conn, int width, int height) { struct drm_cmdline_mode *cmdline_mode; @@ -1197,6 +1198,7 @@ create_mode: list_add(&mode->head, &fb_helper_conn->connector->modes); return mode; } +EXPORT_SYMBOL(drm_pick_cmdline_mode); static bool drm_connector_enabled(struct drm_connector *connector, bool strict) { diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h index 471f276..2d659dc 100644 --- a/include/drm/drm_fb_helper.h +++ b/include/drm/drm_fb_helper.h @@ -121,5 +121,11 @@ bool drm_fb_helper_initial_config(struct drm_fb_helper *fb_helper, int bpp_sel); int drm_fb_helper_single_add_all_connectors(struct drm_fb_helper *fb_helper); int drm_fb_helper_debug_enter(struct fb_info *info); int drm_fb_helper_debug_leave(struct fb_info *info); +struct drm_display_mode * +drm_has_preferred_mode(struct drm_fb_helper_connector *fb_connector, + int width, int height); +struct drm_display_mode * +drm_pick_cmdline_mode(struct drm_fb_helper_connector *fb_helper_conn, + int width, int height);