linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org,
	Samuel Ortiz <sameo@linux.intel.com>,
	liu.y.victor@gmail.com, B02280@freescale.com,
	Sascha Hauer <s.hauer@pengutronix.de>
Subject: [PATCH 4/9] fb: export fb mode db table
Date: Mon, 20 Dec 2010 11:48:42 +0100	[thread overview]
Message-ID: <1292842127-21406-5-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1292842127-21406-1-git-send-email-s.hauer@pengutronix.de>

The different modes can be useful for drivers. Currently there is
no way to expose the modes to sysfs, so export them.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/video/modedb.c |    7 ++++++-
 include/linux/fb.h     |    3 +++
 2 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/drivers/video/modedb.c b/drivers/video/modedb.c
index 0a4dbdc..82122a9 100644
--- a/drivers/video/modedb.c
+++ b/drivers/video/modedb.c
@@ -36,7 +36,7 @@ EXPORT_SYMBOL_GPL(fb_mode_option);
      *  Standard video mode definitions (taken from XFree86)
      */
 
-static const struct fb_videomode modedb[] = {
+const struct fb_videomode modedb[] = {
     {
 	/* 640x400 @ 70 Hz, 31.5 kHz hsync */
 	NULL, 70, 640, 400, 39721, 40, 24, 39, 9, 96, 2,
@@ -277,6 +277,11 @@ static const struct fb_videomode modedb[] = {
     },
 };
 
+const struct fb_videomode *fb_modes = modedb;
+EXPORT_SYMBOL(fb_modes);
+const int num_fb_modes = ARRAY_SIZE(modedb);
+EXPORT_SYMBOL(num_fb_modes);
+
 #ifdef CONFIG_FB_MODE_HELPERS
 const struct fb_videomode vesa_modes[] = {
 	/* 0 640x350-85 VESA */
diff --git a/include/linux/fb.h b/include/linux/fb.h
index d1631d3..e006172 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -1151,6 +1151,9 @@ struct fb_videomode {
 extern const char *fb_mode_option;
 extern const struct fb_videomode vesa_modes[];
 
+extern const struct fb_videomode *fb_modes;
+extern const int num_fb_modes;
+
 struct fb_modelist {
 	struct list_head list;
 	struct fb_videomode mode;
-- 
1.7.2.3


  parent reply	other threads:[~2010-12-20 10:50 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-20 10:48 [PATCH v2] i.MX51 Framebuffer support Sascha Hauer
2010-12-20 10:48 ` [PATCH 1/9] ARM i.MX51: Add ipu clock support Sascha Hauer
2010-12-20 10:48 ` [PATCH 2/9] ARM i.MX51: rename IPU irqs Sascha Hauer
2010-12-20 10:48 ` [PATCH 3/9] Add a mfd IPUv3 driver Sascha Hauer
2011-01-03 15:42   ` Sascha Hauer
2011-01-07 12:08     ` Samuel Ortiz
2011-01-31  8:20       ` Sascha Hauer
2011-02-01 10:51   ` Samuel Ortiz
2011-02-01 10:59     ` Sascha Hauer
2011-02-01 11:44       ` Samuel Ortiz
2011-02-01 11:51         ` Russell King - ARM Linux
2011-02-01 12:07           ` Arnaud Patard
2011-02-01 12:51             ` Sascha Hauer
2011-02-01 16:47               ` Uwe Kleine-König
2011-02-01 14:03           ` Samuel Ortiz
2010-12-20 10:48 ` Sascha Hauer [this message]
2010-12-20 10:48 ` [PATCH 5/9] Add i.MX5 framebuffer driver Sascha Hauer
2010-12-20 10:48 ` [PATCH 6/9] ARM i.MX51: Add IPU device support Sascha Hauer
2010-12-20 10:48 ` [PATCH 7/9] ARM i.MX5: Allow to increase max zone order Sascha Hauer
2010-12-20 10:48 ` [PATCH 8/9] ARM i.MX5: increase dma consistent size for IPU support Sascha Hauer
2010-12-20 10:48 ` [PATCH 9/9] ARM i.MX51 babbage: Add framebuffer support Sascha Hauer
2010-12-20 12:35   ` arden jay
2010-12-22  7:56 ` [PATCH v2] i.MX51 Framebuffer support Arnaud Patard
2010-12-22 10:17   ` Peter Korsgaard
2010-12-23 20:45     ` Arnaud Patard
2011-01-05 13:04 ` Julien Boibessot
2011-01-06  9:42   ` Russell King - ARM Linux
2011-01-14  9:17     ` Julien Boibessot
2011-01-06 10:23   ` Sascha Hauer
  -- strict thread matches above, loose matches on Subject: below --
2010-12-09 13:47 [PATCH RFC] " Sascha Hauer
2010-12-09 13:47 ` [PATCH 4/9] fb: export fb mode db table Sascha Hauer
2011-01-06  7:26   ` Paul Mundt
2011-01-06 10:04     ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1292842127-21406-5-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=B02280@freescale.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liu.y.victor@gmail.com \
    --cc=sameo@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).