From patchwork Wed Nov 18 10:52:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Ser X-Patchwork-Id: 11914779 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=-13.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,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 7043CC5519F for ; Wed, 18 Nov 2020 10:52: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 2B0C5206A5 for ; Wed, 18 Nov 2020 10:52:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2B0C5206A5 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 81C756E3F2; Wed, 18 Nov 2020 10:52:19 +0000 (UTC) Received: from mail2.protonmail.ch (mail2.protonmail.ch [185.70.40.22]) by gabe.freedesktop.org (Postfix) with ESMTPS id CFB876E3F2 for ; Wed, 18 Nov 2020 10:52:18 +0000 (UTC) Date: Wed, 18 Nov 2020 10:52:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emersion.fr; s=protonmail2; t=1605696736; bh=gwd2Kc82sw8Rc6Ptst6h4DMIyMS4TPsTm/hGcu8vZUM=; h=Date:To:From:Cc:Reply-To:Subject:From; b=ksknoyvQYpTawA3MhcDdWVpbRiBtHdEEaE4oapA4MbT3R2/uIMAydzOFdu8aFTfie rDCTXffm717uuY0TC930oxGvoi9yh/WjdSQ5P6pv96ah0FNLuopfvDIZeB3th+bOD2 DbzqcvQ5RLcaMUJVQqHg+FQy2RnThVAlSSvvRlV7VJkzxaTeslCvSBqDPHIoQYED1n +GnRPXeFvIVoge0gcFYXz/YjdR9WdX9sYSOS6XtlWcRfrQawywJa0eOainPqknf33t v6emoucaX1R8BeX1hWHkOLCwU1ypVlx7NkBMzdkznN2nuabn24z2TUzI5dMPXjI2Yn nepqsKe3tZ1Rw== To: dri-devel@lists.freedesktop.org From: Simon Ser Subject: [PATCH] drm: document drm_mode_get_connector 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" Document how to perform a forced probe, and when should user-space do it. Signed-off-by: Simon Ser Cc: Daniel Vetter Cc: Pekka Paalanen --- include/uapi/drm/drm_mode.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h index 5ad10ab2a577..09647b799f39 100644 --- a/include/uapi/drm/drm_mode.h +++ b/include/uapi/drm/drm_mode.h @@ -368,6 +368,19 @@ enum drm_mode_subconnector { #define DRM_MODE_CONNECTOR_WRITEBACK 18 #define DRM_MODE_CONNECTOR_SPI 19 +/** + * struct drm_mode_get_connector - get connector metadata + * + * If the @count_modes field is set to zero, the kernel will perform a forced + * probe on the connector to refresh the connector status, modes and EDID. + * A forced-probe can be slow and the ioctl will block. + * + * User-space shouldn't need to force-probe connectors in general: the kernel + * will automatically take care of probing connectors that don't support + * hot-plug detection when appropriate. However, user-space may force-probe + * connectors on user request (e.g. clicking a "Scan connectors" button, or + * opening a UI to manage screens). + */ struct drm_mode_get_connector { __u64 encoders_ptr;