From patchwork Tue Oct 20 06:31:47 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhao, Yakui" X-Patchwork-Id: 54895 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9K6X785012095 for ; Tue, 20 Oct 2009 06:33:07 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 762F29EB40; Mon, 19 Oct 2009 23:33:07 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id D17E59E7F3 for ; Mon, 19 Oct 2009 23:33:04 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 19 Oct 2009 23:26:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.44,590,1249282800"; d="scan'208";a="505314422" Received: from yakui_zhao.sh.intel.com (HELO localhost.localdomain) ([10.239.13.184]) by fmsmga002.fm.intel.com with ESMTP; 19 Oct 2009 23:24:38 -0700 From: yakui.zhao@intel.com To: cworth@cworth.org Date: Tue, 20 Oct 2009 14:31:47 +0800 Message-Id: <1256020307-32636-1-git-send-email-yakui.zhao@intel.com> X-Mailer: git-send-email 1.5.4.5 Cc: intel-gfx@lists.freedesktop.org Subject: [Intel-gfx] [PATCH] gfx: update the mmheight/mmwidth again after parsing EDID X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.9 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 3417cab..626ca1d 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -783,7 +783,14 @@ static int drmmode_output_lvds_edid(xf86OutputPtr output, output->MonInfo = edid_mon; return 0; } +static void drmmode_update_output(xf86OutputPtr output) +{ + drmmode_output_private_ptr drmmode_output = output->driver_private; + drmModeConnectorPtr koutput = drmmode_output->mode_output; + output->mm_width = koutput->mmWidth; + output->mm_height = koutput->mmHeight; +} static DisplayModePtr drmmode_output_get_modes(xf86OutputPtr output) { @@ -824,6 +831,7 @@ drmmode_output_get_modes(xf86OutputPtr output) xf86InterpretEDID(output->scrn->scrnIndex, NULL)); + drmmode_update_output(output); /* modes should already be available */ for (i = 0; i < koutput->count_modes; i++) { Mode = xnfalloc(sizeof(DisplayModeRec));