From patchwork Thu Dec 9 03:13:05 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 392852 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oB93E7LS027381 for ; Thu, 9 Dec 2010 03:14:27 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D43F19ECC4 for ; Wed, 8 Dec 2010 19:14:06 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qw0-f49.google.com (mail-qw0-f49.google.com [209.85.216.49]) by gabe.freedesktop.org (Postfix) with ESMTP id 9970D9E746 for ; Wed, 8 Dec 2010 19:13:20 -0800 (PST) Received: by qwj9 with SMTP id 9so2046717qwj.36 for ; Wed, 08 Dec 2010 19:13:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references; bh=mX3ISjB4rEg7jXsROZifpvkKDP7YxWeTLH11nTJ03Nw=; b=buyDm7SAa3zm1JkD/pRtH4naXZS83LSQux+7XPoZbTYaco5P0kewdMYFRdqtAh+GkY ECw4iIZ+ScaazHPOJ/3bu+aBU8JDXDtDoVwpaO6ZkudEtkfqRlv+DHrGqWkKcJDmKhdD uo56HrCx4+Uiibc2UA5L1zpgSCklDCGUooSII= 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=QvgRg5QtkmQY6fTirCyLYe9idOnnPN7CtoB1d06x6D7xw8Cyz/STPgKDjs6rJEmS/O bztJDCZHQGowBbJXZbpex5/Zgdfqzx9tu343KSfM0Kbvt2fOv3CPCpUJR2GtkMgc1p8w Juu/TNJKQQ8vh7tu2dBZB1YCv9O5sl7ISMOK0= Received: by 10.224.181.197 with SMTP id bz5mr7716923qab.221.1291864400160; Wed, 08 Dec 2010 19:13:20 -0800 (PST) Received: from localhost.localdomain (static-74-96-105-7.washdc.fios.verizon.net [74.96.105.7]) by mx.google.com with ESMTPS id m7sm841397qck.37.2010.12.08.19.13.18 (version=SSLv3 cipher=RC4-MD5); Wed, 08 Dec 2010 19:13:19 -0800 (PST) From: Alex Deucher To: airlied@gmail.com, dri-devel@lists.freedesktop.org Subject: [PATCH 1/2] drm/radeon/kms: use LCD physical size from vbios tables if available Date: Wed, 8 Dec 2010 22:13:05 -0500 Message-Id: <1291864386-31923-2-git-send-email-alexdeucher@gmail.com> X-Mailer: git-send-email 1.7.1.1 In-Reply-To: <1291864386-31923-1-git-send-email-alexdeucher@gmail.com> References: <1291864386-31923-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.3 (demeter1.kernel.org [140.211.167.41]); Thu, 09 Dec 2010 03:14:27 +0000 (UTC) diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c index 6d33da3..ac8d2e9 100644 --- a/drivers/gpu/drm/radeon/radeon_atombios.c +++ b/drivers/gpu/drm/radeon/radeon_atombios.c @@ -1555,6 +1555,9 @@ struct radeon_encoder_atom_dig *radeon_atombios_get_lvds_info(struct if (misc & ATOM_DOUBLE_CLOCK_MODE) lvds->native_mode.flags |= DRM_MODE_FLAG_DBLSCAN; + lvds->native_mode.width_mm = lvds_info->info.sLCDTiming.usImageHSize; + lvds->native_mode.height_mm = lvds_info->info.sLCDTiming.usImageVSize; + /* set crtc values */ drm_mode_set_crtcinfo(&lvds->native_mode, CRTC_INTERLACE_HALVE_V); diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c index 8afaf7a..5b00f92 100644 --- a/drivers/gpu/drm/radeon/radeon_connectors.c +++ b/drivers/gpu/drm/radeon/radeon_connectors.c @@ -472,6 +472,9 @@ static int radeon_lvds_get_modes(struct drm_connector *connector) if (mode) { ret = 1; drm_mode_probed_add(connector, mode); + /* add the width/height from vbios tables if available */ + connector->display_info.width_mm = mode->width_mm; + connector->display_info.height_mm = mode->height_mm; /* add scaled modes */ radeon_add_common_modes(encoder, connector); }