Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp3232955rdb; Thu, 16 Nov 2023 04:15:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IGipBThrIdcR97Ym/+iGqn4epRfVCfhM1b4Mq4DSv5tmbVBCukCEez+PW1IucIpccQYspDE X-Received: by 2002:a17:902:74c3:b0:1cd:f94b:1823 with SMTP id f3-20020a17090274c300b001cdf94b1823mr7716503plt.64.1700136959076; Thu, 16 Nov 2023 04:15:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700136959; cv=none; d=google.com; s=arc-20160816; b=w0TCdbNhEq4bhlnl+ml22ZGFNY9NlPUNwmVYDYnO9WdPe4N8229utRtXcQL535lHp3 XVyI8xYjbtdfleQ36WBBCQEXILJKrL6c+5it6Uy+0dpJa9hKrSEHcxpO9/VS/ylvp1Uu aKsc9VAoSOohaahc7pL4LA747iD7cfpCHinS5VxXXdOmaxDYY48GKs/OBkP22qdp9Nk5 B2BFRazXgIy/NkpFD4Zm7q+XjX0LsPShOi8AeVxRAeDTD4YSZ8u8z8LU7XhPSrMubNac nnhVv0mRq/6OOcd/OVrmslK8A0cGqqWW9kJ4ZMlokVQij74JZD8HWWhqsPfz+DToMvTZ +K5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :feedback-id:references:in-reply-to:message-id:subject:cc:from:to :date:dkim-signature; bh=peIdrePwT8uOuhEHgYRJoTaPJUFwzal6w1Hv2WtpNCo=; fh=DinVispv9PV7dcSA0glSju3ltzQqNNe2XUb6O4j6VGs=; b=vzAXY8sLUZ504KGR9tYP/CC7Ud9zECQ21YJtIADhQT19qA7x7xt3vvwwkHgUu7ku2E fDOgmuES7wh3dXqVwGCNQjhqAP9hYAEtHrgKqtm5UHAcvtKfmmV2egbHOdDDZrJe5Rcs J9gS3JbVfllTR9kdvhDcMku4neYVockarpYjJiI4GZMbX4LO35D1RCkbwcDTqoGXq2lR HG0W7dmRiYuy+OS+D1Mu/Gfvk7S+mViNhs+zqah4Cug/l1ZyVGKULZFFJsFd2dJpEpYE 7m77R91cSCdjysCnZFVyCdxLQosyx3NsZ4GsXR01b11j4Ooak93xrObzBSplb306BY/9 ByBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@emersion.fr header.s=protonmail2 header.b=KVYvMq7a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=emersion.fr Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id m6-20020a170902f64600b001c7615a8e09si12996030plg.593.2023.11.16.04.15.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 04:15:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@emersion.fr header.s=protonmail2 header.b=KVYvMq7a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=emersion.fr Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id C4BC78062AF9; Thu, 16 Nov 2023 04:15:21 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345165AbjKPMPH (ORCPT + 99 others); Thu, 16 Nov 2023 07:15:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345138AbjKPMPH (ORCPT ); Thu, 16 Nov 2023 07:15:07 -0500 Received: from mail-40136.proton.ch (mail-40136.proton.ch [185.70.40.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B18A9C for ; Thu, 16 Nov 2023 04:15:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emersion.fr; s=protonmail2; t=1700136899; x=1700396099; bh=peIdrePwT8uOuhEHgYRJoTaPJUFwzal6w1Hv2WtpNCo=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=KVYvMq7aUUgkkM4hhRzz9XhWI+nkkhDGTbCDwnU/ctZr0Nm2+qG84sztDrDTvJjdf /UMyuWgoWQDW2LWkaGN+J+qP0Et3l9XrhZgRWnHs8IuH/NLkk0hasslujZzRtfg1Ve Q0QAQSx7oCxchKdAR4cZ2T5u7sY5sAdD7gSAD+V4Ixtp769LL1gzBRF4foscxG92Dx lCci/swQew4QXOcGq/5VeXHwsffnGQj271Fne2Wj7/bRIBdktfeY+XxDhwjrYUGF6e zCZLKPGWE/Z4pvFKOuW/WjBuuNw539vlcMexnBAJG1B3kgVS1KvXT/rrZWXJiCsoLL jGa19YgrPfBgQ== Date: Thu, 16 Nov 2023 12:14:51 +0000 To: Thomas Zimmermann From: Simon Ser Cc: Javier Martinez Canillas , linux-kernel@vger.kernel.org, Pekka Paalanen , Sima Vetter , Bilal Elmoussaoui , dri-devel@lists.freedesktop.org, Maxime Ripard , Erico Nunes Subject: Re: [PATCH v2 4/5] drm/plane: Extend damage tracking kernel-doc Message-ID: In-Reply-To: References: <20231115131549.2191589-1-javierm@redhat.com> <20231115131549.2191589-5-javierm@redhat.com> Feedback-ID: 1358184:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 16 Nov 2023 04:15:22 -0800 (PST) On Thursday, November 16th, 2023 at 13:06, Thomas Zimmermann wrote: > > + * Note that there are two types of damage handling: frame damage and = buffer > > + * damage. The type of damage handling implemented depends on a driver= 's upload > > + * target. Drivers implementing a per-plane or per-CRTC upload target = need to > > + * handle frame damage while drivers implementing a per-buffer upload = target > > + * need to handle buffer damage. > > + * > > + * The existing damage helpers only support the frame damage type, the= re is no > > + * buffer age support or similar damage accumulation algorithm impleme= nted yet. > > + * > > + * Only drivers handling frame damage can use the mentiored damage hel= pers to Typo: mentioned > > + * iterate over the damaged regions. Drivers that handle buffer damage= , need to > > + * set &struct drm_plane_state.ignore_damage_clips as an indication to > > + * drm_atomic_helper_damage_iter_init() that the damage clips should b= e ignored. > > + * In that case, the returned damage rectangle is the &drm_plane_state= .src since > > + * a full plane update should happen. > > + * > > + * For more information about the two type of damage, see: > > + * https://registry.khronos.org/EGL/extensions/KHR/EGL_KHR_swap_buffer= s_with_damage.txt > > + * https://emersion.fr/blog/2019/intro-to-damage-tracking/ >=20 > One thought you might want to consider. >=20 > These URLs are helpful. The only issue I have is that frame damage and > buffer damage are user-space concepts. The kernel bug is that damage > handling expects the backing storage/upload buffer not to change for a > given plane. If the upload buffer changes between page flips, the new > upload buffer has to be updated as a whole. Hence no damage handling then= . Why would these concepts be specific to user-space? The kernel could better handle buffer damage instead of forcing full damage, by doing something similar to what user-space does. Anyways: Reviewed-by: Simon Ser