Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2545388pxb; Tue, 12 Oct 2021 08:44:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzm9Mg3HNliXnrpBwdD7ve8M4pEkwqnnYICIJs+HqJH0/B8D52aGSO1rADRtdiRj4lbFFxf X-Received: by 2002:a65:45cd:: with SMTP id m13mr23689725pgr.26.1634053481414; Tue, 12 Oct 2021 08:44:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634053481; cv=none; d=google.com; s=arc-20160816; b=Dwzvl7r4umVmXGY+GmXIpSlLegc/jPQJW9DVscWMstQHty7Uj3aJ0niReZXOnahTMc 2plfkrGYqWc0+ZXxpNY5JJ8UuJoDruvzl7rgXvj60vtllbYT9Hmy0tV2WV9R0wsCac0a yC7gOP4LpRj9Tz4sEViJW4iq2e0R8R4dRhqyebmXSsEI0KyQUeNHmA6qK1qrGyyLhYsS PeucFySS7MbXTtYOUF+c6Zt0WDlulYjqXeBIMRUO4kIzRfMovl9rYl87PdlAeMShDlJ8 JpwWSrfqX+7OyAa43YovLAcfou0kqpvf5i6/Eg78A737AlaEZDqA7dTSQ+2DVGrV7FHV durg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:dkim-signature; bh=UTtSB/AxX+nSKnjq3c2L4Uc0/wQulxnMO92eFOXOlYQ=; b=1Kiz04lSZdYuHnvAsqqs+R6qlz59YbP2DJPV7/neYpH3uAboZWPd9nbGjYzKJADHK7 RDTrtbPg7Tf5XN3aAejh/ny+8gxDAr+nGNswqodWyZmPXPnO5NrmEGZ416EpUO/IrJRU SVs/zJxBqgmjDcHX0Ks+Tr3XQBZytZ4sGf1uDrSd5GcM7q/pDfUiStJYWMprowEP2vCj vJC59GouMA7Up/2lEdpvgCjtWCkgsgbQMw6ziI2k3HkkEIJ2uncvR/Z6XfftdeXnkJPf zVjuzOeGxWpv7Zu86MIWZRVeJICQB/JK4zDCPOzbqqWt3Q3YECL5te9CZCJN8lL+Rz/Y qmVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=MmwgVDET; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w18si15618740pll.56.2021.10.12.08.44.22; Tue, 12 Oct 2021 08:44:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=MmwgVDET; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237476AbhJLPn7 (ORCPT + 99 others); Tue, 12 Oct 2021 11:43:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237023AbhJLPn7 (ORCPT ); Tue, 12 Oct 2021 11:43:59 -0400 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C8B0C061570 for ; Tue, 12 Oct 2021 08:41:57 -0700 (PDT) Received: by mail-wr1-x42b.google.com with SMTP id u18so68404252wrg.5 for ; Tue, 12 Oct 2021 08:41:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=subject:to:cc:references:from:organization:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=UTtSB/AxX+nSKnjq3c2L4Uc0/wQulxnMO92eFOXOlYQ=; b=MmwgVDETVJouQBmc3HR0QBJHA2yCYg7nOK9wdX24BdMwb15QNzWm4KcN/8Bb0oTo17 PHkQZsm6Ngg7F/cN6jcrFT2QvAb0e92JUAVV9UA0e+NMmk2f9uKUuiWr5c3POlYf4Yhv zg9cBpOl7f9DSyY0tdtNUWeBNvQFH7ioHPm4ecBAXXh4kxTB4z42r0fuITeOo5QaXpxL WjLCPsZjLqhYFE1vpSPcS3YLbR7fhoXnUY5xIYzNlL5fbPqT2nPzsJFWdwFl6W+QcG9O URGwnTBuFNwURuAcuh9dJWex/Xgl4vCB2EllYmY8n6ZvWjF/0gycf4EjFG4y0qxO0Lv2 94Iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=UTtSB/AxX+nSKnjq3c2L4Uc0/wQulxnMO92eFOXOlYQ=; b=QMpMzhwsCZVlAeDvcpCGQWnO9LUqQPWqK8d63xSB+uRaQkMcNQnlb51+BNepjN/4Le oneqpg9sXJnLtRl/ZA6ctwR/j79IHdw5c0AZ4j2nzaEK4y9d3rHhy2z3dktqQUvxH1RI jKYWSb9N0wlpthMZF7BioF+yHSuHX4/vE3mtqJq4jOz3ZTywmdXKg6Jyn+CjOeunxmmn Lj+d014Sgj+wgmJ5s5/54S4GY7bSCByHDNI/JmkraARbZC2/duwj5wjBduHUDvPmePlQ ZnRSRk50iiOlGLLw1NPSGaChgNYzO1mzLa9LlN/+WGOMK9h2sMn5m6WFD2KkYWx9IeV3 k8wQ== X-Gm-Message-State: AOAM530ScCYe/6mHbhxFlwQeZ4wc40Ts3EcXClEJc72aSvMRv/qu8drk WBuRkUFIW1RTaqXv60a//JqOfg== X-Received: by 2002:a7b:c406:: with SMTP id k6mr6436165wmi.170.1634053315482; Tue, 12 Oct 2021 08:41:55 -0700 (PDT) Received: from ?IPv6:2001:861:44c0:66c0:4e93:9fa7:4d66:4f5c? ([2001:861:44c0:66c0:4e93:9fa7:4d66:4f5c]) by smtp.gmail.com with ESMTPSA id w5sm10829357wrq.86.2021.10.12.08.41.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 12 Oct 2021 08:41:55 -0700 (PDT) Subject: Re: [PATCH v5 5/8] drm/omap: Add global state as a private atomic object To: Tomi Valkeinen Cc: linux-omap@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, khilman@baylibre.com, Benoit Parrot References: <20210923070701.145377-1-narmstrong@baylibre.com> <20210923070701.145377-6-narmstrong@baylibre.com> <2609ca32-90e8-1335-2769-14dcbcdfafde@ideasonboard.com> <00ad704f-cd01-cfc2-0418-1cb0561c41a5@ideasonboard.com> From: Neil Armstrong Organization: Baylibre Message-ID: Date: Tue, 12 Oct 2021 17:41:54 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <00ad704f-cd01-cfc2-0418-1cb0561c41a5@ideasonboard.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/10/2021 15:38, Tomi Valkeinen wrote: > On 12/10/2021 16:23, Neil Armstrong wrote: > >>>> +    struct drm_private_obj glob_obj; >>>> + >>>>        struct drm_fb_helper *fbdev; >>>>          struct workqueue_struct *wq; >>>> @@ -88,5 +105,9 @@ struct omap_drm_private { >>>>        void omap_debugfs_init(struct drm_minor *minor); >>>> +struct omap_global_state *__must_check >>>> +omap_get_global_state(struct drm_atomic_state *s); >>>> +struct omap_global_state * >>>> +omap_get_existing_global_state(struct omap_drm_private *priv); >>> >>> These could also be separated by empty lines. At least to my eyes it gets confusing if those declarations are not separated. >> >> Atomic states can be extremely confusing, and hard to track. >> I checked and they do what they are documented for... >> >> The omap_get_existing_global_state() is the most confusing since the result depends if >> we are in an atomic transaction of not. > > So here I was just talking about the cosmetics, how the lines above look like. I have trouble seeing where the function declaration starts and where it ends without looking closely, as both lines of the declaration start at the first column, and there are no empty lines between the declarations. Ok, it's a legacy of the 80chars max, will reformat. > > But now that you mention, yes, the states are confusing =). And this series is somewhat difficult. I think it's important for future maintainability to include explanations and comments in this series for the confusing parts (plane-overlay mapping and state handling, mostly). Yep I added some hopefully useful comments explaining that. Neil > >  Tomi