[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#439846: framebuffer script badly interprets modedb boot parameter



tags 439846 + patch
thanks

A patch for /usr/share/initramfs-tools/scripts/init-top/framebuffer
from initramfs-tools 0.92f, which is the current unstable, is
attached.

-- 
Best regards,
Tomas "trosos" Tintera


On 2007-08-27 23:05 +0200, trosos wrote:
> Package: initramfs-tools
> Version: 0.85h
> 
> The init-top/framebuffer script should use "mode_option" (according
> to the documentation) as a fb module parameter for setting the video
> mode, instead of "mode".
> 
> The Linux documentation uses "mode_option" argument:
> 
>  $ zcat /usr/share/doc/linux-doc-2.6.18/Documentation/fb/modedb.txt.gz
>  ...
>  Valid mode specifiers (mode_option argument):
>  
>      <xres>x<yres>[M][R][-<bpp>][@<refresh>][i][m]
>      <name>[-<bpp>][@<refresh>]
>  ...
> 
> But the framebuffer script uses "mode" argument:
> 
>  $ cat /usr/share/initramfs-tools/scripts/init-top/framebuffer
>  ...
>  # When the options are used with modules, they need to be space-separated
>  ...
>  #       <modevalue>   -> mode=<modevalue>
>  ...
> 
> As a consequence, if I specify eg. "video=aty128fb:1024x768-16" as
> a kernel boot parameter, the framebuffer script uses a "mode" module
> parameter (instead of "mode_option"), which will not be understood by
> the module.
> 
> I tried aty128fb and nvidiafb modules, and both accept "video_mode"
> option, and don't accept "mode" option. With other fb modules I would
> expect similar behavior.
> 
> One can use "video=foofb:mode_option=1024x768..." as a workaround,
> but the documented behavior will not work.
> 
> If no fb driver uses the "mode" parameter, I suggest to change the
> init-top/framebuffer script in order to use the "mode_option"
> parameter.
> 
> ---
> 
> $ uname -r
> 2.6.18

--- framebuffer	2008-06-04 17:21:35.000000000 +0200
+++ framebuffer.new	2008-08-18 16:27:45.000000000 +0200
@@ -21,14 +21,15 @@
 # 1) options are comma-separated
 # 2) options can be in either of these three forms:
 #    <arg>=<value>, <arg>:<value>, <boolean-arg>.
-# 3) the "mode" option has the form <xres>x<yres>[M][R][-<bpp>][@<refresh>][i][m]
-#    and may or may not start with "mode="
+# 3) the "mode_option" option has the form
+#    <xres>x<yres>[M][R][-<bpp>][@<refresh>][i][m]
+#    and may or may not start with "mode_option="
 #
 # When the options are used with modules, they need to be space-separated
 # and the following conversions are needed:
 #	<arg>:<value> -> <arg>=<value>
 #	<boolean-arg> -> <boolean-arg>=1
-#	<modevalue>   -> mode=<modevalue>
+#	<modevalue>   -> mode_option=<modevalue>
 parse_video_opts()
 {
 	local OPTS="$1"
@@ -48,7 +49,7 @@
 			echo -n "${opt%:*}=${opt#*:} "
 		# Presumably a modevalue without the "mode=" prefix
 		elif [ "${opt}" != "${opt#[0-9]*x[0-9]}" ]; then
-			echo -n "mode=$opt "
+			echo -n "mode_option=$opt "
 		# Presumably a boolean
 		else
 			echo -n "${opt}=1 "

Reply to: