From patchwork Thu Oct 22 13:31:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Kuoppala X-Patchwork-Id: 7464961 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 3E0479F302 for ; Thu, 22 Oct 2015 13:30:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 44D1820520 for ; Thu, 22 Oct 2015 13:30:53 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 3494C2051F for ; Thu, 22 Oct 2015 13:30:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C04B06EFCA; Thu, 22 Oct 2015 06:30:51 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id 64FDD6EFCA for ; Thu, 22 Oct 2015 06:30:50 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 22 Oct 2015 06:30:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,182,1444719600"; d="scan'208";a="832997515" Received: from rosetta.fi.intel.com (HELO rosetta) ([10.237.72.50]) by fmsmga002.fm.intel.com with ESMTP; 22 Oct 2015 06:30:45 -0700 Received: by rosetta (Postfix, from userid 1000) id D138681941; Thu, 22 Oct 2015 16:31:01 +0300 (EEST) From: Mika Kuoppala To: intel-gfx@lists.freedesktop.org Date: Thu, 22 Oct 2015 16:31:01 +0300 Message-Id: <1445520661-17819-1-git-send-email-mika.kuoppala@intel.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <20151021154610.GQ2551@nuc-i3427.alporthouse.com> References: <20151021154610.GQ2551@nuc-i3427.alporthouse.com> Subject: [Intel-gfx] [PATCH 3/7] drm/i915/skl: Refuse to load outdated dmc firmware X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There is known issue on GT interrupt delivery with DC6 and firmwares <1.21. There is a suspicion that this causes spurious gpu hangs on driver init and with some workloads, as upgrading the firmware to 1.21 makes these problems disappear. As of now the current version included in distribution firmware packages is very like to be 1.19. Play it safe and refuse to load a firmware version that may affect gpu side stability. With < 1.23 there is a palette and dmc ram corruption issue so blacklist anything below that. v2: Refuse to load fw instead of notifying the user v3: Rebase on header version changes v4: Refuse to load anything less than 1.23 v5: Give enough information for user for finding correct fw (Chris) Cc: Animesh Manna Cc: Jani Nikula Cc: Dave Gordon Cc: Arun Siluvery Cc: Imre Deak Cc: Patrik Jakobsson Cc: Rodrigo Vivi Cc: Chris Wilson References: https://01.org/linuxgraphics/downloads/skldmcver121 References: https://01.org/linuxgraphics/downloads/skylake-dmc-1.23 Testcase: igt/gem_exec_nop Signed-off-by: Mika Kuoppala --- drivers/gpu/drm/i915/intel_csr.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_csr.c b/drivers/gpu/drm/i915/intel_csr.c index cabcc51..8004b6d 100644 --- a/drivers/gpu/drm/i915/intel_csr.c +++ b/drivers/gpu/drm/i915/intel_csr.c @@ -47,6 +47,9 @@ MODULE_FIRMWARE(I915_CSR_SKL); MODULE_FIRMWARE(I915_CSR_BXT); +#define SKL_REQUIRED_FW_MAJOR 1 +#define SKL_REQUIRED_FW_MINOR 23 + /* * SKL CSR registers for DC5 and DC6 */ @@ -401,6 +404,18 @@ static void finish_csr_load(const struct firmware *fw, void *context) dmc_payload = csr->dmc_payload; memcpy(dmc_payload, &fw->data[readcount], nbytes); + if (IS_SKYLAKE(dev) && + (CSR_VERSION_MAJOR(csr->version) < SKL_REQUIRED_FW_MAJOR || + CSR_VERSION_MINOR(csr->version) < SKL_REQUIRED_FW_MINOR)) { + DRM_INFO("Refusing to load outdated DMC firmware v%u.%u\n", + CSR_VERSION_MAJOR(csr->version), + CSR_VERSION_MINOR(csr->version)); + DRM_INFO("Please upgrade to Skylake DMC - %u.%u or newer\n", + SKL_REQUIRED_FW_MAJOR, SKL_REQUIRED_FW_MINOR); + DRM_INFO("https://01.org/linuxgraphics/downloads\n"); + goto out; + } + /* load csr program during system boot, as needed for DC states */ intel_csr_load_program(dev); fw_loaded = true;