From patchwork Mon Jul 29 13:58:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 2835016 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BE5C99F4D4 for ; Mon, 29 Jul 2013 14:01:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0A47420169 for ; Mon, 29 Jul 2013 14:01:07 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 41EC92015E for ; Mon, 29 Jul 2013 14:01:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F0CE0E6A21 for ; Mon, 29 Jul 2013 07:01:01 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-vb0-f46.google.com (mail-vb0-f46.google.com [209.85.212.46]) by gabe.freedesktop.org (Postfix) with ESMTP id 4C2BAE69F9 for ; Mon, 29 Jul 2013 06:58:16 -0700 (PDT) Received: by mail-vb0-f46.google.com with SMTP id p13so320531vbe.5 for ; Mon, 29 Jul 2013 06:58:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=QNzBMLTgXRh4KrBMIq1xfr5ZE8DVJmJYqtjGNWlWa4c=; b=WgTVrnx5j1dbgTtLSFWs9HufJPKwOyBSQi3L+TM6N0ESYRfEutbn1NXMjWUcam49kY V6wqjjHySepn0NLDp6C12sTCjO3iCkXQoqHqgbLQY9vtRAQnVkHAa51gbwhezCXDCxFt MOuYxChLN9lZVlG0y1EM0Nh93C91hLEAKX948Khn6JsPjZ1bZPFx8mU3B2KS053Fggx5 k7b+zjOyTnLGLz68x0Zl7l+XY196pM+y/ic4HOs41iKprvNF7u3GfaS2SrA7gNTUQAxQ 7lsTYKcEwiuVZkby2PeU1TV2DupW1recKCtBpbObjZ/0dAYSty/kavs1TJx7BjAHX8hh inPw== MIME-Version: 1.0 X-Received: by 10.58.182.103 with SMTP id ed7mr26219603vec.70.1375106295751; Mon, 29 Jul 2013 06:58:15 -0700 (PDT) Received: by 10.58.29.3 with HTTP; Mon, 29 Jul 2013 06:58:15 -0700 (PDT) In-Reply-To: <20130729075132.GA354@x4> References: <20130729075132.GA354@x4> Date: Mon, 29 Jul 2013 09:58:15 -0400 Message-ID: Subject: Re: Commit f5d9b7f0f9 (fix r600_enable_sclk_control()) causes kexec issues From: Alex Deucher To: Markus Trippelsdorf Cc: Alex Deucher , Eric Biederman , dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 On Mon, Jul 29, 2013 at 3:51 AM, Markus Trippelsdorf wrote: > On my test machine Xorg doesn't start anymore when I kexec into a > 3.11.0-rc3 kernel. With kexec, dpm doesn't get torn down properly which can result in a bad hardware state when the driver loads again. Does the attached patch help? It attempts to disable dpm at startup in case it wasn't torn down properly previously. Alex From 8a39fdbfd4002c79ba9ab4eeb778c751fb20e173 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Mon, 29 Jul 2013 09:50:37 -0400 Subject: [PATCH] drm/radeon/dpm: disable dpm before enabling it to deal with kexec Hopefully deal with kexec properly by disabling dpm prior to enabling it in case dpm has not been torn down properly previously. Signed-off-by: Alex Deucher Cc: Markus Trippelsdorf --- drivers/gpu/drm/radeon/radeon_pm.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c index 76ffb91..c8e697e 100644 --- a/drivers/gpu/drm/radeon/radeon_pm.c +++ b/drivers/gpu/drm/radeon/radeon_pm.c @@ -1193,6 +1193,8 @@ static int radeon_pm_init_dpm(struct radeon_device *rdev) radeon_dpm_init(rdev); rdev->pm.dpm.current_ps = rdev->pm.dpm.requested_ps = rdev->pm.dpm.boot_ps; radeon_dpm_print_power_states(rdev); + /* for cases like kexec, disable dpm just in case */ + radeon_dpm_disable(rdev); radeon_dpm_setup_asic(rdev); ret = radeon_dpm_enable(rdev); mutex_unlock(&rdev->pm.mutex); -- 1.7.7.5