Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp715472rdb; Fri, 2 Feb 2024 01:28:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IFW2oxibwwk390tqEhN1YA4yKzrw0Om33MbACto2JYQJpyMmuPItHqODULWVH7GO8+cY4cm X-Received: by 2002:a05:620a:24c9:b0:785:45b3:f8dc with SMTP id m9-20020a05620a24c900b0078545b3f8dcmr5926834qkn.1.1706866138282; Fri, 02 Feb 2024 01:28:58 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706866138; cv=pass; d=google.com; s=arc-20160816; b=j4ZndBcH7Dw1nAyT+PqhYmJIwccOgPtmm+LOXy5Z2J5HAdIxfs42c7lbhACkZqMs78 FYDseHP35wpQuQkuIBvt1JrdHRfSn3KxmA3aNQDQ3tqCj+NXUBxKrVLf2OQIBEx+C9vp MwPJ5TvkU9l57E5t1h2PyaU3kYe+JAVesABiBTNcpUkdYMW7z4n4lMX48eQYHjdzZbLm D5BIEqnGzA+ITERfBRNRIvc7xZ/k+G8773B0yYrNmZKj0g/a5X+mHhPWbmtYH4tcXE7c Pf7sY5PWnBve6erx/FBY6f5H4G6FVNQK4jHhYbha3skHh9EMXoj+RH21ggmj/bFcM95m K7dA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:organization:references :in-reply-to:message-id:subject:cc:to:from:date:dkim-signature; bh=2efg9wk2C4VI6y/ULepSR89HvTsqcQDUyUZlb+CaPD0=; fh=A09GIaE06k6xAegDjL7ALx9AWuiAiU0OtxwNKsp88QU=; b=DRSejQDQB2/vkQuOFzp5Oyr/sWml8oXW28169ARh9NYt8iX24xFMfwhS6OYEsjmgB9 v2hmi8u0ggb7/M5ginndZOepp25B3D9Dig6M/JOjjQhybHIeETTaZ7REoE4oxIPHtyc5 94Dj0M/8DJFpSi4LxtsYg6vFKtOi5YO73Yporu7eLT9EXrnbAqGWv8OCzfI6eU60E1GR smR/PmK9ygLrXICMMCB3AUN7Ya5EfKY0pmO7kaG5dKwL83fj2R74yEusHIa4GmiDrLIr 1cE5NbjQcYL1Uzhw0R3K+S/ph4eTQNIN3s3B+QekrRnWwW2Sp89W2dopdXODYrFPDFOC oW1Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=AvLo5nUK; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-49575-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49575-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com X-Forwarded-Encrypted: i=1; AJvYcCX+wbpv8CNpAFUT/tJ7OatxnwCWr0deqJmGXlww5KDnoxmCOfBZIdrsWk8BduJp+4aExLP9q4E/XlSt23f7jNtETxheETkhXaTAmQFL+w== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id h26-20020a05620a21da00b0078400d7f282si1515962qka.725.2024.02.02.01.28.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 01:28:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49575-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=AvLo5nUK; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-49575-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49575-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 0F2A81C26C05 for ; Fri, 2 Feb 2024 09:28:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BB39077F32; Fri, 2 Feb 2024 09:26:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="AvLo5nUK" Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C131C77F10 for ; Fri, 2 Feb 2024 09:26:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.196 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706865969; cv=none; b=mmkkNoloIGptz7EO8DdushciB5Rx4MB4RfjVVf4DzhwhrMyT33h+NiadI0Z9bFfhSOk5zV1GEHRWQMybX6epQx+dDShko95fvdeQb2gm2c24TC0hIQTLLBL779PoPEFircGeeTiJsS0qCnjE6U76pq3EIC4tY7rHqsKdO/0QZYM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706865969; c=relaxed/simple; bh=2efg9wk2C4VI6y/ULepSR89HvTsqcQDUyUZlb+CaPD0=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=UlznGs+nAqBNgrfMRCqURMQqvQQ+w2F76/5hSuUF4GJUh7rqQfJozCYafpURgsNXqAKF8ausGYDb4iM3jn2pr4kvH453+BDYG+su/KP5Q430nSlZm7vO8v8Jmm4FaQoQvlcZ8nqaKNdhNtnK4kcYmm/yHHdsOtowe3OMgsR8IKM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=AvLo5nUK; arc=none smtp.client-ip=217.70.183.196 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 58138E000A; Fri, 2 Feb 2024 09:26:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1706865965; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2efg9wk2C4VI6y/ULepSR89HvTsqcQDUyUZlb+CaPD0=; b=AvLo5nUKWxkD6+kvpqxMZ7XPPJNIO/PQWzhBM+K1am2dN8AncVyUrW9Q+of0m0It9WxzPC JQWlqgnbPzFhVzgroizK4cB7b+ISJOn8xe4LVookunZzYBFILVGpUZRvjdnXH7ILgFcTWc PS68lOBl36Q1nGcNbH+ninf58TsT7puu2NI3Ti1GLbOR8VcOyrZxQ4U4XieWdfxM+oQRTA m/73zQNtfMeM+37E/jn5glv+AsGGmkKxdZWQ0lr9jTJDPcOXJX0I61KwseCtKmg5NY6k+i d6/Th743wUg3UFEp+i0PY7josLuEQx54VcpWDImFD/md1uGpQ/lrSHP+0bgGnw== Date: Fri, 2 Feb 2024 10:26:01 +0100 From: Miquel Raynal To: Pekka Paalanen Cc: Louis Chauvet , Rodrigo Siqueira , Melissa Wen , =?UTF-8?B?TWHDrXJh?= Canal , Haneen Mohammed , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , marcheu@google.com, seanpaul@google.com, nicolejadeyee@google.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com Subject: Re: [PATCH 2/2] drm/vkms: Use a simpler composition function Message-ID: <20240202102601.70b6d49c@xps-13> In-Reply-To: <20240202105522.43128e19@eldfell> References: <20240201-yuv-v1-0-3ca376f27632@bootlin.com> <20240201-yuv-v1-2-3ca376f27632@bootlin.com> <20240202105522.43128e19@eldfell> Organization: Bootlin X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: miquel.raynal@bootlin.com Hi Pekka, pekka.paalanen@haloniitty.fi wrote on Fri, 2 Feb 2024 10:55:22 +0200: > On Thu, 01 Feb 2024 18:31:32 +0100 > Louis Chauvet wrote: >=20 > > Change the composition algorithm to iterate over pixels instead of line= s. > > It allows a simpler management of rotation and pixel access for complex= formats. > >=20 > > This new algorithm allows read_pixel function to have access to x/y > > coordinates and make it possible to read the correct thing in a block > > when block_w and block_h are not 1. > > The iteration pixel-by-pixel in the same method also allows a simpler > > management of rotation with drm_rect_* helpers. This way it's not needed > > anymore to have misterious switch-case distributed in multiple places. = =20 >=20 > Hi, >=20 > there was a very good reason to write this code using lines: > performance. Before lines, it was indeed operating on individual pixels. >=20 > Please, include performance measurements before and after this series > to quantify the impact on the previously already supported pixel > formats, particularly the 32-bit-per-pixel RGB variants. >=20 > VKMS will be used more and more in CI for userspace projects, and > performance actually matters there. >=20 > I'm worrying that this performance degradation here is significant. I > believe it is possible to keep blending with lines, if you add new line > getters for reading from rotated, sub-sampled etc. images. That way you > don't have to regress the most common formats' performance. While I understand performance is important and should be taken into account seriously, I cannot understand how broken testing could be considered better. Fast but inaccurate will always be significantly less attractive to my eyes. I am in favor of making this working first, and then improving the code for faster results. Maybe the line-driven approach can be dedicated to "simpler" formats where more complex corner cases do not happen. But for now I don't see the point in comparing performances between broken and (hopefully) non broken implementations. Thanks, Miqu=C3=A8l