From patchwork Thu Sep 23 06:44:01 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Skeggs X-Patchwork-Id: 201152 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 o8N6inje020575 for ; Thu, 23 Sep 2010 06:45:24 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2AF0C9EF82 for ; Wed, 22 Sep 2010 23:44:49 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yx0-f177.google.com (mail-yx0-f177.google.com [209.85.213.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 52AA39E7F7 for ; Wed, 22 Sep 2010 23:44:39 -0700 (PDT) Received: by yxm34 with SMTP id 34so597148yxm.36 for ; Wed, 22 Sep 2010 23:44:38 -0700 (PDT) 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=WXglTM2BStJ912FE6BpfhPWj439QC7/Y7mZd9K8LSx0=; b=XzadXwzqo6dOi85LoCiPUpFT/bdV+g5X4QA7yRetJHXoaDm+JsMP0iTGk6GaOEb3Fp mvM5/5VtRLXI7HiwWwaO9PTvagfbLi5Yp6z/gJZWql7W7DOejPad6kA/D8+kmEeVfx38 ZxGVJuOMO53s7HxTfA89tEeevCswSSQbOXjdY= 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=ftEO+afmxBG2d38bDHylL0qf5MPZEZjct14TTfZbQFOfmYkSZ3E+2GMxFqd2wGNDNi 1kjxiWQr+BlwDprpI1l1nZJjdL8GqOvzjmaIuI9gfgTo8+p84ekWp9FC7Kn8qCS2jf+D lrTDnoh9Q0DOVScZBQ9/Th35PIfCLW14lWamU= Received: by 10.150.50.9 with SMTP id x9mr2217199ybx.318.1285224278696; Wed, 22 Sep 2010 23:44:38 -0700 (PDT) Received: from nisroch.bne.redhat.com ([66.187.239.10]) by mx.google.com with ESMTPS id u24sm654027yba.9.2010.09.22.23.44.35 (version=SSLv3 cipher=RC4-MD5); Wed, 22 Sep 2010 23:44:37 -0700 (PDT) From: Ben Skeggs To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm/nouveau: fix panels using straps-based mode detection Date: Thu, 23 Sep 2010 16:44:01 +1000 Message-Id: <1285224241-32683-1-git-send-email-skeggsb@gmail.com> X-Mailer: git-send-email 1.7.2.2 In-Reply-To: <20100922225612.826b0553.akpm@linux-foundation.org> References: <20100922225612.826b0553.akpm@linux-foundation.org> Cc: airlied@redhat.com, linux-kernel@vger.kernel.org, Ben Skeggs 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, 23 Sep 2010 06:45:25 +0000 (UTC) diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c index 98c214c..4b286a8 100644 --- a/drivers/gpu/drm/nouveau/nouveau_connector.c +++ b/drivers/gpu/drm/nouveau/nouveau_connector.c @@ -594,8 +594,10 @@ nouveau_connector_get_modes(struct drm_connector *connector) if (nv_encoder->dcb->type == OUTPUT_LVDS && (nv_encoder->dcb->lvdsconf.use_straps_for_mode || dev_priv->vbios.fp_no_ddc) && nouveau_bios_fp_mode(dev, NULL)) { - nv_connector->native_mode = drm_mode_create(dev); - nouveau_bios_fp_mode(dev, nv_connector->native_mode); + struct drm_display_mode mode; + + nouveau_bios_fp_mode(dev, &mode); + nv_connector->native_mode = drm_mode_duplicate(dev, &mode); } /* Find the native mode if this is a digital panel, if we didn't