From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C7AEDC76199 for ; Mon, 17 Feb 2020 01:20:41 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9D7E4206E2 for ; Mon, 17 Feb 2020 01:20:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gVRAktaI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9D7E4206E2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EF5186E3DB; Mon, 17 Feb 2020 01:20:39 +0000 (UTC) Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5B8646E3DB; Mon, 17 Feb 2020 01:20:39 +0000 (UTC) Received: by mail-wm1-x341.google.com with SMTP id s10so15505490wmh.3; Sun, 16 Feb 2020 17:20:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ZuOsBWqGR/J6P3qYbyUpxOiY4OTNviM6Oswc2b07mTA=; b=gVRAktaILye8n+mbqfmhURirjsVfqG2q4nOtT/GeqUkCOd1kd/Uj34DA2Q1JFf7a57 73e/yvG9aa7ZbNEryLbR1xaYweLxVAQ9f8XLKOxBndaTaCj01ovebid95IMiJD0iLAV3 /Va+PEzoe1p1jFSSOa5P/gZcho8td6rHI8jszCmi2YC6eQAC5Cw7KMiDzaaJRb5vazEh /c5Z2hGuODsqbR2+gZjfwku567RASslLZJ8id5E/oRX9LnPvwYCSzcBvBXlOXDs9KYw9 7XtWvCXlDER99H1dJebmqoy08cdDPjgmibojAh5Cwwqt4PR4hLJ5N9OYaSb7T99zlNXJ 9k5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ZuOsBWqGR/J6P3qYbyUpxOiY4OTNviM6Oswc2b07mTA=; b=T80fdODtTfjbhZDtRqRphGFpoyLXvO+yrtFSMr/kLE1haSPxpFh5e1MlT//Y4j1hN5 /hYkoQ1UZEW2OLWq8BDZShZ+6YBUgiqZrfYLpIjN/7SNPqOBXVYxFRufI/moLQ3tK2yV Han1WCKXDWpbl1usk6+H+uqcaVjdZhBq9ezGRKk6lVcwu3hVU4W+H8kjaRdpB8aycsoz dysnQiH+pmgLq6u/EdHr/7xBZfG8fuN1IsSLs65wb1M7Bry8amaAmqKJciHaKdqOfMaA jbYOlGKZRslm4ZvVQOSZUKe0ao4zb3zMzZi7sJSL8Gu75voVcda/iybeKQRsWBFEsy6z 8uaA== X-Gm-Message-State: APjAAAUz/F3rAloiYyr7/g46VjBqxU/aCDLc1akiMAhR8H4unKVyaLgP rPs0yvuRu9vnvaSgcn+V9zWlIH0yX10xr126SYI= X-Google-Smtp-Source: APXvYqx6PBWOpIYIYZLMR1Nb2Yc4mw9pfeBqzDwp/d/kSibSFsfc1P+NGYm2h5IY/YBNVroxq/ho+kWtTgAodNjYPi8= X-Received: by 2002:a7b:cd92:: with SMTP id y18mr14505338wmj.133.1581902437832; Sun, 16 Feb 2020 17:20:37 -0800 (PST) MIME-Version: 1.0 References: <20200215035026.3180698-1-anarsoul@gmail.com> In-Reply-To: <20200215035026.3180698-1-anarsoul@gmail.com> From: Qiang Yu Date: Mon, 17 Feb 2020 09:20:26 +0800 Message-ID: Subject: Re: [PATCH] drm/lima: fix recovering from PLBU out of memory To: Vasily Khoruzhick X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , Linux Kernel Mailing List , dri-devel , lima@lists.freedesktop.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Looks good for me, patch is: Reviewed-by: Qiang Yu Regards, Qiang On Sat, Feb 15, 2020 at 11:50 AM Vasily Khoruzhick wrote: > > It looks like on PLBU_OUT_OF_MEM interrupt we need to resume from where we > stopped, i.e. new PLBU heap start is old end. Also update end address > in GP frame to grow heap on 2nd and subsequent out of memory interrupts. > > Fixes: 2081e8dcf1ee ("drm/lima: recover task by enlarging heap buffer") > Signed-off-by: Vasily Khoruzhick > --- > drivers/gpu/drm/lima/lima_gp.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/lima/lima_gp.c b/drivers/gpu/drm/lima/lima_gp.c > index d1e7826c2d74..325604262def 100644 > --- a/drivers/gpu/drm/lima/lima_gp.c > +++ b/drivers/gpu/drm/lima/lima_gp.c > @@ -224,8 +224,13 @@ static int lima_gp_task_recover(struct lima_sched_pipe *pipe) > } > > gp_write(LIMA_GP_INT_MASK, LIMA_GP_IRQ_MASK_USED); > + /* Resume from where we stopped, i.e. new start is old end */ > + gp_write(LIMA_GP_PLBU_ALLOC_START_ADDR, > + f[LIMA_GP_PLBU_ALLOC_END_ADDR >> 2]); > + f[LIMA_GP_PLBU_ALLOC_END_ADDR >> 2] = > + f[LIMA_GP_PLBU_ALLOC_START_ADDR >> 2] + task->heap->heap_size; > gp_write(LIMA_GP_PLBU_ALLOC_END_ADDR, > - f[LIMA_GP_PLBU_ALLOC_START_ADDR >> 2] + task->heap->heap_size); > + f[LIMA_GP_PLBU_ALLOC_END_ADDR >> 2]); > gp_write(LIMA_GP_CMD, LIMA_GP_CMD_UPDATE_PLBU_ALLOC); > return 0; > } > -- > 2.25.0 > _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel