LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 2154|回复: 5

轻松校对NVIDIA说明文件,编号015!!![12月20日更新](重新置顶)

[复制链接]
发表于 2002-12-20 20:21:14 | 显示全部楼层 |阅读模式
翻译原文:
http://www.linuxsir.cn/forum.php?mod=viewthread&tid=4642

已经校对过的
编号001-014:
http://www.linuxsir.cn/forum.php?mod=viewthread&tid=5738
http://www.linuxsir.cn/forum.php?mod=viewthread&tid=6466
http://www.linuxsir.cn/forum.php?mod=viewthread&tid=6526
http://www.linuxsir.cn/forum.php?mod=viewthread&tid=6842
http://www.linuxsir.cn/forum.php?mod=viewthread&tid=6973
http://www.linuxsir.cn/forum.php?mod=viewthread&tid=7451
http://www.linuxsir.cn/forum.php?mod=viewthread&tid=8154
http://www.linuxsir.cn/forum.php?mod=viewthread&tid=8214
http://www.linuxsir.cn/forum.php?mod=viewthread&tid=8615
http://www.linuxsir.cn/forum.php?mod=viewthread&tid=9380
http://www.linuxsir.cn/forum.php?mod=viewthread&tid=10873
http://www.linuxsir.cn/forum.php?mod=viewthread&tid=11740
http://www.linuxsir.cn/forum.php?mod=viewthread&tid=12309
http://www.linuxsir.cn/forum.php?mod=viewthread&tid=13464
有新意见的朋友还可以继续跟贴,谢谢





今天开始翻译校对编号015,希望大家热情参与:

******************************



__________________________________________________________________________

(app-l) APPENDIX L: PROGRAMMING MODES
__________________________________________________________________________

The NVIDIA Accelerated Linux Driver Set supports all standard VGA and VESA
modes, as well as most user-written custom mode lines; double-scan modes
are supported on all hardware, and interlaced modes are supported on:
GeForce 256, GeForce DDR, Quadro, GeForce2 GTS/GeForce2 Pro, GeForce2 Ti,
GeForce2 Ultra, Quadro2 Pro, and all TNT products.

In general, your display device (monitor/flat panel/television) will be
a greater constraint on what modes you can use than either your NVIDIA
GPU-based video board or the NVIDIA Accelerated Linux Driver Set.

To request one or more standard modes for use in X, you can simply add a
"Modes" line such as:

Modes "1600x1200" "1024x768" "640x480"

in the appropriate Display subsection of your XF86Config file (please see
the XF86Config(4/5) man page for details). The following documentation
is primarily of interest if you compose your own custom mode lines,
experiment with xvidtune(1), or are just interested in learning more.
Please note that this is neither an explanation nor a guide to the fine
art of crafting custom mode lines for XFree86. We leave that, rather,
to documents such as the XFree86 Video Timings HOWTO (which can be found
at www.linuxdoc.org).


DEPTH, BITS PER PIXEL, AND PITCH

While not directly a concern when programming modes, the bits used per
pixel is an issue when considering the maximum programmable resolution;
for this reason, it is worthwhile to address the confusion surrounding
the terms "depth" and "bits per pixel". Depth is how many bits of
data are stored per pixel. Supported depths are 8, 15, 16, and 24.
Most video hardware, however, stores pixel data in sizes of 8, 16, or
32 bits; this is the amount of memory allocated per pixel. When you
specify your depth, X selects the bits per pixel (bpp) size in which to
store the data. Below is a table of what bpp is used for each possible
depth:

depth bpp
===== =====
8 8
15 16
16 16
24 32

Lastly, the "pitch" is how many bytes in the linear frame buffer there are
between one pixel's data, and the data of the pixel immediately below.
You can think of this as the horizontal resolution multiplied by the
bytes per pixel (bits per pixel divided by 8). In practice, the pitch may
be more than this product because video hardware often has requirements
that the pitch be a multiple of some value.


MAXIMUM RESOLUTIONS

The NVIDIA Accelerated Linux Driver Set and NVIDIA GPU-based video boards
support resolutions up to 2048x1536, though the maximum resolution
your system can support is also limited by the amount of video memory
(see USEFUL FORMULAS for details) and the maximum supported resolution
of your display device (monitor/flat panel/television). Also note that
while use of a video overlay does not limit the maximum resolution or
refresh rate, video memory bandwidth used by a programmed mode does
effect the overlay quality.


USEFUL FORMULAS

The maximum resolution is a function both of the amount of video memory
and the bits per pixel you elect to use:

HR * VR * (bpp/8) = Video Memory Used

