From patchwork Wed Jun 1 21:28:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 9148187 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 F0BCF60467 for ; Wed, 1 Jun 2016 21:28:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E206825819 for ; Wed, 1 Jun 2016 21:28:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D6F0426C2F; Wed, 1 Jun 2016 21:28:52 +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=-3.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_WEB, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 912C725819 for ; Wed, 1 Jun 2016 21:28:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5092A6EA51; Wed, 1 Jun 2016 21:28:46 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-it0-x244.google.com (mail-it0-x244.google.com [IPv6:2607:f8b0:4001:c0b::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id BFBC46EA47 for ; Wed, 1 Jun 2016 21:28:42 +0000 (UTC) Received: by mail-it0-x244.google.com with SMTP id z123so447114itg.2 for ; Wed, 01 Jun 2016 14:28:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=dEgpKQxKtVadj63MA1pgtt95P+se8rAt2K6258JF8Io=; b=tl87o1/SoCZ0EoYRvjiT9N3/WGn5rff+T5ewxw/RYtYzl/1iowdY5yMH9NHfznB9OT auGvV8ucPhOYNUhhk/pLdh9fDAZoO6sECS0j2v8mLVfOezxQ22R9/PtNZ/dGXVwxtUNB +mwIoppGqi5syfLRbPoFAD6+n9++Obq8iVJ3EeTPOC7k6sfVxDtNJb+6EixrsuuVq2eQ +FIDR2hVlY2D5PtNa5HagFe2f7sLKKAn+Euj46/GW1xh1IsEUQh84Tzz0xU1mOZLut9l 4iAGNhCKavZ2XqgXiMleLNhN4EBv6ShVSdo33XGPgUZC1tf3EePfEZmU88tbMJahQkce JZ2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=dEgpKQxKtVadj63MA1pgtt95P+se8rAt2K6258JF8Io=; b=CoO94fJ6iSmwMyMN+O32OGH+sy/fAshywOqlng5wT+YHfl59wwpuSFQmQQpm+7Bjw2 dtvN3bp7kkfGRfmbnzuEbEzIJomhgwKHwnkRrMPAtU/KiPH1m+cooSHhY/i0cbOAsv4p EPv/LEGSEfB7gcmqix7HzJE/frbC33WbiAteLtddO2vyxEmrt/HBu9BberZfzxgJ1VET PyszPjPxF8kdNwuSWZsuyvOw823TF74qpVWPdGFPdABJXzv9qQVsURhKEODyVSsll+v2 maLGcWRMeLzWR5wwuSQfjE4D0Ka3W+nbzebXe2xgrhjCnr9w0McPjFJyGNeLM0kBnr6s Xo/w== X-Gm-Message-State: ALyK8tJ8ClP8t3Tb09hVO3zqXfivhze99ceXR1B9gd/DwIOrSL8ix4wisRNm7+5B3oov5Q== X-Received: by 10.36.88.129 with SMTP id f123mr104951itb.7.1464816521842; Wed, 01 Jun 2016 14:28:41 -0700 (PDT) Received: from cm.amd.com ([165.204.55.251]) by smtp.gmail.com with ESMTPSA id y198sm13054978itc.19.2016.06.01.14.28.41 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 01 Jun 2016 14:28:41 -0700 (PDT) From: Alex Deucher X-Google-Original-From: Alex Deucher To: dri-devel@lists.freedesktop.org Subject: [PATCH 3/3] drm/radeon: load different smc firmware on some CI variants Date: Wed, 1 Jun 2016 17:28:33 -0400 Message-Id: <1464816513-7651-3-git-send-email-alexander.deucher@amd.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1464816513-7651-1-git-send-email-alexander.deucher@amd.com> References: <1464816513-7651-1-git-send-email-alexander.deucher@amd.com> Cc: Alex Deucher 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 The power tables on some variants require different firmware. This may fix stability issues on some newer CI parts. bug: https://bugs.freedesktop.org/show_bug.cgi?id=91880 Signed-off-by: Alex Deucher --- drivers/gpu/drm/radeon/cik.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c index ba192a3..20a4bd5 100644 --- a/drivers/gpu/drm/radeon/cik.c +++ b/drivers/gpu/drm/radeon/cik.c @@ -53,6 +53,7 @@ MODULE_FIRMWARE("radeon/bonaire_mc.bin"); MODULE_FIRMWARE("radeon/bonaire_rlc.bin"); MODULE_FIRMWARE("radeon/bonaire_sdma.bin"); MODULE_FIRMWARE("radeon/bonaire_smc.bin"); +MODULE_FIRMWARE("radeon/bonaire_k_smc.bin"); MODULE_FIRMWARE("radeon/HAWAII_pfp.bin"); MODULE_FIRMWARE("radeon/HAWAII_me.bin"); @@ -72,6 +73,7 @@ MODULE_FIRMWARE("radeon/hawaii_mc.bin"); MODULE_FIRMWARE("radeon/hawaii_rlc.bin"); MODULE_FIRMWARE("radeon/hawaii_sdma.bin"); MODULE_FIRMWARE("radeon/hawaii_smc.bin"); +MODULE_FIRMWARE("radeon/hawaii_k_smc.bin"); MODULE_FIRMWARE("radeon/KAVERI_pfp.bin"); MODULE_FIRMWARE("radeon/KAVERI_me.bin"); @@ -1990,12 +1992,17 @@ static int cik_init_microcode(struct radeon_device *rdev) int new_fw = 0; int err; int num_fw; + bool new_smc = false; DRM_DEBUG("\n"); switch (rdev->family) { case CHIP_BONAIRE: chip_name = "BONAIRE"; + if ((rdev->pdev->revision == 0x80) || + (rdev->pdev->revision == 0x81) || + (rdev->pdev->device == 0x665f)) + new_smc = true; new_chip_name = "bonaire"; pfp_req_size = CIK_PFP_UCODE_SIZE * 4; me_req_size = CIK_ME_UCODE_SIZE * 4; @@ -2010,6 +2017,8 @@ static int cik_init_microcode(struct radeon_device *rdev) break; case CHIP_HAWAII: chip_name = "HAWAII"; + if (rdev->pdev->revision == 0x80) + new_smc = true; new_chip_name = "hawaii"; pfp_req_size = CIK_PFP_UCODE_SIZE * 4; me_req_size = CIK_ME_UCODE_SIZE * 4; @@ -2259,7 +2268,10 @@ static int cik_init_microcode(struct radeon_device *rdev) } } - snprintf(fw_name, sizeof(fw_name), "radeon/%s_smc.bin", new_chip_name); + if (new_smc) + snprintf(fw_name, sizeof(fw_name), "radeon/%s_k_smc.bin", new_chip_name); + else + snprintf(fw_name, sizeof(fw_name), "radeon/%s_smc.bin", new_chip_name); err = request_firmware(&rdev->smc_fw, fw_name, rdev->dev); if (err) { snprintf(fw_name, sizeof(fw_name), "radeon/%s_smc.bin", chip_name);