From patchwork Wed Jun 14 14:39:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Larouche X-Patchwork-Id: 9787773 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 8E92E602CB for ; Thu, 15 Jun 2017 01:01:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 849B3284E4 for ; Thu, 15 Jun 2017 01:01:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 793C2284F6; Thu, 15 Jun 2017 01:01:01 +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 C8A77284F1 for ; Thu, 15 Jun 2017 01:01:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 791356E664; Thu, 15 Jun 2017 00:58:15 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mtxmxout1.matrox.com (mtxmxout1.matrox.com [138.11.2.91]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1FFCF6E558 for ; Wed, 14 Jun 2017 14:43:47 +0000 (UTC) Received: from venus.matrox.com (unknown [192.168.1.36]) by mtxmxout1.matrox.com (Postfix) with ESMTP id 6DAC44020F for ; Wed, 14 Jun 2017 10:43:46 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=matrox.com; s=dkim; t=1497451426; bh=TtRgugcb/YhnFhrx0WDC8IE2/SUi25r/Lmf+k/ykZt4=; h=From:To:Cc:Subject:Date; b=INUumnMwew28i1qHmnseAj2rpSSP//r1zwMkHm6+RojETa7GSxcBaChbsslrA1mZw 1Waa1BjaW+56n70otZlKSg9onR/eYX469fyLVoIF1y9F+WDpZVphsjmNFURj4dMJrY BhShhXK/B/oH2O34mSFn5X56xglFBTq9Lcekg/O0= Received: (from ssmsp@localhost) by venus.matrox.com (8.14.6/8.13.2) id v5EEhkjO009671 for dri-devel@lists.freedesktop.org; Wed, 14 Jun 2017 10:43:46 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by venus.matrox.com (Postfix) with ESMTP id AB9BF5F771 for ; Wed, 14 Jun 2017 10:43:45 -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 8RVLNNLCYlcD for ; Wed, 14 Jun 2017 10:43:45 -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 04D515F76D for ; Wed, 14 Jun 2017 10:43:44 -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 B1A8061C58; Wed, 14 Jun 2017 10:43:44 -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 V2 Date: Wed, 14 Jun 2017 10:39:42 -0400 Message-Id: X-Mailer: git-send-email 1.8.3.1 X-Mailman-Approved-At: Thu, 15 Jun 2017 00:57:20 +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 Signed-off-by: Mathieu Larouche --- 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)