From patchwork Wed Jul 12 18:32:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Ser X-Patchwork-Id: 13310808 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 89CFBEB64DA for ; Wed, 12 Jul 2023 18:32:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id ADC9610E5C5; Wed, 12 Jul 2023 18:32:13 +0000 (UTC) Received: from mail-40136.proton.ch (mail-40136.proton.ch [185.70.40.136]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9210C10E5C5 for ; Wed, 12 Jul 2023 18:32:11 +0000 (UTC) Date: Wed, 12 Jul 2023 18:32:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emersion.fr; s=protonmail; t=1689186728; x=1689445928; bh=mEcVm4tfMc7/DP4+6fbxFmxZzLDoO289IkjvzjfsIuw=; h=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=wrWRaMFZtVquiFugXS2wZ4Bq5F79XrHEYQlcSGk+VtOdb48KT5gQzOCdZ/elASPiq sqaN8ypCmEPm+Xug9ofdFzayqSxGGfjBP8neGo2amwZJvbmRmT7i/GgmNz113/46M3 s55cFp9R2/t6TRuizV1TwnALMEXr/xPlKnfLp5JrCZ66kAPwet71PECiymlworXfCx BwcoB5jgsaZFG5lrJk+v67H8pBd97TKi3LBcai04gwwjTxlN4EBDww41ehh7kRkarv 34Cbe3KGXuixyAcQEf85ZJzOlyensoLccxq6k/16DjGcMqoIZ+uc39NdHrxicNEj76 rBrpFHBZogsVg== To: dri-devel@lists.freedesktop.org From: Simon Ser Subject: [PATCH] drm/doc: document that PRIME import/export is always supported Message-ID: <20230712183156.191445-1-contact@emersion.fr> Feedback-ID: 1358184:user:proton 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: , Cc: Alex Deucher , Daniel Vetter , Jeffrey Hugo , Thomas Zimmermann Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Since commit 6b85aa68d9d5 ("drm: Enable PRIME import/export for all drivers"), import/export is always supported. Document this so that user-space knows what to expect. Signed-off-by: Simon Ser Cc: Thomas Zimmermann Cc: Alex Deucher Cc: Jeffrey Hugo Cc: Daniel Vetter Reviewed-by: Jeffrey Hugo --- include/uapi/drm/drm.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h index a87bbbbca2d4..56c194df527e 100644 --- a/include/uapi/drm/drm.h +++ b/include/uapi/drm/drm.h @@ -673,6 +673,9 @@ struct drm_gem_open { * Bitfield of supported PRIME sharing capabilities. See &DRM_PRIME_CAP_IMPORT * and &DRM_PRIME_CAP_EXPORT. * + * Starting from kernel version 6.6, both &DRM_PRIME_CAP_IMPORT and + * &DRM_PRIME_CAP_EXPORT are always advertised. + * * PRIME buffers are exposed as dma-buf file descriptors. See * Documentation/gpu/drm-mm.rst, section "PRIME Buffer Sharing". */ @@ -682,6 +685,8 @@ struct drm_gem_open { * * If this bit is set in &DRM_CAP_PRIME, the driver supports importing PRIME * buffers via the &DRM_IOCTL_PRIME_FD_TO_HANDLE ioctl. + * + * Starting from kernel version 6.6, this bit is always set in &DRM_CAP_PRIME. */ #define DRM_PRIME_CAP_IMPORT 0x1 /** @@ -689,6 +694,8 @@ struct drm_gem_open { * * If this bit is set in &DRM_CAP_PRIME, the driver supports exporting PRIME * buffers via the &DRM_IOCTL_PRIME_HANDLE_TO_FD ioctl. + * + * Starting from kernel version 6.6, this bit is always set in &DRM_CAP_PRIME. */ #define DRM_PRIME_CAP_EXPORT 0x2 /**