From patchwork Wed Jun 1 20:53:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 9148113 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 D5EB260757 for ; Wed, 1 Jun 2016 20:53:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C9DAA200F4 for ; Wed, 1 Jun 2016 20:53:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BEB59268AE; Wed, 1 Jun 2016 20:53:44 +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 8838D200F4 for ; Wed, 1 Jun 2016 20:53:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A13986E289; Wed, 1 Jun 2016 20:53:38 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-io0-x241.google.com (mail-io0-x241.google.com [IPv6:2607:f8b0:4001:c06::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id 525F16E282 for ; Wed, 1 Jun 2016 20:53:36 +0000 (UTC) Received: by mail-io0-x241.google.com with SMTP id p194so4095600iod.0 for ; Wed, 01 Jun 2016 13:53:36 -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=wBJ7xWLGGnoZcUrUu1nqUT5Oc/GviVG9CYBr1l26gKE=; b=ArzYrfiJPCDpOufUILhmqzQrEzlGvGusmLoQOqGWvdyNeJkRMcKU3zwz8OlxbGEWoA v6ZBgf8AOwQvp/dOKWHwtwC5LyQW49PYmymoM9aLVgvEplGGGibb4cWfpOEG9ZnFLDaJ uEcpjo50F6cxxlQfFfmpLKtYuq4IqAOHejWQp4nzkLko+1cL6dgUxJDaK6vgGd7JeBSU uRMGfFwS8os6q37+1hAc14Bqp8ScRC+V/YXP2XduDxqYNqWcwvr7kn7EJSQgW0Fy3R0L ioJ1N2vBwFAG4mDVR405DZtMbZdYCXbi6ULSnSqEIz1AdISDW2elL2DWIMVT6CaY+mNt GkMQ== 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=wBJ7xWLGGnoZcUrUu1nqUT5Oc/GviVG9CYBr1l26gKE=; b=VGAioJ6wv3MPLnVNyiHBlT/IeDmWyvMlDmrMpLRk8TlNxIYbibhn/+YMvbCNIujoSM DEsCfBjEPbIxTiShq5eyyElPHq4fF6kvYGVRVp2GC7jSwdGFRr+Ko+O+dSx80s9DgQlD IV4bkjx5jeoPPPS5nhtQ08QEcB8V5GxdlV2uMB0AeX/B2KiWMhkZVQBWUTM1YhS8Knnk zKtU/0S7AOumFD2GG1DW1UU15S7N64O5WPNCYs24FasiQGZJYQPX1rLmBQq4rFyjT8aL l8AZvDzHgP9jeG4JkJV/REBgGqWm1PhlTKs39coGzvrBGKeWGZ3aQiFfEJUjLXDYvt+J PwjQ== X-Gm-Message-State: ALyK8tJwIAO7fIGCMDXGSN4u2gQyQFblrSM7BrONN32yQBEGyxAFcVe8H+LiPHpVmS7ejA== X-Received: by 10.107.55.132 with SMTP id e126mr5523999ioa.35.1464814415340; Wed, 01 Jun 2016 13:53:35 -0700 (PDT) Received: from cm.amd.com ([165.204.55.251]) by smtp.gmail.com with ESMTPSA id x83sm12983532itf.2.2016.06.01.13.53.34 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 01 Jun 2016 13:53:34 -0700 (PDT) From: Alex Deucher X-Google-Original-From: Alex Deucher To: dri-devel@lists.freedesktop.org Subject: [PATCH 03/12] drm/amdgpu: add a delay after ATPX dGPU power off Date: Wed, 1 Jun 2016 16:53:16 -0400 Message-Id: <1464814405-19729-4-git-send-email-alexander.deucher@amd.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1464814405-19729-1-git-send-email-alexander.deucher@amd.com> References: <1464814405-19729-1-git-send-email-alexander.deucher@amd.com> Cc: Alex Deucher , stable@vger.kernel.org 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 ATPX dGPU power control requires a 200ms delay between power off and on. This should fix dGPU failures on resume from power off. Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org --- drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c index 1be2ce4..c5d280c 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c @@ -10,6 +10,7 @@ #include #include #include +#include #include "amd_acpi.h" @@ -271,6 +272,10 @@ static int amdgpu_atpx_set_discrete_state(struct amdgpu_atpx *atpx, u8 state) if (!info) return -EIO; kfree(info); + + /* 200ms delay is required after off */ + if (state == 0) + msleep(200); } return 0; }