Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1633964rwb; Mon, 7 Nov 2022 04:07:54 -0800 (PST) X-Google-Smtp-Source: AMsMyM7sLm5fKCMOxS4Ups4nTfCAagdv8aqm9t59sA3Dwnxp7Qy7VVKLyc6Fd4T8R1fOHVpEAOEm X-Received: by 2002:a05:6402:2893:b0:461:59fd:9b4 with SMTP id eg19-20020a056402289300b0046159fd09b4mr49897225edb.389.1667822873765; Mon, 07 Nov 2022 04:07:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667822873; cv=none; d=google.com; s=arc-20160816; b=rEqkSphoNT0zMVw4abB1O1PDENVouTHahgnWyboCaDPSc9qj7mstQSmc9SYIsGVvnF +Ue+SroWZWyqzFWkbVA/MX41T3uPt9z6yG5ZYRmbTo/mESvF2OfuCK4T8uVQGiz+FTKx NGfc+2N/q0WXT3Bq1IIXXhO9waD/BVQM4S7YzjKm8X05jZ13e/HgTZLxU0lDiquN+hML HHlHpLGQsUXkD1XOazxfzYhkz7A1aO4Lzem5TXkLH3IS+TL1zsO4As1V6fT734atzbb9 yk/11SfaCIPXeHx7xqfQkK25ybpytny5X5Ql7r7oOlW1dj9IGzdIKL8VQUbJTOKMAfvw zyzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id :dkim-signature; bh=FFI39mP8UtNKgOqsi2a6dT2sTXn4P75XgEouvE9p5L0=; b=BRdd1SlFZfBdROr3MqAZ2AsniI6dQzE9ILMDsLAIVRWtOEE2oMCZLFcbdGfJhxSAVw YKM6Io9OKW9cCFwPHYCgM7GatvVmx+QIPkieepdjeG+EuIRpPDLEWuZb9UbD4vfeMxWb Kr2IV2Tqbev9Rh8L69CklDmhkeVbOLIFRXuHaB2w5bKbE4dg0+Q8tOqmAI/tcalnVe5M z3qD+Vs3I24q7ObFRxvRSOqmnCw7+Ug4B2cdbWzXfiikiakKXG9uHkLw3xSBZ94d3FsK gmDlAiHC1VhglEh8QcvVhNnOdQWAJ/zNjFQVQ3zdc7fB3RsCYkVZHYnGup54dLdX/bH4 pIcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@tronnes.org header.s=ds202112 header.b=TJlNny8m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=tronnes.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w15-20020a05640234cf00b00461ed1fe6ffsi11844911edc.85.2022.11.07.04.07.31; Mon, 07 Nov 2022 04:07:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@tronnes.org header.s=ds202112 header.b=TJlNny8m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=tronnes.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231332AbiKGLRX (ORCPT + 93 others); Mon, 7 Nov 2022 06:17:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229659AbiKGLRU (ORCPT ); Mon, 7 Nov 2022 06:17:20 -0500 Received: from smtp.domeneshop.no (smtp.domeneshop.no [IPv6:2a01:5b40:0:3005::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27CBFBCB8 for ; Mon, 7 Nov 2022 03:17:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tronnes.org ; s=ds202112; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=FFI39mP8UtNKgOqsi2a6dT2sTXn4P75XgEouvE9p5L0=; b=TJlNny8m3SQR1E18mL8S98TVQJ 1oMLGAbLNfa7jW+weTU/RpdeaudZeLqRm6kCaVOsswVSTJsZMlSx94JwUMDbx/pWcLkW0LURu+GtA gTd1n8X4PGBurLIJWx3ORA1yBMkeDAjMX3TjIVnJEd0jOx0eb52UD7NXCpQIf6FVS/x+64KYMWffm Pm6rATU2FGOE2zwcjsh8BNCdbjEeRZJ1pAWhZE5f/MwMJmMIAJ9rhn5bphtAwzBDB4kn2MTJI4shh aBdvTtiL6xN2cOyVs4gfyQ/DFbibjsDqSXt8FdTAcR/3oJimZzlUC04dsdv9CmpIKnSWk1NTNwAYl AdffaDjQ==; Received: from [2a01:799:95a:cb00:fd97:29ff:d72a:349e] (port=49701) by smtp.domeneshop.no with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1os07v-0005Xf-CP; Mon, 07 Nov 2022 12:17:15 +0100 Message-ID: <022d5c23-6387-55b5-615e-5c6aaa0dc86c@tronnes.org> Date: Mon, 7 Nov 2022 12:17:06 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH v6 16/23] drm/probe-helper: Provide a TV get_modes helper To: Maxime Ripard Cc: Mateusz Kwiatkowski , Karol Herbst , Emma Anholt , Ben Skeggs , Chen-Yu Tsai , Rodrigo Vivi , Maarten Lankhorst , Jani Nikula , Daniel Vetter , Thomas Zimmermann , Tvrtko Ursulin , Samuel Holland , Jernej Skrabec , David Airlie , Joonas Lahtinen , Lyude Paul , linux-sunxi@lists.linux.dev, intel-gfx@lists.freedesktop.org, Phil Elwell , linux-arm-kernel@lists.infradead.org, nouveau@lists.freedesktop.org, Hans de Goede , Dom Cobley , dri-devel@lists.freedesktop.org, Dave Stevenson , linux-kernel@vger.kernel.org, Geert Uytterhoeven , =?UTF-8?Q?Noralf_Tr=c3=b8nnes?= References: <20220728-rpi-analog-tv-properties-v6-0-e7792734108f@cerno.tech> <20220728-rpi-analog-tv-properties-v6-16-e7792734108f@cerno.tech> <8d0eee22-50f5-5b0a-c1e6-c5f61dd5bbcd@gmail.com> <20221107100751.neijajfrazxloldp@houat> From: =?UTF-8?Q?Noralf_Tr=c3=b8nnes?= In-Reply-To: <20221107100751.neijajfrazxloldp@houat> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Den 07.11.2022 11.07, skrev Maxime Ripard: > Hi Noralf, > > On Sun, Nov 06, 2022 at 05:59:23PM +0100, Noralf Trønnes wrote: >> >> >> Den 27.10.2022 00.02, skrev Mateusz Kwiatkowski: >>> Hi Maxime, >>> >>> First of all, nice idea with the helper function that can be reused by different >>> drivers. This is neat! >>> >>> But looking at this function, it feels a bit overcomplicated. You're creating >>> the two modes, then checking which one is the default, then set the preferred >>> one and possibly reorder them. Maybe it can be simplified somehow? >>> >>> Although when I tried to refactor it myself, I ended up with something that's >>> not better at all. Maybe it needs to be complicated, after all :( >>> >> >> I also thought that the function was complicated/difficult to read, in >> particular the index stuff at the end, but I also failed in finding a >> "better" solution, just a different one ;) > > I think I like yours better still :) > > Can I bring it into my series, with your authorship and SoB? > Sure, no problem. Noralf.