diff options
author | Mario Kleiner <mario.kleiner.de@gmail.com> | 2015-06-10 20:55:08 +0200 |
---|---|---|
committer | Michel Dänzer <michel.daenzer@amd.com> | 2015-06-11 12:22:16 +0900 |
commit | afab7839fc15722dbaa7203d00fe7f6ce5336b9d (patch) | |
tree | 92eb5131eee7106cb9ea70d284b54e7b031ae9a9 /src/radeon_kms.c | |
parent | d7c82731a8bf3d381bc571b94d80d9bb2dd6e40d (diff) |
Allow/Fix use of multiple ZaphodHead outputs per x-screen. (v2)
Defining multiple ZaphodHead outputs per x-screen in a
multiple x-screen's per gpu configuration caused all
outputs except one per x-screen to go dark, because
there was a fixed mapping x-screen number -> crtc number,
limiting the number of crtc's per x-screen to one.
On a ZaphodHead's setup, be more clever and assign
as many crtc's to a given x-screen as there are
ZaphodHeads defined for that screen, assuming
there are enough unused crtc's available.
Tested on a triple display setup with different combos
of one, two or three ZaphodHeads per one, two or three
x-screens.
This is a port of similar code from xf86-video-nouveau.
v2: Implement suggestions by Michel Dänzer: Less verbose
debug output, more clear warning message on crtc allocation
failure. Move clearing of per gpu assigned_crtc mask to
CloseScreen, indeed testing shows no need for the more
complex new server generation check from v1.
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
(v1) Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Diffstat (limited to 'src/radeon_kms.c')
-rw-r--r-- | src/radeon_kms.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/radeon_kms.c b/src/radeon_kms.c index 0690ef06..25a746db 100644 --- a/src/radeon_kms.c +++ b/src/radeon_kms.c @@ -1457,10 +1457,14 @@ static Bool RADEONCloseScreen_KMS(CLOSE_SCREEN_ARGS_DECL) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); + RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn); xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG, "RADEONCloseScreen\n"); + /* Clear mask of assigned crtc's in this generation */ + pRADEONEnt->assigned_crtcs = 0; + drmmode_uevent_fini(pScrn, &info->drmmode); radeon_drm_queue_close(pScrn); radeon_cs_flush_indirect(pScrn); |