From: Julia Lemire Subject: [PATCH 1/2] drm/mgag200: Bug fix: Renesas board now selects native resolution. Date: Thu, 7 Mar 2013 10:41:03 -0500 Message-ID: <20130307154103.GA20561@harvey-pc.matrox.com> References: <20130307153850.GA20552@harvey-pc.matrox.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mtxmxout2.matrox.com (mtxmxout2.matrox.com [138.11.2.92]) by gabe.freedesktop.org (Postfix) with ESMTP id 2F48BE61CF for ; Thu, 7 Mar 2013 08:01:50 -0800 (PST) Received: from venus.matrox.com (venus.matrox.com [192.168.1.30]) by mtxmxout2.matrox.com (Postfix) with ESMTP id A97CC412E33 for ; Thu, 7 Mar 2013 10:36:47 -0500 (EST) Received: (from ssmsp@localhost) by venus.matrox.com (8.14.4/8.13.2) id r27Fal4S025234 for dri-devel@lists.freedesktop.org; Thu, 7 Mar 2013 10:36:47 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by venus.matrox.com (Postfix) with ESMTP id 31643F4DBF for ; Thu, 7 Mar 2013 10:36:46 -0500 (EST) Received: from pluton.matrox.com (pluton.matrox.com [192.168.8.7]) by venus.matrox.com (Postfix) with ESMTP id EDA32F4DB8 for ; Thu, 7 Mar 2013 10:36:45 -0500 (EST) Content-Disposition: inline In-Reply-To: <20130307153850.GA20552@harvey-pc.matrox.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: dri-devel@lists.freedesktop.org Cc: Mathieu Larouche List-Id: dri-devel@lists.freedesktop.org Renesas boards were consistently defaulting to the 1024x768 resolution, regardless of the native resolution of the monitor plugged in. It was determined that the EDID of the monitor was not being read. Since the DAC is a shared line, in order to read from or write to it we must take control of the DAC clock. This can be done by setting the proper register to one. This bug fix sets the register MGA1064_GEN_IO_CTL2 to one. The DAC control line can be used to determine whether or not a new monitor has been plugged in. But since the hotplug feature is not one we will support, it has been decided to simply leave the register set to one. Signed-off-by: Julia Lemire --- drivers/gpu/drm/mgag200/mgag200_i2c.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/mgag200/mgag200_i2c.c b/drivers/gpu/drm/mgag200/mgag200_i2c.c index 5a88ec5..d3dcf54 100644 --- a/drivers/gpu/drm/mgag200/mgag200_i2c.c +++ b/drivers/gpu/drm/mgag200/mgag200_i2c.c @@ -92,6 +92,7 @@ struct mga_i2c_chan *mgag200_i2c_create(struct drm_device *dev) int ret; int data, clock; + WREG_DAC(MGA1064_GEN_IO_CTL2, 1); WREG_DAC(MGA1064_GEN_IO_DATA, 0xff); WREG_DAC(MGA1064_GEN_IO_CTL, 0); -- 1.7.12.4