Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp4209499rwb; Tue, 8 Nov 2022 13:47:53 -0800 (PST) X-Google-Smtp-Source: AMsMyM7mfu6TgCmd9hJ70SPn9nrztLPbEquUrkxvi59+pPJupAMECzfhP0uBL/vJ5Btj9gxNNFmc X-Received: by 2002:a17:906:e28e:b0:7ad:bde1:3cc9 with SMTP id gg14-20020a170906e28e00b007adbde13cc9mr50539781ejb.482.1667944073038; Tue, 08 Nov 2022 13:47:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667944073; cv=none; d=google.com; s=arc-20160816; b=o83Yk08+z+RYy3X2Bb60qZWaL9qtxuTEYZ15Y905lCkl4xdoXABb0V+cITwaUscnbR l9QcADyOXOPt5HVy9bxRVnPaONTF0IGnxqh7m4zPSmt1IYL/7MBnPxjJgWOqu6C5PY9v APIA2UeXCk8WY5D8463pCzhGS+pYrA4Cama8mAqk7ZpURUyPl+Fipnkr0CwQ5CwI4IsD q3pBokI2tN0xu3+poGln0En0Djheon7Royaiz6IOHDYcbZieOjoSrQeUXrIedeplL9NA 8sxoymLLqqj7eGwnehadBJUxWapZn/JclxVoIW+uQwgyy7WpnVbDraO6wGTIZYslgV+f QjiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:references :cc:to:content-language:subject:reply-to:user-agent:mime-version :date:message-id:from:dkim-signature; bh=nNGGMyCOLpmxcwimAd7d1JNDC8irulEDPwNmVkkpOGQ=; b=b12ES3LmlCr4242nbi6TJWWVfChCu3rKRJBE0JH/eUp14U8I1zB3oITCcNcq2q8YMP YVFjsc7jh1Ry8mTtGFFLWMrgUZWJht/vN8gIGjxWWE17DBHJuBi5ix+cfFNAx2W3QLQO rtqZOEgMcxdEhtpt0VsoC3U/pcWYHp/BhIEV1TGlBNIVvNaHChFpfbWGg9TcXY20IFC/ IquQO8MOTDz9mxm4dZQ6Joy9onei4oGQdjknbpQb5urckjN4zZNU/UHgcsVLmTzSsRm7 OFSTpmsIxW/Izb/IoMiZ3yz53+UI4T++SodO6nCmVYaJsx7DA/b0/jNsfoBBfADgKTBV HICw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=alX57a0K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gs7-20020a1709072d0700b007ad9c8201e7si4037123ejc.93.2022.11.08.13.47.30; Tue, 08 Nov 2022 13:47:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=alX57a0K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229560AbiKHV10 (ORCPT + 92 others); Tue, 8 Nov 2022 16:27:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229835AbiKHV1X (ORCPT ); Tue, 8 Nov 2022 16:27:23 -0500 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA44B5D6A4 for ; Tue, 8 Nov 2022 13:27:21 -0800 (PST) Received: by mail-lf1-x131.google.com with SMTP id d6so22976968lfs.10 for ; Tue, 08 Nov 2022 13:27:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:references:cc:to :content-language:subject:reply-to:user-agent:mime-version:date :message-id:from:from:to:cc:subject:date:message-id:reply-to; bh=nNGGMyCOLpmxcwimAd7d1JNDC8irulEDPwNmVkkpOGQ=; b=alX57a0KugSynuS+NdT7MG6vVfPLxJzuDOo8Ufz4tmYpEgZ1rfWCE8waSQWkiKk6oX jrUC9MI8qA1Zg3z9KeAXKZtyLGdhuBst7UVhEFmqEh6kQEBfrYfoAPOy/AL45vDpOMpE RNASkkvH08H+a1LAyz3uk9VuAS6j/WTDKbTHGVfUVo9GGM2Lm3LExqHo6hOeSrumikH1 AEt6K1r+oQBgFG+2KtGmb2tHTKz6+ieMIoJUlt7d7aLU6HEh2g7lI3HzHBt0pwPQK393 U+yRXD3m72+JE8SrVAQECe4ck979GKs9c4kfyDpiUrLZd6DMAeosTedx31YrUadkknUa M0kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:references:cc:to :content-language:subject:reply-to:user-agent:mime-version:date :message-id:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=nNGGMyCOLpmxcwimAd7d1JNDC8irulEDPwNmVkkpOGQ=; b=rLqKFykmnLa2OWir0iZ3rZADX7+9JeDEEPeVWU7qBfmlc3KfNnCfBvuj/gWr7PhfNM wPhaEfYBg5Hnhmzw/agk2BjGgAV+vzRHinf3tlxT0YsNiSVERfMNTwEqgTFgtj1y+Dp/ zAXte1vi04BW4WseMuDBu3HhnXUHV1LG1lZMv8o98lFst91K3xfrLpoCv+fDhYzHTN0r a7kUbka502kt5ZsyAet6XfVaCfYSKow/R/6uuAnB4iP+sRd207JMD4BTLqxh0IWomRiE 1U3CEByttbyqBhY4HNg98pTbI/I+gOzw7cieJn8DnwCoISmotCGnKT/qnFNUZ81lUQ9y OXpQ== X-Gm-Message-State: ACrzQf0S/pLoiTKGTCew9N9a+W7L2BQhMv3qvvuywRNOUOWmkTjXVRzb 7nUqw0sUIolxaAaBW0WUsq0= X-Received: by 2002:a05:6512:33d2:b0:4a2:a44b:a461 with SMTP id d18-20020a05651233d200b004a2a44ba461mr22661082lfg.551.1667942840154; Tue, 08 Nov 2022 13:27:20 -0800 (PST) Received: from ?IPV6:2a02:a31a:a240:1700:c55e:6e7d:cf12:d8b7? ([2a02:a31a:a240:1700:c55e:6e7d:cf12:d8b7]) by smtp.googlemail.com with ESMTPSA id t9-20020a05651c204900b0026fc8855c20sm1877755ljo.19.2022.11.08.13.27.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 08 Nov 2022 13:27:19 -0800 (PST) From: Mateusz Kwiatkowski X-Google-Original-From: Mateusz Kwiatkowski Message-ID: Date: Tue, 8 Nov 2022 22:27:17 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Reply-To: kfyatek+publicgit@gmail.com Subject: Re: [PATCH v7 15/23] drm/modes: Introduce more named modes Content-Language: pl To: =?UTF-8?Q?Noralf_Tr=c3=b8nnes?= , Maxime Ripard , Jani Nikula , Joonas Lahtinen , Tvrtko Ursulin , Ben Skeggs , Rodrigo Vivi , Maxime Ripard , Samuel Holland , Jernej Skrabec , Maarten Lankhorst , Emma Anholt , Karol Herbst , Daniel Vetter , Chen-Yu Tsai , Lyude Paul , Thomas Zimmermann , David Airlie Cc: Phil Elwell , Hans de Goede , linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Geert Uytterhoeven , Dave Stevenson , linux-arm-kernel@lists.infradead.org, Dom Cobley , dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, nouveau@lists.freedesktop.org References: <20220728-rpi-analog-tv-properties-v7-0-7072a478c6b3@cerno.tech> <20220728-rpi-analog-tv-properties-v7-15-7072a478c6b3@cerno.tech> <262f0953-1e05-e68e-3e96-2ac2132a1e57@tronnes.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,FREEMAIL_REPLYTO, NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Noralf, W dniu 8.11.2022 o 10:38, Noralf Trønnes pisze: > > Den 07.11.2022 19.03, skrev Noralf Trønnes: >> >> Den 07.11.2022 15.16, skrev Maxime Ripard: >>> Now that we can easily extend the named modes list, let's add a few more >>> analog TV modes that were used in the wild, and some unit tests to make >>> sure it works as intended. >>> >>> Signed-off-by: Maxime Ripard >>> >>> --- >>> Changes in v6: >>> - Renamed the tests to follow DRM test naming convention >>> >>> Changes in v5: >>> - Switched to KUNIT_ASSERT_NOT_NULL >>> --- >>> drivers/gpu/drm/drm_modes.c | 2 + >>> drivers/gpu/drm/tests/drm_client_modeset_test.c | 54 +++++++++++++++++++++++++ >>> 2 files changed, 56 insertions(+) >>> >>> diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c >>> index 49441cabdd9d..17c5b6108103 100644 >>> --- a/drivers/gpu/drm/drm_modes.c >>> +++ b/drivers/gpu/drm/drm_modes.c >>> @@ -2272,7 +2272,9 @@ struct drm_named_mode { >>> >>> static const struct drm_named_mode drm_named_modes[] = { >>> NAMED_MODE("NTSC", 13500, 720, 480, DRM_MODE_FLAG_INTERLACE, DRM_MODE_TV_MODE_NTSC), >>> + NAMED_MODE("NTSC-J", 13500, 720, 480, DRM_MODE_FLAG_INTERLACE, DRM_MODE_TV_MODE_NTSC_J), >>> NAMED_MODE("PAL", 13500, 720, 576, DRM_MODE_FLAG_INTERLACE, DRM_MODE_TV_MODE_PAL), >>> + NAMED_MODE("PAL-M", 13500, 720, 480, DRM_MODE_FLAG_INTERLACE, DRM_MODE_TV_MODE_PAL_M), >>> }; >> I'm now having second thoughts about the tv_mode commandline option. Can >> we just add all the variants to this table and drop the tv_mode option? >> IMO this will be more user friendly and less confusing. >> > One downside of this is that it's not possible to force connector status > when using named modes, but I think it would be better to have a force > option than a tv_mode option. A lot of userspace treats unknown status > as disconnected. > > Anyone know if it's possible to set the connector status sysfs file > using a udev rule? > > Noralf. I think that leaving named modes only would be a bit limiting. There are use cases for custom modes, e.g. we might want progressive 240p "NTSC" (like 80s/90s home computers and video game consoles) or the modes with non-13.5MHz pixel clock that Geert requested with Amiga in mind. I'm not sure if the current cmdline-to-drm_mode conversion is flexible enough to meaningfully facilitate those, but we're at least getting the syntax down. Best regards, Mateusz Kwiatkowski