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
97b19b5c
Commit
97b19b5c
authored
Nov 16, 2012
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nvd0/disp: implement dac support for older display classes
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
de8268c5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
25 deletions
+48
-25
drivers/gpu/drm/nouveau/nvd0_display.c
drivers/gpu/drm/nouveau/nvd0_display.c
+48
-25
No files found.
drivers/gpu/drm/nouveau/nvd0_display.c
View file @
97b19b5c
...
...
@@ -1264,30 +1264,46 @@ static void
nvd0_dac_mode_set
(
struct
drm_encoder
*
encoder
,
struct
drm_display_mode
*
mode
,
struct
drm_display_mode
*
adjusted_mode
)
{
struct
nvd0_mast
*
mast
=
nvd0_mast
(
encoder
->
dev
);
struct
nouveau_encoder
*
nv_encoder
=
nouveau_encoder
(
encoder
);
struct
nouveau_crtc
*
nv_crtc
=
nouveau_crtc
(
encoder
->
crtc
);
u32
syncs
,
magic
,
*
push
;
syncs
=
0x00000001
;
if
(
mode
->
flags
&
DRM_MODE_FLAG_NHSYNC
)
syncs
|=
0x00000008
;
if
(
mode
->
flags
&
DRM_MODE_FLAG_NVSYNC
)
syncs
|=
0x00000010
;
magic
=
0x31ec6000
|
(
nv_crtc
->
index
<<
25
);
if
(
mode
->
flags
&
DRM_MODE_FLAG_INTERLACE
)
magic
|=
0x00000001
;
u32
*
push
;
nvd0_dac_dpms
(
encoder
,
DRM_MODE_DPMS_ON
);
push
=
evo_wait
(
nvd0_mast
(
encoder
->
dev
)
,
8
);
push
=
evo_wait
(
mast
,
8
);
if
(
push
)
{
evo_mthd
(
push
,
0x0404
+
(
nv_crtc
->
index
*
0x300
),
2
);
evo_data
(
push
,
syncs
);
evo_data
(
push
,
magic
);
evo_mthd
(
push
,
0x0180
+
(
nv_encoder
->
or
*
0x020
),
1
);
evo_data
(
push
,
1
<<
nv_crtc
->
index
);
evo_kick
(
push
,
nvd0_mast
(
encoder
->
dev
));
if
(
nvd0_vers
(
mast
)
<
NVD0_DISP_MAST_CLASS
)
{
u32
syncs
=
0x00000000
;
if
(
mode
->
flags
&
DRM_MODE_FLAG_NHSYNC
)
syncs
|=
0x00000001
;
if
(
mode
->
flags
&
DRM_MODE_FLAG_NVSYNC
)
syncs
|=
0x00000002
;
evo_mthd
(
push
,
0x0400
+
(
nv_encoder
->
or
*
0x080
),
2
);
evo_data
(
push
,
1
<<
nv_crtc
->
index
);
evo_data
(
push
,
syncs
);
}
else
{
u32
magic
=
0x31ec6000
|
(
nv_crtc
->
index
<<
25
);
u32
syncs
=
0x00000001
;
if
(
mode
->
flags
&
DRM_MODE_FLAG_NHSYNC
)
syncs
|=
0x00000008
;
if
(
mode
->
flags
&
DRM_MODE_FLAG_NVSYNC
)
syncs
|=
0x00000010
;
if
(
mode
->
flags
&
DRM_MODE_FLAG_INTERLACE
)
magic
|=
0x00000001
;
evo_mthd
(
push
,
0x0404
+
(
nv_crtc
->
index
*
0x300
),
2
);
evo_data
(
push
,
syncs
);
evo_data
(
push
,
magic
);
evo_mthd
(
push
,
0x0180
+
(
nv_encoder
->
or
*
0x020
),
1
);
evo_data
(
push
,
1
<<
nv_crtc
->
index
);
}
evo_kick
(
push
,
mast
);
}
nv_encoder
->
crtc
=
encoder
->
crtc
;
...
...
@@ -1297,23 +1313,30 @@ static void
nvd0_dac_disconnect
(
struct
drm_encoder
*
encoder
)
{
struct
nouveau_encoder
*
nv_encoder
=
nouveau_encoder
(
encoder
);
struct
drm_device
*
dev
=
encoder
->
dev
;
struct
nvd0_mast
*
mast
=
nvd0_mast
(
encoder
->
dev
);
const
int
or
=
nv_encoder
->
or
;
u32
*
push
;
if
(
nv_encoder
->
crtc
)
{
nvd0_crtc_prepare
(
nv_encoder
->
crtc
);
push
=
evo_wait
(
nvd0_mast
(
dev
)
,
4
);
push
=
evo_wait
(
mast
,
4
);
if
(
push
)
{
evo_mthd
(
push
,
0x0180
+
(
nv_encoder
->
or
*
0x20
),
1
);
evo_data
(
push
,
0x00000000
);
if
(
nvd0_vers
(
mast
)
<
NVD0_DISP_MAST_CLASS
)
{
evo_mthd
(
push
,
0x0400
+
(
or
*
0x080
),
1
);
evo_data
(
push
,
0x00000000
);
}
else
{
evo_mthd
(
push
,
0x0180
+
(
or
*
0x020
),
1
);
evo_data
(
push
,
0x00000000
);
}
evo_mthd
(
push
,
0x0080
,
1
);
evo_data
(
push
,
0x00000000
);
evo_kick
(
push
,
nvd0_mast
(
dev
)
);
evo_kick
(
push
,
mast
);
}
nv_encoder
->
crtc
=
NULL
;
}
nv_encoder
->
crtc
=
NULL
;
}
static
enum
drm_connector_status
...
...
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