From: Michel =?ISO-8859-1?Q?D=E4nzer?= Subject: Re: [PATCH] drm/radeon: disable any GPU activity after unrecovered lockup Date: Wed, 27 Jun 2012 17:42:44 +0200 Message-ID: <1340811764.3562.56.camel@thor.local> References: <1340744641-2956-1-git-send-email-j.glisse@gmail.com> <1340788778.3562.22.camel@thor.local> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail.gna.ch (darkcity.gna.ch [195.226.6.51]) by gabe.freedesktop.org (Postfix) with ESMTP id A9A9EA091F for ; Wed, 27 Jun 2012 08:42:57 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Jerome Glisse Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On Mit, 2012-06-27 at 10:49 -0400, Jerome Glisse wrote: = > On Wed, Jun 27, 2012 at 5:19 AM, Michel D=E4nzer wro= te: > > On Die, 2012-06-26 at 17:04 -0400, j.glisse@gmail.com wrote: > >> From: Jerome Glisse > >> > >> After unrecovered GPU lockup avoid any GPU activities to avoid > >> things like kernel segfault and alike to happen in any of the > >> path that assume hw is working. > > > > Has the patch been tested and confirmed to actually fix such a problem? > = > Yes it has been tested i dont send untested patch to ml. I didn't expect (or mean to suggest) otherwise. I think I misread the related IRC conversation from last night: I thought you basically whipped up this patch in response to a report of such problems. But on re-reading now, I guess you wrote this patch a while ago and are just sending it now in response to the report on IRC. > >> r =3D radeon_asic_reset(rdev); > >> if (!r) { > >> dev_info(rdev->dev, "GPU reset succeed\n"); > >> radeon_resume(rdev); > >> - radeon_restore_bios_scratch_regs(rdev); > >> - drm_helper_resume_force_mode(rdev->ddev); > >> - ttm_bo_unlock_delayed_workqueue(&rdev->mman.bdev, resche= d); > >> } > >> > >> + /* no matter what restore video mode */ > >> + radeon_restore_bios_scratch_regs(rdev); > >> + drm_helper_resume_force_mode(rdev->ddev); > >> + ttm_bo_unlock_delayed_workqueue(&rdev->mman.bdev, resched); > > > > Maybe this should be in a separate patch. > = > Idea is to send this patch to stable thus having one patch that have it a= ll. That doesn't make sense. Either the changes belong into a single patch (but then the commit log should describe all of them) or not. They can be sent to stable[0] either way. [0] Actually, patches with Cc: stable are picked up automagically once they hit mainline, there's no point in sending them there directly. > >> @@ -399,6 +418,14 @@ static int radeon_bo_move(struct ttm_buffer_objec= t *bo, > >> radeon_move_null(bo, new_mem); > >> return 0; > >> } > >> + if (!rdev->accel_working) { > >> + /* when accel is not working GPU is in broken state just > >> + * do nothing for any ttm operation to avoid making the > >> + * situation worst than it's > > > > 'worse than it is', same in the following two hunks. Are you gonna fix these typos? -- = Earthling Michel D=E4nzer | http://www.amd.com Libre software enthusiast | Debian, X and DRI developer