From patchwork Thu Oct 22 09:38:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Simon Ser X-Patchwork-Id: 11850715 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=-9.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 BE265C4363A for ; Thu, 22 Oct 2020 09:38:21 +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 6D85F223BF for ; Thu, 22 Oct 2020 09:38:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6D85F223BF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=emersion.fr 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 79BA96F593; Thu, 22 Oct 2020 09:38:19 +0000 (UTC) Received: from mail-40133.protonmail.ch (mail-40133.protonmail.ch [185.70.40.133]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0F0426F583 for ; Thu, 22 Oct 2020 09:38:18 +0000 (UTC) Date: Thu, 22 Oct 2020 09:38:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emersion.fr; s=protonmail2; t=1603359495; bh=LGRiWQ8po9v8ocniayvI1sADSQF1X+BLqPUzuucOBS0=; h=Date:To:From:Cc:Reply-To:Subject:From; b=cQML5i7FjocWCk7lAleenBG7hScssBYs/V8KBhnLi5k1UfdmGKfB76vGzSKRopp7r pK5jqHIF5dsJf0AB4l0ThIKN37eyU60oIyEElJH6lF2DKc9haIaRk3JvCgNGavAxyS xi2UO2AwnhaVKGNauIE6hJyn1QVY4Dk6fZIeapPMqEFsavDz11/KkVdpZHsBxAyGOd H3rfM8OKmkpPI/gD4tUW/zzIOy5SwZWaBaRmILuo+2BJl5oKuBscAakLV1AM9vHtPf M9MrV7TftPAfHckB5MhpaBx60l/X9vDAnowihQDmE+UmlZ6i4aIqDEMSyglqDrGJSn p67yzzdpZmHGQ== To: dri-devel@lists.freedesktop.org From: Simon Ser Subject: [PATCH] drm: document that blobs are ref'counted Message-ID: MIME-Version: 1.0 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: , Reply-To: Simon Ser Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" User-space doesn't need to keep track of blobs that might be in use by the kernel. User-space can just destroy blobs as soon as they don't need them anymore. Signed-off-by: Simon Ser Cc: Pekka Paalanen Cc: Daniel Vetter Cc: Jonas Ådahl Reviewed-by: Jonas Ådahl --- include/uapi/drm/drm_mode.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h index 863eda048265..f7c41aa4b5eb 100644 --- a/include/uapi/drm/drm_mode.h +++ b/include/uapi/drm/drm_mode.h @@ -924,6 +924,10 @@ struct drm_mode_create_blob { * struct drm_mode_destroy_blob - Destroy user blob * @blob_id: blob_id to destroy * Destroy a user-created blob property. + * + * Blobs are reference-counted by the kernel, so user-space can destroy them as + * soon as they're done with them. For instance user-space can destroy a blob + * used in an atomic commit right after performing the atomic commit ioctl. */ struct drm_mode_destroy_blob { __u32 blob_id;