From patchwork Mon Jun 13 21:13:35 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 876472 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p5DLaMXh026657 for ; Mon, 13 Jun 2011 21:36:42 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5D1C09F4EC for ; Mon, 13 Jun 2011 14:36:22 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-vx0-f177.google.com (mail-vx0-f177.google.com [209.85.220.177]) by gabe.freedesktop.org (Postfix) with ESMTP id BBD759E753 for ; Mon, 13 Jun 2011 14:36:12 -0700 (PDT) Received: by vxd2 with SMTP id 2so5150538vxd.36 for ; Mon, 13 Jun 2011 14:36:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=AIIIFDJ2gmUxA2/B3VJ0L6QHNh1h88cz1rdQ0gKJcWg=; b=b1PJj5JPLMJhbOIYOAsyjrLxx4DYkim0FOMUVW8eek6FGQhJk5/Mc+SWZ5OL+cI3Zj LZwgf8Y9VsCZlB0apTtStJvGKuMVG/2/fISLBpKQGUYxdKBAGn2BMLw9YfmUQuba4ojq HAA50jHbAFwlcZ3Y7wj/9fHEGcAH3irqksosU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=Nhi66sIu8gFuVn63mn9GO2VWC+sbqVsENott+WSfPnWiKCTB+yNl2AYkRrNMrtrjcl Lm5J9xUW8ndezXlDWOkTkPqkj1FB3m88NannBeUErIZjqAY82TI/QFrCdVOMOox6sbMe r2ONP8/nM+N2IKMIKqf9DMv6ccvVOC8ehSNhc= Received: by 10.52.173.84 with SMTP id bi20mr41013vdc.69.1307999632106; Mon, 13 Jun 2011 14:13:52 -0700 (PDT) Received: from localhost.localdomain (static-74-96-105-7.washdc.fios.verizon.net [74.96.105.7]) by mx.google.com with ESMTPS id bl1sm4055801vbb.17.2011.06.13.14.13.50 (version=SSLv3 cipher=OTHER); Mon, 13 Jun 2011 14:13:51 -0700 (PDT) From: Alex Deucher To: airlied@gmail.com, dri-devel@lists.freedesktop.org Subject: [PATCH 5/6] drm/radeon/kms: fix handling of DP to LVDS bridges Date: Mon, 13 Jun 2011 17:13:35 -0400 Message-Id: <1307999616-6252-5-git-send-email-alexdeucher@gmail.com> X-Mailer: git-send-email 1.7.1.1 In-Reply-To: <1307999616-6252-1-git-send-email-alexdeucher@gmail.com> References: <1307999616-6252-1-git-send-email-alexdeucher@gmail.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.11 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 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Mon, 13 Jun 2011 21:36:42 +0000 (UTC) They need to be treated like eDP rather than DP. May fix: https://bugzilla.kernel.org/show_bug.cgi?id=34822 Signed-off-by: Alex Deucher --- drivers/gpu/drm/radeon/radeon_connectors.c | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c index 4d45855..1d1504b 100644 --- a/drivers/gpu/drm/radeon/radeon_connectors.c +++ b/drivers/gpu/drm/radeon/radeon_connectors.c @@ -1068,7 +1068,8 @@ static int radeon_dp_get_modes(struct drm_connector *connector) struct drm_encoder *encoder = radeon_best_single_encoder(connector); int ret; - if (connector->connector_type == DRM_MODE_CONNECTOR_eDP) { + if ((connector->connector_type == DRM_MODE_CONNECTOR_eDP) || + (connector->connector_type == DRM_MODE_CONNECTOR_LVDS)) { struct drm_display_mode *mode; if (!radeon_dig_connector->edp_on) @@ -1201,7 +1202,8 @@ radeon_dp_detect(struct drm_connector *connector, bool force) radeon_connector->edid = NULL; } - if (connector->connector_type == DRM_MODE_CONNECTOR_eDP) { + if ((connector->connector_type == DRM_MODE_CONNECTOR_eDP) || + (connector->connector_type == DRM_MODE_CONNECTOR_LVDS)) { if (encoder) { struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); struct drm_display_mode *native_mode = &radeon_encoder->native_mode; @@ -1264,7 +1266,8 @@ static int radeon_dp_mode_valid(struct drm_connector *connector, /* XXX check mode bandwidth */ - if (connector->connector_type == DRM_MODE_CONNECTOR_eDP) { + if ((connector->connector_type == DRM_MODE_CONNECTOR_eDP) || + (connector->connector_type == DRM_MODE_CONNECTOR_LVDS)) { struct drm_encoder *encoder = radeon_best_single_encoder(connector); if ((mode->hdisplay < 320) || (mode->vdisplay < 240)) @@ -1274,7 +1277,7 @@ static int radeon_dp_mode_valid(struct drm_connector *connector, struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); struct drm_display_mode *native_mode = &radeon_encoder->native_mode; - /* AVIVO hardware supports downscaling modes larger than the panel + /* AVIVO hardware supports downscaling modes larger than the panel * to the panel size, but I'm not sure this is desirable. */ if ((mode->hdisplay > native_mode->hdisplay) ||