From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christopher Harvey Subject: [PATCH] drm/mgag200: Add missing write to index before accessing data register Date: Fri, 31 May 2013 16:33:07 -0400 (EDT) Message-ID: <20130531203307.787D87F45F@pluton.matrox.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mtxmxout1.matrox.com (mtxmxout1.matrox.com [138.11.2.91]) by gabe.freedesktop.org (Postfix) with ESMTP id 590EBE5E03 for ; Fri, 31 May 2013 13:33:10 -0700 (PDT) Received: from mars.matrox.com (mars.matrox.com [192.168.1.29]) by mtxmxout1.matrox.com (Postfix) with ESMTP id EE46945BD74 for ; Fri, 31 May 2013 16:33:08 -0400 (EDT) Received: (from ssmsp@localhost) by mars.matrox.com (8.14.4/8.13.2) id r4VKX8cg021362 for dri-devel@lists.freedesktop.org; Fri, 31 May 2013 16:33:08 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by mars.matrox.com (Postfix) with ESMTP id C0D1F9521B for ; Fri, 31 May 2013 16:33:07 -0400 (EDT) Received: from pluton.matrox.com (pluton.matrox.com [192.168.8.7]) by mars.matrox.com (Postfix) with ESMTP id 8F74D951E4 for ; Fri, 31 May 2013 16:33:07 -0400 (EDT) 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 This is a bug fix for some versions of g200se cards while doing mode-setting. Signed-off-by: Christopher Harvey Tested-by: Julia Lemire Acked-by: Julia Lemire Julia Lemire --- drivers/gpu/drm/mgag200/mgag200_mode.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/mgag200/mgag200_mode.c b/drivers/gpu/drm/mgag200/mgag200_mode.c index deed0bd..5b1a9e7 100644 --- a/drivers/gpu/drm/mgag200/mgag200_mode.c +++ b/drivers/gpu/drm/mgag200/mgag200_mode.c @@ -1034,13 +1034,14 @@ static int mga_crtc_mode_set(struct drm_crtc *crtc, else hi_pri_lvl = 5; - WREG8(0x1fde, 0x06); - WREG8(0x1fdf, hi_pri_lvl); + WREG8(MGAREG_CRTCEXT_INDEX, 0x06); + WREG8(MGAREG_CRTCEXT_DATA, hi_pri_lvl); } else { + WREG8(MGAREG_CRTCEXT_INDEX, 0x06); if (mdev->reg_1e24 >= 0x01) - WREG8(0x1fdf, 0x03); + WREG8(MGAREG_CRTCEXT_DATA, 0x03); else - WREG8(0x1fdf, 0x04); + WREG8(MGAREG_CRTCEXT_DATA, 0x04); } } return 0; -- 1.8.1.5