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=-13.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,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 9AA36C2D0E4 for ; Tue, 17 Nov 2020 16:54:29 +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 557BF22447 for ; Tue, 17 Nov 2020 16:54:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="Ohkk/wJx" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 557BF22447 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch 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 5C0AA899B7; Tue, 17 Nov 2020 16:54:27 +0000 (UTC) Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by gabe.freedesktop.org (Postfix) with ESMTPS id 388A6899B7 for ; Tue, 17 Nov 2020 16:54:26 +0000 (UTC) Received: by mail-wr1-x443.google.com with SMTP id p8so23888368wrx.5 for ; Tue, 17 Nov 2020 08:54:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=obDjCnbNhkja6ht5vGPPA3q8r5DdxQxiGC3gW13kKE0=; b=Ohkk/wJx8CLXtMW13zUWZeS+hKUcbtjEsRNjd+r5qzXwEfeNKHkSgAbxziQdDK6OvZ cvdmeeYCpl5IuS20knAiqzBILStMko+5G/0Hdby3lD48x2G9a8QDVhJrKt2mcgi0yeBH q2ZGVMHFiIUR/EZgv7leo/RzOh/24V29ZZyLc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=obDjCnbNhkja6ht5vGPPA3q8r5DdxQxiGC3gW13kKE0=; b=m83BTULFppzjBoX9t3nT4oDACoTqq0J5ZpY1iEpYs0WHjktKxjcxeGjvO6ZlTL406W m3V47bgfhKa5twAAqtiGSdK55l5EuiU8HUyeC2Mhcgt4wIgOhYTPsn6ZEVBfMKjnW3oy U+GqhviAj+J3X+FNCOEb/QKRJcIgwHj8ZbJQsYoP/fGxceiOkaLEJ30TLP5H0cgxq/s7 R2F1LGJQfcAUOkLRe327J0c3+xlpCUFHnzWQ91eN/kUQM/9F6YlqReq4cEg82BELvNAb aVJVyLXbcx59Wimk3utY65XLk5cnYXHyUyona3Wlil8wFcuFAAbuKI+SZgZEosrxn8bN IqNw== X-Gm-Message-State: AOAM533l7EAMm6DAMBU/C6xEvlnuNYDcDfYf9Et6d6N+eTQLu1AYQbKp rRCgR9Ix4mS+ejRDN8zdvjlSAA== X-Google-Smtp-Source: ABdhPJz9pnfU+7oqI3IHAq8bH+mv2njpRxhjlGEHDNLhaxx2ZJ//DrG+R751UR1qDhuOFtsWYIJM9Q== X-Received: by 2002:a5d:5222:: with SMTP id i2mr438099wra.247.1605632064755; Tue, 17 Nov 2020 08:54:24 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id q5sm25769589wrf.41.2020.11.17.08.54.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Nov 2020 08:54:23 -0800 (PST) Date: Tue, 17 Nov 2020 17:54:21 +0100 From: Daniel Vetter To: Sebastian Reichel Subject: Re: [PATCH 08/10] drm/fb-helper: Restore damage area upon errors Message-ID: <20201117165421.GL401619@phenom.ffwll.local> References: <20201116200437.17977-1-tzimmermann@suse.de> <20201116200437.17977-9-tzimmermann@suse.de> <20201116205216.GH401619@phenom.ffwll.local> <20201117151446.bqbhbt2tqijjmj2h@earth.universe> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201117151446.bqbhbt2tqijjmj2h@earth.universe> X-Operating-System: Linux phenom 5.7.0-1-amd64 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: airlied@linux.ie, dri-devel@lists.freedesktop.org, Thomas Zimmermann , sam@ravnborg.org, christian.koenig@amd.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Tue, Nov 17, 2020 at 04:14:46PM +0100, Sebastian Reichel wrote: > Hi, > > On Mon, Nov 16, 2020 at 09:52:16PM +0100, Daniel Vetter wrote: > > On Mon, Nov 16, 2020 at 09:04:35PM +0100, Thomas Zimmermann wrote: > > > If the damage handling fails, restore the damage area. The next invocation > > > of the damage worker will then perform the update. > > > > > > Signed-off-by: Thomas Zimmermann > > > --- > > > drivers/gpu/drm/drm_fb_helper.c | 23 ++++++++++++++++++++--- > > > 1 file changed, 20 insertions(+), 3 deletions(-) > > > > > > diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c > > > index 2e1a335bafd2..13b65dad2ca8 100644 > > > --- a/drivers/gpu/drm/drm_fb_helper.c > > > +++ b/drivers/gpu/drm/drm_fb_helper.c > > > @@ -431,11 +431,28 @@ static void drm_fb_helper_damage_work(struct work_struct *work) > > > if (helper->buffer) { > > > ret = drm_fb_helper_damage_blit(helper, &clip_copy); > > > if (ret) > > > - return; > > > + goto err; > > > } > > > > > > - if (helper->fb->funcs->dirty) > > > - helper->fb->funcs->dirty(helper->fb, NULL, 0, 0, &clip_copy, 1); > > > + if (helper->fb->funcs->dirty) { > > > + ret = helper->fb->funcs->dirty(helper->fb, NULL, 0, 0, &clip_copy, 1); > > > + if (ret) > > > + goto err; > > > > I think this is unexpected enough that we should put some drm error > > printing here I think. > > Note, that the dirty framebuffer routines are used by the > framebuffer console. Printing warnings means another line > in the framebuffer console and thus another call to the > dirty routines. Assuming the problem does not get solved > magically the system will be busy printing warnings forever. > I have been through that fun while working on the OMAP DSI > command mode patches and I suggest to only do ratelimited > logging in the code related to damage tracking. Excellent point. Maybe _once is good enough even, perhaps with a dump of the entire atomic state included for debugging (in case it's transient or something like that). Past that there's nothing we can do anyway, and most likely it's just hurting. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel