From patchwork Wed Nov 4 17:01:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Simon Ser X-Patchwork-Id: 11881703 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 8683FC2D0A3 for ; Wed, 4 Nov 2020 17:01:57 +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 2E25820735 for ; Wed, 4 Nov 2020 17:01:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2E25820735 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 35F586E1CF; Wed, 4 Nov 2020 17:01:55 +0000 (UTC) Received: from mail-40136.protonmail.ch (mail-40136.protonmail.ch [185.70.40.136]) by gabe.freedesktop.org (Postfix) with ESMTPS id 85C3C6E1CF for ; Wed, 4 Nov 2020 17:01:53 +0000 (UTC) Date: Wed, 04 Nov 2020 17:01:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emersion.fr; s=protonmail2; t=1604509311; bh=aYiyAH7Zl3pPT2cWAXu5uPwI40tWiAmMM3NeFAypRd0=; h=Date:To:From:Cc:Reply-To:Subject:From; b=B3y26Ro9Rcv+EwRTEFSIkKCFrD3QzA8mzF8WAdWwlbpacjLb1hXf3FdUqT6Wcc7Se Y41sMvbSbaUGoOIw1x0Xnj/+MXcU8UIPGYtbDN16FnXmjw64scHcNINOwBIGXwXuUU Z2qhvJOQaP4ZJMg7Q3zLOo0fQodqH+nJYwqFiuhWxORoLwo4yAkXEq2cL5NQMXJ+7o o4WY8cJfUCJTKljjHdWnkXYAY4caeHHuS+cRp280NxulimaRP/uW5/yQb4XnQn2Emh qVj2cCKec/J74QVH0wq3gI++uBW07YTd+x8URVW1IWbGpQ8jSg7Dkuv96jdvJPA/fi cN6PnIyx2UfZA== To: dri-devel@lists.freedesktop.org From: Simon Ser Subject: [PATCH v2] 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 Signed-off-by: Daniel Stone Reviewed-by: Jonas Ådahl Cc: Pekka Paalanen Cc: Daniel Vetter Reviewed-by: Pekka Paalanen Reviewed-by: Jonas Ådahl Reviewed-by: Daniel Vetter --- include/uapi/drm/drm_mode.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h index 863eda048265..5ad10ab2a577 100644 --- a/include/uapi/drm/drm_mode.h +++ b/include/uapi/drm/drm_mode.h @@ -924,6 +924,12 @@ 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. + * + * User-space can release blobs as soon as they do not need to refer to them by + * their blob object ID. For instance, if you are using a MODE_ID blob in an + * atomic commit and you will not make another commit re-using the same ID, you + * can destroy the blob as soon as the commit has been issued, without waiting + * for it to complete. */ struct drm_mode_destroy_blob { __u32 blob_id;