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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 14505D25959 for ; Tue, 27 Jan 2026 08:04:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7883010E287; Tue, 27 Jan 2026 08:04:07 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="oeeAUez+"; dkim-atps=neutral Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by gabe.freedesktop.org (Postfix) with ESMTPS id DD09410E287 for ; Tue, 27 Jan 2026 08:04:05 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id 3409260097; Tue, 27 Jan 2026 08:04:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 35DD2C16AAE; Tue, 27 Jan 2026 08:04:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1769501044; bh=Qz5Colq+aYuTcYXa/uYYzxOdfv48MJddodnQZw7klwk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oeeAUez+ceIJtD4NwNHFZXriOGpj7C162c3Ux1ZZ/HgJ5oHe0HjrI04bzNj5ExxZU q+dTM9fCbzTZ3AtrwzETQ8kUuYGvds+LuNyiGz87mVLu8DN2Hof4KB5tT14pouKVPw mVSDk9WENm8ISLOpewxnZvbttBDfDSCAp5kvDYFuTv7jVTa81/BvEEMOGienD5yU7e t8Q4iBdeeuthv18WN/MR6/gt6hlO0M2hW12Fx4GsLezQ3FIelg92EpUVtnz+dGh/4Z aHoC+XCiWiCxv1o964awRedTzlFmDPN7CEK/i9DQEt+6seElYJ0D3iuxCFSpunsR0Y +299PdXBCZW8A== Date: Tue, 27 Jan 2026 08:04:01 +0000 From: Tzung-Bi Shih To: Thomas Zimmermann Cc: briannorris@chromium.org, jwerner@chromium.org, javierm@redhat.com, samuel@sholland.org, maarten.lankhorst@linux.intel.com, mripard@kernel.org, airlied@gmail.com, simona@ffwll.ch, chrome-platform@lists.linux.dev, dri-devel@lists.freedesktop.org Subject: Re: [PATCH v2 12/12] drm/corebotdrm: Support panel orientation Message-ID: References: <20260115082128.12460-1-tzimmermann@suse.de> <20260115082128.12460-13-tzimmermann@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Tue, Jan 27, 2026 at 07:49:46AM +0000, Tzung-Bi Shih wrote: > On Thu, Jan 15, 2026 at 08:57:22AM +0100, Thomas Zimmermann wrote: > > diff --git a/include/linux/coreboot.h b/include/linux/coreboot.h > > [...] > > @@ -63,9 +68,13 @@ struct lb_framebuffer { > > u8 blue_mask_size; > > u8 reserved_mask_pos; > > u8 reserved_mask_size; > > + u8 orientation; > > } __packed; > > > > #define LB_FRAMEBUFFER_HAS_LFB(__fb) \ > > ((__fb)->size >= offsetofend(struct lb_framebuffer, reserved_mask_size)) > > > > +#define LB_FRAMEBUFFER_HAS_ORIENTATION(__fb) \ > > + ((__fb)->size >= offsetofend(struct lb_framebuffer, orientation)) > > Wouldn't the new field in struct lb_framebuffer break LB_FRAMEBUFFER_HAS_LFB()? > E.g., fb->size == offsetofend(struct lb_framebuffer, reserved_mask_size) > -> LB_FRAMEBUFFER_HAS_LFB(fb) == true > -> LB_FRAMEBUFFER_HAS_ORIENTATION(fb) == false? The example is wrong, please forget it. Again, I supposed the "LFB" is tailing data of struct lb_framebuffer. I meant: is it possible that there is no tailing data -> fb->size == offsetofend(struct lb_framebuffer, orientation) -> LB_FRAMEBUFFER_HAS_LFB() == true falsely.