Commit graph

12 commits

Author SHA1 Message Date
Emily Deng
041aa65805 drm/amdgpu: Hardcode virtual DCE vblank / scanout position return values
For virtual display feature, by hardcoding 0 for the vblank counter and
-EINVAL for the scanout position return value, we signal to the core DRM code that there are
no hardware counters we can use for these.

Signed-off-by: Emily Deng <Emily.Deng@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-08-17 15:42:50 -04:00
Michel Dänzer
325cbba19a drm/amdgpu: Provide page_flip_target hook
Now we can program a flip during a vertical blank period, if it's the
one targeted by the flip (or a later one). This allows simplifying
amdgpu_flip_work_func considerably.

agd: update dce_virtual.c as well.

Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-08-10 14:28:06 -04:00
Alex Deucher
2579de4394 drm/amdgpu/virtual_dce: add case for topaz for disable_dce
This asic has no DCE block.  Also clarify the error message
for unmatched chips.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-08-08 14:40:04 -04:00
Alex Deucher
d06b7e1cf0 drm/amdgpu: move vsync_timer_enabled setup to dce virtual early_init
Put it in one place.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-08-08 14:35:55 -04:00
Emily Deng
6b5084ccfc drm/amdgpu: Call pageflip irq funtion when receiced vsync interrupt.
For virtual display feature, as there is no dce engine, so no pageflip irq
generated. So directly call pageflip irq funtion when received vysn interrupt.

Signed-off-by: Emily Deng <Emily.Deng@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-08-08 14:11:48 -04:00
Emily Deng
46ac362243 drm/amdgpu: Use software timer to generate vsync interrupt.
For virtual display feature, use the software timer to
simulate the vsync interrupt.

Signed-off-by: Emily Deng <Emily.Deng@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-08-08 14:07:18 -04:00
Emily Deng
83c9b0253b drm/amdgpu: Disable VGA render and crtc when init GMC.
For virtual display feature, when the GPU has DCE engine, need to disable
the VGA render and CRTC, or it will hang when initialize GMC.

Signed-off-by: Emily Deng <Emily.Deng@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-08-08 14:04:37 -04:00
Emily Deng
0d43f3bca1 drm/amdgpu: Initialize dce_virtual_crtc_funcs. (v2)
For virtual display feature, initialize dce_virtual_crtc_funcs.

v2: agd: rebase on upstream

Signed-off-by: Emily Deng <Emily.Deng@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-08-08 14:04:35 -04:00
Emily Deng
f1f5ef9267 drm/amdgpu: Initialize dce_virtual_crtc_helper_funcs
For virtual display feature, initialize dce_virtual_crtc_helper_funcs.

Signed-off-by: Emily Deng <Emily.Deng@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-08-08 13:57:04 -04:00
Emily Deng
e13273d4a4 drm/amdgpu: Initialize crtc, pageflip irq funcs (v2)
For virtual display feature, initialize dce_virtual_crtc_irq_funcs,
dce_virtual_pageflip_irq_funcs. As it has no dce engine, so the
pageflip interrupt won't be generated, and the vsync interrupt will
be generated by smu's periodic timer or software timer which will
be implemented later.

v2: agd: rebase on upstream

Signed-off-by: Emily Deng <Emily.Deng@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-08-08 13:57:04 -04:00
Emily Deng
8e6de75bd1 drm/amdgpu: Initialize dce_virtual_display_funcs.
For virtual display feature, initialize dce_virtual_display_funcs,
which will be used in function dce_virtual_set_display_funcs.

Signed-off-by: Emily Deng <Emily.Deng@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-08-08 13:44:30 -04:00
Emily Deng
c6e14f40ba drm/amdgpu: Initialize dce_virtual_ip_funcs
For virtual display feature, first need to initialize dce_virtual_ip_funcs,
which will be used when set ip blocks.

Signed-off-by: Emily Deng <Emily.Deng@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-08-08 13:44:20 -04:00