Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
7981bf7d
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看板
提交
7981bf7d
编写于
8月 08, 2006
作者:
T
Thomas Hellstrom
提交者:
Dave Airlie
9月 22, 2006
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm: SiS 315 Awareness.
Add support for the SiS 315 to the DRM. Signed-off-by:
N
Dave Airlie
<
airlied@linux.ie
>
上级
8d153f71
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
84 addition
and
1 deletion
+84
-1
drivers/char/drm/drm_pciids.h
drivers/char/drm/drm_pciids.h
+1
-0
drivers/char/drm/sis_drv.c
drivers/char/drm/sis_drv.c
+1
-0
drivers/char/drm/sis_drv.h
drivers/char/drm/sis_drv.h
+11
-1
drivers/char/drm/sis_mm.c
drivers/char/drm/sis_mm.c
+71
-0
未找到文件。
drivers/char/drm/drm_pciids.h
浏览文件 @
7981bf7d
...
...
@@ -209,6 +209,7 @@
{0x1039, 0x0300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
{0x1039, 0x5300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
{0x1039, 0x6300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
{0x1039, 0x6330, PCI_ANY_ID, PCI_ANY_ID, 0, 0, SIS_CHIP_315}, \
{0x1039, 0x7300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
{0, 0, 0}
...
...
drivers/char/drm/sis_drv.c
浏览文件 @
7981bf7d
...
...
@@ -69,6 +69,7 @@ static struct drm_driver driver = {
.
load
=
sis_driver_load
,
.
unload
=
sis_driver_unload
,
.
context_dtor
=
NULL
,
.
dma_quiescent
=
sis_idle
,
.
reclaim_buffers
=
NULL
,
.
reclaim_buffers_locked
=
sis_reclaim_buffers_locked
,
.
lastclose
=
sis_lastclose
,
...
...
drivers/char/drm/sis_drv.h
浏览文件 @
7981bf7d
...
...
@@ -34,13 +34,22 @@
#define DRIVER_AUTHOR "SIS, Tungsten Graphics"
#define DRIVER_NAME "sis"
#define DRIVER_DESC "SIS 300/630/540"
#define DRIVER_DATE "20060
529
"
#define DRIVER_DATE "20060
704
"
#define DRIVER_MAJOR 1
#define DRIVER_MINOR 2
#define DRIVER_PATCHLEVEL 1
enum
sis_family
{
SIS_OTHER
=
0
,
SIS_CHIP_315
=
1
,
};
#include "drm_sman.h"
#define SIS_BASE (dev_priv->mmio)
#define SIS_READ(reg) DRM_READ32(SIS_BASE, reg);
#define SIS_WRITE(reg, val) DRM_WRITE32(SIS_BASE, reg, val);
typedef
struct
drm_sis_private
{
drm_local_map_t
*
mmio
;
unsigned
int
idle_fault
;
...
...
@@ -52,6 +61,7 @@ typedef struct drm_sis_private {
unsigned
long
agp_offset
;
}
drm_sis_private_t
;
extern
int
sis_idle
(
drm_device_t
*
dev
);
extern
void
sis_reclaim_buffers_locked
(
drm_device_t
*
dev
,
struct
file
*
filp
);
extern
void
sis_lastclose
(
drm_device_t
*
dev
);
...
...
drivers/char/drm/sis_mm.c
浏览文件 @
7981bf7d
...
...
@@ -226,6 +226,76 @@ static int sis_ioctl_agp_alloc(DRM_IOCTL_ARGS)
return
sis_drm_alloc
(
dev
,
priv
,
data
,
AGP_TYPE
);
}
static
drm_local_map_t
*
sis_reg_init
(
drm_device_t
*
dev
)
{
drm_map_list_t
*
entry
;
drm_local_map_t
*
map
;
list_for_each_entry
(
entry
,
&
dev
->
maplist
->
head
,
head
)
{
map
=
entry
->
map
;
if
(
!
map
)
continue
;
if
(
map
->
type
==
_DRM_REGISTERS
)
{
return
map
;
}
}
return
NULL
;
}
int
sis_idle
(
drm_device_t
*
dev
)
{
drm_sis_private_t
*
dev_priv
=
dev
->
dev_private
;
uint32_t
idle_reg
;
unsigned
long
end
;
int
i
;
if
(
dev_priv
->
idle_fault
)
return
0
;
if
(
dev_priv
->
mmio
==
NULL
)
{
dev_priv
->
mmio
=
sis_reg_init
(
dev
);
if
(
dev_priv
->
mmio
==
NULL
)
{
DRM_ERROR
(
"Could not find register map.
\n
"
);
return
0
;
}
}
/*
* Implement a device switch here if needed
*/
if
(
dev_priv
->
chipset
!=
SIS_CHIP_315
)
return
0
;
/*
* Timeout after 3 seconds. We cannot use DRM_WAIT_ON here
* because its polling frequency is too low.
*/
end
=
jiffies
+
(
DRM_HZ
*
3
);
for
(
i
=
0
;
i
<
4
;
++
i
)
{
do
{
idle_reg
=
SIS_READ
(
0x85cc
);
}
while
(
!
time_after_eq
(
jiffies
,
end
)
&&
((
idle_reg
&
0x80000000
)
!=
0x80000000
));
}
if
(
time_after_eq
(
jiffies
,
end
))
{
DRM_ERROR
(
"Graphics engine idle timeout. "
"Disabling idle check
\n
"
);
dev_priv
->
idle_fault
=
TRUE
;
}
/*
* The caller never sees an error code. It gets trapped
* in libdrm.
*/
return
0
;
}
void
sis_lastclose
(
struct
drm_device
*
dev
)
{
drm_sis_private_t
*
dev_priv
=
dev
->
dev_private
;
...
...
@@ -237,6 +307,7 @@ void sis_lastclose(struct drm_device *dev)
drm_sman_cleanup
(
&
dev_priv
->
sman
);
dev_priv
->
vram_initialized
=
FALSE
;
dev_priv
->
agp_initialized
=
FALSE
;
dev_priv
->
mmio
=
NULL
;
mutex_unlock
(
&
dev
->
struct_mutex
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录