From patchwork Tue Jun 13 17:50:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Larouche X-Patchwork-Id: 9785061 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 701D760384 for ; Wed, 14 Jun 2017 00:41:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 631F928567 for ; Wed, 14 Jun 2017 00:41:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5702C28573; Wed, 14 Jun 2017 00:41:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6197228567 for ; Wed, 14 Jun 2017 00:41:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9C8E16E3F0; Wed, 14 Jun 2017 00:41:02 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 309 seconds by postgrey-1.35 at gabe; Tue, 13 Jun 2017 18:00:09 UTC Received: from mtxmxout2.matrox.com (mtxmxout5.matrox.com [138.11.2.95]) by gabe.freedesktop.org (Postfix) with ESMTPS id F0D6E6E300 for ; Tue, 13 Jun 2017 18:00:09 +0000 (UTC) Received: from venus.matrox.com (unknown [192.168.1.36]) by mtxmxout2.matrox.com (Postfix) with ESMTP id D34364020D for ; Tue, 13 Jun 2017 13:54:59 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=matrox.com; s=dkim; t=1497376499; bh=BooaOMeqypVnJGlaQn648a4ogvZkAxYq31UqSDtr9i0=; h=From:To:Cc:Subject:Date; b=FLJjnxilxGqhrxVYHP2vZ5/BTdW2ebSmkRE7HsBGBVSubMIr21Qsv6r5c/bN3+1Aj coqwI40i9rp6IWDzsVXQnCqX+tTWZuII0Am5biiGWCETIvHwXEnegOm4W9DIZ4fz9G 60qxBKz/Uwmtwm5x2erH0oi5xfZmX6lil2CNO9HY= Received: (from ssmsp@localhost) by venus.matrox.com (8.14.6/8.13.2) id v5DHsxgi025387 for dri-devel@lists.freedesktop.org; Tue, 13 Jun 2017 13:54:59 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by venus.matrox.com (Postfix) with ESMTP id 996C15F769 for ; Tue, 13 Jun 2017 13:54:57 -0400 (EDT) X-Virus-MTX-Scanned: by Matrox Virus scanner at venus.matrox.com Received: from venus.matrox.com ([127.0.0.1]) by localhost (venus.matrox.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id OnFoUWIMBTqQ for ; Tue, 13 Jun 2017 13:54:57 -0400 (EDT) Received: from venus-in.matrox.com (localhost.localdomain [127.0.0.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by venus.matrox.com (Postfix) with ESMTPS id A05545F76E for ; Tue, 13 Jun 2017 13:54:56 -0400 (EDT) Received: from mlaroucheRHEL.matrox.com (dyn-152-138.matrox.com [192.168.152.138]) by venus-in.matrox.com (Postfix) with ESMTP id 5651761CF8; Tue, 13 Jun 2017 13:54:56 -0400 (EDT) From: mathieu.larouche@matrox.com To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/1] drm/mgag200: Fix to always set HiPri for G200e4 Date: Tue, 13 Jun 2017 13:50:38 -0400 Message-Id: <28e036c63dc92edf4c2dff6a4c8ab0c6814211ef.1497288528.git.mathieu.larouche@matrox.com> X-Mailer: git-send-email 1.8.3.1 X-Mailman-Approved-At: Wed, 14 Jun 2017 00:40:59 +0000 Cc: Mathieu Larouche X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Mathieu Larouche - Changed the HiPri value for G200e4 to always be 0. - Added Bandwith limitation to block resolution above 1920x1200x60Hz --- drivers/gpu/drm/mgag200/mgag200_mode.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mgag200/mgag200_mode.c b/drivers/gpu/drm/mgag200/mgag200_mode.c index 6b21cb2..292e8eb 100644 --- a/drivers/gpu/drm/mgag200/mgag200_mode.c +++ b/drivers/gpu/drm/mgag200/mgag200_mode.c @@ -1133,7 +1133,10 @@ static int mga_crtc_mode_set(struct drm_crtc *crtc, if (IS_G200_SE(mdev)) { - if (mdev->unique_rev_id >= 0x02) { + if (mdev->unique_rev_id >= 0x04) { + WREG8(MGAREG_CRTCEXT_INDEX, 0x06); + WREG8(MGAREG_CRTCEXT_DATA, 0); + } else if (mdev->unique_rev_id >= 0x02) { u8 hi_pri_lvl; u32 bpp; u32 mb; @@ -1598,6 +1601,10 @@ static int mga_vga_mode_valid(struct drm_connector *connector, if (mga_vga_calculate_mode_bandwidth(mode, bpp) > (30100 * 1024)) return MODE_BANDWIDTH; + } else { + if (mga_vga_calculate_mode_bandwidth(mode, bpp) + > (55000 * 1024)) + return MODE_BANDWIDTH; } } else if (mdev->type == G200_WB) { if (mode->hdisplay > 1280)