From patchwork Thu Jul 5 13:52:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 10509327 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 F2C3660116 for ; Thu, 5 Jul 2018 13:52:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E261928CD2 for ; Thu, 5 Jul 2018 13:52:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D69D628EC0; Thu, 5 Jul 2018 13:52:28 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 506DF28CD2 for ; Thu, 5 Jul 2018 13:52:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753690AbeGENw0 (ORCPT ); Thu, 5 Jul 2018 09:52:26 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:54210 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753640AbeGENwY (ORCPT ); Thu, 5 Jul 2018 09:52:24 -0400 Received: by mail-wm0-f68.google.com with SMTP id b188-v6so11284525wme.3 for ; Thu, 05 Jul 2018 06:52:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id; bh=IQoEupKOwRI0uz1CSps2N1zxz7hssgAoyDBi6z4LE5Q=; b=jiH0I6bwUnZ++mA9Bbm2l30IS8ir98B6OfIZZ5EPv4EkqloQPGWAjGqxpU6CaQ9b4/ FViCJ2qiSJMkDdMOIAL00CLq49krQ+p6BFSioJicCm5xRpBdodTHLSnwqaHv68mFTi6H qXJDNguCuiJkriLTdR+BC4PB+o8bo6S0ItpXI= 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=IQoEupKOwRI0uz1CSps2N1zxz7hssgAoyDBi6z4LE5Q=; b=Nyoy37mFwp+q1FpKwRee6uMcP/dAvubG4ZY3C+fS9LGuz0+eWsSlx3UxKW6/XC+UIK EXd5h6Lo0l3UKkU5opA+gRWBpqNKn6q0rBUlR70jtzjiKhEuzdJqvEN/TWRRpGlyrqD+ bhvOYz+NyTjxGakS6FxwMExi/PiyEgzEHLc8zQ6blFX0apkQVYO0F03mKiyphZRI1Ymf abadw9dFS0qJ/fqpBkCTMu+VLvwqn8Bg2LQ+nHW6aIFMv1OGT2IWwrnI+m/4cgMXQAIr epwteLvixEBzZqgIv52aAFHReCkX8l6/C2fbzbgrSqd4e4U3q7gi2pJsVSmt+m9lGkeR UN1g== X-Gm-Message-State: APt69E3UOEYHBzBFZZGqsUuhZx79a7ndH+4k4SKqsGWO1CKkJUK1n2q3 QDDuM7xgZY1kN//Q9YfeauirPQ== X-Google-Smtp-Source: AAOMgpexGhab0RNA3GEH/MCp4WkghbYWRJIqHIVTp6o/ObWBWXNNESwa3i7q6LpnerSUx5TZUcNvaw== X-Received: by 2002:aa7:d68b:: with SMTP id d11-v6mr6868214edr.196.1530798743415; Thu, 05 Jul 2018 06:52:23 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:5628:0:496f:7dc5:66d7:a057]) by smtp.gmail.com with ESMTPSA id p59-v6sm3226573edp.54.2018.07.05.06.52.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Jul 2018 06:52:22 -0700 (PDT) From: Daniel Vetter To: DRI Development Cc: Daniel Vetter , Bartlomiej Zolnierkiewicz , linux-fbdev@vger.kernel.org Subject: [PATCH] fbdev: fix modedb docs in fb_find_mode Date: Thu, 5 Jul 2018 15:52:17 +0200 Message-Id: <20180705135217.12561-1-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.18.0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fix up the indenting that confused sphinx. To make sure we don't have to make the examples unreadable with escaping just put them in as block quotes, that seems the simplest solution. Cc: Bartlomiej Zolnierkiewicz Cc: linux-fbdev@vger.kernel.org Signed-off-by: Daniel Vetter --- drivers/video/fbdev/core/modedb.c | 62 ++++++++++++++++--------------- 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/drivers/video/fbdev/core/modedb.c b/drivers/video/fbdev/core/modedb.c index 2510fa728d77..5ab8af271286 100644 --- a/drivers/video/fbdev/core/modedb.c +++ b/drivers/video/fbdev/core/modedb.c @@ -628,45 +628,47 @@ static int fb_try_mode(struct fb_var_screeninfo *var, struct fb_info *info, } /** - * fb_find_mode - finds a valid video mode - * @var: frame buffer user defined part of display - * @info: frame buffer info structure - * @mode_option: string video mode to find - * @db: video mode database - * @dbsize: size of @db - * @default_mode: default video mode to fall back to - * @default_bpp: default color depth in bits per pixel + * fb_find_mode - finds a valid video mode + * @var: frame buffer user defined part of display + * @info: frame buffer info structure + * @mode_option: string video mode to find + * @db: video mode database + * @dbsize: size of @db + * @default_mode: default video mode to fall back to + * @default_bpp: default color depth in bits per pixel * - * Finds a suitable video mode, starting with the specified mode - * in @mode_option with fallback to @default_mode. If - * @default_mode fails, all modes in the video mode database will - * be tried. + * Finds a suitable video mode, starting with the specified mode + * in @mode_option with fallback to @default_mode. If + * @default_mode fails, all modes in the video mode database will + * be tried. * - * Valid mode specifiers for @mode_option: + * Valid mode specifiers for @mode_option:: * - * x[M][R][-][@][i][m] or - * [-][@] + * x[M][R][-][@][i][m] + * + * or :: * - * with , , and decimal numbers and - * a string. + * [-][@] * - * If 'M' is present after yres (and before refresh/bpp if present), - * the function will compute the timings using VESA(tm) Coordinated - * Video Timings (CVT). If 'R' is present after 'M', will compute with - * reduced blanking (for flatpanels). If 'i' is present, compute - * interlaced mode. If 'm' is present, add margins equal to 1.8% - * of xres rounded down to 8 pixels, and 1.8% of yres. The char - * 'i' and 'm' must be after 'M' and 'R'. Example: + * with , , and decimal numbers and + * a string. * - * 1024x768MR-8@60m - Reduced blank with margins at 60Hz. + * If 'M' is present after yres (and before refresh/bpp if present), + * the function will compute the timings using VESA(tm) Coordinated + * Video Timings (CVT). If 'R' is present after 'M', will compute with + * reduced blanking (for flatpanels). If 'i' is present, compute + * interlaced mode. If 'm' is present, add margins equal to 1.8% + * of xres rounded down to 8 pixels, and 1.8% of yres. The char + * 'i' and 'm' must be after 'M' and 'R'. Example:: * - * NOTE: The passed struct @var is _not_ cleared! This allows you - * to supply values for e.g. the grayscale and accel_flags fields. + * 1024x768MR-8@60m - Reduced blank with margins at 60Hz. * - * Returns zero for failure, 1 if using specified @mode_option, - * 2 if using specified @mode_option with an ignored refresh rate, - * 3 if default mode is used, 4 if fall back to any valid mode. + * NOTE: The passed struct @var is _not_ cleared! This allows you + * to supply values for e.g. the grayscale and accel_flags fields. * + * Returns zero for failure, 1 if using specified @mode_option, + * 2 if using specified @mode_option with an ignored refresh rate, + * 3 if default mode is used, 4 if fall back to any valid mode. */ int fb_find_mode(struct fb_var_screeninfo *var,