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
64d9cc04
Commit
64d9cc04
authored
Nov 11, 2011
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nvd0/disp: enable hdmi on sor if hdmi monitor present
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
78951d22
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
0 deletions
+44
-0
drivers/gpu/drm/nouveau/nvd0_display.c
drivers/gpu/drm/nouveau/nvd0_display.c
+44
-0
No files found.
drivers/gpu/drm/nouveau/nvd0_display.c
View file @
64d9cc04
...
@@ -811,13 +811,57 @@ nvd0_audio_disconnect(struct drm_encoder *encoder)
...
@@ -811,13 +811,57 @@ nvd0_audio_disconnect(struct drm_encoder *encoder)
static
void
static
void
nvd0_hdmi_mode_set
(
struct
drm_encoder
*
encoder
,
struct
drm_display_mode
*
mode
)
nvd0_hdmi_mode_set
(
struct
drm_encoder
*
encoder
,
struct
drm_display_mode
*
mode
)
{
{
struct
nouveau_encoder
*
nv_encoder
=
nouveau_encoder
(
encoder
);
struct
nouveau_crtc
*
nv_crtc
=
nouveau_crtc
(
encoder
->
crtc
);
struct
nouveau_connector
*
nv_connector
;
struct
drm_device
*
dev
=
encoder
->
dev
;
int
head
=
nv_crtc
->
index
*
0x800
;
u32
rekey
=
56
;
/* binary driver, and tegra constant */
u32
max_ac_packet
;
nv_connector
=
nouveau_encoder_connector_get
(
nv_encoder
);
if
(
!
drm_detect_hdmi_monitor
(
nv_connector
->
edid
))
return
;
max_ac_packet
=
mode
->
htotal
-
mode
->
hdisplay
;
max_ac_packet
-=
rekey
;
max_ac_packet
-=
18
;
/* constant from tegra */
max_ac_packet
/=
32
;
/* AVI InfoFrame */
nv_mask
(
dev
,
0x616714
+
head
,
0x00000001
,
0x00000000
);
nv_wr32
(
dev
,
0x61671c
+
head
,
0x000d0282
);
nv_wr32
(
dev
,
0x616720
+
head
,
0x0000006f
);
nv_wr32
(
dev
,
0x616724
+
head
,
0x00000000
);
nv_wr32
(
dev
,
0x616728
+
head
,
0x00000000
);
nv_wr32
(
dev
,
0x61672c
+
head
,
0x00000000
);
nv_mask
(
dev
,
0x616714
+
head
,
0x00000001
,
0x00000001
);
/* ??? InfoFrame? */
nv_mask
(
dev
,
0x6167a4
+
head
,
0x00000001
,
0x00000000
);
nv_wr32
(
dev
,
0x6167ac
+
head
,
0x00000010
);
nv_mask
(
dev
,
0x6167a4
+
head
,
0x00000001
,
0x00000001
);
/* HDMI_CTRL */
nv_mask
(
dev
,
0x616798
+
head
,
0x401f007f
,
0x40000000
|
rekey
|
max_ac_packet
<<
16
);
nvd0_audio_mode_set
(
encoder
,
mode
);
nvd0_audio_mode_set
(
encoder
,
mode
);
}
}
static
void
static
void
nvd0_hdmi_disconnect
(
struct
drm_encoder
*
encoder
)
nvd0_hdmi_disconnect
(
struct
drm_encoder
*
encoder
)
{
{
struct
nouveau_encoder
*
nv_encoder
=
nouveau_encoder
(
encoder
);
struct
nouveau_crtc
*
nv_crtc
=
nouveau_crtc
(
nv_encoder
->
crtc
);
struct
drm_device
*
dev
=
encoder
->
dev
;
int
head
=
nv_crtc
->
index
*
0x800
;
nvd0_audio_disconnect
(
encoder
);
nvd0_audio_disconnect
(
encoder
);
nv_mask
(
dev
,
0x616798
+
head
,
0x40000000
,
0x00000000
);
nv_mask
(
dev
,
0x6167a4
+
head
,
0x00000001
,
0x00000000
);
nv_mask
(
dev
,
0x616714
+
head
,
0x00000001
,
0x00000000
);
}
}
/******************************************************************************
/******************************************************************************
...
...
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