From patchwork Mon Aug 18 20:56:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alex Deucher X-Patchwork-Id: 4739181 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 91F88C0338 for ; Mon, 18 Aug 2014 20:56:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AC8822012E for ; Mon, 18 Aug 2014 20:56:43 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id B31B420125 for ; Mon, 18 Aug 2014 20:56:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 70E8289C68; Mon, 18 Aug 2014 13:56:41 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qa0-f54.google.com (mail-qa0-f54.google.com [209.85.216.54]) by gabe.freedesktop.org (Postfix) with ESMTP id D6DA789C68 for ; Mon, 18 Aug 2014 13:56:39 -0700 (PDT) Received: by mail-qa0-f54.google.com with SMTP id k15so4819393qaq.41 for ; Mon, 18 Aug 2014 13:56:36 -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=tpuw/XVtb0nUt7195/yte/GByNSdAalEdh2sDBt/QhA=; b=jUMIjjlWO4hMl0XdKIqRR547Roe5QWAcfXLkcVHiMkApohWY5Qd8pRnKlXBD/YIDm5 PXCnNxNwYNsIAIagoofwR4rtDSS+Psyb4VEFr9LR+jBw7rHGP3/zKO4E9iZ9eZDT+kod 4MrSohustwjtIBdj5jya8mYZ9qSicDpWL/Y/PJy4KNNC7DITaM4/jicmQpWEco7i4gvj iN3CjaNy0tEE6zuVHX7f//V5JU08eWCfTLQycpybZnbACLzbdotLA7LdixgYaPdFR9Ic th1169B2h6ipFeu1QfQOh379fAWFARQ3Du7Iap1DlcekZmCuxsy1A4m5q8ba6hyWw+Iw RyzA== MIME-Version: 1.0 X-Received: by 10.140.51.166 with SMTP id u35mr56648648qga.68.1408395396347; Mon, 18 Aug 2014 13:56:36 -0700 (PDT) Received: by 10.140.94.75 with HTTP; Mon, 18 Aug 2014 13:56:35 -0700 (PDT) In-Reply-To: <53F25BC5.7060706@canonical.com> References: <53F2118F.8000706@canonical.com> <53F215A0.1070107@vodafone.de> <53F224AC.4070806@vodafone.de> <53F25BC5.7060706@canonical.com> Date: Mon, 18 Aug 2014 16:56:35 -0400 Message-ID: Subject: Re: [PATCH 1/3] drm/radeon: take exclusive_lock in read mode during ring tests From: Alex Deucher To: Maarten Lankhorst Cc: "dri-devel@lists.freedesktop.org" X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.8 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, Aug 18, 2014 at 4:02 PM, Maarten Lankhorst wrote: > Hey, > > On 18-08-14 18:10, Alex Deucher wrote: >> On Mon, Aug 18, 2014 at 12:07 PM, Christian König >> wrote: >>>> Yeah, looks like a bug. I think the attached patch should fix it. >>> >>> Sounds logical and the patch is Reviewed-by: Christian König >>> >>> >>> Going to apply Maartens patch on top and test that one a bit to make sure it >>> works as expected. >> >> pushed my current -fixes queue to my drm-fixes-3.17-wip branch if that helps. > > Thanks, maybe that fixes uvd on resume for me. :-) > > I'll have to rework it to include the changes, but does resuming everything in the order of my v2 patch look sane? > Then as a final act I'm downgrading to read, and run the tests. Seems sane. Looks like we probably also need this attached patch as well to be on the safe side for displays. It would be nice to unify the suspend/resume and gpu_reset paths at some point. Alex From e8cfbe410871de7a4805f13c6f18c3551741c639 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Mon, 18 Aug 2014 16:51:46 -0400 Subject: [PATCH] drm/radeon: fix display handling in radeon_gpu_reset If the display hw was reset or a hard reset was used, we need to re-init some of the common display hardware as well. Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org --- drivers/gpu/drm/radeon/radeon_device.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c index 8e61870..6a219bc 100644 --- a/drivers/gpu/drm/radeon/radeon_device.c +++ b/drivers/gpu/drm/radeon/radeon_device.c @@ -1681,6 +1681,7 @@ int radeon_gpu_reset(struct radeon_device *rdev) /* block TTM */ resched = ttm_bo_lock_delayed_workqueue(&rdev->mman.bdev); radeon_suspend(rdev); + radeon_hpd_fini(rdev); for (i = 0; i < RADEON_NUM_RINGS; ++i) { ring_sizes[i] = radeon_ring_backup(rdev, &rdev->ring[i], @@ -1737,6 +1738,21 @@ retry: radeon_pm_resume(rdev); } + /* init dig PHYs, disp eng pll */ + if (rdev->is_atom_bios) { + radeon_atom_encoder_init(rdev); + radeon_atom_disp_eng_pll_init(rdev); + /* turn on the BL */ + if (rdev->mode_info.bl_encoder) { + u8 bl_level = radeon_get_backlight_level(rdev, + rdev->mode_info.bl_encoder); + radeon_set_backlight_level(rdev, rdev->mode_info.bl_encoder, + bl_level); + } + } + /* reset hpd state */ + radeon_hpd_init(rdev); + drm_helper_resume_force_mode(rdev->ddev); /* set the power state here in case we are a PX system or headless */ -- 1.8.3.1