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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 947ABC05027 for ; Tue, 14 Feb 2023 15:04:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=U1ruA6Kl/9StZFkkJK5Q/m7bddOwWNWI9gFiXWWOEfA=; b=1NWBuOek6/HipA KHAG7cPXARGTCI2+jknnpbqXJdJTi6F58RUOsLeT9o7+ONJCMgDV4UBKn3/b6tA0fiO1v+Xn3Lt01 3400yXHgKF1l+QWnlaqx132Tcnh328JQ4r7L2wpuaukxZepENKNl4bDwwmxV9bZt+JkQXJtiUoQvL tPaadwfpcVLqfsb05wmLBbpQMRLtTZr2JSg35+X7WdM+2kulZEVzJ0OdFBJ9BGz66UwKvfCrBl17S rSQ6yPGzjm1j5IKvv5N7/4qyRLCPeDfTGVyKHL3INAGOfyeZCbQZXt5cDqlGm3dO4hx0kgPIyeKse 6+qEZX+gjhI3WYiZ3HFQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pRwpM-002N9n-Sp; Tue, 14 Feb 2023 15:02:41 +0000 Received: from mga11.intel.com ([192.55.52.93]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pRw6z-0024UR-WD for linux-arm-kernel@lists.infradead.org; Tue, 14 Feb 2023 14:16:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1676384209; x=1707920209; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=zXTf3MmymcGTYiS/8pw46Ic62YElU9b0FxEiZvXIB58=; b=UQ6vRixdtcUkU7XXy5PKwp5EmDQeMBJsCQa4bARVu4OPhh7KLxRQSftK EzQyb/ZhiaUS4jW9dY47m5iIcRtzxB6pvMH1XNWmfoupY1mWbAKarXN1m 8GyPLKsv2M9urKcYfXNX9662j8vJtG2kHaiqYVLJVsELBHGaKNWh2Vjq3 og0uULxlU1zkGVClYcz3vuh6kd8XMK4jhvGOX2Bt9h4/yLowNo7U/Vb2n RtATN1OmN1FdYHJOipatyG4eA2hNXDFzqfsUkb4Y7SswL8MZPOUgoA4Ji x7VU9cB9Q+MtzNIzSrI6MsIdratdPIW62wFsTS2nhmC5ENJJG8paUU9qP w==; X-IronPort-AV: E=McAfee;i="6500,9779,10621"; a="328879394" X-IronPort-AV: E=Sophos;i="5.97,296,1669104000"; d="scan'208";a="328879394" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Feb 2023 06:16:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10621"; a="671231034" X-IronPort-AV: E=Sophos;i="5.97,296,1669104000"; d="scan'208";a="671231034" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.55]) by fmsmga007.fm.intel.com with SMTP; 14 Feb 2023 06:16:41 -0800 Received: by stinkbox (sSMTP sendmail emulation); Tue, 14 Feb 2023 16:16:41 +0200 Date: Tue, 14 Feb 2023 16:16:41 +0200 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Alexander Stein Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Liu Ying , marex@denx.de, shawnguo@kernel.org, s.hauer@pengutronix.de, krzysztof.kozlowski@linaro.org, robh+dt@kernel.org, linux-imx@nxp.com, krzysztof.kozlowski+dt@linaro.org, kernel@pengutronix.de, LW@karo-electronics.de Subject: Re: [PATCH v3 3/6] drm: lcdif: Determine bus format and flags in ->atomic_check() Message-ID: References: <20230213085612.1026538-1-victor.liu@nxp.com> <20230213085612.1026538-4-victor.liu@nxp.com> <1755644.VLH7GnMWUR@steina-w> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1755644.VLH7GnMWUR@steina-w> X-Patchwork-Hint: comment X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230214_061650_091842_F23DA735 X-CRM114-Status: GOOD ( 25.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Feb 14, 2023 at 03:12:55PM +0100, Alexander Stein wrote: > Hi Liu, > = > thanks for the update. > = > Am Montag, 13. Februar 2023, 09:56:09 CET schrieb Liu Ying: > > Instead of determining LCDIF output bus format and bus flags in > > ->atomic_enable(), do that in ->atomic_check(). This is a > > preparation for the upcoming patch to check consistent bus format > > and bus flags across all first downstream bridges in ->atomic_check(). > > New lcdif_crtc_state structure is introduced to cache bus format > > and bus flags states in ->atomic_check() so that they can be read > > in ->atomic_enable(). > > = > > Signed-off-by: Liu Ying > > --- > > v2->v3: > > * No change. > > = > > v1->v2: > > * Split from patch 2/2 in v1. (Marek, Alexander) > > * Add comment on the 'base' member of lcdif_crtc_state structure to > > note it should always be the first member. (Lothar) > > = > > drivers/gpu/drm/mxsfb/lcdif_kms.c | 138 ++++++++++++++++++++++-------- > > 1 file changed, 100 insertions(+), 38 deletions(-) > > = > > diff --git a/drivers/gpu/drm/mxsfb/lcdif_kms.c > > b/drivers/gpu/drm/mxsfb/lcdif_kms.c index e54200a9fcb9..294cecdf5439 10= 0644 > > --- a/drivers/gpu/drm/mxsfb/lcdif_kms.c > > +++ b/drivers/gpu/drm/mxsfb/lcdif_kms.c > > @@ -30,6 +30,18 @@ > > #include "lcdif_drv.h" > > #include "lcdif_regs.h" > > = > > +struct lcdif_crtc_state { > > + struct drm_crtc_state base; /* always be the first = > member */ > = > Is it strictly necessary that base is the first member? to_lcdif_crtc_sta= te() = > should be able to handle any position within the struct. I mean it's sens= ible = > to put it in first place. But the comment somehow bugs me. NULL pointers is where these things go bad if it't not at offset 0. Unless you're willing to always handle those explicitly. -- = Ville Syrj=E4l=E4 Intel _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel