From patchwork Tue Jul 24 21:06:11 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Glisse X-Patchwork-Id: 1233341 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 26FB23FD4F for ; Tue, 24 Jul 2012 21:06:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F037BA09C1 for ; Tue, 24 Jul 2012 14:06:16 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-gh0-f177.google.com (mail-gh0-f177.google.com [209.85.160.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 0A26CA09D5 for ; Tue, 24 Jul 2012 14:06:01 -0700 (PDT) Received: by ghbf11 with SMTP id f11so19105ghb.36 for ; Tue, 24 Jul 2012 14:06:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=+1e7vKAYz/bNbIUE2c+dm5/ZeG1mAW2BV4mdxIXGDtc=; b=E3hE2efLq569av6eUNscZmTHPgT5X/vITz88xyN3kVb//XRmVjc6/AuU7t4+BMLoyT DE8y6N1V6zdjuO46kXLS7TbSs7FgTIaQSzdqmFma+5CzlmXzkD2D9QsXOafRkYKLgB34 8AIUkXHEfyaJaS6RA2npKDERDD02uMrs1CPtBqfDk7Ff3GCnCSopSZ0MxUpkoyLf02OB xeiOgD9lGVNJXMQtyFQG5NeahaP+Q3D5hX8kKwOsEn6pJoAXDHe6WITmYUDzkKrsEUjM OPd6LrEXzXWrG6b5lawaWN6GHg+EswHT9PzRVHSTyk62du4LTz24CrutJsAXq3CooTJ/ qnqQ== Received: by 10.43.70.71 with SMTP id yf7mr18208193icb.14.1343163961174; Tue, 24 Jul 2012 14:06:01 -0700 (PDT) Received: from homer.localdomain.com ([66.187.233.206]) by mx.google.com with ESMTPS id nh8sm3167172igc.1.2012.07.24.14.05.59 (version=SSLv3 cipher=OTHER); Tue, 24 Jul 2012 14:06:00 -0700 (PDT) From: j.glisse@gmail.com To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm/radeon: fix dpms on/off on trinity/aruba v2 Date: Tue, 24 Jul 2012 17:06:11 -0400 Message-Id: <1343163971-1101-1-git-send-email-j.glisse@gmail.com> X-Mailer: git-send-email 1.7.10.4 Cc: Jerome Glisse , stable@kernel.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org From: Jerome Glisse The external encoder need to be setup again before enabling the transmiter. This seems to be only needed on some trinity/aruba to fix dpms on. v2: Add comment, only setup again on dce6 ie aruba or newer. Cc: Signed-off-by: Jerome Glisse Reviewed-by: Alex Deucher --- drivers/gpu/drm/radeon/atombios_encoders.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/radeon/atombios_encoders.c b/drivers/gpu/drm/radeon/atombios_encoders.c index 486ccdf..8676b1b 100644 --- a/drivers/gpu/drm/radeon/atombios_encoders.c +++ b/drivers/gpu/drm/radeon/atombios_encoders.c @@ -1392,10 +1392,18 @@ radeon_atom_encoder_dpms_dig(struct drm_encoder *encoder, int mode) case DRM_MODE_DPMS_ON: /* some early dce3.2 boards have a bug in their transmitter control table */ if ((rdev->family == CHIP_RV710) || (rdev->family == CHIP_RV730) || - ASIC_IS_DCE41(rdev) || ASIC_IS_DCE5(rdev)) + ASIC_IS_DCE41(rdev) || ASIC_IS_DCE5(rdev)) { + if (ASIC_IS_DCE6(rdev)) { + /* It seems we need to call ATOM_ENCODER_CMD_SETUP again + * before reenabling encoder on DPMS ON, otherwise we never + * get picture + */ + atombios_dig_encoder_setup(encoder, ATOM_ENCODER_CMD_SETUP, 0); + } atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_ENABLE, 0, 0); - else + } else { atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_ENABLE_OUTPUT, 0, 0); + } if (ENCODER_MODE_IS_DP(atombios_get_encoder_mode(encoder)) && connector) { if (connector->connector_type == DRM_MODE_CONNECTOR_eDP) { atombios_set_edp_panel_power(connector,