* [PATCH 2/4] radeonfb: add new module parameter to force PLL calculation
@ 2007-09-04 10:59 aherrman
2007-09-04 13:46 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 4+ messages in thread
From: aherrman @ 2007-09-04 10:59 UTC (permalink / raw)
To: benh, linux-fbdev-devel, linux-kernel
On my Acer Aspire 5100 (with 0x5975) I need to force PLL caclulation.
Most probably the BIOS dividers are incorrect/insufficient. Without pll
calculation console goes blank.
Signed-off-by: Andreas Herrmann <aherrman@arcor.de>
---
drivers/video/aty/radeon_base.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c
index 90a3957..f672c0c 100644
--- a/drivers/video/aty/radeon_base.c
+++ b/drivers/video/aty/radeon_base.c
@@ -268,6 +268,7 @@ static int mirror = 0;
static int panel_yres = 0;
static int force_dfp = 0;
static int force_measure_pll = 0;
+static int force_pll_calc = 0;
#ifdef CONFIG_MTRR
static int nomtrr = 0;
#endif
@@ -1590,7 +1591,7 @@ static int radeonfb_set_par(struct fb_info *info)
pixClock = 100000000 / rinfo->panel_info.clock;
- if (rinfo->panel_info.use_bios_dividers) {
+ if (rinfo->panel_info.use_bios_dividers && !force_pll_calc) {
nopllcalc = 1;
newmode->ppll_div_3 = rinfo->panel_info.fbk_divider |
(rinfo->panel_info.post_divider << 16);
@@ -2495,6 +2496,8 @@ static int __init radeonfb_setup (char *options)
nomodeset = 1;
} else if (!strncmp(this_opt, "force_measure_pll", 17)) {
force_measure_pll = 1;
+ } else if (!strncmp(this_opt, "force_pll_calc", 17)) {
+ force_pll_calc = 1;
} else if (!strncmp(this_opt, "ignore_edid", 11)) {
ignore_edid = 1;
#if defined(CONFIG_PM) && defined(CONFIG_X86)
@@ -2550,6 +2553,8 @@ module_param(monitor_layout, charp, 0);
MODULE_PARM_DESC(monitor_layout, "Specify monitor mapping (like XFree86)");
module_param(force_measure_pll, bool, 0);
MODULE_PARM_DESC(force_measure_pll, "Force measurement of PLL (debug)");
+module_param(force_pll_calc, bool, 0400);
+MODULE_PARM_DESC(force_pll_calc, "Force calculation of PLL");
#ifdef CONFIG_MTRR
module_param(nomtrr, bool, 0);
MODULE_PARM_DESC(nomtrr, "bool: disable use of MTRR registers");
--
1.5.3
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2/4] radeonfb: add new module parameter to force PLL calculation
2007-09-04 10:59 [PATCH 2/4] radeonfb: add new module parameter to force PLL calculation aherrman
@ 2007-09-04 13:46 ` Benjamin Herrenschmidt
2007-09-10 22:20 ` aherrman
0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2007-09-04 13:46 UTC (permalink / raw)
To: aherrman; +Cc: linux-fbdev-devel, linux-kernel
On Tue, 2007-09-04 at 12:59 +0200, aherrman@arcor.de wrote:
> On my Acer Aspire 5100 (with 0x5975) I need to force PLL caclulation.
> Most probably the BIOS dividers are incorrect/insufficient. Without pll
> calculation console goes blank.
>
> Signed-off-by: Andreas Herrmann <aherrman@arcor.de>
I don't like those tunables. First we should get a look at what values
we obtain from the BIOS. Could be something with the parsing of ATOM
BIOS. In any case, we might be able to detect we got wrong values or use
subsystem vendor/device ID to blacklist.
Ben.
> ---
> drivers/video/aty/radeon_base.c | 7 ++++++-
> 1 files changed, 6 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c
> index 90a3957..f672c0c 100644
> --- a/drivers/video/aty/radeon_base.c
> +++ b/drivers/video/aty/radeon_base.c
> @@ -268,6 +268,7 @@ static int mirror = 0;
> static int panel_yres = 0;
> static int force_dfp = 0;
> static int force_measure_pll = 0;
> +static int force_pll_calc = 0;
> #ifdef CONFIG_MTRR
> static int nomtrr = 0;
> #endif
> @@ -1590,7 +1591,7 @@ static int radeonfb_set_par(struct fb_info *info)
>
> pixClock = 100000000 / rinfo->panel_info.clock;
>
> - if (rinfo->panel_info.use_bios_dividers) {
> + if (rinfo->panel_info.use_bios_dividers && !force_pll_calc) {
> nopllcalc = 1;
> newmode->ppll_div_3 = rinfo->panel_info.fbk_divider |
> (rinfo->panel_info.post_divider << 16);
> @@ -2495,6 +2496,8 @@ static int __init radeonfb_setup (char *options)
> nomodeset = 1;
> } else if (!strncmp(this_opt, "force_measure_pll", 17)) {
> force_measure_pll = 1;
> + } else if (!strncmp(this_opt, "force_pll_calc", 17)) {
> + force_pll_calc = 1;
> } else if (!strncmp(this_opt, "ignore_edid", 11)) {
> ignore_edid = 1;
> #if defined(CONFIG_PM) && defined(CONFIG_X86)
> @@ -2550,6 +2553,8 @@ module_param(monitor_layout, charp, 0);
> MODULE_PARM_DESC(monitor_layout, "Specify monitor mapping (like XFree86)");
> module_param(force_measure_pll, bool, 0);
> MODULE_PARM_DESC(force_measure_pll, "Force measurement of PLL (debug)");
> +module_param(force_pll_calc, bool, 0400);
> +MODULE_PARM_DESC(force_pll_calc, "Force calculation of PLL");
> #ifdef CONFIG_MTRR
> module_param(nomtrr, bool, 0);
> MODULE_PARM_DESC(nomtrr, "bool: disable use of MTRR registers");
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/4] radeonfb: add new module parameter to force PLL calculation
2007-09-04 13:46 ` Benjamin Herrenschmidt
@ 2007-09-10 22:20 ` aherrman
2007-09-11 0:45 ` aherrman
0 siblings, 1 reply; 4+ messages in thread
From: aherrman @ 2007-09-10 22:20 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linux-fbdev-devel, linux-kernel
On Tue, Sep 04, 2007 at 03:46:29PM +0200, Benjamin Herrenschmidt wrote:
> I don't like those tunables. First we should get a look at what values
> we obtain from the BIOS. Could be something with the parsing of ATOM
> BIOS. In any case, we might be able to detect we got wrong values or use
> subsystem vendor/device ID to blacklist.
So what should I looking for?
Here is the diff of the radeonfb kernel messages between
(-)nopllcalc and (+)forcing pll calculation with my patch:
vSync_width: 4
clock: 7350
Setting up default mode based on panel info
-hStart = 672, hEnd = 712, hTotal = 824
-vStart = 404, vEnd = 408, vTotal = 437
-h_total_disp = 0x4f0066 hsync_strt_wid = 0x5029a
-v_total_disp = 0x18f01b4 vsync_strt_wid = 0x40193
+hStart = 1312, hEnd = 1352, hTotal = 1464
+vStart = 804, vEnd = 808, vTotal = 837
+h_total_disp = 0x9f00b6 hsync_strt_wid = 0x5051a
+v_total_disp = 0x31f0344 vsync_strt_wid = 0x40323
pixclock = 13605
freq = 7350
-Console: switching to colour frame buffer device 80x25
+freq = 7350, PLL min = 20000, PLL max = 40000
+ref_div = 6, ref_clk = 1432, output_freq = 29400
+ref_div = 6, ref_clk = 1432, output_freq = 29400
+post div = 0x2
+fb_div = 0x7b
+ppll_div_3 = 0x2007b
+Console: switching to colour frame buffer device 160x50
radeonfb (0000:01:05.0): ATI Radeon 5975 "Yu"
radeonfb_pci_register END
"nopllcalc" results in a console 80x25 but forcing pll calculation gives
the expected result.
BTW, I am a little surprised that the display doesn't blank without
my patch as it used to in the past ...
Oops, PCI ID 0x5975 was already added with commit
b5f2f4d1a6d7efde39cfb5e1d034981c69f2214c
I guess I have to repeat some testing with both the older commit and my patch(es)
to sort out what is really needed to support my RS482/0x5975.
Regards,
Andreas
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/4] radeonfb: add new module parameter to force PLL calculation
2007-09-10 22:20 ` aherrman
@ 2007-09-11 0:45 ` aherrman
0 siblings, 0 replies; 4+ messages in thread
From: aherrman @ 2007-09-11 0:45 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linux-fbdev-devel
On Tue, Sep 11, 2007 at 12:20:12AM +0200, aherrman@arcor.de wrote:
> On Tue, Sep 04, 2007 at 03:46:29PM +0200, Benjamin Herrenschmidt wrote:
> > I don't like those tunables. First we should get a look at what values
> > we obtain from the BIOS. Could be something with the parsing of ATOM
> > BIOS. In any case, we might be able to detect we got wrong values or use
> > subsystem vendor/device ID to blacklist.
<snip>
> "nopllcalc" results in a console 80x25 but forcing pll calculation gives
> the expected result.
>
> BTW, I am a little surprised that the display doesn't blank without
> my patch as it used to in the past ...
>
> Oops, PCI ID 0x5975 was already added with commit
> b5f2f4d1a6d7efde39cfb5e1d034981c69f2214c
>
> I guess I have to repeat some testing with both the older commit and my patch(es)
> to sort out what is really needed to support my RS482/0x5975.
Done that.
And meanwhile I found out that force_measure_pll gives the same results
like the new force_pll_calc knob. Hence that new tunable is really not needed.
By blacklisting you meant to add a workaround to reinit the card if subsystem vendor/devID
matches my combination of Acer Aspire+Radeon, right? Then I wouldn't have to add the
force_measure_pll option on boot to get the optimal resolution ...
Do we need a second Acer Aspire system that's not correctly working to justify
a blacklisting?
Well, and how should the reinit function look like?
Thanks and Regards,
Andreas
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-09-11 0:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-04 10:59 [PATCH 2/4] radeonfb: add new module parameter to force PLL calculation aherrman
2007-09-04 13:46 ` Benjamin Herrenschmidt
2007-09-10 22:20 ` aherrman
2007-09-11 0:45 ` aherrman
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).