In other words, the amount of video memory used is equal to the horizontal
resolution (HR) multiplied by the vertical resolution (VR) multiplied by
the bytes per pixel (bits per pixel divided by eight). Technically, the
video memory used is actually the pitch times the vertical resolution,
and the pitch may be slightly greater than (HR * (bpp/8)) to accommodate
hardware requirements that the pitch be a multiple of some value.

Please note that this is just memory usage for the frame buffer; video
memory is also used by other things such as OpenGL or pixmap caching.

Another important relationship is that between the resolution, the pixel
clock (aka dot clock) and the vertical refresh rate:

RR = PCLK / (HFL * VFL)

In other words, the refresh rate (RR) is equal to the pixel clock (PCLK)
divided by the total number of pixels: the horizontal frame length (HFL)
multiplied by the vertical frame length (VFL) (note that these are the
frame lengths, and not just the visible resolutions). As described in
the XFree86 Video Timings HOWTO, the above formula can be rewritten as:

PCLK = RR * HFL * VFL

Given a maximum pixel clock, you can adjust the RR, HFL and VFL as
desired, as long as the product of the three is consistent. The pixel
clock is reported in the log file when you run X with verbose logging:
`startx -- -logverbose 5`. Your XFree86.0.log should contain several
lines like:

(--) NVIDIA(0): Display Device 0: maximum pixel clock at 8 bpp: 350 MHz
(--) NVIDIA(0): Display Device 0: maximum pixel clock at 16 bpp: 350 MHz
(--) NVIDIA(0): Display Device 0: maximum pixel clock at 32 bpp: 300 MHz

which indicate the maximum pixel clock at each bit per pixel size.


HOW MODES ARE VALIDATED

During the PreInit phase of the X server, the NVIDIA X driver validates
all requested modes by doing the following:

o Take the intersection of the HorizSync and VertRefresh ranges given
by the user in the XF86Config with the ranges reported by the monitor
in the EDID (Extended Display Identification Data); this behavior
can be disabled by using the "IgnoreEDID" option in which case the
X driver will blindly accept the HorizSync and VertRefresh ranges
given by the user.

o Call the xf86ValidateModes() helper function, which finds modes with
the names the user specified in the XF86Config file, pruning
out modes with invalid horizontal sync frequencies or vertical
refresh rates, pixel clocks larger than the maximum pixel clock
for the video card, or resolutions larger than the virtual
screen size (if a virtual screen size was specified in the
XF86Config file). Several other constraints are applied; see
xc/programs/Xserver/hw/xfree86/common/xf86Mode.c:xf86ValidateModes().

o All modes returned from xf86ValidateModes() are then examined to make
sure their resolutions are not larger than the largest mode reported
by the monitor's EDID (this can be disabled with the "IgnoreEDID"
option. If the display is a TV, each mode is checked to make sure
it has a resolution that is supported by the TV encoder (usually
only 800x600 and 640x480 are supported by the encoder).

o All remaining modes are then checked to make sure they pass the
constraints described below in ADDITIONAL MODE CONSTRAINTS.

The last two steps are also done when each mode is programmed, to
catch potentially invalid modes submitted by the XF86VidModeExtension
(eg xvidtune(1)). For TwinView, the above validation is done for the
modes requested for each display device.


ADDITIONAL MODE CONSTRAINTS

Below is a list of additional constraints on a mode's parameters that
must be met.

