Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
a78f6787
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
a78f6787
编写于
8月 25, 2011
作者:
M
Michael Witten
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
DocBook/drm: Eradicate inappropriate uses of the future tense
Signed-off-by:
N
Michael Witten
<
mfwitten@gmail.com
>
上级
caca9510
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
25 addition
and
25 deletion
+25
-25
Documentation/DocBook/drm.tmpl
Documentation/DocBook/drm.tmpl
+25
-25
未找到文件。
Documentation/DocBook/drm.tmpl
浏览文件 @
a78f6787
...
@@ -57,10 +57,10 @@
...
@@ -57,10 +57,10 @@
existing drivers.
existing drivers.
</para>
</para>
<para>
<para>
First, we
'll
go over some typical driver initialization
First, we go over some typical driver initialization
requirements, like setting up command buffers, creating an
requirements, like setting up command buffers, creating an
initial output configuration, and initializing core services.
initial output configuration, and initializing core services.
Subsequent sections
will
cover core internals in more detail,
Subsequent sections cover core internals in more detail,
providing implementation notes and examples.
providing implementation notes and examples.
</para>
</para>
<para>
<para>
...
@@ -74,7 +74,7 @@
...
@@ -74,7 +74,7 @@
</para>
</para>
<para>
<para>
The core of every DRM driver is struct drm_driver. Drivers
The core of every DRM driver is struct drm_driver. Drivers
will
typically statically initialize a drm_driver structure,
typically statically initialize a drm_driver structure,
then pass it to drm_init() at load time.
then pass it to drm_init() at load time.
</para>
</para>
...
@@ -155,7 +155,7 @@
...
@@ -155,7 +155,7 @@
<para>
<para>
In the example above, taken from the i915 DRM driver, the driver
In the example above, taken from the i915 DRM driver, the driver
sets several flags indicating what core features it supports.
sets several flags indicating what core features it supports.
We
'll
go over the individual callbacks in later sections. Since
We go over the individual callbacks in later sections. Since
flags indicate which features your driver supports to the DRM
flags indicate which features your driver supports to the DRM
core, you need to set most of them prior to calling drm_init(). Some,
core, you need to set most of them prior to calling drm_init(). Some,
like DRIVER_MODESET can be set later based on user supplied parameters,
like DRIVER_MODESET can be set later based on user supplied parameters,
...
@@ -238,7 +238,7 @@
...
@@ -238,7 +238,7 @@
</variablelist>
</variablelist>
<para>
<para>
In this specific case, the driver requires AGP and supports
In this specific case, the driver requires AGP and supports
IRQs. DMA, as
we'll see
, is handled by device specific ioctls
IRQs. DMA, as
discussed later
, is handled by device specific ioctls
in this case. It also supports the kernel mode setting APIs, though
in this case. It also supports the kernel mode setting APIs, though
unlike in the actual i915 driver source, this example unconditionally
unlike in the actual i915 driver source, this example unconditionally
exports KMS capability.
exports KMS capability.
...
@@ -315,7 +315,7 @@
...
@@ -315,7 +315,7 @@
<sect2>
<sect2>
<title>
Configuring the device
</title>
<title>
Configuring the device
</title>
<para>
<para>
Obviously, device configuration
will be
device specific.
Obviously, device configuration
is
device specific.
However, there are several common operations: finding a
However, there are several common operations: finding a
device's PCI resources, mapping them, and potentially setting
device's PCI resources, mapping them, and potentially setting
up an IRQ handler.
up an IRQ handler.
...
@@ -326,7 +326,7 @@
...
@@ -326,7 +326,7 @@
drm_get_resource_len() can be used to find BARs on the given
drm_get_resource_len() can be used to find BARs on the given
drm_device struct. Once those values have been retrieved, the
drm_device struct. Once those values have been retrieved, the
driver load function can call drm_addmap() to create a new
driver load function can call drm_addmap() to create a new
mapping for the BAR in question. Note you
'll
probably want a
mapping for the BAR in question. Note you probably want a
drm_local_map_t in your driver private structure to track any
drm_local_map_t in your driver private structure to track any
mappings you create.
mappings you create.
<!-- !Fdrivers/gpu/drm/drm_bufs.c drm_get_resource_* -->
<!-- !Fdrivers/gpu/drm/drm_bufs.c drm_get_resource_* -->
...
@@ -357,7 +357,7 @@
...
@@ -357,7 +357,7 @@
</para>
</para>
<!--!Fdrivers/char/drm/drm_irq.c drm_irq_install-->
<!--!Fdrivers/char/drm/drm_irq.c drm_irq_install-->
<para>
<para>
Once your interrupt handler is registered (it
'll use
your
Once your interrupt handler is registered (it
uses
your
drm_driver.irq_handler as the actual interrupt handling
drm_driver.irq_handler as the actual interrupt handling
function), you can safely enable interrupts on your device,
function), you can safely enable interrupts on your device,
assuming any other state your interrupt handler uses is also
assuming any other state your interrupt handler uses is also
...
@@ -389,7 +389,7 @@
...
@@ -389,7 +389,7 @@
should support a memory manager.
should support a memory manager.
</para>
</para>
<para>
<para>
If your driver supports memory management (it should!), you
'll
If your driver supports memory management (it should!), you
need to set that up at load time as well. How you initialize
need to set that up at load time as well. How you initialize
it depends on which memory manager you're using, TTM or GEM.
it depends on which memory manager you're using, TTM or GEM.
</para>
</para>
...
@@ -430,13 +430,13 @@
...
@@ -430,13 +430,13 @@
have a type of TTM_GLOBAL_TTM_MEM. The size field for the global
have a type of TTM_GLOBAL_TTM_MEM. The size field for the global
object should be sizeof(struct ttm_mem_global), and the init and
object should be sizeof(struct ttm_mem_global), and the init and
release hooks should point at your driver specific init and
release hooks should point at your driver specific init and
release routines, which
will
probably eventually call
release routines, which probably eventually call
ttm_mem_global_init and ttm_mem_global_release respectively.
ttm_mem_global_init and ttm_mem_global_release respectively.
</para>
</para>
<para>
<para>
Once your global TTM accounting structure is set up and initialized
Once your global TTM accounting structure is set up and initialized
(done by calling ttm_global_item_ref on the global object you
(done by calling ttm_global_item_ref on the global object you
just created), you
'll
need to create a buffer object TTM to
just created), you need to create a buffer object TTM to
provide a pool for buffer object allocation by clients and the
provide a pool for buffer object allocation by clients and the
kernel itself. The type of this object should be TTM_GLOBAL_TTM_BO,
kernel itself. The type of this object should be TTM_GLOBAL_TTM_BO,
and its size should be sizeof(struct ttm_bo_global). Again,
and its size should be sizeof(struct ttm_bo_global). Again,
...
@@ -455,8 +455,8 @@
...
@@ -455,8 +455,8 @@
than TTM, but has no VRAM management capability. Core GEM
than TTM, but has no VRAM management capability. Core GEM
initialization is comprised of a basic drm_mm_init call to create
initialization is comprised of a basic drm_mm_init call to create
a GTT DRM MM object, which provides an address space pool for
a GTT DRM MM object, which provides an address space pool for
object allocation. In a KMS configuration, the driver
will
object allocation. In a KMS configuration, the driver
need to allocate and initialize a command ring buffer following
need
s
to allocate and initialize a command ring buffer following
basic GEM initialization. Most UMA devices have a so-called
basic GEM initialization. Most UMA devices have a so-called
"stolen" memory region, which provides space for the initial
"stolen" memory region, which provides space for the initial
framebuffer and large, contiguous memory regions required by the
framebuffer and large, contiguous memory regions required by the
...
@@ -464,16 +464,16 @@
...
@@ -464,16 +464,16 @@
be initialized separately into its own DRM MM object.
be initialized separately into its own DRM MM object.
</para>
</para>
<para>
<para>
Initialization
will be driver specific, and will depend
on
Initialization
is driver specific, and depends
on
the architecture of the device. In the case of Intel
the architecture of the device. In the case of Intel
integrated graphics chips like 965GM, GEM initialization can
integrated graphics chips like 965GM, GEM initialization can
be done by calling the internal GEM init function,
be done by calling the internal GEM init function,
i915_gem_do_init(). Since the 965GM is a UMA device
i915_gem_do_init(). Since the 965GM is a UMA device
(i.e. it doesn't have dedicated VRAM), GEM
will manage
(i.e. it doesn't have dedicated VRAM), GEM
manages
making regular RAM available for GPU operations. Memory set
making regular RAM available for GPU operations. Memory set
aside by the BIOS (called "stolen" memory by the i915
aside by the BIOS (called "stolen" memory by the i915
driver)
will be
managed by the DRM memrange allocator; the
driver)
is
managed by the DRM memrange allocator; the
rest of the aperture
will be
managed by GEM.
rest of the aperture
is
managed by GEM.
<programlisting>
<programlisting>
/* Basic memrange allocator for stolen space (aka vram) */
/* Basic memrange allocator for stolen space (aka vram) */
drm_memrange_init(
&
dev_priv->vram, 0, prealloc_size);
drm_memrange_init(
&
dev_priv->vram, 0, prealloc_size);
...
@@ -616,7 +616,7 @@ void intel_crt_init(struct drm_device *dev)
...
@@ -616,7 +616,7 @@ void intel_crt_init(struct drm_device *dev)
<para>
<para>
DRM_IOCTL_MODESET_CTL should be called by application level
DRM_IOCTL_MODESET_CTL should be called by application level
drivers before and after mode setting, since on many devices the
drivers before and after mode setting, since on many devices the
vertical blank counter
will be
reset at that time. Internally,
vertical blank counter
is
reset at that time. Internally,
the DRM snapshots the last vblank count when the ioctl is called
the DRM snapshots the last vblank count when the ioctl is called
with the _DRM_PRE_MODESET command so that the counter won't go
with the _DRM_PRE_MODESET command so that the counter won't go
backwards (which is dealt with when _DRM_POST_MODESET is used).
backwards (which is dealt with when _DRM_POST_MODESET is used).
...
@@ -632,8 +632,8 @@ void intel_crt_init(struct drm_device *dev)
...
@@ -632,8 +632,8 @@ void intel_crt_init(struct drm_device *dev)
register. The enable and disable vblank callbacks should enable
register. The enable and disable vblank callbacks should enable
and disable vertical blank interrupts, respectively. In the
and disable vertical blank interrupts, respectively. In the
absence of DRM clients waiting on vblank events, the core DRM
absence of DRM clients waiting on vblank events, the core DRM
code
will use
the disable_vblank() function to disable
code
uses
the disable_vblank() function to disable
interrupts, which saves power. They
'll b
e re-enabled again when
interrupts, which saves power. They
ar
e re-enabled again when
a client calls the vblank wait ioctl above.
a client calls the vblank wait ioctl above.
</para>
</para>
<para>
<para>
...
@@ -699,14 +699,14 @@ void intel_crt_init(struct drm_device *dev)
...
@@ -699,14 +699,14 @@ void intel_crt_init(struct drm_device *dev)
performs any necessary flushing or synchronization to put the object
performs any necessary flushing or synchronization to put the object
into the desired coherency domain (note that the object may be busy,
into the desired coherency domain (note that the object may be busy,
i.e. an active render target; in that case the set domain function
i.e. an active render target; in that case the set domain function
will block the client and wait
for rendering to complete before
blocks the client and waits
for rendering to complete before
performing any necessary flushing operations).
performing any necessary flushing operations).
</para>
</para>
<para>
<para>
Perhaps the most important GEM function is providing a command
Perhaps the most important GEM function is providing a command
execution interface to clients. Client programs construct command
execution interface to clients. Client programs construct command
buffers containing references to previously allocated memory objects
buffers containing references to previously allocated memory objects
and submit them to GEM. At that point, GEM
will take
care to bind
and submit them to GEM. At that point, GEM
takes
care to bind
all the objects into the GTT, execute the buffer, and provide
all the objects into the GTT, execute the buffer, and provide
necessary synchronization between clients accessing the same buffers.
necessary synchronization between clients accessing the same buffers.
This often involves evicting some objects from the GTT and re-binding
This often involves evicting some objects from the GTT and re-binding
...
@@ -767,7 +767,7 @@ void intel_crt_init(struct drm_device *dev)
...
@@ -767,7 +767,7 @@ void intel_crt_init(struct drm_device *dev)
<para>
<para>
In order to set a mode on a given CRTC, encoder and connector
In order to set a mode on a given CRTC, encoder and connector
configuration, clients need to provide a framebuffer object which
configuration, clients need to provide a framebuffer object which
will provide
a source of pixels for the CRTC to deliver to the encoder(s)
provides
a source of pixels for the CRTC to deliver to the encoder(s)
and ultimately the connector(s) in the configuration. A framebuffer
and ultimately the connector(s) in the configuration. A framebuffer
is fundamentally a driver specific memory object, made into an opaque
is fundamentally a driver specific memory object, made into an opaque
handle by the DRM addfb function. Once an fb has been created this
handle by the DRM addfb function. Once an fb has been created this
...
@@ -789,7 +789,7 @@ void intel_crt_init(struct drm_device *dev)
...
@@ -789,7 +789,7 @@ void intel_crt_init(struct drm_device *dev)
<para>
<para>
The DRM core provides some suspend/resume code, but drivers
The DRM core provides some suspend/resume code, but drivers
wanting full suspend/resume support should provide save() and
wanting full suspend/resume support should provide save() and
restore() functions. These
will b
e called at suspend,
restore() functions. These
ar
e called at suspend,
hibernate, or resume time, and should perform any state save or
hibernate, or resume time, and should perform any state save or
restore required by your device across suspend or hibernate
restore required by your device across suspend or hibernate
states.
states.
...
@@ -823,7 +823,7 @@ void intel_crt_init(struct drm_device *dev)
...
@@ -823,7 +823,7 @@ void intel_crt_init(struct drm_device *dev)
</para>
</para>
<para>
<para>
Cover generic ioctls and sysfs layout here. Only need high
Cover generic ioctls and sysfs layout here. Only need high
level info, since man pages
will
cover the rest.
level info, since man pages
should
cover the rest.
</para>
</para>
</chapter>
</chapter>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录