From patchwork Tue Feb 27 10:11:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 10244669 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6144C60208 for ; Tue, 27 Feb 2018 10:11:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4D9292A64C for ; Tue, 27 Feb 2018 10:11:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 425A32A657; Tue, 27 Feb 2018 10:11:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5C6072A650 for ; Tue, 27 Feb 2018 10:11:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 374076E0F4; Tue, 27 Feb 2018 10:11:18 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf0-x243.google.com (mail-lf0-x243.google.com [IPv6:2a00:1450:4010:c07::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id D9E456E0F4 for ; Tue, 27 Feb 2018 10:11:16 +0000 (UTC) Received: by mail-lf0-x243.google.com with SMTP id m69so26662476lfe.8 for ; Tue, 27 Feb 2018 02:11:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=6UzGL3R0/1tCnL5PxDkQNFRwqY2yqoB0iyC1shjkHsk=; b=X9fAgDtahS7D9pcwzBLJr4MXG3NuxtHNnz3hID0ichSGFc1vprKUXSJ2ZvKMQcn2V0 hHUbtQyQV53MK5Z9S2flknSPEDfGyVPrD5g6tK6IIARO6gLosIzkCFiSlM1aiMXWqqXX JZAE2/a1KxFbRntVTjFKxusayqewzh6r0n5dM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=6UzGL3R0/1tCnL5PxDkQNFRwqY2yqoB0iyC1shjkHsk=; b=k5JNZ4DZQBrgp08Yx0A1JnqJpHVujH1Yx482VKa7nlPdTEQEYisHeozZjwDBgFP8CU ORLQ/3fT7hH0VQDEcZbnNeWXgzTiEofy/f/Ooe0ItOH8qUQnL+vF47ButjYaJRme/Ibm 2beU8Vt3Rm6h31FvWUi9jJxlgTA0u3F2tj7/XmzPPbEsuDaKzv6lN24fwo4H+M3QjPpt da1gbAYiAcftnBsQ5Pfgv+IjrMzwnV6XWwZ0UvYvheZkTxP8V2/zyItb7m5jX97ZyqOq 7Gc4d6B73P3DAN2D8AeOWRkRBRgMTWBOT73TGyELpmUGlnE2Qc2nqcnb3matBHeLtctZ T80A== X-Gm-Message-State: APf1xPAAVWXTk0MygAUxBMOZwTENznuSV94h7jtP+/9T7ozpPdpr34li FppfEvvAzFKDAjyxcs+dMIGI5tiTifg= X-Google-Smtp-Source: AG47ELtFWRZcGv61my9GAzpaFRsccx09OF2tOr8PY41fWXsWhEZi5qSXTw2tLv0r5OOz4TPwJwSVmg== X-Received: by 10.25.31.141 with SMTP id f135mr10557708lff.68.1519726274683; Tue, 27 Feb 2018 02:11:14 -0800 (PST) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id b27sm2472909ljb.84.2018.02.27.02.11.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 27 Feb 2018 02:11:13 -0800 (PST) From: Linus Walleij To: dri-devel@lists.freedesktop.org, Eric Anholt , Daniel Vetter , Jani Nikula , Sean Paul Subject: [PATCH] drm: simple_kms_helper: Fix .mode_valid() documentation Date: Tue, 27 Feb 2018 11:11:09 +0100 Message-Id: <20180227101109.6088-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.14.3 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP This fixes up the .mode_valid() vtable entry documentation by copyediting the documentation from the .mode_valid() documentation in the drm_modeset_helper_vtables.h file. Fixes: 40275dc4edb4 ("drm: simple_kms_helper: Add mode_valid() callback support") Suggested-by: Daniel Vetter Signed-off-by: Linus Walleij Reviewed-by: Daniel Vetter --- include/drm/drm_simple_kms_helper.h | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/include/drm/drm_simple_kms_helper.h b/include/drm/drm_simple_kms_helper.h index d9e4c3c3f009..0d700a869cc8 100644 --- a/include/drm/drm_simple_kms_helper.h +++ b/include/drm/drm_simple_kms_helper.h @@ -24,9 +24,30 @@ struct drm_simple_display_pipe_funcs { /** * @mode_valid: * - * This function is called to filter out valid modes from the - * suggestions suggested by the bridge or display. This optional - * hook is passed in when initializing the pipeline. + * This callback is used to check if a specific mode is valid in the + * crtc used in this simple display pipe. This should be implemented + * if the display pipe has some sort of restriction in the modes + * it can display. For example, a given display pipe may be responsible + * to set a clock value. If the clock can not produce all the values + * for the available modes then this callback can be used to restrict + * the number of modes to only the ones that can be displayed. Another + * reason can be bandwidth mitigation: the memory port on the display + * controller can have bandwidth limitations not allowing pixel data + * to be fetched at any rate. + * + * This hook is used by the probe helpers to filter the mode list in + * drm_helper_probe_single_connector_modes(), and it is used by the + * atomic helpers to validate modes supplied by userspace in + * drm_atomic_helper_check_modeset(). + * + * This function is optional. + * + * NOTE: + * + * Since this function is both called from the check phase of an atomic + * commit, and the mode validation in the probe paths it is not allowed + * to look at anything else but the passed-in mode, and validate it + * against configuration-invariant hardware constraints. * * RETURNS: *