Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
c5a09c81
Commit
c5a09c81
authored
Aug 19, 2014
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/bios: add support for ccb 4.1
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
dae20439
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
7 deletions
+25
-7
drivers/gpu/drm/nouveau/core/include/subdev/bios/i2c.h
drivers/gpu/drm/nouveau/core/include/subdev/bios/i2c.h
+8
-5
drivers/gpu/drm/nouveau/core/subdev/bios/i2c.c
drivers/gpu/drm/nouveau/core/subdev/bios/i2c.c
+17
-2
No files found.
drivers/gpu/drm/nouveau/core/include/subdev/bios/i2c.h
View file @
c5a09c81
...
@@ -4,10 +4,13 @@
...
@@ -4,10 +4,13 @@
struct
nouveau_bios
;
struct
nouveau_bios
;
enum
dcb_i2c_type
{
enum
dcb_i2c_type
{
DCB_I2C_NV04_BIT
=
0
,
/* matches bios type field prior to ccb 4.1 */
DCB_I2C_NV4E_BIT
=
4
,
DCB_I2C_NV04_BIT
=
0x00
,
DCB_I2C_NVIO_BIT
=
5
,
DCB_I2C_NV4E_BIT
=
0x04
,
DCB_I2C_NVIO_AUX
=
6
,
DCB_I2C_NVIO_BIT
=
0x05
,
DCB_I2C_NVIO_AUX
=
0x06
,
/* made up - mostly */
DCB_I2C_PMGR
=
0x80
,
DCB_I2C_UNUSED
=
0xff
DCB_I2C_UNUSED
=
0xff
};
};
...
...
drivers/gpu/drm/nouveau/core/subdev/bios/i2c.c
View file @
c5a09c81
...
@@ -39,7 +39,7 @@ dcb_i2c_table(struct nouveau_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len)
...
@@ -39,7 +39,7 @@ dcb_i2c_table(struct nouveau_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len)
i2c
=
nv_ro16
(
bios
,
dcb
+
4
);
i2c
=
nv_ro16
(
bios
,
dcb
+
4
);
}
}
if
(
i2c
&&
*
ver
>=
0x4
1
)
{
if
(
i2c
&&
*
ver
>=
0x4
2
)
{
nv_warn
(
bios
,
"ccb %02x not supported
\n
"
,
*
ver
);
nv_warn
(
bios
,
"ccb %02x not supported
\n
"
,
*
ver
);
return
0x0000
;
return
0x0000
;
}
}
...
@@ -75,6 +75,12 @@ dcb_i2c_parse(struct nouveau_bios *bios, u8 idx, struct dcb_i2c_entry *info)
...
@@ -75,6 +75,12 @@ dcb_i2c_parse(struct nouveau_bios *bios, u8 idx, struct dcb_i2c_entry *info)
u8
ver
,
len
;
u8
ver
,
len
;
u16
ent
=
dcb_i2c_entry
(
bios
,
idx
,
&
ver
,
&
len
);
u16
ent
=
dcb_i2c_entry
(
bios
,
idx
,
&
ver
,
&
len
);
if
(
ent
)
{
if
(
ent
)
{
if
(
ver
>=
0x41
)
{
if
(
!
(
nv_ro32
(
bios
,
ent
)
&
0x80000000
))
info
->
type
=
DCB_I2C_UNUSED
;
else
info
->
type
=
DCB_I2C_PMGR
;
}
else
if
(
ver
>=
0x30
)
{
if
(
ver
>=
0x30
)
{
info
->
type
=
nv_ro08
(
bios
,
ent
+
0x03
);
info
->
type
=
nv_ro08
(
bios
,
ent
+
0x03
);
}
else
{
}
else
{
...
@@ -106,6 +112,15 @@ dcb_i2c_parse(struct nouveau_bios *bios, u8 idx, struct dcb_i2c_entry *info)
...
@@ -106,6 +112,15 @@ dcb_i2c_parse(struct nouveau_bios *bios, u8 idx, struct dcb_i2c_entry *info)
if
(
nv_ro08
(
bios
,
ent
+
1
)
&
0x01
)
if
(
nv_ro08
(
bios
,
ent
+
1
)
&
0x01
)
info
->
share
=
info
->
auxch
;
info
->
share
=
info
->
auxch
;
return
0
;
return
0
;
case
DCB_I2C_PMGR
:
info
->
drive
=
(
nv_ro16
(
bios
,
ent
+
0
)
&
0x01f
)
>>
0
;
if
(
info
->
drive
==
0x1f
)
info
->
drive
=
DCB_I2C_UNUSED
;
info
->
auxch
=
(
nv_ro16
(
bios
,
ent
+
0
)
&
0x3e0
)
>>
5
;
if
(
info
->
auxch
==
0x1f
)
info
->
auxch
=
DCB_I2C_UNUSED
;
info
->
share
=
info
->
auxch
;
return
0
;
case
DCB_I2C_UNUSED
:
case
DCB_I2C_UNUSED
:
return
0
;
return
0
;
default:
default:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment