From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 9FBBCC6FA83 for ; Tue, 6 Sep 2022 12:35:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4D7D010E65F; Tue, 6 Sep 2022 12:35:37 +0000 (UTC) Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by gabe.freedesktop.org (Postfix) with ESMTPS id A550B10E36C; Thu, 1 Sep 2022 22:46:34 +0000 (UTC) Received: by mail-lf1-x133.google.com with SMTP id bt10so853563lfb.1; 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=6luDXYkKehHdAnYdMJhk7cI6qElyi/2uvi09jmZZpzeGEQRX2ABLsr0CorWc3UHcr6 nUenpoYfuMg9X5J0NGrAddsfJ1ueQMorvF/+jXRRNF1hbeZzdx9SN/IKeYR9+0I4QYTA sRhYUMSGLAk7tY/gfLzL+aTnfMx/NmihFAafMznLUjEViWILP6Lo+tDQonnsMiji3ST9 dquQ4beGD15WxXL94jtrIAyyVfvmOcJvhnElMp6XepEU6Cs2pXjGaJRuUc3koUt/Kf7c HIj3COyiWjA5atvgY8kEsdHGozYg7bLnjGaqAtEJBzPzoWxmpSQB6LucLNoBuvaM26tm sSgg== X-Gm-Message-State: ACgBeo3LuUC0i9CiaA+b0Bh0HduCorSfvThLnk/Wo1o+ux3mkr3zw8ep KhG5q4EDKdHgnXbG74vJeDQ= X-Google-Smtp-Source: AA6agR4DDf2sl/p3w9svbMNnoZK7uBdh14I0I0N23iu/YSRY24vtSyAPu3BWH8/9FpD2KRu1t1XcVA== 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 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 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-Mailman-Approved-At: Tue, 06 Sep 2022 12:33:45 +0000 Subject: Re: [Intel-gfx] [PATCH v2 19/41] drm/modes: Introduce the tv_mode property as a command-line option X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dom Cobley , Dave Stevenson , nouveau@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-sunxi@lists.linux.dev, Geert Uytterhoeven , Phil Elwell , linux-arm-kernel@lists.infradead.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DA56A2577 for ; Thu, 1 Sep 2022 22:46:34 +0000 (UTC) Received: by mail-lf1-f44.google.com with SMTP id p7so833780lfu.3 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=HNTOfpKlNU5lMdm1UneK+RzpbMH10MbAPKBqPz/qLnpQBPwsJ0UVHm65Zx/63Nhqne +DqmcaDH9Kx1u9N6cmeG0zZHa5H6zAbqYaPU65LTz5ogvlPlHOHNNz6nU2VvRamHePBm GSLxxkhZ2zF3mWfUHo4Mv0JW9RtVeiTpXwAeurtpfuNmiGtQiTXKXCGkKlhJ0XlOB2BQ L/a5q+PNZ8uEKo6XZMA1CdC+TyEKOowqR2Ulphz1QjVI97YT9TEUN05Zm3NcoV8tXi+J 1k2tBijKRE2YLEE2UXTxv6PH6uA7K67ZBYRVwHZm9AowqbPrCwLJhX2hnd2RNpGwW7RA miuw== X-Gm-Message-State: ACgBeo0CBzAPBgKr3dq+n8RE2O/wWz2gBJKqV2Wrh2aqW6ZulA4x8ZM7 jvQ3IJnVknlEwY/KUaHDhls= X-Google-Smtp-Source: AA6agR4DDf2sl/p3w9svbMNnoZK7uBdh14I0I0N23iu/YSRY24vtSyAPu3BWH8/9FpD2KRu1t1XcVA== 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 Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: 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 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 50ED3C54EE9 for ; Tue, 6 Sep 2022 20:31:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 27FFE10EA9C; Tue, 6 Sep 2022 20:31:26 +0000 (UTC) Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by gabe.freedesktop.org (Postfix) with ESMTPS id A550B10E36C; Thu, 1 Sep 2022 22:46:34 +0000 (UTC) Received: by mail-lf1-x133.google.com with SMTP id bt10so853563lfb.1; 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=6luDXYkKehHdAnYdMJhk7cI6qElyi/2uvi09jmZZpzeGEQRX2ABLsr0CorWc3UHcr6 nUenpoYfuMg9X5J0NGrAddsfJ1ueQMorvF/+jXRRNF1hbeZzdx9SN/IKeYR9+0I4QYTA sRhYUMSGLAk7tY/gfLzL+aTnfMx/NmihFAafMznLUjEViWILP6Lo+tDQonnsMiji3ST9 dquQ4beGD15WxXL94jtrIAyyVfvmOcJvhnElMp6XepEU6Cs2pXjGaJRuUc3koUt/Kf7c HIj3COyiWjA5atvgY8kEsdHGozYg7bLnjGaqAtEJBzPzoWxmpSQB6LucLNoBuvaM26tm sSgg== X-Gm-Message-State: ACgBeo3LuUC0i9CiaA+b0Bh0HduCorSfvThLnk/Wo1o+ux3mkr3zw8ep KhG5q4EDKdHgnXbG74vJeDQ= X-Google-Smtp-Source: AA6agR4DDf2sl/p3w9svbMNnoZK7uBdh14I0I0N23iu/YSRY24vtSyAPu3BWH8/9FpD2KRu1t1XcVA== 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 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 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-Mailman-Approved-At: Tue, 06 Sep 2022 20:31:03 +0000 Subject: Re: [Nouveau] [PATCH v2 19/41] drm/modes: Introduce the tv_mode property as a command-line option X-BeenThere: nouveau@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Nouveau development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dom Cobley , nouveau@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-sunxi@lists.linux.dev, Hans de Goede , Geert Uytterhoeven , Phil Elwell , linux-arm-kernel@lists.infradead.org Errors-To: nouveau-bounces@lists.freedesktop.org Sender: "Nouveau" 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 20633ECAAD2 for ; Thu, 1 Sep 2022 22:47:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:References:Cc:To:Subject: MIME-Version:Date:Message-ID:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6qGzxCnKq9ypdVTbZht2/Qnz3+vEXwX3OYQOVW0GR0E=; b=NcaRJOEwUwRoyf oJ60qx9fVKi7v1mkE/8uE9X9vx6+ukDIO4S2Ls/SisOqHgxRCZPl3JrL231t1BI1lBM6qLHW3bpXw yDmlb9RlnklBuZRU1lUxxzCuY+sLcyPN4veDYKz7s1/YSnXR5HqHscNsyRAaTMksHYNQRvmiDOAAj HOrvzK1Vw+0GEMYoq9CoJxhwqMJT+XVpNNJTBk5yZW7IwG/M+/G5ebGPKLn9uLehEICWnRHaDoV/r m2j2RS/LmTi27g+KZthCCv4//awfTeNEXAqHzLGdLeX2IjegWVtjdPg5oxuVRiDJ/VzUdLnqvetcP FhBcVqei3YK2jGds2/sA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oTsxK-00FW4T-RY; Thu, 01 Sep 2022 22:46:39 +0000 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oTsxI-00FW16-A5 for linux-arm-kernel@lists.infradead.org; Thu, 01 Sep 2022 22:46:37 +0000 Received: by mail-lf1-x130.google.com with SMTP id v26so783692lfd.10 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=Odtctb3VtjhAtSPgqZ2HljvA6+mHwhMx5OpQ2PSKuC2NutCpkXRvLOpF/kl799+PYP xHdCFsWFaY4oRDl0e40/NDSB4uwhutiLmDkH9ZlOXQoDerfRAOslDFmPcLOpiXkQkBzI uJsFBOAf53WUAROBUGmw7Y+u/KEFY5aQTKxa1f9i2s37b9ShhKJrZZUx73yoO+WgmRkc HKUzt/3LUQkfVvzYstdjDFteS43VI1QniokV7eSi3vAGD6FSwRq5PTFOjAmLLw7UPuuo TRqvZB4mS41SQIYeX1DUW078uUu2uJZOIRclD59xkBNZaGxVcA99sY1mhlD4VXiE3z89 K3tQ== X-Gm-Message-State: ACgBeo1fZpy3Gz7yZtd55WvlsQCaQLETfwx0/i32Xq3t0FjbynXTb8iX hTPNOel/x4v3mRCeRRxbahY= X-Google-Smtp-Source: AA6agR4DDf2sl/p3w9svbMNnoZK7uBdh14I0I0N23iu/YSRY24vtSyAPu3BWH8/9FpD2KRu1t1XcVA== 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220901_154636_390430_0A7BC80A X-CRM114-Status: GOOD ( 14.63 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org SGkgTWF4aW1lLAoKPiBAQCAtMjIxMiwyMCArMjIzOSwyMiBAQCBzdHJ1Y3QgZHJtX25hbWVkX21v ZGUgewo+IMKgwqDCoCDCoHVuc2lnbmVkIGludCB4cmVzOwo+IMKgwqDCoCDCoHVuc2lnbmVkIGlu dCB5cmVzOwo+IMKgwqDCoCDCoHVuc2lnbmVkIGludCBmbGFnczsKPiArwqDCoCDCoHVuc2lnbmVk IGludCB0dl9tb2RlOwo+wqAgfTsKCkFyZSBfYWxsXyBuYW1lZCBtb2RlcyBzdXBwb3NlZCB0byBi ZSBhYm91dCBhbmFsb2cgVFY/CgpJZiBzbywgdGhlbiBwcm9iYWJseSB0aGlzIHN0cnVjdHVyZSBz aG91bGQgYmUgcmVuYW1lZCBkcm1fbmFtZWRfYW5hbG9nX3R2X21vZGUKb3Igc29tZXRoaW5nLgoK SWYgbm90LCB0aGVuIGluY2x1ZGluZyB0dl9tb2RlIGluIGFsbCBvZiB0aGVtIHNvdW5kcyBhbG1v c3QgZGFuZ3JvdXMuIDAgaXMgYQp2YWxpZCB2YWx1ZSBmb3IgZW51bSBkcm1fY29ubmVjdG9yX3R2 X21vZGUsIGNvcnJlc3BvbmRpbmcgdG8KRFJNX01PREVfVFZfTU9ERV9OVFNDXzQ0My4gVGhpcyBp cyBhIHZlcnkgd2VpcmQgZGVmYXVsdCAobWF5YmUgaXQgc2hvdWxkbid0IGJlCnRoZSBvbmUgdGhh dCBoYXMgYSBudW1lcmljIHZhbHVlIG9mIDA/KSBhbmQgaWYgdGhlcmUgZXZlciBpcyBhIG5hbWVk IG1vZGUgdGhhdAppcyBub3QgcmVsYXRlZCB0byBhbmFsb2cgVFYsIGl0IGxvb2tzIHRoYXQgaXQg d2lsbCByZWZlciB0byBOVFNDLTQ0My4KCk5vdCBzdXJlIHdoZXJlIGNvdWxkIHRoYXQgYWN0dWFs bHkgcHJvcGFnYXRlLCBhbmQgbWF5YmUgd2hhdCBJJ20gc2F5aW5nIGNhbid0CmhhcHBlbiwgYnV0 IEknbSBpbWFnaW5pbmcgd2VpcmQgc2NlbmFyaW9zIHdoZXJlIGEgR1BVIHRoYXQgaGFzIGJvdGgg YQpWR0EvSERNSS93aGF0ZXZlciBvdXRwdXQsIGFuZCBhIGNvbXBvc2l0ZSBvdXRwdXQsIHN3aXRj aGVzIHRvIE5UU0MtNDQzIG9uIHRoZQpjb21wb3NpdGUgb3V0cHV0IGJ5IGRlZmF1bHQgYmVjYXVz ZSBhIG5hbWVkIG1vZGUgZm9yIHRoZSBtb2Rlcm4gb3V0cHV0IGlzCnNlbGVjdGVkLgoKTWF5YmUg c29tZXRoaW5nIGxpa2UgRFJNX01PREVfVFZfTU9ERV9OT05FID0gMCB3b3VsZCBtYWtlIHNlbnNl PwoKTWF5YmUgbm90LiBUaGlzIGlzIG5vdCBhbiBhY3R1YWwgc3VnZ2VzdGlvbiwganVzdCAidGhp bmtpbmcgb3V0IGxvdWQiLgoKQmVzdCByZWdhcmRzLApNYXRldXN6IEt3aWF0a293c2tpCgpfX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fXwpsaW51eC1hcm0ta2Vy bmVsIG1haWxpbmcgbGlzdApsaW51eC1hcm0ta2VybmVsQGxpc3RzLmluZnJhZGVhZC5vcmcKaHR0 cDovL2xpc3RzLmluZnJhZGVhZC5vcmcvbWFpbG1hbi9saXN0aW5mby9saW51eC1hcm0ta2VybmVs Cg== From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 60F80ECAAD3 for ; Thu, 1 Sep 2022 22:46:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A6C5710E373; Thu, 1 Sep 2022 22:46:39 +0000 (UTC) Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by gabe.freedesktop.org (Postfix) with ESMTPS id A550B10E36C; Thu, 1 Sep 2022 22:46:34 +0000 (UTC) Received: by mail-lf1-x133.google.com with SMTP id bt10so853563lfb.1; 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=6luDXYkKehHdAnYdMJhk7cI6qElyi/2uvi09jmZZpzeGEQRX2ABLsr0CorWc3UHcr6 nUenpoYfuMg9X5J0NGrAddsfJ1ueQMorvF/+jXRRNF1hbeZzdx9SN/IKeYR9+0I4QYTA sRhYUMSGLAk7tY/gfLzL+aTnfMx/NmihFAafMznLUjEViWILP6Lo+tDQonnsMiji3ST9 dquQ4beGD15WxXL94jtrIAyyVfvmOcJvhnElMp6XepEU6Cs2pXjGaJRuUc3koUt/Kf7c HIj3COyiWjA5atvgY8kEsdHGozYg7bLnjGaqAtEJBzPzoWxmpSQB6LucLNoBuvaM26tm sSgg== X-Gm-Message-State: ACgBeo3LuUC0i9CiaA+b0Bh0HduCorSfvThLnk/Wo1o+ux3mkr3zw8ep KhG5q4EDKdHgnXbG74vJeDQ= X-Google-Smtp-Source: AA6agR4DDf2sl/p3w9svbMNnoZK7uBdh14I0I0N23iu/YSRY24vtSyAPu3BWH8/9FpD2KRu1t1XcVA== 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 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-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: , Cc: Dom Cobley , Dave Stevenson , nouveau@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-sunxi@lists.linux.dev, Hans de Goede , Geert Uytterhoeven , Phil Elwell , linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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