public inbox for linux-m68k@lists.linux-m68k.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>,
	linux-fbdev@vger.kernel.org
Cc: linux-m68k@vger.kernel.org, linux-kernel@vger.kernel.org,
	Geert Uytterhoeven <geert@linux-m68k.org>
Subject: [PATCH 6/8] fbdev/amifb: Store monitor limits in separate __initdata variables
Date: Mon, 21 Nov 2011 21:53:57 +0100	[thread overview]
Message-ID: <1321908839-11419-6-git-send-email-geert@linux-m68k.org> (raw)
In-Reply-To: <1321908839-11419-1-git-send-email-geert@linux-m68k.org>

The static fb_info will go away soon.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 drivers/video/amifb.c |   26 ++++++++++++++++++--------
 1 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/drivers/video/amifb.c b/drivers/video/amifb.c
index 421c1f9..13e7a17 100644
--- a/drivers/video/amifb.c
+++ b/drivers/video/amifb.c
@@ -961,6 +961,11 @@ static int round_down_bpp = 1;	/* for mode probing */
 static int amifb_ilbm = 0;	/* interleaved or normal bitplanes */
 static int amifb_inverse = 0;
 
+static u32 amifb_hfmin __initdata;	/* monitor hfreq lower limit (Hz) */
+static u32 amifb_hfmax __initdata;	/* monitor hfreq upper limit (Hz) */
+static u16 amifb_vfmin __initdata;	/* monitor vfreq lower limit (Hz) */
+static u16 amifb_vfmax __initdata;	/* monitor vfreq upper limit (Hz) */
+
 
 	/*
 	 * Macros for the conversion from real world values to hardware register
@@ -2357,10 +2362,10 @@ static void __init amifb_setup_mcap(char *spec)
 	if (hmax <= 0 || hmax <= hmin)
 		return;
 
-	fb_info.monspecs.vfmin = vmin;
-	fb_info.monspecs.vfmax = vmax;
-	fb_info.monspecs.hfmin = hmin;
-	fb_info.monspecs.hfmax = hmax;
+	amifb_hfmin = hmin;
+	amifb_hfmax = hmax;
+	amifb_vfmin = vmin;
+	amifb_vfmax = vmax;
 }
 
 static int __init amifb_setup(char *options)
@@ -3666,10 +3671,15 @@ default_chipset:
 		}
 	}
 
-	/*
-	 *  These monitor specs are for a typical Amiga monitor (e.g. A1960)
-	 */
-	if (fb_info.monspecs.hfmin == 0) {
+	if (amifb_hfmin) {
+		fb_info.monspecs.hfmin = amifb_hfmin;
+		fb_info.monspecs.hfmax = amifb_hfmax;
+		fb_info.monspecs.vfmin = amifb_vfmin;
+		fb_info.monspecs.vfmax = amifb_vfmax;
+	} else {
+		/*
+		 *  These are for a typical Amiga monitor (e.g. A1960)
+		 */
 		fb_info.monspecs.hfmin = 15000;
 		fb_info.monspecs.hfmax = 38000;
 		fb_info.monspecs.vfmin = 49;
-- 
1.7.0.4

  parent reply	other threads:[~2011-11-21 20:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-21 20:53 [PATCH 1/8] fbdev/amifb: Correct whitespace Geert Uytterhoeven
2011-11-21 20:53 ` [PATCH 2/8] fbdev/amifb: Fix double free Geert Uytterhoeven
2011-11-21 20:53 ` [PATCH 3/8] fbdev/amifb: Reorder functions to remove forward declarations Geert Uytterhoeven
2011-11-21 20:53 ` [PATCH 4/8] fbdev/amifb: Make amifb_setup() static Geert Uytterhoeven
2011-11-21 20:53 ` [PATCH 5/8] fbdev/amifb: Remove superfluous casts when assigning void * Geert Uytterhoeven
2011-11-21 20:53 ` Geert Uytterhoeven [this message]
2011-11-21 20:53 ` [PATCH 7/8] fbdev/amifb: Enable Copper DMA after setting up the Copper Geert Uytterhoeven
2011-11-21 20:53 ` [PATCH 8/8] fbdev/amifb: Use framebuffer_alloc() Geert Uytterhoeven
2011-12-04  0:35 ` [PATCH 1/8] fbdev/amifb: Correct whitespace Florian Tobias Schandinat

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=1321908839-11419-6-git-send-email-geert@linux-m68k.org \
    --to=geert@linux-m68k.org \
    --cc=FlorianSchandinat@gmx.de \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@vger.kernel.org \
    /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