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 A90A3C02181 for ; Mon, 20 Jan 2025 21:31:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2911410E023; Mon, 20 Jan 2025 21:31:56 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="tz5cIsFv"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by gabe.freedesktop.org (Postfix) with ESMTPS id A43B710E023; Mon, 20 Jan 2025 21:31:55 +0000 (UTC) Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 84F29594; Mon, 20 Jan 2025 22:30:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1737408652; bh=UR0Dn2aJ9/EbfFUoHjgJTmS310tTTS7kpgbvgK5/QDc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tz5cIsFv7BRMKEY3D3u98tmREMFxaLPzmkvKmO6wbVQGH19/R54iyLMQQ9KewTF7w XG2/cC4eVkCou98Uc5c6SjKBuQToMQv6RXAwUvyyw9bv++mGApN8ZszSrV/7WmM1sj RjBxqj+2N5UL8AxG5M7IOKtI8e0NgxtpGCU3dr8Q= Date: Mon, 20 Jan 2025 23:31:47 +0200 From: Laurent Pinchart To: Thomas Zimmermann Cc: Marek =?utf-8?B?T2zFocOhaw==?= , Simona Vetter , Daniel Stone , James Jones , Brian Starkey , Michel =?utf-8?Q?D=C3=A4nzer?= , dri-devel , amd-gfx mailing list , ML Mesa-dev , nd@arm.com Subject: Re: [PATCH] drm/fourcc: add LINEAR modifiers with an exact pitch alignment Message-ID: <20250120213147.GI9249@pendragon.ideasonboard.com> References: <07d08a42-c44a-477e-8057-721b270310cf@nvidia.com> <0e9aee49-aa69-4fb6-bab8-4624143f5267@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <0e9aee49-aa69-4fb6-bab8-4624143f5267@suse.de> X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" On Mon, Jan 20, 2025 at 08:58:20AM +0100, Thomas Zimmermann wrote: > Am 18.01.25 um 03:37 schrieb Marek Olšák: > [...] > > > > 3) Implementing DRM_FORMAT_MOD_LINEAR as having 256B pitch and offset > > alignment. This is what we do today. Even if Intel and some AMD chips > > can do 64B or 128B alignment, they overalign to 256B. With so many > > AMD+NV laptops out there, NV is probably next, unless they already do > > this in the closed source driver. > > The dumb-buffer series currently being discussed on dri-devel also > touches handling of scanline pitches. THe actual value varies with each > driver.  Should dumb buffers use a default pitch alignment of 256 on al > hardware? That may break sharing buffers with other devices (codecs, NPUs and/or cameras) that would not support a configurable pitch. I don't expect that to be the majority case, but I can't rule it out either. There's also the issue that, even if the devices support configurable pitches, the drivers may not implement it. That's fixable, but hardcoding the pitch to 256 bytes without fixing that would be a regression. -- Regards, Laurent Pinchart