Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3741208rdh; Fri, 29 Sep 2023 00:34:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFtbNaC3Ges5VddTaPaCFrSBGlbJ08j+TePJ11JoP8P6VR7WlV10n/qcrWwMPNwZCT4jDiV X-Received: by 2002:a05:6a20:3956:b0:15d:fc71:1b9e with SMTP id r22-20020a056a20395600b0015dfc711b9emr3933440pzg.49.1695972872228; Fri, 29 Sep 2023 00:34:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695972872; cv=none; d=google.com; s=arc-20160816; b=XiiOjWaHigbwp4ueY4+PvoYDjKe8an+oMxciMwdCJ+/q2EvtDoRHqt/jVSCqIvQUNW 234gzMhORo0JYbE8qpq0OEFU7HAXOA+SElMuT4ujSP0YfrQY5eVRfoVRdI8Gwy9EHtX0 wtzViVSXhxcG3eoBSPxiWWcnJODqEcVL4355l5kzDkgV1vkHTFEXx9te8rWBlU2PULK3 IcTlN4ghzRGNGQPciY3rq/t4J4G8/1asB7IgRM1qszyiCtxvrcOEzMCbH4PTu5vnUioV Xooaz+Fl/BL4ovnO+THMKC8f7xWukG1GXId1Ht+Kl5r2vJed7Mbq6Sv7v4W2MKpA3mXW M3Vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=Z18cVpgzwnCeP1lwve5/OW/DVlaSMerzuKjpWXJ4rIk=; fh=r5qJeyrJhRS4dD1MVNfPDQn0u4Mi2pH+f9yrqVHirLM=; b=OOJSuqrFmlxZ9gIT+vutV/PlSB+Xq6sbgpIjlcHf/0GbQL8nFE7at6vCzbNoLCOo1S 0+u9ZOsgd47KMuhhcR232uC4BRVjVbqo0YnP1q7FR5nAJTOP+gRGSuwHgDWuxImHIChl cBaWcqA5od7pr7vgenf0nrLPkidSpSs8ZWGh44Chy1DxLyUDl7b28vHGhc9vbB42YvEc 9NVbg5RaOKB25+oXlD5GWCFXqAscTVh2P4vBwjLAKGzAv0OY9vVafXagV+FVTECNZ5iB veVvR31CkLZomuYBmtAml8qJU6047U5tlwY7ZYtWKCJ+XeNltv4qG0H/mHGfdAHbSTWF rR/w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id lp9-20020a17090b4a8900b00273e2f407casi490740pjb.76.2023.09.29.00.34.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 00:34:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 76B3B829B89F; Fri, 29 Sep 2023 00:34:29 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232663AbjI2HeQ convert rfc822-to-8bit (ORCPT + 99 others); Fri, 29 Sep 2023 03:34:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232621AbjI2HeN (ORCPT ); Fri, 29 Sep 2023 03:34:13 -0400 Received: from mail-ot1-f47.google.com (mail-ot1-f47.google.com [209.85.210.47]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBF341B4 for ; Fri, 29 Sep 2023 00:34:08 -0700 (PDT) Received: by mail-ot1-f47.google.com with SMTP id 46e09a7af769-6c4fc2ce697so3420082a34.0 for ; Fri, 29 Sep 2023 00:34:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695972848; x=1696577648; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rUWQxOTsSrkcrkTI16CKvhBBl32jDdZTQBwnUO0YWt4=; b=DZhI3IOX/5p2CqZ4kKYF+HmfIDnF0b71WIGNw1f8H5KcrQYj59A6eYcKIGlxeTHvgF 2xDrFtBxP1ebCpJfW6D3lBixXtfGSEfXNFLk+yd8sy4mxUhqWzJ4PPYNSdlW2KmQdqkr swXqmiHJNqeH2Up8eWDLtZZpPbqkIAAlj6+Iah2B9mYYGRXp1OiQYP7qTwxlMNdlJeog SN42+YpswLFcXn1W8d+IXuH/U5efeLeRo+0zhbQ5t8Y4znY+iW+SDITUZIfabQAZavps qcmvMp1zCdpAHE9jklNkyHN9sZucBYqS8+/mLX85wfg80sBin1nLQbclYAV5EHnU3D84 zjcQ== X-Gm-Message-State: AOJu0Yw5JsZdkCidmy3ThRIJCRtXxcDSoE/Bdv0WPwKtdphq7A/IS79H gkF/LWVeGv1M6/3UDuUGwE0Fb1iscQgK16pq X-Received: by 2002:a05:6830:3d0c:b0:6bf:1e78:cc52 with SMTP id eu12-20020a0568303d0c00b006bf1e78cc52mr3716684otb.25.1695972847776; Fri, 29 Sep 2023 00:34:07 -0700 (PDT) Received: from mail-yw1-f175.google.com (mail-yw1-f175.google.com. [209.85.128.175]) by smtp.gmail.com with ESMTPSA id g64-20020a0df643000000b0059bdac3fd08sm5282812ywf.48.2023.09.29.00.34.07 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 29 Sep 2023 00:34:07 -0700 (PDT) Received: by mail-yw1-f175.google.com with SMTP id 00721157ae682-5a1ec43870cso70585667b3.0 for ; Fri, 29 Sep 2023 00:34:07 -0700 (PDT) X-Received: by 2002:a81:9152:0:b0:59b:c11:ad7c with SMTP id i79-20020a819152000000b0059b0c11ad7cmr3474689ywg.18.1695972847371; Fri, 29 Sep 2023 00:34:07 -0700 (PDT) MIME-Version: 1.0 References: <0f0eae276da4f8ed44cd1a15ffa138879d27b148.1695903065.git.geert+renesas@glider.be> <9af0ab00-7afd-493b-848a-a433e9b9e182@suse.de> In-Reply-To: <9af0ab00-7afd-493b-848a-a433e9b9e182@suse.de> From: Geert Uytterhoeven Date: Fri, 29 Sep 2023 09:33:55 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH/RFC 3/3] drm: Split drm_modeset_helper_vtables.h To: Thomas Zimmermann Cc: Maarten Lankhorst , Maxime Ripard , David Airlie , Daniel Vetter , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 29 Sep 2023 00:34:29 -0700 (PDT) Hi Thomas, On Fri, Sep 29, 2023 at 9:11 AM Thomas Zimmermann wrote: > Am 28.09.23 um 17:32 schrieb Geert Uytterhoeven: > > On Thu, Sep 28, 2023 at 3:59 PM Thomas Zimmermann wrote: > >> Am 28.09.23 um 14:16 schrieb Geert Uytterhoeven: > >>> is the second largest header file in > >>> the DRM subsystem, and declares helpers vtables for various DRM > >>> components. Several vtables contain methods with the same name, and all > >>> but one vtable do not fit on the screen, making it hard to navigate to > >>> the actual method one is interested in. > >>> > >>> Make it easier for the casual reviewer to keep track by splitting > >>> in multiple header files, one per DRM > >>> component. > >> > >> I never liked this header either, but do we need new header files? Each > >> struct could be appended to the end of the regular header: struct > >> drm_plane_helper_funcs to drm_plane.h, drm_connector_helper_func to > >> drm_connector.h and so on. > > > > That would work for me, too. But perhaps we want to maintain a clear > > separation between core and helpers? > > > > Note that moving the contents to *_helper.h would be another option, > > drm_crtc_helper.h and drm_plane_helper.h already exist. > > I've taken a closer look at the users of the _vtables header. There's > code in drm_atomic_helper.c or drm_probe_helper.c that invokes the > callback functions. > > The drivers fill the pointers with code that often comes from other > helper modules. That code is in files like drm_plane_helper.c or > drm_crtc_helper.c. There header files are drm_plane_helper.h, etc. > > In that context, the _vtables header makes sense, as it separates the > callers from the callees. Putting the structs into headers like > drm_plane_helper.h would move it to the callee side. > > I suggest to leave the header as it is. The fallout to the code base > from refactoring seems worse than the current state. To clarify: do you mean keeping the single big drm_modeset_helper_vtables.h, or the split drm_*_helper_vtable.h set? Thanks! > >>> Signed-off-by: Geert Uytterhoeven > >>> --- > >>> RFC, a future patch could replace inclusion of > >>> by inclusion of one or more of the > >>> new files, and reduce compilation time. > >>> --- > >>> include/drm/drm_connector_helper_vtable.h | 364 +++++ > >>> include/drm/drm_crtc_helper_vtable.h | 483 ++++++ > >>> include/drm/drm_encoder_helper_vtable.h | 381 +++++ > >>> include/drm/drm_mode_config_helper_vtable.h | 97 ++ > >>> include/drm/drm_modeset_helper_vtables.h | 1466 +------------------ > >>> include/drm/drm_plane_helper_vtable.h | 297 ++++ > >>> 6 files changed, 1627 insertions(+), 1461 deletions(-) > >>> create mode 100644 include/drm/drm_connector_helper_vtable.h > >>> create mode 100644 include/drm/drm_crtc_helper_vtable.h > >>> create mode 100644 include/drm/drm_encoder_helper_vtable.h > >>> create mode 100644 include/drm/drm_mode_config_helper_vtable.h > >>> create mode 100644 include/drm/drm_plane_helper_vtable.h Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds