Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1311043rwe; Thu, 1 Sep 2022 16:37:44 -0700 (PDT) X-Google-Smtp-Source: AA6agR5ioBmi14Gmn1r1CvtP3fwl6uEDv6wg+fYWVOjBe0P8XoB/W79/1B4+iCUfIoNWNgyygxJF X-Received: by 2002:a17:907:1c12:b0:742:7a6:a1b6 with SMTP id nc18-20020a1709071c1200b0074207a6a1b6mr11206104ejc.159.1662075464578; Thu, 01 Sep 2022 16:37:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662075464; cv=none; d=google.com; s=arc-20160816; b=P1UZ7T/oeiYtJVBLq2Y4NP0f10eqWKnqLd1acRFDd1WKbIJCbxw1WDcBJRghPtS3Z9 Yb72Uura4JhLISadJqkCI5wUO1/V/SUuWk+H4Y8a/35mRt4CQ/mYh4O7IXCpMV+3mR5u cQ2TkSjznr3PJilPSgH6PBXf9O1zIkcSzW3dTUYaXdHUnEOgU3qqSMzdB64C+8ZMiH06 n837eALTH1qOQQbvkzap6FBdIZKSxH77/bcr3I2i1FqmJuXoyiqSHLrM1Ysx+ZrwjPqy 0WoUsqPwH+LcIfsdQusVx1linKx+2ZXPADneWBM70Wee16/0URRxaVvwN12l+6Jojwax YRww== 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:user-agent:mime-version:date :message-id:from:dkim-signature; bh=j9JPtLXuGOAthdbqCGaZBEMPKdA+qziCC+Oox2WhyWE=; b=KPmMbl7FIFayfw31A9iMVdYKk5nNXic4Nz9b4VnWpBFmYu4ojg3a9XBSw7p/WYUORx qg4dQ8twAhs5gzuT4pY2dXPMzrSiUrpz2H3jeJLaMNYPae9Met6jMZ1t4wAMBNZsJ2Vv 2+fbZZ1bZV2t4gPabqY0Bf3BSBpuEVUKzR0t0KFCkUnLPb2piD/bWuQMJD3tNRSSXL1R ALkeVDs9JirjOQbmyX9lqIY+0IKfubV3vqk9yGJiN2oaoi4YTONA3b8lV9NqpLBoCwiE gmPtVjfbTIXTDAUuRkilvGnvu176+a/Adnp2Pw0VCbpufW6+nk5sEmQc9HewOCMZ/Fr9 P/ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=KeZRTpmg; 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 sd17-20020a1709076e1100b007307a4f5102si473611ejc.830.2022.09.01.16.37.19; Thu, 01 Sep 2022 16:37:44 -0700 (PDT) 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=KeZRTpmg; 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 S234410AbiIAWqh (ORCPT + 99 others); Thu, 1 Sep 2022 18:46:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234385AbiIAWqf (ORCPT ); Thu, 1 Sep 2022 18:46:35 -0400 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E0746E2F2 for ; Thu, 1 Sep 2022 15:46:34 -0700 (PDT) Received: by mail-lf1-x12b.google.com with SMTP id bt10so853561lfb.1 for ; Thu, 01 Sep 2022 15:46:34 -0700 (PDT) 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:user-agent:mime-version:date:message-id :from:from:to:cc; bh=j9JPtLXuGOAthdbqCGaZBEMPKdA+qziCC+Oox2WhyWE=; b=KeZRTpmg+yfKKrQlCWb6p9FCrXOfw+fAObK0nGPdoQQEB9jXrfaidZettyBeWa3nIV cOJHlY1O1waPz+lWUwvlk6O1GTp1OgOoT3QMrLYrtRNgSiZe8oO/nj9ihZAFKUeShrKo eZzD5wo3kchE7FbSnMJJSNSc7SkMe/AwUN2hrEx5QlHXysXfWa8bbvhaVxtr++E3utU8 P+QAzv5pgUgN+NVWi9HJbQVusoZd5if6AUN8zXlSTRHzLJR2+7BUcjx9J4NDI6K0uoTC /2TNVxNYQTq15lTo5xELyjfNMDWWt1snAGJlPXjRN6aivFyUt5+admL+PKyoAO6TBUOA yy7Q== 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:user-agent:mime-version:date:message-id :from:x-gm-message-state:from:to:cc; bh=j9JPtLXuGOAthdbqCGaZBEMPKdA+qziCC+Oox2WhyWE=; b=6ERbkPicSakM175wmJqfJqPSxXMHPIXmTOJGecwlYG4BnWayXFJlph7nr5ptAaavWU jzHSDOnA4M5uiM4JuH0AgnvgrUfPXaMpA46f7EyAvt0sFhPJHPXmNgIoS3nsEz6Avhjm u0PkbPyC0F9lAnFPuYwR341A8aAUyfR2KuQ8wWfVXQfJSr8X6v6UaaOjAR0aDzPVdzZk M2pEy7tEz6m+EYz2vFuPrVK2Be/1K081F6RnT0Vmx+ONeMp/cDCz0SND+Tl5Ar5HctRu saIP4aglp8WP/h2pTNwzvrLo0vbRF3Lwx5X5UiJ6ojRzqvkUJWv0nsY0BPFUg1a1nKgR LHYg== X-Gm-Message-State: ACgBeo0XBpyYDkaGY42nkcYJjQeVKzHHmkIbyfs/E6fkdBDqDHdevL7m ArxirmwPD05NYbqV2pP/Z4Q= X-Received: by 2002:a05:6512:10c4:b0:492:d006:2b13 with SMTP id k4-20020a05651210c400b00492d0062b13mr11967803lfg.398.1662072392749; Thu, 01 Sep 2022 15:46:32 -0700 (PDT) Received: from ?IPV6:2a02:a31a:a240:1700:9c45:8fa1:8ce7:8852? ([2a02:a31a:a240:1700:9c45:8fa1:8ce7:8852]) by smtp.googlemail.com with ESMTPSA id u25-20020a056512041900b00492d6ae2386sm29410lfk.96.2022.09.01.15.46.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 01 Sep 2022 15:46:32 -0700 (PDT) From: Mateusz Kwiatkowski X-Google-Original-From: Mateusz Kwiatkowski Message-ID: <2f607c7d-6da1-c8df-1c02-8dd344a92343@gmail.com> Date: Fri, 2 Sep 2022 00:46:29 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.2.0 Subject: Re: [PATCH v2 19/41] drm/modes: Introduce the tv_mode property as a command-line option Content-Language: pl To: Maxime Ripard , Maxime Ripard , Ben Skeggs , David Airlie , Chen-Yu Tsai , Thomas Zimmermann , Jani Nikula , Lyude Paul , Philipp Zabel , Maarten Lankhorst , Rodrigo Vivi , Tvrtko Ursulin , Jernej Skrabec , Samuel Holland , Karol Herbst , =?UTF-8?Q?Noralf_Tr=c3=b8nnes?= , Emma Anholt , Daniel Vetter , Joonas Lahtinen Cc: Hans de Goede , linux-arm-kernel@lists.infradead.org, Phil Elwell , intel-gfx@lists.freedesktop.org, Dave Stevenson , dri-devel@lists.freedesktop.org, Dom Cobley , linux-kernel@vger.kernel.org, nouveau@lists.freedesktop.org, linux-sunxi@lists.linux.dev, Geert Uytterhoeven References: <20220728-rpi-analog-tv-properties-v2-0-459522d653a7@cerno.tech> <20220728-rpi-analog-tv-properties-v2-19-459522d653a7@cerno.tech> In-Reply-To: <20220728-rpi-analog-tv-properties-v2-19-459522d653a7@cerno.tech> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Maxime, > @@ -2212,20 +2239,22 @@ struct drm_named_mode { >      unsigned int xres; >      unsigned int yres; >      unsigned int flags; > +    unsigned int tv_mode; >  }; Are _all_ named modes supposed to be about analog TV? If so, then probably this structure should be renamed drm_named_analog_tv_mode or something. If not, then including tv_mode in all of them sounds almost dangrous. 0 is a valid value for enum drm_connector_tv_mode, corresponding to DRM_MODE_TV_MODE_NTSC_443. This is a very weird default (maybe it shouldn't be the one that has a numeric value of 0?) and if there ever is a named mode that is not related to analog TV, it looks that it will refer to NTSC-443. Not sure where could that actually propagate, and maybe what I'm saying can't happen, but I'm imagining weird scenarios where a GPU that has both a VGA/HDMI/whatever output, and a composite output, switches to NTSC-443 on the composite output by default because a named mode for the modern output is selected. Maybe something like DRM_MODE_TV_MODE_NONE = 0 would make sense? Maybe not. This is not an actual suggestion, just "thinking out loud". Best regards, Mateusz Kwiatkowski