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 EB92AC6FA8A for ; Mon, 12 Sep 2022 13:39:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2374510E530; Mon, 12 Sep 2022 13:38:19 +0000 (UTC) Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by gabe.freedesktop.org (Postfix) with ESMTPS id DA0B810EA96; Thu, 8 Sep 2022 11:31:39 +0000 (UTC) Received: by mail-lj1-x22a.google.com with SMTP id z20so19515596ljq.3; Thu, 08 Sep 2022 04:31:39 -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:subject:date; bh=Pe/I+w+iO2pwgJXl8T4sC38en64C2l3oERN/xelPq20=; b=V4sxO+75nLSa4ntHYBDYJK7NyyItm+0ZuqLo4c8gxEblOEQGHihNxBzP1ywfeAMYWP A6gbXFUa+oFissD0CGGT9qZjiT57qAO/LcaelBX/nJDUId7ciewfaXSWVpw6M29eM72Z q0uRM6YPLLMRxsucdQdim3Ufr73pusbVeQPwM6bfhtQ87iWKRwLxmE3cBBQxY4H9VZIf pQM3O1hiKQXGJzsJvyphYtgmgFfp7lXMh65ITn1H0JW5pYN/LHrKWP/ORM0dXXFdRZOf 6SddjB7+yub2ELpu5aTF2EbiCg6LgO8CuZOMv2TnRuzKXVquW5W4obBFXEUnssRCyD4H ta2g== 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:subject:date; bh=Pe/I+w+iO2pwgJXl8T4sC38en64C2l3oERN/xelPq20=; b=NtJLZb4uRW8yHAPfIPxN+OhxxLLr/OGzJseeOC5S76lHMmmx05WBC1VBnLe9mY9isC xIhqh04NmPUY2xQey2qE/KTIcJUvuDLKiUowS67D1D7kD7d/4VWkJ7kUEFmuunXDtUck WmbUNbWcF9xeHNm3zlJZtXigsZElNw8R9gFo89a0lqOFTld4ncsmV+GOh9JdKXJ+kZwA LO6vtkLWcEkJtHVuapgSkEBTIGTx6RmwDilHPw0e9SsdyTAbX5eeOpUKj+SysTph+bwA 1fX31tcJqrJMDndkmNnqhhh1bVaMlDxxbmNfrKOozyD75sorukQWBlLb/hqp7ymQhXxC 5hqw== X-Gm-Message-State: ACgBeo1yHExU/QHz1mSjUaehJ7MhXgCvGkUhnpGn0gzBvwY//PCKmc14 odNWpIJtAx9ZOZipU5O8Keo= X-Google-Smtp-Source: AA6agR7hqDYt7a6c30Zzx2HM7qo0bpBArfiiaiAMashCn8pCJhXeqGkG5/jvmcd17AYfIZXNcSfBMg== X-Received: by 2002:a2e:b16c:0:b0:266:175c:cd54 with SMTP id a12-20020a2eb16c000000b00266175ccd54mr2425837ljm.278.1662636698015; Thu, 08 Sep 2022 04:31:38 -0700 (PDT) Received: from [10.10.53.53] (81-18-220-16.static.chello.pl. [81.18.220.16]) by smtp.googlemail.com with ESMTPSA id z20-20020a195e54000000b00497a879e552sm930968lfi.291.2022.09.08.04.31.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 08 Sep 2022 04:31:37 -0700 (PDT) From: Mateusz Kwiatkowski X-Google-Original-From: Mateusz Kwiatkowski Message-ID: Date: Thu, 8 Sep 2022 13:31:34 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Content-Language: en-US To: Maxime Ripard , =?UTF-8?Q?Noralf_Tr=c3=b8nnes?= References: <20220728-rpi-analog-tv-properties-v2-0-459522d653a7@cerno.tech> <20220728-rpi-analog-tv-properties-v2-32-459522d653a7@cerno.tech> <199cf4b3-8ace-e047-3050-b810cf0c6b63@tronnes.org> <20220908112312.hlb7mzneuxnethhr@houat> In-Reply-To: <20220908112312.hlb7mzneuxnethhr@houat> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Mon, 12 Sep 2022 13:38:08 +0000 Subject: Re: [Intel-gfx] [PATCH v2 32/41] drm/vc4: vec: Convert to the new TV mode property 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: Karol Herbst , David Airlie , nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Phil Elwell , Emma Anholt , Samuel Holland , Jernej Skrabec , Chen-Yu Tsai , Geert Uytterhoeven , Ben Skeggs , linux-sunxi@lists.linux.dev, Thomas Zimmermann , intel-gfx@lists.freedesktop.org, Rodrigo Vivi , Daniel Vetter , linux-arm-kernel@lists.infradead.org, Dom Cobley , Dave Stevenson , linux-kernel@vger.kernel.org, Mateusz Kwiatkowski , Philipp Zabel Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Hi Maxime, W dniu 08.09.2022 o 13:23, Maxime Ripard pisze: > Hi Noralf, > > On Tue, Aug 30, 2022 at 09:01:08PM +0200, Noralf Trønnes wrote: >>> +static const struct drm_prop_enum_list tv_mode_names[] = { >> >> Maybe call it legacy_tv_mode_enums? >> >>> >>> +    { VC4_VEC_TV_MODE_NTSC, "NTSC", }, >>> >>> +    { VC4_VEC_TV_MODE_NTSC_J, "NTSC-J", }, >>> >>> +    { VC4_VEC_TV_MODE_PAL, "PAL", }, >>> >>> +    { VC4_VEC_TV_MODE_PAL_M, "PAL-M", }, >> >> If you use DRM_MODE_TV_MODE_* here you don't need to translate the value >> using the switch statement in get/set property, you can use the value >> directly to get/set tv.mode. > > I'm sorry, I'm not quite sure what you mean by that. If we expose the > DRM_MODE_TV_MODE_* properties there, won't that change the values the > userspace will need to use to set that property? I'd just like to point out that if numerical values of these enums are your concern, then you're (or perhaps I am ;) already breaking this by adding new modes in patch 33/41 in this series. And the values (and names!) added by that patch (33/41) don't match those currently used by the downstream version (https://github.com/raspberrypi/linux/blob/rpi-5.15.y/drivers/gpu/drm/vc4/vc4_vec.c). If any userspace software is manipulating this property, it's most likely targeting the downstream code. But since you're not aiming for consistency with that, I was under the impression that compatibility isn't a concern. Best regards, Mateusz Kwiatkowski From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) (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 D21CE7C for ; Thu, 8 Sep 2022 11:40:15 +0000 (UTC) Received: by mail-wr1-f46.google.com with SMTP id c11so21358742wrp.11 for ; Thu, 08 Sep 2022 04:40:15 -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:subject:date; bh=Pe/I+w+iO2pwgJXl8T4sC38en64C2l3oERN/xelPq20=; b=V4sxO+75nLSa4ntHYBDYJK7NyyItm+0ZuqLo4c8gxEblOEQGHihNxBzP1ywfeAMYWP A6gbXFUa+oFissD0CGGT9qZjiT57qAO/LcaelBX/nJDUId7ciewfaXSWVpw6M29eM72Z q0uRM6YPLLMRxsucdQdim3Ufr73pusbVeQPwM6bfhtQ87iWKRwLxmE3cBBQxY4H9VZIf pQM3O1hiKQXGJzsJvyphYtgmgFfp7lXMh65ITn1H0JW5pYN/LHrKWP/ORM0dXXFdRZOf 6SddjB7+yub2ELpu5aTF2EbiCg6LgO8CuZOMv2TnRuzKXVquW5W4obBFXEUnssRCyD4H ta2g== 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:subject:date; bh=Pe/I+w+iO2pwgJXl8T4sC38en64C2l3oERN/xelPq20=; b=LbN4zp9JAEmu2LG0Zt/56qn0VYo9Kr2ys6jNHiu6At6njIzuP4Ygnk6P1DdWVccdTH Vi5Kk4Hl/I6Sa9x/KUjdTO3s95vlzVIbLMxyfKzO1aQMQXwVRoKyzGgUZECYNdwQJTzY nsko1cdFPPFlSUldn2AHp3MGURCfMzT0jc+FcligfDg0p8TZj1Hy4Uety8QHGoOO9y9+ 6q8hMZ/3Dvg2VpA0vhe52GiwURrg5gtW5+IQQCPku+R2zQE7sUk88HopHCNQtY+3Wrjg aFvD3WPjuRyxBLN6Ae0wsdas3RoSwuLrl+8lhkI0MUbhcDMu3cZnsr7+w/9KmVzyOF88 OxEw== X-Gm-Message-State: ACgBeo3DJ/WM7rB8jCME42QRmyRePrBVjJvEsscdldkJaNrTkX3GM4MD F6/bwjnAp15sQQ/ExlZAaL+A78W7CfSSqw== X-Google-Smtp-Source: AA6agR7hqDYt7a6c30Zzx2HM7qo0bpBArfiiaiAMashCn8pCJhXeqGkG5/jvmcd17AYfIZXNcSfBMg== X-Received: by 2002:a2e:b16c:0:b0:266:175c:cd54 with SMTP id a12-20020a2eb16c000000b00266175ccd54mr2425837ljm.278.1662636698015; Thu, 08 Sep 2022 04:31:38 -0700 (PDT) Received: from [10.10.53.53] (81-18-220-16.static.chello.pl. [81.18.220.16]) by smtp.googlemail.com with ESMTPSA id z20-20020a195e54000000b00497a879e552sm930968lfi.291.2022.09.08.04.31.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 08 Sep 2022 04:31:37 -0700 (PDT) From: Mateusz Kwiatkowski X-Google-Original-From: Mateusz Kwiatkowski Message-ID: Date: Thu, 8 Sep 2022 13:31:34 +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 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v2 32/41] drm/vc4: vec: Convert to the new TV mode property Content-Language: en-US To: Maxime Ripard , =?UTF-8?Q?Noralf_Tr=c3=b8nnes?= Cc: 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 , Emma Anholt , Daniel Vetter , Joonas Lahtinen , 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, Mateusz Kwiatkowski , Geert Uytterhoeven References: <20220728-rpi-analog-tv-properties-v2-0-459522d653a7@cerno.tech> <20220728-rpi-analog-tv-properties-v2-32-459522d653a7@cerno.tech> <199cf4b3-8ace-e047-3050-b810cf0c6b63@tronnes.org> <20220908112312.hlb7mzneuxnethhr@houat> In-Reply-To: <20220908112312.hlb7mzneuxnethhr@houat> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hi Maxime, W dniu 08.09.2022 o 13:23, Maxime Ripard pisze: > Hi Noralf, > > On Tue, Aug 30, 2022 at 09:01:08PM +0200, Noralf Trønnes wrote: >>> +static const struct drm_prop_enum_list tv_mode_names[] = { >> >> Maybe call it legacy_tv_mode_enums? >> >>> >>> +    { VC4_VEC_TV_MODE_NTSC, "NTSC", }, >>> >>> +    { VC4_VEC_TV_MODE_NTSC_J, "NTSC-J", }, >>> >>> +    { VC4_VEC_TV_MODE_PAL, "PAL", }, >>> >>> +    { VC4_VEC_TV_MODE_PAL_M, "PAL-M", }, >> >> If you use DRM_MODE_TV_MODE_* here you don't need to translate the value >> using the switch statement in get/set property, you can use the value >> directly to get/set tv.mode. > > I'm sorry, I'm not quite sure what you mean by that. If we expose the > DRM_MODE_TV_MODE_* properties there, won't that change the values the > userspace will need to use to set that property? I'd just like to point out that if numerical values of these enums are your concern, then you're (or perhaps I am ;) already breaking this by adding new modes in patch 33/41 in this series. And the values (and names!) added by that patch (33/41) don't match those currently used by the downstream version (https://github.com/raspberrypi/linux/blob/rpi-5.15.y/drivers/gpu/drm/vc4/vc4_vec.c). If any userspace software is manipulating this property, it's most likely targeting the downstream code. But since you're not aiming for consistency with that, I was under the impression that compatibility isn't a concern. 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 D39CCC54EE9 for ; Thu, 8 Sep 2022 11:31:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DD01410EA99; Thu, 8 Sep 2022 11:31:43 +0000 (UTC) Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by gabe.freedesktop.org (Postfix) with ESMTPS id DA0B810EA96; Thu, 8 Sep 2022 11:31:39 +0000 (UTC) Received: by mail-lj1-x22a.google.com with SMTP id z20so19515596ljq.3; Thu, 08 Sep 2022 04:31:39 -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:subject:date; bh=Pe/I+w+iO2pwgJXl8T4sC38en64C2l3oERN/xelPq20=; b=V4sxO+75nLSa4ntHYBDYJK7NyyItm+0ZuqLo4c8gxEblOEQGHihNxBzP1ywfeAMYWP A6gbXFUa+oFissD0CGGT9qZjiT57qAO/LcaelBX/nJDUId7ciewfaXSWVpw6M29eM72Z q0uRM6YPLLMRxsucdQdim3Ufr73pusbVeQPwM6bfhtQ87iWKRwLxmE3cBBQxY4H9VZIf pQM3O1hiKQXGJzsJvyphYtgmgFfp7lXMh65ITn1H0JW5pYN/LHrKWP/ORM0dXXFdRZOf 6SddjB7+yub2ELpu5aTF2EbiCg6LgO8CuZOMv2TnRuzKXVquW5W4obBFXEUnssRCyD4H ta2g== 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:subject:date; bh=Pe/I+w+iO2pwgJXl8T4sC38en64C2l3oERN/xelPq20=; b=NtJLZb4uRW8yHAPfIPxN+OhxxLLr/OGzJseeOC5S76lHMmmx05WBC1VBnLe9mY9isC xIhqh04NmPUY2xQey2qE/KTIcJUvuDLKiUowS67D1D7kD7d/4VWkJ7kUEFmuunXDtUck WmbUNbWcF9xeHNm3zlJZtXigsZElNw8R9gFo89a0lqOFTld4ncsmV+GOh9JdKXJ+kZwA LO6vtkLWcEkJtHVuapgSkEBTIGTx6RmwDilHPw0e9SsdyTAbX5eeOpUKj+SysTph+bwA 1fX31tcJqrJMDndkmNnqhhh1bVaMlDxxbmNfrKOozyD75sorukQWBlLb/hqp7ymQhXxC 5hqw== X-Gm-Message-State: ACgBeo1yHExU/QHz1mSjUaehJ7MhXgCvGkUhnpGn0gzBvwY//PCKmc14 odNWpIJtAx9ZOZipU5O8Keo= X-Google-Smtp-Source: AA6agR7hqDYt7a6c30Zzx2HM7qo0bpBArfiiaiAMashCn8pCJhXeqGkG5/jvmcd17AYfIZXNcSfBMg== X-Received: by 2002:a2e:b16c:0:b0:266:175c:cd54 with SMTP id a12-20020a2eb16c000000b00266175ccd54mr2425837ljm.278.1662636698015; Thu, 08 Sep 2022 04:31:38 -0700 (PDT) Received: from [10.10.53.53] (81-18-220-16.static.chello.pl. [81.18.220.16]) by smtp.googlemail.com with ESMTPSA id z20-20020a195e54000000b00497a879e552sm930968lfi.291.2022.09.08.04.31.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 08 Sep 2022 04:31:37 -0700 (PDT) From: Mateusz Kwiatkowski X-Google-Original-From: Mateusz Kwiatkowski Message-ID: Date: Thu, 8 Sep 2022 13:31:34 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Content-Language: en-US To: Maxime Ripard , =?UTF-8?Q?Noralf_Tr=c3=b8nnes?= References: <20220728-rpi-analog-tv-properties-v2-0-459522d653a7@cerno.tech> <20220728-rpi-analog-tv-properties-v2-32-459522d653a7@cerno.tech> <199cf4b3-8ace-e047-3050-b810cf0c6b63@tronnes.org> <20220908112312.hlb7mzneuxnethhr@houat> In-Reply-To: <20220908112312.hlb7mzneuxnethhr@houat> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: [Nouveau] [PATCH v2 32/41] drm/vc4: vec: Convert to the new TV mode property 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: David Airlie , nouveau@lists.freedesktop.org, Joonas Lahtinen , dri-devel@lists.freedesktop.org, Phil Elwell , Emma Anholt , Samuel Holland , Jernej Skrabec , Chen-Yu Tsai , Geert Uytterhoeven , Ben Skeggs , linux-sunxi@lists.linux.dev, intel-gfx@lists.freedesktop.org, Maarten Lankhorst , Jani Nikula , Hans de Goede , Rodrigo Vivi , Daniel Vetter , linux-arm-kernel@lists.infradead.org, Tvrtko Ursulin , Dom Cobley , linux-kernel@vger.kernel.org, Mateusz Kwiatkowski , Philipp Zabel Errors-To: nouveau-bounces@lists.freedesktop.org Sender: "Nouveau" Hi Maxime, W dniu 08.09.2022 o 13:23, Maxime Ripard pisze: > Hi Noralf, > > On Tue, Aug 30, 2022 at 09:01:08PM +0200, Noralf Trønnes wrote: >>> +static const struct drm_prop_enum_list tv_mode_names[] = { >> >> Maybe call it legacy_tv_mode_enums? >> >>> >>> +    { VC4_VEC_TV_MODE_NTSC, "NTSC", }, >>> >>> +    { VC4_VEC_TV_MODE_NTSC_J, "NTSC-J", }, >>> >>> +    { VC4_VEC_TV_MODE_PAL, "PAL", }, >>> >>> +    { VC4_VEC_TV_MODE_PAL_M, "PAL-M", }, >> >> If you use DRM_MODE_TV_MODE_* here you don't need to translate the value >> using the switch statement in get/set property, you can use the value >> directly to get/set tv.mode. > > I'm sorry, I'm not quite sure what you mean by that. If we expose the > DRM_MODE_TV_MODE_* properties there, won't that change the values the > userspace will need to use to set that property? I'd just like to point out that if numerical values of these enums are your concern, then you're (or perhaps I am ;) already breaking this by adding new modes in patch 33/41 in this series. And the values (and names!) added by that patch (33/41) don't match those currently used by the downstream version (https://github.com/raspberrypi/linux/blob/rpi-5.15.y/drivers/gpu/drm/vc4/vc4_vec.c). If any userspace software is manipulating this property, it's most likely targeting the downstream code. But since you're not aiming for consistency with that, I was under the impression that compatibility isn't a concern. 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 E5C25C38145 for ; Thu, 8 Sep 2022 11:32:49 +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=Chr/4Y0Yhib8fjbsmat0qvxude6T/TaA2Jp/f779xNM=; b=keKncg1rxIX4Sn 1JX5LMT4LfE0vDUu2dhdwk7H/oZp8Vt0Le+SM8iFquMyaQQO6r0Y0+FAj3mNfHeEx5ZXbmtrUnr3u JTuPKADYomOdJrl0WKJsI53W8AaTc5r4TLwBH/lI9EieaEH2PtxS6VM/5umP+Tr+Cfub5fm+Uq8rS e5K1gXnHlouWPmg4unU/P9K1Fc86fgS7maJnFOkc3+MtudOGQ6e7bXfj/HjAqVU5+nyg6SrsxLisF 2+7nTgvjgJyGbMlk958Mw5USdeipoc0+qBrFrzeLct+o9amrVZogSMh0JBER21fz5eVlejYa9W287 9ZvzfrXqSw1yX+AkFlyA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWFl3-002kmR-LH; Thu, 08 Sep 2022 11:31:45 +0000 Received: from mail-lj1-x231.google.com ([2a00:1450:4864:20::231]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWFkz-002kj7-QF for linux-arm-kernel@lists.infradead.org; Thu, 08 Sep 2022 11:31:43 +0000 Received: by mail-lj1-x231.google.com with SMTP id bx38so19481595ljb.10 for ; Thu, 08 Sep 2022 04:31:39 -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:subject:date; bh=Pe/I+w+iO2pwgJXl8T4sC38en64C2l3oERN/xelPq20=; b=V4sxO+75nLSa4ntHYBDYJK7NyyItm+0ZuqLo4c8gxEblOEQGHihNxBzP1ywfeAMYWP A6gbXFUa+oFissD0CGGT9qZjiT57qAO/LcaelBX/nJDUId7ciewfaXSWVpw6M29eM72Z q0uRM6YPLLMRxsucdQdim3Ufr73pusbVeQPwM6bfhtQ87iWKRwLxmE3cBBQxY4H9VZIf pQM3O1hiKQXGJzsJvyphYtgmgFfp7lXMh65ITn1H0JW5pYN/LHrKWP/ORM0dXXFdRZOf 6SddjB7+yub2ELpu5aTF2EbiCg6LgO8CuZOMv2TnRuzKXVquW5W4obBFXEUnssRCyD4H ta2g== 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:subject:date; bh=Pe/I+w+iO2pwgJXl8T4sC38en64C2l3oERN/xelPq20=; b=t75ltRBgOW/uyriYQ5Rm1WjgwL2nd1nRzE/eaP5qx/HVdYDXsIoS6oShuIdedDHcoo OXcTNs+P0mfVF+3kKzFHwLDewhq/FINiNctdacw3CP/yeUr1br3/AQGSHKH2r5sPSZFE YnmJmsboemlTjTN2V3UsvDh88KzZiuHxk3yNG+VU4fOHbVmBDnaYzQ2/K4pVacYa/vJn nyVclc6HaK1vokgeT+He8yPt5LCc0h4CtFM2wQ4+kMzVrm7dBGI2bvPGTZRqfWIrR7Zw AYkRRtpTTyTUrAg3+vvLxUmaX+cVCYEqD+FIspfmVV2uBBdPbm1J6XKlehhkqCdcVGeP KLgg== X-Gm-Message-State: ACgBeo2Go2T9bZVXmQTOiqojP3NXmQPw/VeEofcvkIgv/Zd7drwjmAGX sXAZ1i7Ugt9zPvlHo/idniU= X-Google-Smtp-Source: AA6agR7hqDYt7a6c30Zzx2HM7qo0bpBArfiiaiAMashCn8pCJhXeqGkG5/jvmcd17AYfIZXNcSfBMg== X-Received: by 2002:a2e:b16c:0:b0:266:175c:cd54 with SMTP id a12-20020a2eb16c000000b00266175ccd54mr2425837ljm.278.1662636698015; Thu, 08 Sep 2022 04:31:38 -0700 (PDT) Received: from [10.10.53.53] (81-18-220-16.static.chello.pl. [81.18.220.16]) by smtp.googlemail.com with ESMTPSA id z20-20020a195e54000000b00497a879e552sm930968lfi.291.2022.09.08.04.31.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 08 Sep 2022 04:31:37 -0700 (PDT) From: Mateusz Kwiatkowski X-Google-Original-From: Mateusz Kwiatkowski Message-ID: Date: Thu, 8 Sep 2022 13:31:34 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v2 32/41] drm/vc4: vec: Convert to the new TV mode property Content-Language: en-US To: Maxime Ripard , =?UTF-8?Q?Noralf_Tr=c3=b8nnes?= Cc: 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 , Emma Anholt , Daniel Vetter , Joonas Lahtinen , 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, Mateusz Kwiatkowski , Geert Uytterhoeven References: <20220728-rpi-analog-tv-properties-v2-0-459522d653a7@cerno.tech> <20220728-rpi-analog-tv-properties-v2-32-459522d653a7@cerno.tech> <199cf4b3-8ace-e047-3050-b810cf0c6b63@tronnes.org> <20220908112312.hlb7mzneuxnethhr@houat> In-Reply-To: <20220908112312.hlb7mzneuxnethhr@houat> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220908_043141_876411_93B8A44D X-CRM114-Status: GOOD ( 20.55 ) 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 SGkgTWF4aW1lLAoKVyBkbml1IDA4LjA5LjIwMjIgbyAxMzoyMywgTWF4aW1lIFJpcGFyZCBwaXN6 ZToKPiBIaSBOb3JhbGYsCj4KPiBPbiBUdWUsIEF1ZyAzMCwgMjAyMiBhdCAwOTowMTowOFBNICsw MjAwLCBOb3JhbGYgVHLDuG5uZXMgd3JvdGU6Cj4+PiArc3RhdGljIGNvbnN0IHN0cnVjdCBkcm1f cHJvcF9lbnVtX2xpc3QgdHZfbW9kZV9uYW1lc1tdID0gewo+Pgo+PiBNYXliZSBjYWxsIGl0IGxl Z2FjeV90dl9tb2RlX2VudW1zPwo+Pgo+Pj4KPj4+ICvCoMKgIMKgeyBWQzRfVkVDX1RWX01PREVf TlRTQywgIk5UU0MiLCB9LAo+Pj4KPj4+ICvCoMKgIMKgeyBWQzRfVkVDX1RWX01PREVfTlRTQ19K LCAiTlRTQy1KIiwgfSwKPj4+Cj4+PiArwqDCoCDCoHsgVkM0X1ZFQ19UVl9NT0RFX1BBTCwgIlBB TCIsIH0sCj4+Pgo+Pj4gK8KgwqAgwqB7IFZDNF9WRUNfVFZfTU9ERV9QQUxfTSwgIlBBTC1NIiwg fSwKPj4KPj4gSWYgeW91IHVzZSBEUk1fTU9ERV9UVl9NT0RFXyogaGVyZSB5b3UgZG9uJ3QgbmVl ZCB0byB0cmFuc2xhdGUgdGhlIHZhbHVlCj4+IHVzaW5nIHRoZSBzd2l0Y2ggc3RhdGVtZW50IGlu IGdldC9zZXQgcHJvcGVydHksIHlvdSBjYW4gdXNlIHRoZSB2YWx1ZQo+PiBkaXJlY3RseSB0byBn ZXQvc2V0IHR2Lm1vZGUuCj4KPiBJJ20gc29ycnksIEknbSBub3QgcXVpdGUgc3VyZSB3aGF0IHlv dSBtZWFuIGJ5IHRoYXQuIElmIHdlIGV4cG9zZSB0aGUKPiBEUk1fTU9ERV9UVl9NT0RFXyogcHJv cGVydGllcyB0aGVyZSwgd29uJ3QgdGhhdCBjaGFuZ2UgdGhlIHZhbHVlcyB0aGUKPiB1c2Vyc3Bh Y2Ugd2lsbCBuZWVkIHRvIHVzZSB0byBzZXQgdGhhdCBwcm9wZXJ0eT8KCkknZCBqdXN0IGxpa2Ug dG8gcG9pbnQgb3V0IHRoYXQgaWYgbnVtZXJpY2FsIHZhbHVlcyBvZiB0aGVzZSBlbnVtcyBhcmUg eW91cgpjb25jZXJuLCB0aGVuIHlvdSdyZSAob3IgcGVyaGFwcyBJIGFtIDspIGFscmVhZHkgYnJl YWtpbmcgdGhpcyBieSBhZGRpbmcgbmV3Cm1vZGVzIGluIHBhdGNoIDMzLzQxIGluIHRoaXMgc2Vy aWVzLgoKQW5kIHRoZSB2YWx1ZXMgKGFuZCBuYW1lcyEpIGFkZGVkIGJ5IHRoYXQgcGF0Y2ggKDMz LzQxKSBkb24ndCBtYXRjaCB0aG9zZQpjdXJyZW50bHkgdXNlZCBieSB0aGUgZG93bnN0cmVhbSB2 ZXJzaW9uCihodHRwczovL2dpdGh1Yi5jb20vcmFzcGJlcnJ5cGkvbGludXgvYmxvYi9ycGktNS4x NS55L2RyaXZlcnMvZ3B1L2RybS92YzQvdmM0X3ZlYy5jKS4KSWYgYW55IHVzZXJzcGFjZSBzb2Z0 d2FyZSBpcyBtYW5pcHVsYXRpbmcgdGhpcyBwcm9wZXJ0eSwgaXQncyBtb3N0IGxpa2VseQp0YXJn ZXRpbmcgdGhlIGRvd25zdHJlYW0gY29kZS4gQnV0IHNpbmNlIHlvdSdyZSBub3QgYWltaW5nIGZv ciBjb25zaXN0ZW5jeSB3aXRoCnRoYXQsIEkgd2FzIHVuZGVyIHRoZSBpbXByZXNzaW9uIHRoYXQg Y29tcGF0aWJpbGl0eSBpc24ndCBhIGNvbmNlcm4uCgpCZXN0IHJlZ2FyZHMsCk1hdGV1c3ogS3dp YXRrb3dza2kKCl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f CmxpbnV4LWFybS1rZXJuZWwgbWFpbGluZyBsaXN0CmxpbnV4LWFybS1rZXJuZWxAbGlzdHMuaW5m cmFkZWFkLm9yZwpodHRwOi8vbGlzdHMuaW5mcmFkZWFkLm9yZy9tYWlsbWFuL2xpc3RpbmZvL2xp bnV4LWFybS1rZXJuZWwK 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 44B0BC54EE9 for ; Thu, 8 Sep 2022 11:31:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B942D10EA96; Thu, 8 Sep 2022 11:31:42 +0000 (UTC) Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by gabe.freedesktop.org (Postfix) with ESMTPS id DA0B810EA96; Thu, 8 Sep 2022 11:31:39 +0000 (UTC) Received: by mail-lj1-x22a.google.com with SMTP id z20so19515596ljq.3; Thu, 08 Sep 2022 04:31:39 -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:subject:date; bh=Pe/I+w+iO2pwgJXl8T4sC38en64C2l3oERN/xelPq20=; b=V4sxO+75nLSa4ntHYBDYJK7NyyItm+0ZuqLo4c8gxEblOEQGHihNxBzP1ywfeAMYWP A6gbXFUa+oFissD0CGGT9qZjiT57qAO/LcaelBX/nJDUId7ciewfaXSWVpw6M29eM72Z q0uRM6YPLLMRxsucdQdim3Ufr73pusbVeQPwM6bfhtQ87iWKRwLxmE3cBBQxY4H9VZIf pQM3O1hiKQXGJzsJvyphYtgmgFfp7lXMh65ITn1H0JW5pYN/LHrKWP/ORM0dXXFdRZOf 6SddjB7+yub2ELpu5aTF2EbiCg6LgO8CuZOMv2TnRuzKXVquW5W4obBFXEUnssRCyD4H ta2g== 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:subject:date; bh=Pe/I+w+iO2pwgJXl8T4sC38en64C2l3oERN/xelPq20=; b=NtJLZb4uRW8yHAPfIPxN+OhxxLLr/OGzJseeOC5S76lHMmmx05WBC1VBnLe9mY9isC xIhqh04NmPUY2xQey2qE/KTIcJUvuDLKiUowS67D1D7kD7d/4VWkJ7kUEFmuunXDtUck WmbUNbWcF9xeHNm3zlJZtXigsZElNw8R9gFo89a0lqOFTld4ncsmV+GOh9JdKXJ+kZwA LO6vtkLWcEkJtHVuapgSkEBTIGTx6RmwDilHPw0e9SsdyTAbX5eeOpUKj+SysTph+bwA 1fX31tcJqrJMDndkmNnqhhh1bVaMlDxxbmNfrKOozyD75sorukQWBlLb/hqp7ymQhXxC 5hqw== X-Gm-Message-State: ACgBeo1yHExU/QHz1mSjUaehJ7MhXgCvGkUhnpGn0gzBvwY//PCKmc14 odNWpIJtAx9ZOZipU5O8Keo= X-Google-Smtp-Source: AA6agR7hqDYt7a6c30Zzx2HM7qo0bpBArfiiaiAMashCn8pCJhXeqGkG5/jvmcd17AYfIZXNcSfBMg== X-Received: by 2002:a2e:b16c:0:b0:266:175c:cd54 with SMTP id a12-20020a2eb16c000000b00266175ccd54mr2425837ljm.278.1662636698015; Thu, 08 Sep 2022 04:31:38 -0700 (PDT) Received: from [10.10.53.53] (81-18-220-16.static.chello.pl. [81.18.220.16]) by smtp.googlemail.com with ESMTPSA id z20-20020a195e54000000b00497a879e552sm930968lfi.291.2022.09.08.04.31.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 08 Sep 2022 04:31:37 -0700 (PDT) From: Mateusz Kwiatkowski X-Google-Original-From: Mateusz Kwiatkowski Message-ID: Date: Thu, 8 Sep 2022 13:31:34 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v2 32/41] drm/vc4: vec: Convert to the new TV mode property Content-Language: en-US To: Maxime Ripard , =?UTF-8?Q?Noralf_Tr=c3=b8nnes?= References: <20220728-rpi-analog-tv-properties-v2-0-459522d653a7@cerno.tech> <20220728-rpi-analog-tv-properties-v2-32-459522d653a7@cerno.tech> <199cf4b3-8ace-e047-3050-b810cf0c6b63@tronnes.org> <20220908112312.hlb7mzneuxnethhr@houat> In-Reply-To: <20220908112312.hlb7mzneuxnethhr@houat> 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: Karol Herbst , David Airlie , nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Phil Elwell , Emma Anholt , Samuel Holland , Jernej Skrabec , Chen-Yu Tsai , Geert Uytterhoeven , Ben Skeggs , linux-sunxi@lists.linux.dev, Thomas Zimmermann , intel-gfx@lists.freedesktop.org, Hans de Goede , Rodrigo Vivi , linux-arm-kernel@lists.infradead.org, Tvrtko Ursulin , Dom Cobley , Dave Stevenson , linux-kernel@vger.kernel.org, Mateusz Kwiatkowski Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Maxime, W dniu 08.09.2022 o 13:23, Maxime Ripard pisze: > Hi Noralf, > > On Tue, Aug 30, 2022 at 09:01:08PM +0200, Noralf Trønnes wrote: >>> +static const struct drm_prop_enum_list tv_mode_names[] = { >> >> Maybe call it legacy_tv_mode_enums? >> >>> >>> +    { VC4_VEC_TV_MODE_NTSC, "NTSC", }, >>> >>> +    { VC4_VEC_TV_MODE_NTSC_J, "NTSC-J", }, >>> >>> +    { VC4_VEC_TV_MODE_PAL, "PAL", }, >>> >>> +    { VC4_VEC_TV_MODE_PAL_M, "PAL-M", }, >> >> If you use DRM_MODE_TV_MODE_* here you don't need to translate the value >> using the switch statement in get/set property, you can use the value >> directly to get/set tv.mode. > > I'm sorry, I'm not quite sure what you mean by that. If we expose the > DRM_MODE_TV_MODE_* properties there, won't that change the values the > userspace will need to use to set that property? I'd just like to point out that if numerical values of these enums are your concern, then you're (or perhaps I am ;) already breaking this by adding new modes in patch 33/41 in this series. And the values (and names!) added by that patch (33/41) don't match those currently used by the downstream version (https://github.com/raspberrypi/linux/blob/rpi-5.15.y/drivers/gpu/drm/vc4/vc4_vec.c). If any userspace software is manipulating this property, it's most likely targeting the downstream code. But since you're not aiming for consistency with that, I was under the impression that compatibility isn't a concern. Best regards, Mateusz Kwiatkowski