From patchwork Tue Sep 11 05:24:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hui Wang X-Patchwork-Id: 968414 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 428YJh3vtVz9s7T; Tue, 11 Sep 2018 15:25:08 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1fzbAa-0005uJ-0Z; Tue, 11 Sep 2018 05:25:00 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1fzbAZ-0005uD-6s for kernel-team@lists.ubuntu.com; Tue, 11 Sep 2018 05:24:59 +0000 Received: from [125.35.49.90] (helo=hwang4-Lenovo-V480c.bluefin) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1fzbAY-0003kH-9n for kernel-team@lists.ubuntu.com; Tue, 11 Sep 2018 05:24:59 +0000 From: Hui Wang To: kernel-team@lists.ubuntu.com Subject: [SRU][Bionic][B-OEM][PATCH 0/1] fix the hang problem for nvidia p1000 graphic card Date: Tue, 11 Sep 2018 13:24:48 +0800 Message-Id: <1536643489-6238-1-git-send-email-hui.wang@canonical.com> X-Mailer: git-send-email 2.7.4 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/1791569 This patch is in the 4.18 already, no need to send it to cosmic. Due to the context conflict, if we want to apply this patch as it is, we need to apply a large amount of patches ahead of this patch, it is possible to introduce some regression. So I made some change in this patch, it is some differnt from the orignal patch, but they have the same logic, and it can be applied to bionic kernel. [Impact] We have 2 nvidia graphic cards, and the nouveau driver in the bionic kernel can't work well with both of these 2 cards, one of the cards hang during the boot process, we compared the output of lspci and vbios version of these 2 cards, they are same; and according to nivida's reply, it is possible that they have some difference on computational units (https://devtalk.nvidia.com/default/topic/1038973/ linux/2-same-quadro-p1000-cards-but-only-one-can-install-ubuntu-/), and kernel-4.18 fixed this problem, through bisect, this patch was found. [Fix] backport a upstream patch to fix this problem. without this patch, the number of tpc (texture process cluster) is hardcoded to be 5 for some nv graphic families, but in practice, the tpc number of many families is not 5. And the p1000 grphic card belong to gp107 family, it is 3 intead of 5. [Test Case] tested this patch with P1000, P2000, P620 and P500 graphic cards, all work well as before. [Regression Potential] Very low, this patch comes from upstream, and I have tested it with many nv graphic cards, they all worked well as before. Ben Skeggs (1): drm/nouveau/gr/gf100-: virtualise tpc_mask + apply fixes from traces drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.c | 6 ++++++ drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.h | 12 +++++++----- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm200.c | 17 ++++++++++++++--- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm20b.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgp100.c | 17 +++++++++-------- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgp102.c | 2 ++ drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgp107.c | 2 ++ drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h | 2 ++ drivers/gpu/drm/nouveau/nvkm/engine/gr/gm200.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gp100.c | 2 ++ drivers/gpu/drm/nouveau/nvkm/engine/gr/gp102.c | 2 ++ drivers/gpu/drm/nouveau/nvkm/engine/gr/gp107.c | 2 ++ drivers/gpu/drm/nouveau/nvkm/engine/gr/gp10b.c | 2 ++ 13 files changed, 52 insertions(+), 17 deletions(-)