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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 18BD8C433FE for ; Mon, 7 Nov 2022 11:17:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231419AbiKGLRX (ORCPT ); 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 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.