Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
2657929d
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
2657929d
编写于
9月 16, 2013
作者:
P
Patrik Jakobsson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/gma500: Add support for aux pci vdc device
Signed-off-by:
N
Patrik Jakobsson
<
patrik.r.jakobsson@gmail.com
>
上级
cf8efd3a
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
51 addition
and
2 deletion
+51
-2
drivers/gpu/drm/gma500/psb_drv.c
drivers/gpu/drm/gma500/psb_drv.c
+31
-1
drivers/gpu/drm/gma500/psb_drv.h
drivers/gpu/drm/gma500/psb_drv.h
+20
-1
未找到文件。
drivers/gpu/drm/gma500/psb_drv.c
浏览文件 @
2657929d
...
...
@@ -251,6 +251,12 @@ static int psb_driver_unload(struct drm_device *dev)
iounmap
(
dev_priv
->
sgx_reg
);
dev_priv
->
sgx_reg
=
NULL
;
}
if
(
dev_priv
->
aux_reg
)
{
iounmap
(
dev_priv
->
aux_reg
);
dev_priv
->
aux_reg
=
NULL
;
}
if
(
dev_priv
->
aux_pdev
)
pci_dev_put
(
dev_priv
->
aux_pdev
);
/* Destroy VBT data */
psb_intel_destroy_bios
(
dev
);
...
...
@@ -266,7 +272,7 @@ static int psb_driver_unload(struct drm_device *dev)
static
int
psb_driver_load
(
struct
drm_device
*
dev
,
unsigned
long
chipset
)
{
struct
drm_psb_private
*
dev_priv
;
unsigned
long
resource_start
;
unsigned
long
resource_start
,
resource_len
;
unsigned
long
irqflags
;
int
ret
=
-
ENOMEM
;
struct
drm_connector
*
connector
;
...
...
@@ -296,6 +302,30 @@ static int psb_driver_load(struct drm_device *dev, unsigned long chipset)
if
(
!
dev_priv
->
sgx_reg
)
goto
out_err
;
if
(
IS_MRST
(
dev
))
{
dev_priv
->
aux_pdev
=
pci_get_bus_and_slot
(
0
,
PCI_DEVFN
(
3
,
0
));
if
(
dev_priv
->
aux_pdev
)
{
resource_start
=
pci_resource_start
(
dev_priv
->
aux_pdev
,
PSB_AUX_RESOURCE
);
resource_len
=
pci_resource_len
(
dev_priv
->
aux_pdev
,
PSB_AUX_RESOURCE
);
dev_priv
->
aux_reg
=
ioremap_nocache
(
resource_start
,
resource_len
);
if
(
!
dev_priv
->
aux_reg
)
goto
out_err
;
DRM_DEBUG_KMS
(
"Found aux vdc"
);
}
else
{
/* Couldn't find the aux vdc so map to primary vdc */
dev_priv
->
aux_reg
=
dev_priv
->
vdc_reg
;
DRM_DEBUG_KMS
(
"Couldn't find aux pci device"
);
}
dev_priv
->
gmbus_reg
=
dev_priv
->
aux_reg
;
}
else
{
dev_priv
->
gmbus_reg
=
dev_priv
->
vdc_reg
;
}
psb_intel_opregion_setup
(
dev
);
ret
=
dev_priv
->
ops
->
chip_setup
(
dev
);
...
...
drivers/gpu/drm/gma500/psb_drv.h
浏览文件 @
2657929d
...
...
@@ -75,6 +75,7 @@ enum {
* PCI resource identifiers
*/
#define PSB_MMIO_RESOURCE 0
#define PSB_AUX_RESOURCE 0
#define PSB_GATT_RESOURCE 2
#define PSB_GTT_RESOURCE 3
/*
...
...
@@ -455,6 +456,7 @@ struct psb_ops;
struct
drm_psb_private
{
struct
drm_device
*
dev
;
struct
pci_dev
*
aux_pdev
;
/* Currently only used by mrst */
const
struct
psb_ops
*
ops
;
const
struct
psb_offset
*
regmap
;
...
...
@@ -486,6 +488,7 @@ struct drm_psb_private {
uint8_t
__iomem
*
sgx_reg
;
uint8_t
__iomem
*
vdc_reg
;
uint8_t
__iomem
*
aux_reg
;
/* Auxillary vdc pipe regs */
uint32_t
gatt_free_offset
;
/*
...
...
@@ -532,6 +535,7 @@ struct drm_psb_private {
/* gmbus */
struct
intel_gmbus
*
gmbus
;
uint8_t
__iomem
*
gmbus_reg
;
/* Used by SDVO */
int
crt_ddc_pin
;
...
...
@@ -928,16 +932,31 @@ static inline uint32_t REGISTER_READ(struct drm_device *dev, uint32_t reg)
return
ioread32
(
dev_priv
->
vdc_reg
+
reg
);
}
static
inline
uint32_t
REGISTER_READ_AUX
(
struct
drm_device
*
dev
,
uint32_t
reg
)
{
struct
drm_psb_private
*
dev_priv
=
dev
->
dev_private
;
return
ioread32
(
dev_priv
->
aux_reg
+
reg
);
}
#define REG_READ(reg) REGISTER_READ(dev, (reg))
#define REG_READ_AUX(reg) REGISTER_READ_AUX(dev, (reg))
static
inline
void
REGISTER_WRITE
(
struct
drm_device
*
dev
,
uint32_t
reg
,
uint32_t
val
)
uint32_t
val
)
{
struct
drm_psb_private
*
dev_priv
=
dev
->
dev_private
;
iowrite32
((
val
),
dev_priv
->
vdc_reg
+
(
reg
));
}
static
inline
void
REGISTER_WRITE_AUX
(
struct
drm_device
*
dev
,
uint32_t
reg
,
uint32_t
val
)
{
struct
drm_psb_private
*
dev_priv
=
dev
->
dev_private
;
iowrite32
((
val
),
dev_priv
->
aux_reg
+
(
reg
));
}
#define REG_WRITE(reg, val) REGISTER_WRITE(dev, (reg), (val))
#define REG_WRITE_AUX(reg, val) REGISTER_WRITE_AUX(dev, (reg), (val))
static
inline
void
REGISTER_WRITE16
(
struct
drm_device
*
dev
,
uint32_t
reg
,
uint32_t
val
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录