|
@@ -432,6 +432,7 @@ nv50_crtc_prepare(struct drm_crtc *crtc)
|
|
struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc);
|
|
struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc);
|
|
struct drm_device *dev = crtc->dev;
|
|
struct drm_device *dev = crtc->dev;
|
|
struct drm_encoder *encoder;
|
|
struct drm_encoder *encoder;
|
|
|
|
+ uint32_t dac = 0, sor = 0;
|
|
|
|
|
|
NV_DEBUG_KMS(dev, "index %d\n", nv_crtc->index);
|
|
NV_DEBUG_KMS(dev, "index %d\n", nv_crtc->index);
|
|
|
|
|
|
@@ -439,9 +440,28 @@ nv50_crtc_prepare(struct drm_crtc *crtc)
|
|
list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
|
|
list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
|
|
struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
|
|
struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
|
|
|
|
|
|
- if (drm_helper_encoder_in_use(encoder))
|
|
|
|
|
|
+ if (!drm_helper_encoder_in_use(encoder))
|
|
continue;
|
|
continue;
|
|
|
|
|
|
|
|
+ if (nv_encoder->dcb->type == OUTPUT_ANALOG ||
|
|
|
|
+ nv_encoder->dcb->type == OUTPUT_TV)
|
|
|
|
+ dac |= (1 << nv_encoder->or);
|
|
|
|
+ else
|
|
|
|
+ sor |= (1 << nv_encoder->or);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
|
|
|
|
+ struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
|
|
|
|
+
|
|
|
|
+ if (nv_encoder->dcb->type == OUTPUT_ANALOG ||
|
|
|
|
+ nv_encoder->dcb->type == OUTPUT_TV) {
|
|
|
|
+ if (dac & (1 << nv_encoder->or))
|
|
|
|
+ continue;
|
|
|
|
+ } else {
|
|
|
|
+ if (sor & (1 << nv_encoder->or))
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+
|
|
nv_encoder->disconnect(nv_encoder);
|
|
nv_encoder->disconnect(nv_encoder);
|
|
}
|
|
}
|
|
|
|
|