o The horizontal resolution (HR) must be a multiple of 4 and be less
than or equal to 2048.
o The horizontal blanking width (the maximum of the horizontal frame
length and the horizontal sync end minus the minimum of the horizontal
resolution and the horizontal sync start (max(HFL,HSE) - min(HR,HSS))
must be a multiple of 4 and be less than or equal to 1024.
o The horizontal sync start (HSS) must be a multiple of 4 and be less
than or equal to 4088.
o The horizontal sync width (the horizontal sync end minus the
horizontal sync start (HSE - HSS)) must be a multiple of 4 and be
less than or equal to 256.
o The horizontal frame length (HFL) must be a multiple of 4 and be
less than or equal to 4128 and be greater than or equal to 40.
o The vertical resolution (VR) must be less than or equal to 2048.
o The vertical blanking width (the maximum of the vertical frame length
and the vertical sync end minus the minimum of the vertical resolution
and the vertical sync start (max(VFL,VSE) - min(VR,VSS)) must be
less than or equal to 128.
o The vertical sync start (VSS) must be less than or equal to 2047.
o The vertical sync width (the vertical sync end minus the vertical sync
start (VSE - VSS)) must be less than or equal to 16.
o The vertical frame length (VFL) must be less than or equal to 2049
and be greater than or equal to 2.

Here is an example mode line demonstrating the use of each abbreviation
used above:

# Custom Mode line for the SGI 1600SW Flatpanel
# name PCLK HR HSS HSE HFL VR VSS VSE VFL

Modeline "sgi1600x1024" 106.9 1600 1632 1656 1672 1024 1027 1030 1067

SEE ALSO:

An XFree86 modeline generator, conforming to the GTF Standard has
been posted to the XFree86 Xpert mailing list:

http://www.xfree86.org/pipermail/xp...ber/012070.html

For additional modeline generators, try searching for "modeline"
on freshmeat.net.
 楼主| 发表于 2003-5-31 20:58:24 | 显示全部楼层
曾经搁浅了半年的翻译计划,今天干脆重新置顶吧,希望这次能完成!
发表于 2003-5-31 21:04:37 | 显示全部楼层
应该可以很快完成了吧,这里的E文高手N多的,期待中
发表于 2003-6-3 15:03:42 | 显示全部楼层

.

翻译完毕.


由于涉及专业技术术语,相信有不少错误.恳请批评指正.
仅供参考,如有疑问以英文版本为准.
__________________________________________________________________________

(应用-l)附录 L: 设计显示模式
__________________________________________________________________________

NVIDIA 的linux驱动程序集支持所有标准的VGA和VESA模式, 和绝大多数的自定义模式;所有的硬件都支持逐行扫描模式, 包括隔行扫描模式:

GeForce 256, GeForce DDR, Quadro, GeForce2 GTS/GeForce2 Pro, GeForce2 Ti,
GeForce2 Ultra, Quadro2 Pro, and all TNT products.

通常,对显示模式的限制很大程度上取决于你的显示设备 (监视器/液晶屏/电视) ,而不是NVIDIA显卡或NIVIDA的linux驱动程序集。

如果要为 X 设置一种或多种标准显示模式, 你可以简单地在 XF86Config 文件的Display subsection中添加一行"Modes"(细节请看XF86Config(4/5)手册页).
例如:

Modes  "1600 x1200" "1024 x768" "640 x480"

如果你希望用自定义显示模式,做xvidtune(1)实验, 或想学更多东西,下列各项将是你最关心的内容.请注意: 这既不是对XFree86自定义模式行的解释也不是其艺术指南.详细情况见XFree86 Video Timings HOWTO(在www.linuxdoc.org上可以找到).


DEPTH(色深), BITS PER PIXEL(每像素使用的位数bpp), 和 PITCH(点距)

设计显示模式不是一个直观的东西(不是东西),而采用bpp来衡量最大分辨率;因此,需要界定术语 "depth" 和 "bpp". depth是指每一 像素存储多少位数据.支援的depth是 8, 15, 16,和 24.然而,多数视频硬件储存 像素数据的大小为 8,16,或32; 这是指每一 像素分配的内存(显存)总数. 当你指定depth后, X 则采用每 像素位数 (bpp)的大小来储存数据. 下列是depth和 bpp对照表:


  1. depth  bpp
  2. ===== =====
  3. 8      8
  4. 15     16
  5. 16     16
  6. 24     32
复制代码


最后, "pitch" 是指在线性帧缓冲中,两个相邻像素的数据之间有多少字节.
你可以把它相象为水平分辨率 乘以 每像素的字节数(bpp 除以 8). 事实上, pitch值可能比实际值大,因为通常要求视频硬件的pitch值是某个数值的倍数.


最大的分辨率

NVIDIA 的Linux驱动程序集和 基于NVIDIA GPU(图形处理器)的视频卡支持高达
2048 x 1536的分辨率,然而,你的系统能支持的最大分辨率还受限于显存大小(细节见实用公式)和显示器(监视器/液晶屏/电视)能够支持的最大分辨率. 并请注意,使用视频层叠不限制最大分辨率或刷新率,设计的显示模式所使用的显存带宽会影响层叠质量.


USERFUL FORMULAS(实用公式)

最大分辨率是显存总数和选用的bpp这两个家伙的函数:

HR * VR * (bpp/8) = 使用的显存

换句话说,使用的显存数量相等水平分辨率(HR) 乘以 垂直分辨率(VR) 再乘以 每像素字节数(bbp 除以 8). 从技术上讲,使用的显存实际上是pitch乘以垂直分辨率,而pitch可能比(HR * (bpp/8)) 略大些以便于符合pitch是某个数值的倍数的硬件要求.

这只是帧缓冲使用的内存;显存同时被其他程序使用,如OpenGL或pixmap缓存.

另外一个重要关系是分辨率,PCLK(像素时钟(aka 点的时钟(频率))) 和垂直刷新率(RR):

RR= PCLK/( HFL * VFL)

换句话说, 刷新率(RR)等于像素时钟pixel clock(PCLK)除以总像素: 水平帧长度(HFL) 乘以 垂直帧长度(VFL) ( 注:这些是帧长度, 而不只是视频分辨率). 如
XFree86 Video Timings HOWTO描述的, 上述公式可以写成下列形式:

PCLK = RR * HFL * VFL

给出一个最大的PCLK像素时钟(频率), 你可以随意调整 RR , HFL 和 VFL, 只要三个数的乘积不变.当你用提示记录方式运行X时, PCLK被记录在log文件中:
'startx -- -logverbose 5'.XFree86.0.log 应该包含一些类似下面的行:

(--) NVIDIA(0): Display Device 0: maximum pixel clock at 8 bpp: 350 MHz
(--) NVIDIA(0): Display Device 0: maximum pixel clock at 16 bpp: 350 MHz
(--) NVIDIA(0): Display Device 0: maximum pixel clock at 32 bpp: 300 MHz


这些行显示了不同大小bbp所对应的最大PCLK。


模式是如何验证的

在 X 服务器的 PreInit 阶段, NVIDIA X 驱动程序通过下列操作来验证请求的所有显示模式:

o 通过(1)用户在XF86Config中设置的 HorizSync(水平同步) 和 VertRefresh(垂直刷新) 和(2)从监视器EDID(扩展显示识别数据)获得的数值范围,得到(1)和(2)的交集;
可以通过使用 "IgnoreEDID" 选项来禁止, 这样的话 X 驱动将会盲目地接受 用户设置的HorizSync 和 VertRefresh 范围.

o 调用 xf86ValidateModes() helper函数, 找到用户在XF86Config文件中设置的显示模式,砍掉其中无效的模式:
无效的水平同步频率 或 垂直刷新率,比显卡最大PCLK高的PCLK, 或大于虚拟屏幕尺. 使用很多其他的(限制)规范;见
xc/programs/ Xserv/hw/xfree86/common/xf86Mode.c:xf86ValidateModes.()

o 接着检查所有从 xf86ValidateModes() 返回的模式, 确定他们的分辨率不会大于监视器EDID显示的最大的模式(可以通过使用 "IgnoreEDID" 选项来禁止).如果接电视的话,则检查每种模式,以确定有一种分辨率能够被电视编码器支持(通常编码器只有支持 800 x 600 和 640 x480).

o 接着检查所有剩下的模式,以确定符合下面ADDITIONAL MODE CONSTRAINTS中描述的规范.

当每个模式被规划的时候, 要做最后二个步骤,捕捉被 XF86VidModeExtension 提出的可能无效的模式(例如 xvidtune(1)). 对于 TwinView,要求的显示设备模式都要做上述验证.


ADDITIONAL MODE CONSTRAINTS(附加的模式规范)

下面是必须匹配的模式参数的附加规范列表.

o 水平分辨率 (HR) 必须是 4 倍数,并且小于等于 2048.
o 水平消隐宽度 (水平帧最大长度和水平同步结束 减 最小水平分辨率和水平同步开始 (max(HFL,HSE) - min(HR,HSS)) 必须是 4 的倍数,并且小于等于 1024.
o 水平同步开始 (HSS) 必须是 4 的倍数并且小于等于 4088.
o 水平同步宽度 (水平同步结束 减 水平同步开始( HSE - HSS)) 必须是 4 的倍数, 并且小于等于 256.
o 水平帧长度 (HFL) 必须是 4 的倍数,并且小于等于 4128, 而且大于等于 40.
o 垂直分辨率 (VR) 必须小于等于 2048.
o 垂直消隐宽度 (最大垂直帧长度和垂直同步结束 减 最小垂直分辨率和垂直同步开始  (max(VFL,VSE) - min(VR,VSS))必须小于等于 128.
o 垂直同步开始 (VSS) 必须小于等于 2047.
o 垂直同步宽度 ( 垂直同步结束 减 垂直同步开始 (VSE - VSS)) 必须小于等于16.
o 垂直帧长度 (VFL) 必须小于等于 2049, 而且大于等于 2.

这里是一个使用上面缩写的模式行范例:

# Custom Mode line for the SGI 1600SW Flatpanel
# name PCLK HR HSS HSE HFL VR VSS VSE VFL

Modeline "sgi1600x1024" 106.9 1600 1632 1656 1672 1024 1027 1030 1067

请参考:

一个遵循 GTF 标准的 XFree86 modeline 产生器, 已被寄到 XFree86 Xpert 邮寄名单:

http:// www.xfree86.org/pipermail/xp...ber/012070. html

更多的 modeline 产生器, 在 freshmeat.net 上搜索 "modeline" .

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
 楼主| 发表于 2003-6-3 21:55:17 | 显示全部楼层
感谢gzqhz兄,能不能贴出来?我来整理到上面供大家校对,附件我下载了打开显示有问题。
发表于 2003-6-3 23:28:13 | 显示全部楼层
这是用gedit处理的,所以会出现乱码的情况,要用gedit打开才行。

多谢gzqhz兄,辛苦了。。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表