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
Kirill Smelkov
linux
Commits
f2a40513
Commit
f2a40513
authored
Nov 04, 2016
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/disp/sor/gf119-: add method to control mst enable
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
1f8711ba
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
11 deletions
+43
-11
drivers/gpu/drm/nouveau/include/nvif/cl5070.h
drivers/gpu/drm/nouveau/include/nvif/cl5070.h
+7
-0
drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c
+12
-10
drivers/gpu/drm/nouveau/nvkm/engine/disp/outpdp.h
drivers/gpu/drm/nouveau/nvkm/engine/disp/outpdp.h
+1
-0
drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c
+20
-0
drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgf119.c
drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgf119.c
+3
-1
No files found.
drivers/gpu/drm/nouveau/include/nvif/cl5070.h
View file @
f2a40513
...
@@ -34,6 +34,7 @@ struct nv50_disp_mthd_v1 {
...
@@ -34,6 +34,7 @@ struct nv50_disp_mthd_v1 {
#define NV50_DISP_MTHD_V1_SOR_HDMI_PWR 0x22
#define NV50_DISP_MTHD_V1_SOR_HDMI_PWR 0x22
#define NV50_DISP_MTHD_V1_SOR_LVDS_SCRIPT 0x23
#define NV50_DISP_MTHD_V1_SOR_LVDS_SCRIPT 0x23
#define NV50_DISP_MTHD_V1_SOR_DP_PWR 0x24
#define NV50_DISP_MTHD_V1_SOR_DP_PWR 0x24
#define NV50_DISP_MTHD_V1_SOR_DP_MST_LINK 0x25
#define NV50_DISP_MTHD_V1_PIOR_PWR 0x30
#define NV50_DISP_MTHD_V1_PIOR_PWR 0x30
__u8
method
;
__u8
method
;
__u16
hasht
;
__u16
hasht
;
...
@@ -90,6 +91,12 @@ struct nv50_disp_sor_dp_pwr_v0 {
...
@@ -90,6 +91,12 @@ struct nv50_disp_sor_dp_pwr_v0 {
__u8
pad02
[
6
];
__u8
pad02
[
6
];
};
};
struct
nv50_disp_sor_dp_mst_link_v0
{
__u8
version
;
__u8
state
;
__u8
pad02
[
6
];
};
struct
nv50_disp_pior_pwr_v0
{
struct
nv50_disp_pior_pwr_v0
{
__u8
version
;
__u8
version
;
__u8
state
;
__u8
state
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c
View file @
f2a40513
...
@@ -203,6 +203,7 @@ gf119_disp_intr_unk2_0(struct nv50_disp *disp, int head)
...
@@ -203,6 +203,7 @@ gf119_disp_intr_unk2_0(struct nv50_disp *disp, int head)
/* see note in nv50_disp_intr_unk20_0() */
/* see note in nv50_disp_intr_unk20_0() */
if
(
outp
&&
outp
->
info
.
type
==
DCB_OUTPUT_DP
)
{
if
(
outp
&&
outp
->
info
.
type
==
DCB_OUTPUT_DP
)
{
struct
nvkm_output_dp
*
outpdp
=
nvkm_output_dp
(
outp
);
struct
nvkm_output_dp
*
outpdp
=
nvkm_output_dp
(
outp
);
if
(
!
outpdp
->
lt
.
mst
)
{
struct
nvbios_init
init
=
{
struct
nvbios_init
init
=
{
.
subdev
=
subdev
,
.
subdev
=
subdev
,
.
bios
=
subdev
->
device
->
bios
,
.
bios
=
subdev
->
device
->
bios
,
...
@@ -215,6 +216,7 @@ gf119_disp_intr_unk2_0(struct nv50_disp *disp, int head)
...
@@ -215,6 +216,7 @@ gf119_disp_intr_unk2_0(struct nv50_disp *disp, int head)
nvbios_exec
(
&
init
);
nvbios_exec
(
&
init
);
atomic_set
(
&
outpdp
->
lt
.
done
,
0
);
atomic_set
(
&
outpdp
->
lt
.
done
,
0
);
}
}
}
}
}
static
void
static
void
...
...
drivers/gpu/drm/nouveau/nvkm/engine/disp/outpdp.h
View file @
f2a40513
...
@@ -32,6 +32,7 @@ struct nvkm_output_dp {
...
@@ -32,6 +32,7 @@ struct nvkm_output_dp {
struct
mutex
mutex
;
struct
mutex
mutex
;
struct
{
struct
{
atomic_t
done
;
atomic_t
done
;
bool
mst
;
}
lt
;
}
lt
;
};
};
...
...
drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv50.c
View file @
f2a40513
...
@@ -180,6 +180,26 @@ nv50_disp_root_mthd_(struct nvkm_object *object, u32 mthd, void *data, u32 size)
...
@@ -180,6 +180,26 @@ nv50_disp_root_mthd_(struct nvkm_object *object, u32 mthd, void *data, u32 size)
return
ret
;
return
ret
;
}
}
break
;
break
;
case
NV50_DISP_MTHD_V1_SOR_DP_MST_LINK
:
{
struct
nvkm_output_dp
*
outpdp
=
nvkm_output_dp
(
outp
);
union
{
struct
nv50_disp_sor_dp_mst_link_v0
v0
;
}
*
args
=
data
;
int
ret
=
-
ENOSYS
;
nvif_ioctl
(
object
,
"disp sor dp mst link size %d
\n
"
,
size
);
if
(
!
(
ret
=
nvif_unpack
(
ret
,
&
data
,
&
size
,
args
->
v0
,
0
,
0
,
false
)))
{
nvif_ioctl
(
object
,
"disp sor dp mst link vers %d state %d
\n
"
,
args
->
v0
.
version
,
args
->
v0
.
state
);
if
(
outpdp
->
lt
.
mst
!=
!!
args
->
v0
.
state
)
{
outpdp
->
lt
.
mst
=
!!
args
->
v0
.
state
;
atomic_set
(
&
outpdp
->
lt
.
done
,
0
);
nvkm_output_dp_train
(
&
outpdp
->
base
,
0
);
}
return
0
;
}
else
return
ret
;
}
break
;
case
NV50_DISP_MTHD_V1_PIOR_PWR
:
case
NV50_DISP_MTHD_V1_PIOR_PWR
:
if
(
!
func
->
pior
.
power
)
if
(
!
func
->
pior
.
power
)
return
-
ENODEV
;
return
-
ENODEV
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgf119.c
View file @
f2a40513
...
@@ -56,11 +56,13 @@ gf119_sor_dp_lnk_ctl(struct nvkm_output_dp *outp, int nr, int bw, bool ef)
...
@@ -56,11 +56,13 @@ gf119_sor_dp_lnk_ctl(struct nvkm_output_dp *outp, int nr, int bw, bool ef)
clksor
|=
bw
<<
18
;
clksor
|=
bw
<<
18
;
dpctrl
|=
((
1
<<
nr
)
-
1
)
<<
16
;
dpctrl
|=
((
1
<<
nr
)
-
1
)
<<
16
;
if
(
outp
->
lt
.
mst
)
dpctrl
|=
0x40000000
;
if
(
ef
)
if
(
ef
)
dpctrl
|=
0x00004000
;
dpctrl
|=
0x00004000
;
nvkm_mask
(
device
,
0x612300
+
soff
,
0x007c0000
,
clksor
);
nvkm_mask
(
device
,
0x612300
+
soff
,
0x007c0000
,
clksor
);
nvkm_mask
(
device
,
0x61c10c
+
loff
,
0x
0
01f4000
,
dpctrl
);
nvkm_mask
(
device
,
0x61c10c
+
loff
,
0x
4
01f4000
,
dpctrl
);
return
0
;
return
0
;
}
}
...
...
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