From patchwork Tue Jun 26 07:55:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AceLan Kao X-Patchwork-Id: 934706 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 Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="pPzuXNys"; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41FJJ305D2z9ryk; Tue, 26 Jun 2018 17:55:46 +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 1fXip6-000327-GF; Tue, 26 Jun 2018 07:55:36 +0000 Received: from mail-pl0-f66.google.com ([209.85.160.66]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1fXip5-000320-GO for kernel-team@lists.ubuntu.com; Tue, 26 Jun 2018 07:55:35 +0000 Received: by mail-pl0-f66.google.com with SMTP id s24-v6so8158523plq.6 for ; Tue, 26 Jun 2018 00:55:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id; bh=bOvwdX9S6O7LfZ+QO9k/gusHQlm39q/4Yjiib8FzWV0=; b=pPzuXNysCmzmZjeONjKgO/wNyZ754HaHipEnxSdHkggUdirNBwU7XkrgA+18cZnK46 vf5DZjRxmRnyls1YibcOHW+hTlXWs2+B1K9Y9q3ctaQWyftvFdSni2VingBlhUcWzpJN sIkIexh7KDgwJPLO8TlrQ6kNXCniXZXZtgrRwudPCITMhSGQ6hTGgJ2g/9kghW7c2gcm HDpTtG7uiZSakjZuxtjBNQ8dTD4B6EY6Td1UzzfnSuWM8o2UepEdXFuwsMqLVCm7sxi0 /FJHrNK3XAyWF4D00Pdpo0y7EyvivkrwhoCoNMnCFtXiH+IxDuou+gsHYkFJH3BAsq82 W4EA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id; bh=bOvwdX9S6O7LfZ+QO9k/gusHQlm39q/4Yjiib8FzWV0=; b=Q5DxTJatEYGiZ8jME0qp/p1pwGbfnChdtBpziSS6o8xW2refPu79ZwF2MONBJxf0Xr 8XKs46OrYSj+T6poZE7Xwxmx4QNYcFLIEFkTJGkjT62sf/fmdyqR4UqAWa6/FvvGsFwq y6oVVNWjWWokhbcU+CmBEixJ7TiPx1oNO8vq8r51qOzLIk+qv6Eb4QnmBHS2tCUI1hQz ju+GLi0xT10pb8A2cjePipwwWwurUp54oy7WRPWEP5JGaKog4EOQqwvvcpoCJeBorrX2 YLQ0HOUQlN6jckRFQ5LcVQlsmEMqfcMeIgeVlTlNomUfnENEVFmM5+i1EiIAFAQDZXUK EYTA== X-Gm-Message-State: APt69E2ax28MMFFd+RB/kJKsRJlErPcmRGSL/K0YsVZbjmpVkeReAA7K IejBtk+3uUx9FSygR04A4MvTDeiv X-Google-Smtp-Source: ADUXVKIHXWATR7GTSXkD+q1jnBvpUO6Z4MfJvC23xTxbGALa4gbOFHJiFZkrCDlgU/8Quc6qkZlaXA== X-Received: by 2002:a17:902:88:: with SMTP id a8-v6mr509879pla.156.1529999733651; Tue, 26 Jun 2018 00:55:33 -0700 (PDT) Received: from localhost ([175.41.48.77]) by smtp.gmail.com with ESMTPSA id t3-v6sm1521831pgf.43.2018.06.26.00.55.31 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Jun 2018 00:55:32 -0700 (PDT) From: AceLan Kao To: kernel-team@lists.ubuntu.com Subject: [PATCH 0/1][SRU][Bionic] Fix Nvidia fails after switching its mode Date: Tue, 26 Jun 2018 15:55:29 +0800 Message-Id: <20180626075530.9200-1-acelan.kao@canonical.com> X-Mailer: git-send-email 2.17.1 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/1778658 [Impact] Switch Nvidia mode requires rebooting the system. It's because of losing some of its states while switching mode if runtime PM is enabled. It's a generic issue that would happen on some other devices, too. This patch restores devices' config space on runtime resume. [Test] Test and verify it on machines with Nvidia discrete graphics. [Fix] Fix by saving and restoring config space over a runtime suspend cycle even if the device is not bound. [Regression Potential] Low. It just saves and restores states during suspending and resuming. Rafael J. Wysocki (1): PCI: Restore config space on runtime resume despite being unbound drivers/pci/pci-driver.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) Acked-by: Anthony Wong