From: Pierre O. <pi...@os...> - 2009-11-30 20:16:09
Attachments:
signature.asc
|
Reconfiguring one CRTC whilst another is running can cause a hang under some circumstances. Unfortunately we haven't pinpointed exactly what those circumstances are, so disable all CRTCs for every mode switch. Signed-off-by: Pierre Ossman <pi...@os...> Acked-by: Alex Deucher <ale...@gm...> --- diff --git a/drivers/gpu/drm/radeon/radeon_legacy_crtc.c b/drivers/gpu/drm/radeon/radeon_legacy_crtc.c index 8d0b7aa..4ece480 100644 --- a/drivers/gpu/drm/radeon/radeon_legacy_crtc.c +++ b/drivers/gpu/drm/radeon/radeon_legacy_crtc.c @@ -1042,12 +1042,29 @@ static int radeon_crtc_mode_set(struct drm_crtc *crtc, static void radeon_crtc_prepare(struct drm_crtc *crtc) { - radeon_crtc_dpms(crtc, DRM_MODE_DPMS_OFF); + struct drm_device *dev = crtc->dev; + struct drm_crtc *crtci; + + /* + * The hardware wedges sometimes if you reconfigure one CRTC + * whilst another is running (see fdo bug #24611). + */ + list_for_each_entry(crtci, &dev->mode_config.crtc_list, head) + radeon_crtc_dpms(crtci, DRM_MODE_DPMS_OFF); } static void radeon_crtc_commit(struct drm_crtc *crtc) { - radeon_crtc_dpms(crtc, DRM_MODE_DPMS_ON); + struct drm_device *dev = crtc->dev; + struct drm_crtc *crtci; + + /* + * Reenable the CRTCs that should be running. + */ + list_for_each_entry(crtci, &dev->mode_config.crtc_list, head) { + if (crtci->enabled) + radeon_crtc_dpms(crtci, DRM_MODE_DPMS_ON); + } } static const struct drm_crtc_helper_funcs legacy_helper_funcs = { -- -- Pierre Ossman WARNING: This correspondence is being monitored by FRA, a Swedish intelligence agency. Make sure your server uses encryption for SMTP traffic and consider using PGP for end-to-end encryption. |
From: Jerome G. <gl...@fr...> - 2009-11-30 21:10:59
|
On Mon, Nov 30, 2009 at 09:15:44PM +0100, Pierre Ossman wrote: > Reconfiguring one CRTC whilst another is running can cause a hang under > some circumstances. Unfortunately we haven't pinpointed exactly what those > circumstances are, so disable all CRTCs for every mode switch. > > Signed-off-by: Pierre Ossman <pi...@os...> > Acked-by: Alex Deucher <ale...@gm...> > --- I think this patch is wrong, we should only reenable crtc which are on, and not uncondionaly reenable all crtc. Cheers, Jerome |
From: Jerome G. <gl...@fr...> - 2009-11-30 21:39:42
|
On Mon, Nov 30, 2009 at 10:07:50PM +0100, Jerome Glisse wrote: > On Mon, Nov 30, 2009 at 09:15:44PM +0100, Pierre Ossman wrote: > > Reconfiguring one CRTC whilst another is running can cause a hang under > > some circumstances. Unfortunately we haven't pinpointed exactly what those > > circumstances are, so disable all CRTCs for every mode switch. > > > > Signed-off-by: Pierre Ossman <pi...@os...> > > Acked-by: Alex Deucher <ale...@gm...> > > --- > > I think this patch is wrong, we should only reenable crtc which > are on, and not uncondionaly reenable all crtc. > > Cheers, > Jerome > Never mind i missed the test. Cheers, Jerome |