From nobody Tue Dec 30 14:57:01 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C0B72C47072 for ; Wed, 15 Nov 2023 13:16:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343939AbjKONQU (ORCPT ); Wed, 15 Nov 2023 08:16:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343919AbjKONQP (ORCPT ); Wed, 15 Nov 2023 08:16:15 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DDF6130 for ; Wed, 15 Nov 2023 05:16:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700054164; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gJqsY2/QsCenwJh5W290HFz55lPASu6G1HsKVTRTOh0=; b=QsOIIPXjEcipN66sXOeLYx+r5AMXp54yxPFDeJjQj/AFNt6OWbZ1R1rwbUVDDI1CJww7+x bVCn9HvbUfpNv+9abZl0WreQaPo9zrJYeWd16hG/CXrTX7izGcCQgczhQok882q5z8bpFO pnEVh97aE7G23Da0xj/ZWxBeOFcvOQg= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-178-Mtn23c1cOL-IJQryoFb6jg-1; Wed, 15 Nov 2023 08:16:03 -0500 X-MC-Unique: Mtn23c1cOL-IJQryoFb6jg-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-40839252e81so43567185e9.3 for ; Wed, 15 Nov 2023 05:16:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700054161; x=1700658961; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gJqsY2/QsCenwJh5W290HFz55lPASu6G1HsKVTRTOh0=; b=nR/JxvDLFteIicTQ9wZho4KNh46Z2VorlHX0hiZ/k5rALHla/c4D6njTC97k7E9aOO 2/ZlZnr1u5xreLWs52DUBDiuG1azYXRyjCALIzG3Efr+7v2z7GqnkzOnxl8lOTnp0/jO sH3gv/9siH20oCAiYkgdeg9I4uQAJdBCdVOsFYy5hUjHivLHIuHAeZAKP9EwoCxSkiEb GosTadLn6VftM2opF0w0hCioteRAkSECjlxFPpjNT1W0CHqZ4+QxAEWIkJ1t+oGu4vFr bWW4xhOGM9VW5akd/kH/6W4lMWt+pA36vw0ebpNc6t/MFhRquCEAzuiuKU2qMCRGUt0I LhKQ== X-Gm-Message-State: AOJu0Yz3M249KmvAYVjOYa+wSl3IB7zADAgLhOAD0sny6KQbkY+F8dJ+ iOzpHJMsZDh7i7KWSDHyUi/qJv7NSuujh1dFCoUS4qbGLUyJXgdoNQddwo+cgV6AJGVp5ki9SQ1 /tZn9tv5Tj3D+xzBNsA+lc6QeSwzcfpndJqIaC94ItzOdd094jTZiWqPDaNicUZfGUkO2uf7mH8 YRB+BcuyQ= X-Received: by 2002:a05:600c:4fd2:b0:408:434c:dae7 with SMTP id o18-20020a05600c4fd200b00408434cdae7mr11319529wmq.2.1700054161330; Wed, 15 Nov 2023 05:16:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IHeDdWdtJ7aB4xucaGXBN4YZIdjMA0MwwhEfRrMy5dCuiFqOT3NDoUGtQljuQes2A4j3nnCww== X-Received: by 2002:a05:600c:4fd2:b0:408:434c:dae7 with SMTP id o18-20020a05600c4fd200b00408434cdae7mr11319502wmq.2.1700054161047; Wed, 15 Nov 2023 05:16:01 -0800 (PST) Received: from localhost (205.pool92-176-231.dynamic.orange.es. [92.176.231.205]) by smtp.gmail.com with ESMTPSA id z10-20020a05600c0a0a00b00405959bbf4fsm15025163wmp.19.2023.11.15.05.15.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 05:16:00 -0800 (PST) From: Javier Martinez Canillas To: linux-kernel@vger.kernel.org Cc: Maxime Ripard , Bilal Elmoussaoui , Simon Ser , Erico Nunes , Pekka Paalanen , Thomas Zimmermann , Sima Vetter , Javier Martinez Canillas , Daniel Vetter , David Airlie , Maarten Lankhorst , dri-devel@lists.freedesktop.org Subject: [PATCH v2 4/5] drm/plane: Extend damage tracking kernel-doc Date: Wed, 15 Nov 2023 14:15:43 +0100 Message-ID: <20231115131549.2191589-5-javierm@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231115131549.2191589-1-javierm@redhat.com> References: <20231115131549.2191589-1-javierm@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The "Damage Tracking Properties" section in the documentation doesn't have info about the two type of damage handling: frame damage vs buffer damage. Add it to the section and mention that helpers only support frame damage, and how drivers handling buffer damage can indicate that the damage clips should be ignored. Also add references to further documentation about the two damage types. Suggested-by: Simon Ser Signed-off-by: Javier Martinez Canillas Reviewed-by: Simon Ser --- - Dropped Simon Ser's Reviwed-by tag because the text changed to adapt to the approach Thomas Zimmermann suggested for v2. (no changes since v1) drivers/gpu/drm/drm_plane.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c index 24e7998d1731..3b1b8bca3065 100644 --- a/drivers/gpu/drm/drm_plane.c +++ b/drivers/gpu/drm/drm_plane.c @@ -1442,6 +1442,26 @@ int drm_mode_page_flip_ioctl(struct drm_device *dev, * Drivers implementing damage can use drm_atomic_helper_damage_iter_init(= ) and * drm_atomic_helper_damage_iter_next() helper iterator function to get da= mage * rectangles clipped to &drm_plane_state.src. + * + * Note that there are two types of damage handling: frame damage and buff= er + * damage. The type of damage handling implemented depends on a driver's u= pload + * target. Drivers implementing a per-plane or per-CRTC upload target need= to + * handle frame damage while drivers implementing a per-buffer upload targ= et + * need to handle buffer damage. + * + * The existing damage helpers only support the frame damage type, there i= s no + * buffer age support or similar damage accumulation algorithm implemented= yet. + * + * Only drivers handling frame damage can use the mentiored damage helpers= to + * iterate over the damaged regions. Drivers that handle buffer damage, ne= ed to + * set &struct drm_plane_state.ignore_damage_clips as an indication to + * drm_atomic_helper_damage_iter_init() that the damage clips should be ig= nored. + * 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 /** --=20 2.41.0