[PATCH] drm/radeon: release digital encoder before asking for new one.

Dave Airlie airlied at gmail.com
Wed Feb 25 17:32:54 PST 2015


From: Dave Airlie <airlied at redhat.com>

This stops a DRM_ERROR that says we already used the encoder.

Reported-by: Dieter Nützel <Dieter at nuetzel-hh.de>
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 drivers/gpu/drm/radeon/atombios_encoders.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/radeon/atombios_encoders.c b/drivers/gpu/drm/radeon/atombios_encoders.c
index e8fe2b7..0f46f68 100644
--- a/drivers/gpu/drm/radeon/atombios_encoders.c
+++ b/drivers/gpu/drm/radeon/atombios_encoders.c
@@ -2465,6 +2465,8 @@ static void radeon_atom_encoder_prepare(struct drm_encoder *encoder)
 	     ENCODER_OBJECT_ID_NONE)) {
 		struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv;
 		if (dig) {
+			if (dig->dig_encoder >= 0)
+				radeon_atom_release_dig_encoder(rdev, dig->dig_encoder);
 			dig->dig_encoder = radeon_atom_pick_dig_encoder(encoder, -1);
 			if (radeon_encoder->active_device & ATOM_DEVICE_DFP_SUPPORT) {
 				if (rdev->family >= CHIP_R600)
-- 
2.1.0



More information about the dri-devel mailing list