Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2437572pxb; Tue, 12 Oct 2021 06:40:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwGuYOS6Y27PRpcPESkeMzJiBuwf/zI75gI2oCiqq8m7Q5I1m4Shmkhnq3wGDUCvFDPcZdm X-Received: by 2002:a05:6000:1624:: with SMTP id v4mr31484810wrb.401.1634046057093; Tue, 12 Oct 2021 06:40:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634046057; cv=none; d=google.com; s=arc-20160816; b=a7b0WlEbJC8Er7CmjNcCJZ2No5cSE4oc6UVPievCqpn8RQU7Ab5KXFlWwjAlSGYvgA ppXEhZt6+7heGktzTxsAOTsmeyt5J6X70UGlBCjo7YfbYYGBzoqXDsDFGHOq5MjLmX53 UelfgwK1StuVd4S4lis/sXo4XdB0uxRXPhiCBbNywj+4qaAQk6mR5BMQIZtuGKx94rTo yEhZwmJ88JZGDU/1aiSvdyqvPDHKUSQ5ndc6p9mewVwPF6BeWt5bPXt5HkLtmz02zVJa 3QZOqY+VdyJT4Tfxss+0KK7wtg3YFUST8wsYIhVsaq5pJ0UmSFUXl39nG8MTySX5dj+J KB9w== 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:from:references :cc:to:subject:dkim-signature; bh=+k8elCI93ZjdXw7g9GBGwNb6DaCpivclzJV6QPexb5w=; b=CamvHS2EKZ1JXV5lKg2sHYfFMamBHkoGr5zY6pisDMtZraCuIBZ4OjKzAxRbI1A2/u QphRq1ghIVFjWXX7ek8t2B+BnrwlnbFg4PyZYp4JyP+Lpt+5wWdYtRwMwP4W8agWR1+d IEN5KKogCIpt4aJhezeyBO3WJNrud+BaCVLZA5CCwvLnpRTcfUzq5VpLBHJKF5conHSb Kin92/iKSv6sJMmy/hSieSj4wNZlvXZ7zJFXCDI5FMYENylhvozNpk+FKEGzizq8ntPa pB6keXKmXtntZYaEPrHqkEqJjhqhjHWnBI8fQdIEvQ72wEUexg29hn8kkMDpfEHR9Cjr P9xA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=NOXMlHHm; 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 a12si3685647edr.352.2021.10.12.06.40.32; Tue, 12 Oct 2021 06:40:57 -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 (test mode) header.i=@ideasonboard.com header.s=mail header.b=NOXMlHHm; 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 S236974AbhJLNkk (ORCPT + 99 others); Tue, 12 Oct 2021 09:40:40 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:55692 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233296AbhJLNk3 (ORCPT ); Tue, 12 Oct 2021 09:40:29 -0400 Received: from [192.168.1.111] (91-158-153-130.elisa-laajakaista.fi [91.158.153.130]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id ECDA7F1; Tue, 12 Oct 2021 15:38:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1634045903; bh=N8uxQ9NyAxZH3uOWCc3RVKPEmZO/5GjhQNo8ppobBpk=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=NOXMlHHmC9r1YQqn3/AS+C/ke3PWHkWUxqX0i63bDOek50htnnEa+TPKkx5eQgix1 clTSeohfenCBS0rntuuMMhAeABgnLSXILOXfDmbbr8kGSgghIYbyhQKk/iuplJPbAO 48tcOenYnYWUTnj7Liwsw/HcphUSzSDSe29CgDFE= Subject: Re: [PATCH v5 5/8] drm/omap: Add global state as a private atomic object To: Neil Armstrong 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> From: Tomi Valkeinen Message-ID: <00ad704f-cd01-cfc2-0418-1cb0561c41a5@ideasonboard.com> Date: Tue, 12 Oct 2021 16:38:20 +0300 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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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). Tomi