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
4cbb0f8d
Commit
4cbb0f8d
authored
Mar 12, 2012
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nvd0/disp: disconnect encoders before reprogramming them
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
3488c57b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
33 deletions
+33
-33
drivers/gpu/drm/nouveau/nvd0_display.c
drivers/gpu/drm/nouveau/nvd0_display.c
+33
-33
No files found.
drivers/gpu/drm/nouveau/nvd0_display.c
View file @
4cbb0f8d
...
@@ -284,6 +284,8 @@ nvd0_display_flip_next(struct drm_crtc *crtc, struct drm_framebuffer *fb,
...
@@ -284,6 +284,8 @@ nvd0_display_flip_next(struct drm_crtc *crtc, struct drm_framebuffer *fb,
u32
*
push
;
u32
*
push
;
int
ret
;
int
ret
;
evo_sync
(
crtc
->
dev
,
EVO_MASTER
);
swap_interval
<<=
4
;
swap_interval
<<=
4
;
if
(
swap_interval
==
0
)
if
(
swap_interval
==
0
)
swap_interval
|=
0x100
;
swap_interval
|=
0x100
;
...
@@ -593,7 +595,7 @@ nvd0_crtc_commit(struct drm_crtc *crtc)
...
@@ -593,7 +595,7 @@ nvd0_crtc_commit(struct drm_crtc *crtc)
evo_kick
(
push
,
crtc
->
dev
,
EVO_MASTER
);
evo_kick
(
push
,
crtc
->
dev
,
EVO_MASTER
);
}
}
nvd0_crtc_cursor_show
(
nv_crtc
,
nv_crtc
->
cursor
.
visible
,
fals
e
);
nvd0_crtc_cursor_show
(
nv_crtc
,
nv_crtc
->
cursor
.
visible
,
tru
e
);
nvd0_display_flip_next
(
crtc
,
crtc
->
fb
,
NULL
,
1
);
nvd0_display_flip_next
(
crtc
,
crtc
->
fb
,
NULL
,
1
);
}
}
...
@@ -947,11 +949,6 @@ nvd0_dac_mode_fixup(struct drm_encoder *encoder, struct drm_display_mode *mode,
...
@@ -947,11 +949,6 @@ nvd0_dac_mode_fixup(struct drm_encoder *encoder, struct drm_display_mode *mode,
return
true
;
return
true
;
}
}
static
void
nvd0_dac_prepare
(
struct
drm_encoder
*
encoder
)
{
}
static
void
static
void
nvd0_dac_commit
(
struct
drm_encoder
*
encoder
)
nvd0_dac_commit
(
struct
drm_encoder
*
encoder
)
{
{
...
@@ -1045,7 +1042,7 @@ nvd0_dac_destroy(struct drm_encoder *encoder)
...
@@ -1045,7 +1042,7 @@ nvd0_dac_destroy(struct drm_encoder *encoder)
static
const
struct
drm_encoder_helper_funcs
nvd0_dac_hfunc
=
{
static
const
struct
drm_encoder_helper_funcs
nvd0_dac_hfunc
=
{
.
dpms
=
nvd0_dac_dpms
,
.
dpms
=
nvd0_dac_dpms
,
.
mode_fixup
=
nvd0_dac_mode_fixup
,
.
mode_fixup
=
nvd0_dac_mode_fixup
,
.
prepare
=
nvd0_dac_
prepare
,
.
prepare
=
nvd0_dac_
disconnect
,
.
commit
=
nvd0_dac_commit
,
.
commit
=
nvd0_dac_commit
,
.
mode_set
=
nvd0_dac_mode_set
,
.
mode_set
=
nvd0_dac_mode_set
,
.
disable
=
nvd0_dac_disconnect
,
.
disable
=
nvd0_dac_disconnect
,
...
@@ -1385,9 +1382,38 @@ nvd0_sor_mode_fixup(struct drm_encoder *encoder, struct drm_display_mode *mode,
...
@@ -1385,9 +1382,38 @@ nvd0_sor_mode_fixup(struct drm_encoder *encoder, struct drm_display_mode *mode,
return
true
;
return
true
;
}
}
static
void
nvd0_sor_disconnect
(
struct
drm_encoder
*
encoder
)
{
struct
nouveau_encoder
*
nv_encoder
=
nouveau_encoder
(
encoder
);
struct
drm_device
*
dev
=
encoder
->
dev
;
u32
*
push
;
if
(
nv_encoder
->
crtc
)
{
nvd0_crtc_prepare
(
nv_encoder
->
crtc
);
push
=
evo_wait
(
dev
,
EVO_MASTER
,
4
);
if
(
push
)
{
evo_mthd
(
push
,
0x0200
+
(
nv_encoder
->
or
*
0x20
),
1
);
evo_data
(
push
,
0x00000000
);
evo_mthd
(
push
,
0x0080
,
1
);
evo_data
(
push
,
0x00000000
);
evo_kick
(
push
,
dev
,
EVO_MASTER
);
}
nvd0_hdmi_disconnect
(
encoder
);
nv_encoder
->
crtc
=
NULL
;
nv_encoder
->
last_dpms
=
DRM_MODE_DPMS_OFF
;
}
}
static
void
static
void
nvd0_sor_prepare
(
struct
drm_encoder
*
encoder
)
nvd0_sor_prepare
(
struct
drm_encoder
*
encoder
)
{
{
nvd0_sor_disconnect
(
encoder
);
if
(
nouveau_encoder
(
encoder
)
->
dcb
->
type
==
OUTPUT_DP
)
evo_sync
(
encoder
->
dev
,
EVO_MASTER
);
}
}
static
void
static
void
...
@@ -1508,32 +1534,6 @@ nvd0_sor_mode_set(struct drm_encoder *encoder, struct drm_display_mode *umode,
...
@@ -1508,32 +1534,6 @@ nvd0_sor_mode_set(struct drm_encoder *encoder, struct drm_display_mode *umode,
nv_encoder
->
crtc
=
encoder
->
crtc
;
nv_encoder
->
crtc
=
encoder
->
crtc
;
}
}
static
void
nvd0_sor_disconnect
(
struct
drm_encoder
*
encoder
)
{
struct
nouveau_encoder
*
nv_encoder
=
nouveau_encoder
(
encoder
);
struct
drm_device
*
dev
=
encoder
->
dev
;
u32
*
push
;
if
(
nv_encoder
->
crtc
)
{
nvd0_crtc_prepare
(
nv_encoder
->
crtc
);
push
=
evo_wait
(
dev
,
EVO_MASTER
,
4
);
if
(
push
)
{
evo_mthd
(
push
,
0x0200
+
(
nv_encoder
->
or
*
0x20
),
1
);
evo_data
(
push
,
0x00000000
);
evo_mthd
(
push
,
0x0080
,
1
);
evo_data
(
push
,
0x00000000
);
evo_kick
(
push
,
dev
,
EVO_MASTER
);
}
nvd0_hdmi_disconnect
(
encoder
);
nv_encoder
->
crtc
=
NULL
;
nv_encoder
->
last_dpms
=
DRM_MODE_DPMS_OFF
;
}
}
static
void
static
void
nvd0_sor_destroy
(
struct
drm_encoder
*
encoder
)
nvd0_sor_destroy
(
struct
drm_encoder
*
encoder
)
{
{
...
...
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