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 6966AE748E9 for ; Sun, 1 Oct 2023 09:11:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5C40410E0D0; Sun, 1 Oct 2023 09:11:37 +0000 (UTC) Received: from fanzine2.igalia.com (fanzine.igalia.com [178.60.130.6]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2FD8410E0D0; Sun, 1 Oct 2023 09:11:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Ee471ciaPlX0phSy+SQV96SmG4ukJhTbdg8H1e3PVh0=; b=c28dziJqYoePmgk8MekJaVi7Go gB6rE/E49eV49+3XNS3BBdtWbIreQJvCBHzVWBbnG6o8nGYC8LQND8FhzAvmGHVYdt2c5KF3RPIAU NBcs2G2hyRWjVm2nQ+oZwkSLEET8uRI89N7QbslE5JoDqJJvOA7VoMJ4QJIGG+H8EUZaRpmu2QsYR ssWy0z3sol9olRLGkzFyhYtToUg/s61C2UA8Zx8KoxkSJeYTOamZDELdPcI5F4OJuIGu+WsZob11Y spisS75Cgol3OTvb7uv4/MdFP+Ki2+D7AwJ2901xQL2rIjwHkhYP9iVrPuLnB64K+0F1BoZgYJggC W9q20amg==; Received: from [206.0.75.64] (helo=[192.168.205.76]) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_128_GCM:128) (Exim) id 1qmsU0-00AK31-Jw; Sun, 01 Oct 2023 11:11:25 +0200 Message-ID: <4202076c-bbdb-4c1f-a3e3-45235fb390ae@igalia.com> Date: Sun, 1 Oct 2023 11:10:24 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 2/2] drm: Replace drm_framebuffer plane size functions with its equivalents Content-Language: en-US To: Carlos Eduardo Gallo Filho References: <20230926141519.9315-1-gcarlos@disroot.org> <20230926141519.9315-3-gcarlos@disroot.org> From: =?UTF-8?Q?Andr=C3=A9_Almeida?= In-Reply-To: <20230926141519.9315-3-gcarlos@disroot.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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: , Cc: Tvrtko Ursulin , Juha-Pekka Heikkila , Tales Aparecida , intel-gfx@lists.freedesktop.org, Maxime Ripard , Maira Canal , Matt Roper , dri-devel@lists.freedesktop.org, Thomas Zimmermann , Rodrigo Vivi , Niranjana Vishwanathapura , Arthur Grillo Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On 9/26/23 16:15, Carlos Eduardo Gallo Filho wrote: > The functions drm_framebuffer_plane_{width,height} and > fb_plane_{width,height} do exactly the same job of its > equivalents drm_format_info_plane_{width,height} from drm_fourcc. > > The only reason to have these functions on drm_framebuffer > would be if they would added a abstraction layer to call it just > passing a drm_framebuffer pointer and the desired plane index, > which is not the case, where these functions actually implements > just part of it. In the actual implementation, every call to both > drm_framebuffer_plane_{width,height} and fb_plane_{width,height} should > pass some drm_framebuffer attribute, which is the same as calling the > drm_format_info_plane_{width,height} functions. > > The drm_format_info_pane_{width,height} functions are much more > consistent in both its implementation and its location on code. The > kind of calculation that they do is intrinsically derivated from the > drm_format_info struct and has not to do with drm_framebuffer, except > by the potential motivation described above, which is still not a good > justification to have drm_framebuffer functions to calculate it. > > So, replace each drm_framebuffer_plane_{width,height} and > fb_plane_{width,height} call to drm_format_info_plane_{width,height} > and remove them. > > Signed-off-by: Carlos Eduardo Gallo Filho Reviewed-by: André Almeida