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
52c7bcdb
Commit
52c7bcdb
authored
Oct 05, 2011
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/hdmi: add hdmi register accessors to handle hdmi block move
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
25575b41
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
4 deletions
+35
-4
drivers/gpu/drm/nouveau/nouveau_hdmi.c
drivers/gpu/drm/nouveau/nouveau_hdmi.c
+32
-1
drivers/gpu/drm/nouveau/nv50_sor.c
drivers/gpu/drm/nouveau/nv50_sor.c
+3
-3
No files found.
drivers/gpu/drm/nouveau/nouveau_hdmi.c
View file @
52c7bcdb
...
...
@@ -26,6 +26,7 @@
#include "nouveau_drv.h"
#include "nouveau_connector.h"
#include "nouveau_encoder.h"
#include "nouveau_crtc.h"
static
bool
hdmi_sor
(
struct
drm_encoder
*
encoder
)
...
...
@@ -36,12 +37,42 @@ hdmi_sor(struct drm_encoder *encoder)
return
true
;
}
static
inline
u32
hdmi_base
(
struct
drm_encoder
*
encoder
)
{
struct
nouveau_encoder
*
nv_encoder
=
nouveau_encoder
(
encoder
);
struct
nouveau_crtc
*
nv_crtc
=
nouveau_crtc
(
nv_encoder
->
crtc
);
if
(
!
hdmi_sor
(
encoder
))
return
0x616500
+
(
nv_crtc
->
index
*
0x800
);
return
0x61c500
+
(
nv_encoder
->
or
*
0x800
);
}
static
void
hdmi_wr32
(
struct
drm_encoder
*
encoder
,
u32
reg
,
u32
val
)
{
nv_wr32
(
encoder
->
dev
,
hdmi_base
(
encoder
)
+
reg
,
val
);
}
static
u32
hdmi_rd32
(
struct
drm_encoder
*
encoder
,
u32
reg
)
{
return
nv_rd32
(
encoder
->
dev
,
hdmi_base
(
encoder
)
+
reg
);
}
static
u32
hdmi_mask
(
struct
drm_encoder
*
encoder
,
u32
reg
,
u32
mask
,
u32
val
)
{
u32
tmp
=
hdmi_rd32
(
encoder
,
reg
);
hdmi_wr32
(
encoder
,
reg
,
(
tmp
&
~
mask
)
|
val
);
return
tmp
;
}
static
void
nouveau_audio_disconnect
(
struct
drm_encoder
*
encoder
)
{
struct
nouveau_encoder
*
nv_encoder
=
nouveau_encoder
(
encoder
);
struct
drm_device
*
dev
=
encoder
->
dev
;
int
or
=
nv_encoder
->
or
*
0x800
;
u32
or
=
nv_encoder
->
or
*
0x800
;
if
(
hdmi_sor
(
encoder
))
{
nv_mask
(
dev
,
0x61c448
+
or
,
0x00000003
,
0x00000000
);
...
...
drivers/gpu/drm/nouveau/nv50_sor.c
View file @
52c7bcdb
...
...
@@ -195,6 +195,7 @@ nv50_sor_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode,
NV_DEBUG_KMS
(
dev
,
"or %d type %d -> crtc %d
\n
"
,
nv_encoder
->
or
,
nv_encoder
->
dcb
->
type
,
crtc
->
index
);
nv_encoder
->
crtc
=
encoder
->
crtc
;
switch
(
nv_encoder
->
dcb
->
type
)
{
case
OUTPUT_TMDS
:
...
...
@@ -206,7 +207,7 @@ nv50_sor_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode,
}
else
mode_ctl
=
0x0200
;
nouveau_hdmi_mode_set
(
encoder
,
mode
);
nouveau_hdmi_mode_set
(
encoder
,
adjusted_
mode
);
break
;
case
OUTPUT_DP
:
nv_connector
=
nouveau_encoder_connector_get
(
nv_encoder
);
...
...
@@ -243,12 +244,11 @@ nv50_sor_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode,
ret
=
RING_SPACE
(
evo
,
2
);
if
(
ret
)
{
NV_ERROR
(
dev
,
"no space while connecting SOR
\n
"
);
nv_encoder
->
crtc
=
NULL
;
return
;
}
BEGIN_RING
(
evo
,
0
,
NV50_EVO_SOR
(
nv_encoder
->
or
,
MODE_CTRL
),
1
);
OUT_RING
(
evo
,
mode_ctl
);
nv_encoder
->
crtc
=
encoder
->
crtc
;
}
static
struct
drm_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