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 E7B14C43217 for ; Mon, 17 Oct 2022 19:57:05 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6F65610EE09; Mon, 17 Oct 2022 19:56:33 +0000 (UTC) Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by gabe.freedesktop.org (Postfix) with ESMTPS id 68ED310E038; Sat, 15 Oct 2022 08:59:18 +0000 (UTC) Received: by mail-wr1-x42e.google.com with SMTP id j16so10899313wrh.5; Sat, 15 Oct 2022 01:59:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VjSRqmWkaFZ0BLuD6MivrAvypkKqaIT8x6LKQIsQKn8=; b=gdcg6hXz5wuVSv/KtfFI848qYS7t9NYjUI618ptxzzIpxaqmveySS5BR9QIVwZQznb xBp1LMARjJsFgTsfoQXSKdlgOksIgUDgK5K2AKQXk0cNXfVB1iXroI7ut/cD9tGOsURQ jm8KdDG1cgj3F2tXB8fsFhaB4Dgqa4STOi2smUvQX0W6V5JuU1fb2T0Jx1olayaXMioH qUVlRlUtYIZYW47agdnyqxBUbpxtv8QqHmVCx5PtIwbbxpRu//fPm+9YkMHbweUr6hyr GIo4cI3kV/QaK6qCRbfx4UQzBvTvJNtzUUilSXr8/BKEVqoYVnzl8JMOwJPISK3D8rO8 AGPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VjSRqmWkaFZ0BLuD6MivrAvypkKqaIT8x6LKQIsQKn8=; b=uHVDQFEoB8hXmudDp7vw44LWVDJu5EC5YLvrU1KmTuzhkLl8/7yYtGiJrOzaMECDb9 KfwqVI47+idwao0FOjDSTSLNdki8MHc6LcAYlGISeBa6HT10GuQETgqzY9V6tniytudD vref3b7L9rYu6xFhDEMpugCMpTUQwgO/G12TgYZgAOQPeR8mPnm0ZEAQj+D4TRiire8W CYiDxYuwbq6UjOhMvNc9ELNLe/yYo91MkqxKzidvxd/tF0jq4wJs/MfMv+HsFOcYrECh ANVoYpxVNE7sn8u9OqWDubksWGaXuewiqV8UQody2WXSGGuriE1ycILem5yYxB6+p0bP H1+w== X-Gm-Message-State: ACrzQf3E9BMGvZPctRr9LAjWGxJXFcAf5DFgmhpAjBgn2ygi56PlX72P IFodmWAofbJwxYBkjXjBCLo= X-Google-Smtp-Source: AMsMyM6RC+ab/6o3qXAuzwTkjLJWhUo2MRVgXF2cNlp5Etq5q5a0yKzX7Not8qtetRts0yGJHJyAJg== X-Received: by 2002:adf:fb0e:0:b0:21a:34a2:5ca9 with SMTP id c14-20020adffb0e000000b0021a34a25ca9mr985742wrr.472.1665824356510; Sat, 15 Oct 2022 01:59:16 -0700 (PDT) Received: from kista.localnet (82-149-19-102.dynamic.telemach.net. [82.149.19.102]) by smtp.gmail.com with ESMTPSA id k13-20020adff5cd000000b0022e36c1113fsm3693723wrp.13.2022.10.15.01.59.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Oct 2022 01:59:15 -0700 (PDT) From: Jernej =?utf-8?B?xaBrcmFiZWM=?= To: Maxime Ripard Date: Sat, 15 Oct 2022 10:59:14 +0200 Message-ID: <2649653.mvXUDI8C0e@kista> In-Reply-To: <20221014073810.akfoyfzxerywnt65@houat> References: <20220728-rpi-analog-tv-properties-v5-0-d841cc64fe4b@cerno.tech> <6482539.4vTCxPXJkl@kista> <20221014073810.akfoyfzxerywnt65@houat> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Mailman-Approved-At: Mon, 17 Oct 2022 19:56:17 +0000 Subject: Re: [Intel-gfx] [PATCH v5 22/22] drm/sun4i: tv: 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: Emma Anholt , David Airlie , nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Phil Elwell , Karol Herbst , Samuel Holland , Chen-Yu Tsai , Geert Uytterhoeven , Ben Skeggs , linux-sunxi@lists.linux.dev, Daniel Vetter , intel-gfx@lists.freedesktop.org, Hans de Goede , Rodrigo Vivi , linux-arm-kernel@lists.infradead.org, Dom Cobley , Dave Stevenson , linux-kernel@vger.kernel.org, Mateusz Kwiatkowski , =?UTF-8?B?Tm9yYWxmIFRyw4PCuG5uZXM=?= , Thomas Zimmermann Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Dne petek, 14. oktober 2022 ob 09:38:10 CEST je Maxime Ripard napisal(a): > Hi Jernej, >=20 > On Thu, Oct 13, 2022 at 08:23:51PM +0200, Jernej =C5=A0krabec wrote: > > Dne =C4=8Detrtek, 13. oktober 2022 ob 15:19:06 CEST je Maxime Ripard=20 napisal(a): > > > Now that the core can deal fine with analog TV modes, let's convert t= he > > > sun4i TV driver to leverage those new features. > > >=20 > > > Acked-by: Noralf Tr=C3=B8nnes > > > Signed-off-by: Maxime Ripard > > >=20 > > > --- > > > Changes in v5: > > > - Removed the count variable in get_modes > > > - Removed spurious vc4 change > > > --- > > >=20 > > > drivers/gpu/drm/sun4i/sun4i_tv.c | 145 > > >=20 > > > +++++++++++++-------------------------- 1 file changed, 48 > > > insertions(+), > > > 97 deletions(-) > > >=20 > > > diff --git a/drivers/gpu/drm/sun4i/sun4i_tv.c > > > b/drivers/gpu/drm/sun4i/sun4i_tv.c index c65f0a89b6b0..4f07aff11551 > > > 100644 > > > --- a/drivers/gpu/drm/sun4i/sun4i_tv.c > > > +++ b/drivers/gpu/drm/sun4i/sun4i_tv.c > > > @@ -141,23 +141,14 @@ struct resync_parameters { > > >=20 > > > struct tv_mode { > > > =20 > > > char *name; > > >=20 > > > + unsigned int tv_mode; > > > + > > >=20 > > > u32 mode; > > > u32 chroma_freq; > > > u16 back_porch; > > > u16 front_porch; > > >=20 > > > - u16 line_number; > > >=20 > > > u16 vblank_level; > >=20 > > isn't there a way to get or calculate back_porch, front_porch and > > vblank_level from mode? From quick glance over removed values below, I > > would say that at least back_porch can be removed too? >=20 > I tried actually, but I'm not sure what the front porch and back porch > parameters actually are. They are called that way by Allwinner, but it > doesn't match the PAL or NTSC timings at all. >=20 > For example, back_porch is 118 for NTSC and 138 for PAL. Actual back > porches would be around 12 and 16, respectively. Actually, the entire > blanking area are 138 and 144. This is close enough for PAL, but pretty > far off for NTSC. >=20 > Allwinner has the habit of integrating the sync period into one of the > porches, but still there's no obvious match. >=20 > front_porch is pretty much in the same case. Ok then. >=20 > Since it affected the display output quite a lot, I chose to keep it for > now unfortunately. >=20 > > Otherwise this patch looks ok. >=20 > Can I add your Acked-by/Reviewed-by then? Sure. Reviewed-by: Jernej Skrabec Best regards, Jernej From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) (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 6972436F for ; Sat, 15 Oct 2022 08:59:18 +0000 (UTC) Received: by mail-wr1-f54.google.com with SMTP id bv10so10886821wrb.4 for ; Sat, 15 Oct 2022 01:59:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VjSRqmWkaFZ0BLuD6MivrAvypkKqaIT8x6LKQIsQKn8=; b=gdcg6hXz5wuVSv/KtfFI848qYS7t9NYjUI618ptxzzIpxaqmveySS5BR9QIVwZQznb xBp1LMARjJsFgTsfoQXSKdlgOksIgUDgK5K2AKQXk0cNXfVB1iXroI7ut/cD9tGOsURQ jm8KdDG1cgj3F2tXB8fsFhaB4Dgqa4STOi2smUvQX0W6V5JuU1fb2T0Jx1olayaXMioH qUVlRlUtYIZYW47agdnyqxBUbpxtv8QqHmVCx5PtIwbbxpRu//fPm+9YkMHbweUr6hyr GIo4cI3kV/QaK6qCRbfx4UQzBvTvJNtzUUilSXr8/BKEVqoYVnzl8JMOwJPISK3D8rO8 AGPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VjSRqmWkaFZ0BLuD6MivrAvypkKqaIT8x6LKQIsQKn8=; b=pJ/kyYGl3AUdHZmSW4+8FlpVMjxH3/L05KIJc0ko3zoRr4Vv1FBxp+nPbjcZ9rUD/X Tkg2jyRX9rR0eFAIAxSm4F4w8UuvhItykoeQBLyF7Bx7r2EKlhSv8DZ2JuMu37GpiyhK B05jPbgRaDMBzO9w1XiRwLu51xIlt/cUqTat5KGOnyqNJMiS5YUbS+eGi/ith4qR8dAw tREs37VuHnlYno87HNQp3DlsIwifgnip4cIZCzeD/F1/1YngcIKiitME9uFGvGi3zy0g bo4bsExRoL/TsWfk8xnipq188AajD2G6I/Y8iKQMPEnrREi3HQQLvd26sK+sc7H18s5Y oBFA== X-Gm-Message-State: ACrzQf0VkVwRPjKMOsyR8RujqRBuI8h6058BY/tv36Y2jyOk1kYdV+3t ER04bwOpFOKdnoFCbJ3GuYY= X-Google-Smtp-Source: AMsMyM6RC+ab/6o3qXAuzwTkjLJWhUo2MRVgXF2cNlp5Etq5q5a0yKzX7Not8qtetRts0yGJHJyAJg== X-Received: by 2002:adf:fb0e:0:b0:21a:34a2:5ca9 with SMTP id c14-20020adffb0e000000b0021a34a25ca9mr985742wrr.472.1665824356510; Sat, 15 Oct 2022 01:59:16 -0700 (PDT) Received: from kista.localnet (82-149-19-102.dynamic.telemach.net. [82.149.19.102]) by smtp.gmail.com with ESMTPSA id k13-20020adff5cd000000b0022e36c1113fsm3693723wrp.13.2022.10.15.01.59.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Oct 2022 01:59:15 -0700 (PDT) From: Jernej =?utf-8?B?xaBrcmFiZWM=?= To: Maxime Ripard Cc: Karol Herbst , Jani Nikula , Tvrtko Ursulin , Daniel Vetter , Maarten Lankhorst , David Airlie , Joonas Lahtinen , Lyude Paul , Emma Anholt , Chen-Yu Tsai , Samuel Holland , Ben Skeggs , Thomas Zimmermann , Rodrigo Vivi , Dom Cobley , linux-sunxi@lists.linux.dev, Dave Stevenson , =?UTF-8?B?Tm9yYWxmIFRyw4PCuG5uZXM=?= , intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, nouveau@lists.freedesktop.org, Geert Uytterhoeven , linux-arm-kernel@lists.infradead.org, Mateusz Kwiatkowski , dri-devel@lists.freedesktop.org, Hans de Goede , Phil Elwell Subject: Re: Re: [PATCH v5 22/22] drm/sun4i: tv: Convert to the new TV mode property Date: Sat, 15 Oct 2022 10:59:14 +0200 Message-ID: <2649653.mvXUDI8C0e@kista> In-Reply-To: <20221014073810.akfoyfzxerywnt65@houat> References: <20220728-rpi-analog-tv-properties-v5-0-d841cc64fe4b@cerno.tech> <6482539.4vTCxPXJkl@kista> <20221014073810.akfoyfzxerywnt65@houat> Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" Dne petek, 14. oktober 2022 ob 09:38:10 CEST je Maxime Ripard napisal(a): > Hi Jernej, >=20 > On Thu, Oct 13, 2022 at 08:23:51PM +0200, Jernej =C5=A0krabec wrote: > > Dne =C4=8Detrtek, 13. oktober 2022 ob 15:19:06 CEST je Maxime Ripard=20 napisal(a): > > > Now that the core can deal fine with analog TV modes, let's convert t= he > > > sun4i TV driver to leverage those new features. > > >=20 > > > Acked-by: Noralf Tr=C3=B8nnes > > > Signed-off-by: Maxime Ripard > > >=20 > > > --- > > > Changes in v5: > > > - Removed the count variable in get_modes > > > - Removed spurious vc4 change > > > --- > > >=20 > > > drivers/gpu/drm/sun4i/sun4i_tv.c | 145 > > >=20 > > > +++++++++++++-------------------------- 1 file changed, 48 > > > insertions(+), > > > 97 deletions(-) > > >=20 > > > diff --git a/drivers/gpu/drm/sun4i/sun4i_tv.c > > > b/drivers/gpu/drm/sun4i/sun4i_tv.c index c65f0a89b6b0..4f07aff11551 > > > 100644 > > > --- a/drivers/gpu/drm/sun4i/sun4i_tv.c > > > +++ b/drivers/gpu/drm/sun4i/sun4i_tv.c > > > @@ -141,23 +141,14 @@ struct resync_parameters { > > >=20 > > > struct tv_mode { > > > =20 > > > char *name; > > >=20 > > > + unsigned int tv_mode; > > > + > > >=20 > > > u32 mode; > > > u32 chroma_freq; > > > u16 back_porch; > > > u16 front_porch; > > >=20 > > > - u16 line_number; > > >=20 > > > u16 vblank_level; > >=20 > > isn't there a way to get or calculate back_porch, front_porch and > > vblank_level from mode? From quick glance over removed values below, I > > would say that at least back_porch can be removed too? >=20 > I tried actually, but I'm not sure what the front porch and back porch > parameters actually are. They are called that way by Allwinner, but it > doesn't match the PAL or NTSC timings at all. >=20 > For example, back_porch is 118 for NTSC and 138 for PAL. Actual back > porches would be around 12 and 16, respectively. Actually, the entire > blanking area are 138 and 144. This is close enough for PAL, but pretty > far off for NTSC. >=20 > Allwinner has the habit of integrating the sync period into one of the > porches, but still there's no obvious match. >=20 > front_porch is pretty much in the same case. Ok then. >=20 > Since it affected the display output quite a lot, I chose to keep it for > now unfortunately. >=20 > > Otherwise this patch looks ok. >=20 > Can I add your Acked-by/Reviewed-by then? Sure. Reviewed-by: Jernej Skrabec Best regards, Jernej 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 DB3FAC4332F for ; Sat, 15 Oct 2022 08:59:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8197510E18D; Sat, 15 Oct 2022 08:59:26 +0000 (UTC) Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by gabe.freedesktop.org (Postfix) with ESMTPS id 68ED310E038; Sat, 15 Oct 2022 08:59:18 +0000 (UTC) Received: by mail-wr1-x42e.google.com with SMTP id j16so10899313wrh.5; Sat, 15 Oct 2022 01:59:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VjSRqmWkaFZ0BLuD6MivrAvypkKqaIT8x6LKQIsQKn8=; b=gdcg6hXz5wuVSv/KtfFI848qYS7t9NYjUI618ptxzzIpxaqmveySS5BR9QIVwZQznb xBp1LMARjJsFgTsfoQXSKdlgOksIgUDgK5K2AKQXk0cNXfVB1iXroI7ut/cD9tGOsURQ jm8KdDG1cgj3F2tXB8fsFhaB4Dgqa4STOi2smUvQX0W6V5JuU1fb2T0Jx1olayaXMioH qUVlRlUtYIZYW47agdnyqxBUbpxtv8QqHmVCx5PtIwbbxpRu//fPm+9YkMHbweUr6hyr GIo4cI3kV/QaK6qCRbfx4UQzBvTvJNtzUUilSXr8/BKEVqoYVnzl8JMOwJPISK3D8rO8 AGPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VjSRqmWkaFZ0BLuD6MivrAvypkKqaIT8x6LKQIsQKn8=; b=uHVDQFEoB8hXmudDp7vw44LWVDJu5EC5YLvrU1KmTuzhkLl8/7yYtGiJrOzaMECDb9 KfwqVI47+idwao0FOjDSTSLNdki8MHc6LcAYlGISeBa6HT10GuQETgqzY9V6tniytudD vref3b7L9rYu6xFhDEMpugCMpTUQwgO/G12TgYZgAOQPeR8mPnm0ZEAQj+D4TRiire8W CYiDxYuwbq6UjOhMvNc9ELNLe/yYo91MkqxKzidvxd/tF0jq4wJs/MfMv+HsFOcYrECh ANVoYpxVNE7sn8u9OqWDubksWGaXuewiqV8UQody2WXSGGuriE1ycILem5yYxB6+p0bP H1+w== X-Gm-Message-State: ACrzQf3E9BMGvZPctRr9LAjWGxJXFcAf5DFgmhpAjBgn2ygi56PlX72P IFodmWAofbJwxYBkjXjBCLo= X-Google-Smtp-Source: AMsMyM6RC+ab/6o3qXAuzwTkjLJWhUo2MRVgXF2cNlp5Etq5q5a0yKzX7Not8qtetRts0yGJHJyAJg== X-Received: by 2002:adf:fb0e:0:b0:21a:34a2:5ca9 with SMTP id c14-20020adffb0e000000b0021a34a25ca9mr985742wrr.472.1665824356510; Sat, 15 Oct 2022 01:59:16 -0700 (PDT) Received: from kista.localnet (82-149-19-102.dynamic.telemach.net. [82.149.19.102]) by smtp.gmail.com with ESMTPSA id k13-20020adff5cd000000b0022e36c1113fsm3693723wrp.13.2022.10.15.01.59.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Oct 2022 01:59:15 -0700 (PDT) From: Jernej =?utf-8?B?xaBrcmFiZWM=?= To: Maxime Ripard Date: Sat, 15 Oct 2022 10:59:14 +0200 Message-ID: <2649653.mvXUDI8C0e@kista> In-Reply-To: <20221014073810.akfoyfzxerywnt65@houat> References: <20220728-rpi-analog-tv-properties-v5-0-d841cc64fe4b@cerno.tech> <6482539.4vTCxPXJkl@kista> <20221014073810.akfoyfzxerywnt65@houat> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" Subject: Re: [Nouveau] [PATCH v5 22/22] drm/sun4i: tv: 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: Emma Anholt , David Airlie , nouveau@lists.freedesktop.org, Joonas Lahtinen , dri-devel@lists.freedesktop.org, Phil Elwell , Samuel Holland , Chen-Yu Tsai , Geert Uytterhoeven , Ben Skeggs , linux-sunxi@lists.linux.dev, Daniel Vetter , intel-gfx@lists.freedesktop.org, Maarten Lankhorst , Jani Nikula , Hans de Goede , Rodrigo Vivi , linux-arm-kernel@lists.infradead.org, Tvrtko Ursulin , Dom Cobley , linux-kernel@vger.kernel.org, Mateusz Kwiatkowski , =?UTF-8?B?Tm9yYWxmIFRyw4PCuG5uZXM=?= Errors-To: nouveau-bounces@lists.freedesktop.org Sender: "Nouveau" Dne petek, 14. oktober 2022 ob 09:38:10 CEST je Maxime Ripard napisal(a): > Hi Jernej, >=20 > On Thu, Oct 13, 2022 at 08:23:51PM +0200, Jernej =C5=A0krabec wrote: > > Dne =C4=8Detrtek, 13. oktober 2022 ob 15:19:06 CEST je Maxime Ripard=20 napisal(a): > > > Now that the core can deal fine with analog TV modes, let's convert t= he > > > sun4i TV driver to leverage those new features. > > >=20 > > > Acked-by: Noralf Tr=C3=B8nnes > > > Signed-off-by: Maxime Ripard > > >=20 > > > --- > > > Changes in v5: > > > - Removed the count variable in get_modes > > > - Removed spurious vc4 change > > > --- > > >=20 > > > drivers/gpu/drm/sun4i/sun4i_tv.c | 145 > > >=20 > > > +++++++++++++-------------------------- 1 file changed, 48 > > > insertions(+), > > > 97 deletions(-) > > >=20 > > > diff --git a/drivers/gpu/drm/sun4i/sun4i_tv.c > > > b/drivers/gpu/drm/sun4i/sun4i_tv.c index c65f0a89b6b0..4f07aff11551 > > > 100644 > > > --- a/drivers/gpu/drm/sun4i/sun4i_tv.c > > > +++ b/drivers/gpu/drm/sun4i/sun4i_tv.c > > > @@ -141,23 +141,14 @@ struct resync_parameters { > > >=20 > > > struct tv_mode { > > > =20 > > > char *name; > > >=20 > > > + unsigned int tv_mode; > > > + > > >=20 > > > u32 mode; > > > u32 chroma_freq; > > > u16 back_porch; > > > u16 front_porch; > > >=20 > > > - u16 line_number; > > >=20 > > > u16 vblank_level; > >=20 > > isn't there a way to get or calculate back_porch, front_porch and > > vblank_level from mode? From quick glance over removed values below, I > > would say that at least back_porch can be removed too? >=20 > I tried actually, but I'm not sure what the front porch and back porch > parameters actually are. They are called that way by Allwinner, but it > doesn't match the PAL or NTSC timings at all. >=20 > For example, back_porch is 118 for NTSC and 138 for PAL. Actual back > porches would be around 12 and 16, respectively. Actually, the entire > blanking area are 138 and 144. This is close enough for PAL, but pretty > far off for NTSC. >=20 > Allwinner has the habit of integrating the sync period into one of the > porches, but still there's no obvious match. >=20 > front_porch is pretty much in the same case. Ok then. >=20 > Since it affected the display output quite a lot, I chose to keep it for > now unfortunately. >=20 > > Otherwise this patch looks ok. >=20 > Can I add your Acked-by/Reviewed-by then? Sure. Reviewed-by: Jernej Skrabec Best regards, Jernej 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 E8C8EC4332F for ; Sat, 15 Oct 2022 09:00:16 +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:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=EvnSjTik6S9mjKz4Y9cV4okRryYUiWe3+uEkgdUfvVM=; b=Gen0VKBIAjY2RH J/lpjAq5uw4sAPtlYAbCByhswXhUSMpaZ/015OltySrswYCb43TWUm97bESWOfFnkzVTuyVKGLjoo jsgCjZOCEPvP63SCJkNLWSwUeH8SVnXvaBxAIpJZVnJZewyW8VCXisERGD/6nVcUCAZ7AZDqbnzYE Ffek3qioz3zF6I7mnPxhPlOWbdodmdlcJD/96/ZhXkEryKcUywc4TOgLPyoI7X3uNUzqDIrOmpFlU /DEg34Q4M6KVDSCTYasPT1L/pPVN4+xOeuSAUYf/lw1dUlVFF+t2ACbc2ZvlthTpWF977tHABWhat KssI4KetCtwFHgNkN0bg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ojd0r-00Gf7e-Ch; Sat, 15 Oct 2022 08:59:21 +0000 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ojd0o-00Gf6a-Ou for linux-arm-kernel@lists.infradead.org; Sat, 15 Oct 2022 08:59:20 +0000 Received: by mail-wr1-x42a.google.com with SMTP id b4so10929174wrs.1 for ; Sat, 15 Oct 2022 01:59:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VjSRqmWkaFZ0BLuD6MivrAvypkKqaIT8x6LKQIsQKn8=; b=gdcg6hXz5wuVSv/KtfFI848qYS7t9NYjUI618ptxzzIpxaqmveySS5BR9QIVwZQznb xBp1LMARjJsFgTsfoQXSKdlgOksIgUDgK5K2AKQXk0cNXfVB1iXroI7ut/cD9tGOsURQ jm8KdDG1cgj3F2tXB8fsFhaB4Dgqa4STOi2smUvQX0W6V5JuU1fb2T0Jx1olayaXMioH qUVlRlUtYIZYW47agdnyqxBUbpxtv8QqHmVCx5PtIwbbxpRu//fPm+9YkMHbweUr6hyr GIo4cI3kV/QaK6qCRbfx4UQzBvTvJNtzUUilSXr8/BKEVqoYVnzl8JMOwJPISK3D8rO8 AGPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VjSRqmWkaFZ0BLuD6MivrAvypkKqaIT8x6LKQIsQKn8=; b=SO0BGhin7GCIUHtGmlyA3BxNnxetUleELVXQQDj/cT4hq8Zg6JhqYXN70VwaecxCXx P7xzPbCFB5ZOWkGN/BHagfboBtVhSUQzPIFt2t+P2QERwysGK4V+aE3vnb5vECE5jyD0 jqR5wLUVOF3+88YgBFQmuIhCKwxcPMUNvM6il3XiVWdt5seL8PkCm9UyLnbP1UFXfGS0 5z6D/L5pJngAagUvqbddeUQnsTSuQ9jM5C2W2Mpne15JJQwQFQLrqOiAvh4+9IPka0ur U4oDDhiYalibVPCRwWGs92fOtPT+rwAfZ5eUIltqn/YvSs2hDKq7Pab/1ttsQPsMTy1i BZTA== X-Gm-Message-State: ACrzQf1p3toyV2Xbf45qqW32gCe5gEQKhDL1+gvNrqg+0B+tUqAXcDQ1 dz3xd5cq64CHp7Tq6OjKHsg= X-Google-Smtp-Source: AMsMyM6RC+ab/6o3qXAuzwTkjLJWhUo2MRVgXF2cNlp5Etq5q5a0yKzX7Not8qtetRts0yGJHJyAJg== X-Received: by 2002:adf:fb0e:0:b0:21a:34a2:5ca9 with SMTP id c14-20020adffb0e000000b0021a34a25ca9mr985742wrr.472.1665824356510; Sat, 15 Oct 2022 01:59:16 -0700 (PDT) Received: from kista.localnet (82-149-19-102.dynamic.telemach.net. [82.149.19.102]) by smtp.gmail.com with ESMTPSA id k13-20020adff5cd000000b0022e36c1113fsm3693723wrp.13.2022.10.15.01.59.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Oct 2022 01:59:15 -0700 (PDT) From: Jernej =?utf-8?B?xaBrcmFiZWM=?= To: Maxime Ripard Cc: Karol Herbst , Jani Nikula , Tvrtko Ursulin , Daniel Vetter , Maarten Lankhorst , David Airlie , Joonas Lahtinen , Lyude Paul , Emma Anholt , Chen-Yu Tsai , Samuel Holland , Ben Skeggs , Thomas Zimmermann , Rodrigo Vivi , Dom Cobley , linux-sunxi@lists.linux.dev, Dave Stevenson , =?UTF-8?B?Tm9yYWxmIFRyw4PCuG5uZXM=?= , intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, nouveau@lists.freedesktop.org, Geert Uytterhoeven , linux-arm-kernel@lists.infradead.org, Mateusz Kwiatkowski , dri-devel@lists.freedesktop.org, Hans de Goede , Phil Elwell Subject: Re: Re: [PATCH v5 22/22] drm/sun4i: tv: Convert to the new TV mode property Date: Sat, 15 Oct 2022 10:59:14 +0200 Message-ID: <2649653.mvXUDI8C0e@kista> In-Reply-To: <20221014073810.akfoyfzxerywnt65@houat> References: <20220728-rpi-analog-tv-properties-v5-0-d841cc64fe4b@cerno.tech> <6482539.4vTCxPXJkl@kista> <20221014073810.akfoyfzxerywnt65@houat> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221015_015918_828397_F3FBB7EF X-CRM114-Status: GOOD ( 27.70 ) 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 RG5lIHBldGVrLCAxNC4gb2t0b2JlciAyMDIyIG9iIDA5OjM4OjEwIENFU1QgamUgTWF4aW1lIFJp cGFyZCBuYXBpc2FsKGEpOgo+IEhpIEplcm5laiwKPiAKPiBPbiBUaHUsIE9jdCAxMywgMjAyMiBh dCAwODoyMzo1MVBNICswMjAwLCBKZXJuZWogxaBrcmFiZWMgd3JvdGU6Cj4gPiBEbmUgxI1ldHJ0 ZWssIDEzLiBva3RvYmVyIDIwMjIgb2IgMTU6MTk6MDYgQ0VTVCBqZSBNYXhpbWUgUmlwYXJkIApu YXBpc2FsKGEpOgo+ID4gPiBOb3cgdGhhdCB0aGUgY29yZSBjYW4gZGVhbCBmaW5lIHdpdGggYW5h bG9nIFRWIG1vZGVzLCBsZXQncyBjb252ZXJ0IHRoZQo+ID4gPiBzdW40aSBUViBkcml2ZXIgdG8g bGV2ZXJhZ2UgdGhvc2UgbmV3IGZlYXR1cmVzLgo+ID4gPiAKPiA+ID4gQWNrZWQtYnk6IE5vcmFs ZiBUcsO4bm5lcyA8bm9yYWxmQHRyb25uZXMub3JnPgo+ID4gPiBTaWduZWQtb2ZmLWJ5OiBNYXhp bWUgUmlwYXJkIDxtYXhpbWVAY2Vybm8udGVjaD4KPiA+ID4gCj4gPiA+IC0tLQo+ID4gPiBDaGFu Z2VzIGluIHY1Ogo+ID4gPiAtIFJlbW92ZWQgdGhlIGNvdW50IHZhcmlhYmxlIGluIGdldF9tb2Rl cwo+ID4gPiAtIFJlbW92ZWQgc3B1cmlvdXMgdmM0IGNoYW5nZQo+ID4gPiAtLS0KPiA+ID4gCj4g PiA+ICBkcml2ZXJzL2dwdS9kcm0vc3VuNGkvc3VuNGlfdHYuYyB8IDE0NQo+ID4gPiAKPiA+ID4g KysrKysrKysrKysrKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tIDEgZmlsZSBjaGFuZ2VkLCA0 OAo+ID4gPiBpbnNlcnRpb25zKCspLAo+ID4gPiA5NyBkZWxldGlvbnMoLSkKPiA+ID4gCj4gPiA+ IGRpZmYgLS1naXQgYS9kcml2ZXJzL2dwdS9kcm0vc3VuNGkvc3VuNGlfdHYuYwo+ID4gPiBiL2Ry aXZlcnMvZ3B1L2RybS9zdW40aS9zdW40aV90di5jIGluZGV4IGM2NWYwYTg5YjZiMC4uNGYwN2Fm ZjExNTUxCj4gPiA+IDEwMDY0NAo+ID4gPiAtLS0gYS9kcml2ZXJzL2dwdS9kcm0vc3VuNGkvc3Vu NGlfdHYuYwo+ID4gPiArKysgYi9kcml2ZXJzL2dwdS9kcm0vc3VuNGkvc3VuNGlfdHYuYwo+ID4g PiBAQCAtMTQxLDIzICsxNDEsMTQgQEAgc3RydWN0IHJlc3luY19wYXJhbWV0ZXJzIHsKPiA+ID4g Cj4gPiA+ICBzdHJ1Y3QgdHZfbW9kZSB7Cj4gPiA+ICAKPiA+ID4gIAljaGFyCQkqbmFtZTsKPiA+ ID4gCj4gPiA+ICsJdW5zaWduZWQgaW50CXR2X21vZGU7Cj4gPiA+ICsKPiA+ID4gCj4gPiA+ICAJ dTMyCQltb2RlOwo+ID4gPiAgCXUzMgkJY2hyb21hX2ZyZXE7Cj4gPiA+ICAJdTE2CQliYWNrX3Bv cmNoOwo+ID4gPiAgCXUxNgkJZnJvbnRfcG9yY2g7Cj4gPiA+IAo+ID4gPiAtCXUxNgkJbGluZV9u dW1iZXI7Cj4gPiA+IAo+ID4gPiAgCXUxNgkJdmJsYW5rX2xldmVsOwo+ID4gCj4gPiBpc24ndCB0 aGVyZSBhIHdheSB0byBnZXQgb3IgY2FsY3VsYXRlIGJhY2tfcG9yY2gsIGZyb250X3BvcmNoIGFu ZAo+ID4gdmJsYW5rX2xldmVsIGZyb20gbW9kZT8gRnJvbSBxdWljayBnbGFuY2Ugb3ZlciByZW1v dmVkIHZhbHVlcyBiZWxvdywgSQo+ID4gd291bGQgc2F5IHRoYXQgYXQgbGVhc3QgYmFja19wb3Jj aCBjYW4gYmUgcmVtb3ZlZCB0b28/Cj4gCj4gSSB0cmllZCBhY3R1YWxseSwgYnV0IEknbSBub3Qg c3VyZSB3aGF0IHRoZSBmcm9udCBwb3JjaCBhbmQgYmFjayBwb3JjaAo+IHBhcmFtZXRlcnMgYWN0 dWFsbHkgYXJlLiBUaGV5IGFyZSBjYWxsZWQgdGhhdCB3YXkgYnkgQWxsd2lubmVyLCBidXQgaXQK PiBkb2Vzbid0IG1hdGNoIHRoZSBQQUwgb3IgTlRTQyB0aW1pbmdzIGF0IGFsbC4KPiAKPiBGb3Ig ZXhhbXBsZSwgYmFja19wb3JjaCBpcyAxMTggZm9yIE5UU0MgYW5kIDEzOCBmb3IgUEFMLiBBY3R1 YWwgYmFjawo+IHBvcmNoZXMgd291bGQgYmUgYXJvdW5kIDEyIGFuZCAxNiwgcmVzcGVjdGl2ZWx5 LiBBY3R1YWxseSwgdGhlIGVudGlyZQo+IGJsYW5raW5nIGFyZWEgYXJlIDEzOCBhbmQgMTQ0LiBU aGlzIGlzIGNsb3NlIGVub3VnaCBmb3IgUEFMLCBidXQgcHJldHR5Cj4gZmFyIG9mZiBmb3IgTlRT Qy4KPiAKPiBBbGx3aW5uZXIgaGFzIHRoZSBoYWJpdCBvZiBpbnRlZ3JhdGluZyB0aGUgc3luYyBw ZXJpb2QgaW50byBvbmUgb2YgdGhlCj4gcG9yY2hlcywgYnV0IHN0aWxsIHRoZXJlJ3Mgbm8gb2J2 aW91cyBtYXRjaC4KPiAKPiBmcm9udF9wb3JjaCBpcyBwcmV0dHkgbXVjaCBpbiB0aGUgc2FtZSBj YXNlLgoKT2sgdGhlbi4KCj4gCj4gU2luY2UgaXQgYWZmZWN0ZWQgdGhlIGRpc3BsYXkgb3V0cHV0 IHF1aXRlIGEgbG90LCBJIGNob3NlIHRvIGtlZXAgaXQgZm9yCj4gbm93IHVuZm9ydHVuYXRlbHku Cj4gCj4gPiBPdGhlcndpc2UgdGhpcyBwYXRjaCBsb29rcyBvay4KPiAKPiBDYW4gSSBhZGQgeW91 ciBBY2tlZC1ieS9SZXZpZXdlZC1ieSB0aGVuPwoKU3VyZS4KUmV2aWV3ZWQtYnk6IEplcm5laiBT a3JhYmVjIDxqZXJuZWouc2tyYWJlY0BnbWFpbC5jb20+CgpCZXN0IHJlZ2FyZHMsCkplcm5lagoK CgpfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fXwpsaW51eC1h cm0ta2VybmVsIG1haWxpbmcgbGlzdApsaW51eC1hcm0ta2VybmVsQGxpc3RzLmluZnJhZGVhZC5v cmcKaHR0cDovL2xpc3RzLmluZnJhZGVhZC5vcmcvbWFpbG1hbi9saXN0aW5mby9saW51eC1hcm0t a2VybmVsCg== 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 60F15C4332F for ; Sat, 15 Oct 2022 08:59:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F081610E038; Sat, 15 Oct 2022 08:59:24 +0000 (UTC) Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by gabe.freedesktop.org (Postfix) with ESMTPS id 68ED310E038; Sat, 15 Oct 2022 08:59:18 +0000 (UTC) Received: by mail-wr1-x42e.google.com with SMTP id j16so10899313wrh.5; Sat, 15 Oct 2022 01:59:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VjSRqmWkaFZ0BLuD6MivrAvypkKqaIT8x6LKQIsQKn8=; b=gdcg6hXz5wuVSv/KtfFI848qYS7t9NYjUI618ptxzzIpxaqmveySS5BR9QIVwZQznb xBp1LMARjJsFgTsfoQXSKdlgOksIgUDgK5K2AKQXk0cNXfVB1iXroI7ut/cD9tGOsURQ jm8KdDG1cgj3F2tXB8fsFhaB4Dgqa4STOi2smUvQX0W6V5JuU1fb2T0Jx1olayaXMioH qUVlRlUtYIZYW47agdnyqxBUbpxtv8QqHmVCx5PtIwbbxpRu//fPm+9YkMHbweUr6hyr GIo4cI3kV/QaK6qCRbfx4UQzBvTvJNtzUUilSXr8/BKEVqoYVnzl8JMOwJPISK3D8rO8 AGPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VjSRqmWkaFZ0BLuD6MivrAvypkKqaIT8x6LKQIsQKn8=; b=uHVDQFEoB8hXmudDp7vw44LWVDJu5EC5YLvrU1KmTuzhkLl8/7yYtGiJrOzaMECDb9 KfwqVI47+idwao0FOjDSTSLNdki8MHc6LcAYlGISeBa6HT10GuQETgqzY9V6tniytudD vref3b7L9rYu6xFhDEMpugCMpTUQwgO/G12TgYZgAOQPeR8mPnm0ZEAQj+D4TRiire8W CYiDxYuwbq6UjOhMvNc9ELNLe/yYo91MkqxKzidvxd/tF0jq4wJs/MfMv+HsFOcYrECh ANVoYpxVNE7sn8u9OqWDubksWGaXuewiqV8UQody2WXSGGuriE1ycILem5yYxB6+p0bP H1+w== X-Gm-Message-State: ACrzQf3E9BMGvZPctRr9LAjWGxJXFcAf5DFgmhpAjBgn2ygi56PlX72P IFodmWAofbJwxYBkjXjBCLo= X-Google-Smtp-Source: AMsMyM6RC+ab/6o3qXAuzwTkjLJWhUo2MRVgXF2cNlp5Etq5q5a0yKzX7Not8qtetRts0yGJHJyAJg== X-Received: by 2002:adf:fb0e:0:b0:21a:34a2:5ca9 with SMTP id c14-20020adffb0e000000b0021a34a25ca9mr985742wrr.472.1665824356510; Sat, 15 Oct 2022 01:59:16 -0700 (PDT) Received: from kista.localnet (82-149-19-102.dynamic.telemach.net. [82.149.19.102]) by smtp.gmail.com with ESMTPSA id k13-20020adff5cd000000b0022e36c1113fsm3693723wrp.13.2022.10.15.01.59.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Oct 2022 01:59:15 -0700 (PDT) From: Jernej =?utf-8?B?xaBrcmFiZWM=?= To: Maxime Ripard Subject: Re: Re: [PATCH v5 22/22] drm/sun4i: tv: Convert to the new TV mode property Date: Sat, 15 Oct 2022 10:59:14 +0200 Message-ID: <2649653.mvXUDI8C0e@kista> In-Reply-To: <20221014073810.akfoyfzxerywnt65@houat> References: <20220728-rpi-analog-tv-properties-v5-0-d841cc64fe4b@cerno.tech> <6482539.4vTCxPXJkl@kista> <20221014073810.akfoyfzxerywnt65@houat> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" 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: Emma Anholt , David Airlie , nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Phil Elwell , Karol Herbst , Samuel Holland , Chen-Yu Tsai , Geert Uytterhoeven , Ben Skeggs , linux-sunxi@lists.linux.dev, 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 , =?UTF-8?B?Tm9yYWxmIFRyw4PCuG5uZXM=?= , Thomas Zimmermann Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Dne petek, 14. oktober 2022 ob 09:38:10 CEST je Maxime Ripard napisal(a): > Hi Jernej, >=20 > On Thu, Oct 13, 2022 at 08:23:51PM +0200, Jernej =C5=A0krabec wrote: > > Dne =C4=8Detrtek, 13. oktober 2022 ob 15:19:06 CEST je Maxime Ripard=20 napisal(a): > > > Now that the core can deal fine with analog TV modes, let's convert t= he > > > sun4i TV driver to leverage those new features. > > >=20 > > > Acked-by: Noralf Tr=C3=B8nnes > > > Signed-off-by: Maxime Ripard > > >=20 > > > --- > > > Changes in v5: > > > - Removed the count variable in get_modes > > > - Removed spurious vc4 change > > > --- > > >=20 > > > drivers/gpu/drm/sun4i/sun4i_tv.c | 145 > > >=20 > > > +++++++++++++-------------------------- 1 file changed, 48 > > > insertions(+), > > > 97 deletions(-) > > >=20 > > > diff --git a/drivers/gpu/drm/sun4i/sun4i_tv.c > > > b/drivers/gpu/drm/sun4i/sun4i_tv.c index c65f0a89b6b0..4f07aff11551 > > > 100644 > > > --- a/drivers/gpu/drm/sun4i/sun4i_tv.c > > > +++ b/drivers/gpu/drm/sun4i/sun4i_tv.c > > > @@ -141,23 +141,14 @@ struct resync_parameters { > > >=20 > > > struct tv_mode { > > > =20 > > > char *name; > > >=20 > > > + unsigned int tv_mode; > > > + > > >=20 > > > u32 mode; > > > u32 chroma_freq; > > > u16 back_porch; > > > u16 front_porch; > > >=20 > > > - u16 line_number; > > >=20 > > > u16 vblank_level; > >=20 > > isn't there a way to get or calculate back_porch, front_porch and > > vblank_level from mode? From quick glance over removed values below, I > > would say that at least back_porch can be removed too? >=20 > I tried actually, but I'm not sure what the front porch and back porch > parameters actually are. They are called that way by Allwinner, but it > doesn't match the PAL or NTSC timings at all. >=20 > For example, back_porch is 118 for NTSC and 138 for PAL. Actual back > porches would be around 12 and 16, respectively. Actually, the entire > blanking area are 138 and 144. This is close enough for PAL, but pretty > far off for NTSC. >=20 > Allwinner has the habit of integrating the sync period into one of the > porches, but still there's no obvious match. >=20 > front_porch is pretty much in the same case. Ok then. >=20 > Since it affected the display output quite a lot, I chose to keep it for > now unfortunately. >=20 > > Otherwise this patch looks ok. >=20 > Can I add your Acked-by/Reviewed-by then? Sure. Reviewed-by: Jernej Skrabec Best regards, Jernej