From patchwork Sun Jun 2 14:13:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rhys Kidd X-Patchwork-Id: 10971775 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C31266C5 for ; Sun, 2 Jun 2019 15:00:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A494F28405 for ; Sun, 2 Jun 2019 15:00:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9716328A26; Sun, 2 Jun 2019 15:00:59 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 51C5128405 for ; Sun, 2 Jun 2019 15:00:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 502D489211; Sun, 2 Jun 2019 15:00:56 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by gabe.freedesktop.org (Postfix) with ESMTPS id 99E3F89970; Sun, 2 Jun 2019 14:13:36 +0000 (UTC) Received: by mail-pf1-x444.google.com with SMTP id s11so9023359pfm.12; Sun, 02 Jun 2019 07:13:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=g8nhw207JO81aJGXpFM+zIRwmOM/AtNu4yX4je0sw18=; b=BFSxq8CPOaiauD3qrqlsFXX7u4tWY49AqF641RE5I5uWywR2TDRuB5kEnStdZaBJqi LXNa5eeoqRoCVMpA/4zvOp2PTgV4olqyA1KCEhz+kGVcxuWtnev0wFtCxLYUte5rRlzd nSJj5qWDDKnaY2N5jgMM/SW0ngTYhJcE/wRte9gbiPOp+9BbZuwisqQBUBQPDn7NaxfP RSFe/QIb2pYlB7Wg79BNn9jXJEUNpAIe6NrPocwZ6sCsP+738xjda029C9f02Bu2aGW5 fgIIzh6Vqqc67WfAQgfPISvWqaZfjMk14AWorZy90Zz8ZtTw7Z+PAChfUfnzGeeboSeV hpTA== X-Gm-Message-State: APjAAAU0NWoPkPFPTlwb4krB4jBervFkqSX9Ew9wGJQAUmWPqThRFk6i SGNpQjUr9lY1ppwEOpG4HP+zDrtXGgs= X-Google-Smtp-Source: APXvYqzEo+/2XW6GYocCFk4l/IkSto/Y+dKiPwCtbIjs84SIUImKPoLTDmVMAoTIiAmAGjmzqvS4GQ== X-Received: by 2002:a63:788a:: with SMTP id t132mr22575882pgc.52.1559484816231; Sun, 02 Jun 2019 07:13:36 -0700 (PDT) Received: from localhost.localdomain (119-18-21-111.771215.syd.nbn.aussiebb.net. [119.18.21.111]) by smtp.gmail.com with ESMTPSA id x66sm12533278pfx.139.2019.06.02.07.13.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Jun 2019 07:13:35 -0700 (PDT) From: Rhys Kidd To: Ben Skeggs , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org, Karol Herbst , Lyude Paul , Ilia Mirkin Subject: [PATCH 1/2] drm/nouveau/bios/init: handle INIT_RESET_BEGUN devinit opcode Date: Mon, 3 Jun 2019 00:13:14 +1000 Message-Id: <20190602141315.6197-2-rhyskidd@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190602141315.6197-1-rhyskidd@gmail.com> References: <20190602141315.6197-1-rhyskidd@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Sun, 02 Jun 2019 15:00:55 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=g8nhw207JO81aJGXpFM+zIRwmOM/AtNu4yX4je0sw18=; b=mK08QkHS2dCObF9/dRfSwzI9Ll32nymYjdUCb8rbTWsioyWBtdIv/IUAPmCa3M2CqV G9M8NsIa/WNcXMjO2nXbgNFVQeo2wZx/dofGNKqWkx+jZrrATV4MM9w2/s5f0jtblbs0 q1rldY15ERkqEIsePvMnyWdjQZ0sYZASvIay+tRVqO4cfBUxn1hwMxc1syBcaTCIB3pY hQqwUhh9T/CdsdoyomOr9QFbb28VzsLgb6kSf1LgqRiIrwD/nixxXTDtep0ljbdsmc3L 9nmVfsmHgHY3gUrHClDI91nnNKKDoWYKfqDA+evTqs/wRR72Fo5XbvRpGdFgN14wh+YJ 7URA== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rhys Kidd Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signal that the reset sequence has begun. This opcode signals that the software reset sequence has begun. Ordinarily, no actual operations are performed by the opcode. However it allows for possible software work arounds by devinit engines in software agents other than the VBIOS, such as the resman, FCODE, and EFI driver. Signed-off-by: Rhys Kidd --- drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c index ec0e9f7224b5..a54b5e410dcd 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c @@ -1934,6 +1934,17 @@ init_ram_restrict_pll(struct nvbios_init *init) } } +/** + * INIT_RESET_BEGUN - opcode 0x8c + * + */ +static void +init_reset_begun(struct nvbios_init *init) +{ + trace("RESET_BEGUN\n"); + init->offset += 1; +} + /** * INIT_GPIO - opcode 0x8e * @@ -2260,7 +2271,7 @@ static struct nvbios_init_opcode { [0x79] = { init_pll }, [0x7a] = { init_zm_reg }, [0x87] = { init_ram_restrict_pll }, - [0x8c] = { init_reserved }, + [0x8c] = { init_reset_begun }, [0x8d] = { init_reserved }, [0x8e] = { init_gpio }, [0x8f] = { init_ram_restrict_zm_reg_group }, From patchwork Sun Jun 2 14:13:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rhys Kidd X-Patchwork-Id: 10971789 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4AB4C6C5 for ; Sun, 2 Jun 2019 15:01:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3ACEE28405 for ; Sun, 2 Jun 2019 15:01:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2E02B28A26; Sun, 2 Jun 2019 15:01:16 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 DFA9128405 for ; Sun, 2 Jun 2019 15:01:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2105589722; Sun, 2 Jun 2019 15:01:04 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by gabe.freedesktop.org (Postfix) with ESMTPS id 60FFB8999A; Sun, 2 Jun 2019 14:13:41 +0000 (UTC) Received: by mail-pf1-x442.google.com with SMTP id q17so9042959pfq.8; Sun, 02 Jun 2019 07:13:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=w9PH2k6rPB87/EEGusf4NGVLGYsoLDBvNH1XesU5MSE=; b=tF0JBnFYQCsSn4KgowioMjmXZwjE5pogMiHk3rSVPx7jF17rHLR5Sl4h/vzCZO5Rtz JGSEIjGDECrLXyT40ewgJf0FNLz+xdp/mXdzO0vcjXpcZCg5PNaphuE+U+GENjgaDEHv A3tTiadJqMd7h8Jx9aaBP9a04rhhA4LDPgjgvkv35mnOafrIU7kaaxFT7eiPwfHXF1Of KDrgdAqAglfzbOmygJ2VM6SOgYAO48vrh+j8T8xDdKQwUGmGaQ7T3EH+ypU4DHJYc/aw jLNhut3oM0IJTJevJjWaOGivh0Roi/HgQT6QzK2K0E/ZDWzGneyD7q2II3S37qJzeQeM /OCg== X-Gm-Message-State: APjAAAUTcMEp/1nPJIcSk+1G/USffJAzIuOxo7EntAH5sHRwV/V7D89p MFVTUo4FYz+uggAEwans3XA= X-Google-Smtp-Source: APXvYqzpaRyuh5gQli++xqEgVoQRrE1rPqttbhI9uhh1SUA8jrKDVOtdKqsjDKH3Ewbwo8eiC0WG0Q== X-Received: by 2002:a65:530d:: with SMTP id m13mr22569795pgq.68.1559484821083; Sun, 02 Jun 2019 07:13:41 -0700 (PDT) Received: from localhost.localdomain (119-18-21-111.771215.syd.nbn.aussiebb.net. [119.18.21.111]) by smtp.gmail.com with ESMTPSA id x66sm12533278pfx.139.2019.06.02.07.13.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Jun 2019 07:13:40 -0700 (PDT) From: Rhys Kidd To: Ben Skeggs , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org, Karol Herbst , Lyude Paul , Ilia Mirkin Subject: [PATCH 2/2] drm/nouveau/bios/init: handle INIT_RESET_END devinit opcode Date: Mon, 3 Jun 2019 00:13:15 +1000 Message-Id: <20190602141315.6197-3-rhyskidd@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190602141315.6197-1-rhyskidd@gmail.com> References: <20190602141315.6197-1-rhyskidd@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Sun, 02 Jun 2019 15:00:55 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=w9PH2k6rPB87/EEGusf4NGVLGYsoLDBvNH1XesU5MSE=; b=PaIRevF6X9EwLo4tynO/oQYZRBcG85PvvyQLyKkXdp6vLjcnIUH5UpsmZLz4KjTSBK hms704ygyRWoFPRI63ehIjsVCPvsOsoLL/AGv2aj3Mda4muSyDjZjdLokpCixSZp4ahG qlAtxyFvBrQMPKJWe18dzIzQFmAOLj+AU3DvdTYo7PkHk0cbmUPxrnna1QjVzTad/gOQ nrWhRxa14WLuw3btqxPJvpBCUuBlBc4O4MmyrqQ1XI4zXU21DvHZq1m0yqutKddyMBjH gtoHj2K6RggWYFSgNfu5ixkSbo2dtTPZLaqkqci6yyFWWYqFXhrf2EcOBYyeQxJTEwcW f+tw== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rhys Kidd Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signal that the reset sequence has completed. This opcode signals that the software reset sequence has completed. Ordinarily, no actual operations are performed by the opcode. However it allows for possible software work arounds by devinit engines in software agents other than the VBIOS, such as the resman, FCODE, and EFI driver. Signed-off-by: Rhys Kidd --- drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c index a54b5e410dcd..49d09503cd31 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c @@ -1945,6 +1945,17 @@ init_reset_begun(struct nvbios_init *init) init->offset += 1; } +/** + * INIT_RESET_END - opcode 0x8d + * + */ +static void +init_reset_end(struct nvbios_init *init) +{ + trace("RESET_END\n"); + init->offset += 1; +} + /** * INIT_GPIO - opcode 0x8e * @@ -2272,7 +2283,7 @@ static struct nvbios_init_opcode { [0x7a] = { init_zm_reg }, [0x87] = { init_ram_restrict_pll }, [0x8c] = { init_reset_begun }, - [0x8d] = { init_reserved }, + [0x8d] = { init_reset_end }, [0x8e] = { init_gpio }, [0x8f] = { init_ram_restrict_zm_reg_group }, [0x90] = { init_copy_zm_reg },