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
cc2a9071
Commit
cc2a9071
authored
Sep 15, 2014
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/gt214-/disp: enable dp audio
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
d889c524
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
22 deletions
+30
-22
drivers/gpu/drm/nouveau/core/engine/disp/hdanva3.c
drivers/gpu/drm/nouveau/core/engine/disp/hdanva3.c
+11
-4
drivers/gpu/drm/nouveau/core/engine/disp/hdanvd0.c
drivers/gpu/drm/nouveau/core/engine/disp/hdanvd0.c
+12
-8
drivers/gpu/drm/nouveau/core/engine/disp/hdminvd0.c
drivers/gpu/drm/nouveau/core/engine/disp/hdminvd0.c
+0
-3
drivers/gpu/drm/nouveau/core/engine/disp/hdminve0.c
drivers/gpu/drm/nouveau/core/engine/disp/hdminve0.c
+0
-3
drivers/gpu/drm/nouveau/nv50_display.c
drivers/gpu/drm/nouveau/nv50_display.c
+7
-4
No files found.
drivers/gpu/drm/nouveau/core/engine/disp/hdanva3.c
View file @
cc2a9071
...
@@ -26,6 +26,8 @@
...
@@ -26,6 +26,8 @@
#include <nvif/unpack.h>
#include <nvif/unpack.h>
#include <nvif/class.h>
#include <nvif/class.h>
#include <subdev/timer.h>
#include "nv50.h"
#include "nv50.h"
int
int
...
@@ -46,16 +48,21 @@ nva3_hda_eld(NV50_DISP_MTHD_V1)
...
@@ -46,16 +48,21 @@ nva3_hda_eld(NV50_DISP_MTHD_V1)
return
ret
;
return
ret
;
if
(
size
&&
args
->
v0
.
data
[
0
])
{
if
(
size
&&
args
->
v0
.
data
[
0
])
{
if
(
outp
->
info
.
type
==
DCB_OUTPUT_DP
)
{
nv_mask
(
priv
,
0x61c1e0
+
soff
,
0x8000000d
,
0x80000001
);
nv_wait
(
priv
,
0x61c1e0
+
soff
,
0x80000000
,
0x00000000
);
}
for
(
i
=
0
;
i
<
size
;
i
++
)
for
(
i
=
0
;
i
<
size
;
i
++
)
nv_wr32
(
priv
,
0x61c440
+
soff
,
(
i
<<
8
)
|
args
->
v0
.
data
[
0
]);
nv_wr32
(
priv
,
0x61c440
+
soff
,
(
i
<<
8
)
|
args
->
v0
.
data
[
0
]);
for
(;
i
<
0x60
;
i
++
)
for
(;
i
<
0x60
;
i
++
)
nv_wr32
(
priv
,
0x61c440
+
soff
,
(
i
<<
8
));
nv_wr32
(
priv
,
0x61c440
+
soff
,
(
i
<<
8
));
nv_mask
(
priv
,
0x61c448
+
soff
,
0x80000003
,
0x80000003
);
nv_mask
(
priv
,
0x61c448
+
soff
,
0x80000003
,
0x80000003
);
}
else
if
(
size
)
{
nv_mask
(
priv
,
0x61c448
+
soff
,
0x80000003
,
0x80000001
);
}
else
{
}
else
{
nv_mask
(
priv
,
0x61c448
+
soff
,
0x80000003
,
0x80000000
);
if
(
outp
->
info
.
type
==
DCB_OUTPUT_DP
)
{
nv_mask
(
priv
,
0x61c1e0
+
soff
,
0x80000001
,
0x80000000
);
nv_wait
(
priv
,
0x61c1e0
+
soff
,
0x80000000
,
0x00000000
);
}
nv_mask
(
priv
,
0x61c448
+
soff
,
0x80000003
,
0x80000000
|
!!
size
);
}
}
return
0
;
return
0
;
...
...
drivers/gpu/drm/nouveau/core/engine/disp/hdanvd0.c
View file @
cc2a9071
...
@@ -26,10 +26,7 @@
...
@@ -26,10 +26,7 @@
#include <nvif/unpack.h>
#include <nvif/unpack.h>
#include <nvif/class.h>
#include <nvif/class.h>
#include <subdev/bios.h>
#include <subdev/timer.h>
#include <subdev/bios/dcb.h>
#include <subdev/bios/dp.h>
#include <subdev/bios/init.h>
#include "nv50.h"
#include "nv50.h"
...
@@ -40,6 +37,7 @@ nvd0_hda_eld(NV50_DISP_MTHD_V1)
...
@@ -40,6 +37,7 @@ nvd0_hda_eld(NV50_DISP_MTHD_V1)
struct
nv50_disp_sor_hda_eld_v0
v0
;
struct
nv50_disp_sor_hda_eld_v0
v0
;
}
*
args
=
data
;
}
*
args
=
data
;
const
u32
soff
=
outp
->
or
*
0x030
;
const
u32
soff
=
outp
->
or
*
0x030
;
const
u32
hoff
=
head
*
0x800
;
int
ret
,
i
;
int
ret
,
i
;
nv_ioctl
(
object
,
"disp sor hda eld size %d
\n
"
,
size
);
nv_ioctl
(
object
,
"disp sor hda eld size %d
\n
"
,
size
);
...
@@ -51,16 +49,22 @@ nvd0_hda_eld(NV50_DISP_MTHD_V1)
...
@@ -51,16 +49,22 @@ nvd0_hda_eld(NV50_DISP_MTHD_V1)
return
ret
;
return
ret
;
if
(
size
&&
args
->
v0
.
data
[
0
])
{
if
(
size
&&
args
->
v0
.
data
[
0
])
{
if
(
outp
->
info
.
type
==
DCB_OUTPUT_DP
)
{
nv_mask
(
priv
,
0x616618
+
hoff
,
0x8000000c
,
0x80000001
);
nv_wait
(
priv
,
0x616618
+
hoff
,
0x80000000
,
0x00000000
);
}
nv_mask
(
priv
,
0x616548
+
hoff
,
0x00000070
,
0x00000000
);
for
(
i
=
0
;
i
<
size
;
i
++
)
for
(
i
=
0
;
i
<
size
;
i
++
)
nv_wr32
(
priv
,
0x10ec00
+
soff
,
(
i
<<
8
)
|
args
->
v0
.
data
[
i
]);
nv_wr32
(
priv
,
0x10ec00
+
soff
,
(
i
<<
8
)
|
args
->
v0
.
data
[
i
]);
for
(;
i
<
0x60
;
i
++
)
for
(;
i
<
0x60
;
i
++
)
nv_wr32
(
priv
,
0x10ec00
+
soff
,
(
i
<<
8
));
nv_wr32
(
priv
,
0x10ec00
+
soff
,
(
i
<<
8
));
nv_mask
(
priv
,
0x10ec10
+
soff
,
0x80000003
,
0x80000003
);
nv_mask
(
priv
,
0x10ec10
+
soff
,
0x80000003
,
0x80000003
);
}
else
if
(
size
)
{
nv_mask
(
priv
,
0x10ec10
+
soff
,
0x80000003
,
0x80000001
);
}
else
{
}
else
{
nv_mask
(
priv
,
0x10ec10
+
soff
,
0x80000003
,
0x80000000
);
if
(
outp
->
info
.
type
==
DCB_OUTPUT_DP
)
{
nv_mask
(
priv
,
0x616618
+
hoff
,
0x80000001
,
0x80000000
);
nv_wait
(
priv
,
0x616618
+
hoff
,
0x80000000
,
0x00000000
);
}
nv_mask
(
priv
,
0x10ec10
+
soff
,
0x80000003
,
0x80000000
|
!!
size
);
}
}
return
0
;
return
0
;
...
...
drivers/gpu/drm/nouveau/core/engine/disp/hdminvd0.c
View file @
cc2a9071
...
@@ -75,8 +75,5 @@ nvd0_hdmi_ctrl(NV50_DISP_MTHD_V1)
...
@@ -75,8 +75,5 @@ nvd0_hdmi_ctrl(NV50_DISP_MTHD_V1)
/* HDMI_CTRL */
/* HDMI_CTRL */
nv_mask
(
priv
,
0x616798
+
hoff
,
0x401f007f
,
ctrl
);
nv_mask
(
priv
,
0x616798
+
hoff
,
0x401f007f
,
ctrl
);
/* NFI, audio doesn't work without it though.. */
nv_mask
(
priv
,
0x616548
+
hoff
,
0x00000070
,
0x00000000
);
return
0
;
return
0
;
}
}
drivers/gpu/drm/nouveau/core/engine/disp/hdminve0.c
View file @
cc2a9071
...
@@ -79,8 +79,5 @@ nve0_hdmi_ctrl(NV50_DISP_MTHD_V1)
...
@@ -79,8 +79,5 @@ nve0_hdmi_ctrl(NV50_DISP_MTHD_V1)
/* HDMI_CTRL */
/* HDMI_CTRL */
nv_mask
(
priv
,
0x616798
+
hoff
,
0x401f007f
,
ctrl
);
nv_mask
(
priv
,
0x616798
+
hoff
,
0x401f007f
,
ctrl
);
/* NFI, audio doesn't work without it though.. */
nv_mask
(
priv
,
0x616548
+
hoff
,
0x00000070
,
0x00000000
);
return
0
;
return
0
;
}
}
drivers/gpu/drm/nouveau/nv50_display.c
View file @
cc2a9071
...
@@ -1656,6 +1656,7 @@ static void
...
@@ -1656,6 +1656,7 @@ static void
nv50_audio_mode_set
(
struct
drm_encoder
*
encoder
,
struct
drm_display_mode
*
mode
)
nv50_audio_mode_set
(
struct
drm_encoder
*
encoder
,
struct
drm_display_mode
*
mode
)
{
{
struct
nouveau_encoder
*
nv_encoder
=
nouveau_encoder
(
encoder
);
struct
nouveau_encoder
*
nv_encoder
=
nouveau_encoder
(
encoder
);
struct
nouveau_crtc
*
nv_crtc
=
nouveau_crtc
(
encoder
->
crtc
);
struct
nouveau_connector
*
nv_connector
;
struct
nouveau_connector
*
nv_connector
;
struct
nv50_disp
*
disp
=
nv50_disp
(
encoder
->
dev
);
struct
nv50_disp
*
disp
=
nv50_disp
(
encoder
->
dev
);
struct
__packed
{
struct
__packed
{
...
@@ -1668,7 +1669,8 @@ nv50_audio_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode)
...
@@ -1668,7 +1669,8 @@ nv50_audio_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode)
.
base
.
mthd
.
version
=
1
,
.
base
.
mthd
.
version
=
1
,
.
base
.
mthd
.
method
=
NV50_DISP_MTHD_V1_SOR_HDA_ELD
,
.
base
.
mthd
.
method
=
NV50_DISP_MTHD_V1_SOR_HDA_ELD
,
.
base
.
mthd
.
hasht
=
nv_encoder
->
dcb
->
hasht
,
.
base
.
mthd
.
hasht
=
nv_encoder
->
dcb
->
hasht
,
.
base
.
mthd
.
hashm
=
nv_encoder
->
dcb
->
hashm
,
.
base
.
mthd
.
hashm
=
(
0xf0ff
&
nv_encoder
->
dcb
->
hashm
)
|
(
0x0100
<<
nv_crtc
->
index
),
};
};
nv_connector
=
nouveau_encoder_connector_get
(
nv_encoder
);
nv_connector
=
nouveau_encoder_connector_get
(
nv_encoder
);
...
@@ -1682,7 +1684,7 @@ nv50_audio_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode)
...
@@ -1682,7 +1684,7 @@ nv50_audio_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode)
}
}
static
void
static
void
nv50_audio_disconnect
(
struct
drm_encoder
*
encoder
)
nv50_audio_disconnect
(
struct
drm_encoder
*
encoder
,
struct
nouveau_crtc
*
nv_crtc
)
{
{
struct
nouveau_encoder
*
nv_encoder
=
nouveau_encoder
(
encoder
);
struct
nouveau_encoder
*
nv_encoder
=
nouveau_encoder
(
encoder
);
struct
nv50_disp
*
disp
=
nv50_disp
(
encoder
->
dev
);
struct
nv50_disp
*
disp
=
nv50_disp
(
encoder
->
dev
);
...
@@ -1693,7 +1695,8 @@ nv50_audio_disconnect(struct drm_encoder *encoder)
...
@@ -1693,7 +1695,8 @@ nv50_audio_disconnect(struct drm_encoder *encoder)
.
base
.
version
=
1
,
.
base
.
version
=
1
,
.
base
.
method
=
NV50_DISP_MTHD_V1_SOR_HDA_ELD
,
.
base
.
method
=
NV50_DISP_MTHD_V1_SOR_HDA_ELD
,
.
base
.
hasht
=
nv_encoder
->
dcb
->
hasht
,
.
base
.
hasht
=
nv_encoder
->
dcb
->
hasht
,
.
base
.
hashm
=
nv_encoder
->
dcb
->
hashm
,
.
base
.
hashm
=
(
0xf0ff
&
nv_encoder
->
dcb
->
hashm
)
|
(
0x0100
<<
nv_crtc
->
index
),
};
};
nvif_mthd
(
disp
->
disp
,
0
,
&
args
,
sizeof
(
args
));
nvif_mthd
(
disp
->
disp
,
0
,
&
args
,
sizeof
(
args
));
...
@@ -1860,7 +1863,7 @@ nv50_sor_disconnect(struct drm_encoder *encoder)
...
@@ -1860,7 +1863,7 @@ nv50_sor_disconnect(struct drm_encoder *encoder)
if
(
nv_crtc
)
{
if
(
nv_crtc
)
{
nv50_crtc_prepare
(
&
nv_crtc
->
base
);
nv50_crtc_prepare
(
&
nv_crtc
->
base
);
nv50_sor_ctrl
(
nv_encoder
,
1
<<
nv_crtc
->
index
,
0
);
nv50_sor_ctrl
(
nv_encoder
,
1
<<
nv_crtc
->
index
,
0
);
nv50_audio_disconnect
(
encoder
);
nv50_audio_disconnect
(
encoder
,
nv_crtc
);
nv50_hdmi_disconnect
(
&
nv_encoder
->
base
.
base
,
nv_crtc
);
nv50_hdmi_disconnect
(
&
nv_encoder
->
base
.
base
,
nv_crtc
);
}
}
}
}
...
...
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