Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp1854802lqo; Sun, 12 May 2024 23:31:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXcDzXhx469pXl20XPF4OTtHjLYIf3uxqkqudbSO/ffMfnWAoXAeNvb9evbkD3glU+m1wIouaQO2aRgbqdInhEViZn7im7Ufox67FGCOQ== X-Google-Smtp-Source: AGHT+IFSqG+nYUOsCrWwZmu9jfNSqGK8ySGeFOuOwg/vnEyuyZqDeAHL1dy7sjbWC/8Yt5WcRFST X-Received: by 2002:a17:902:e5cd:b0:1e4:4125:806f with SMTP id d9443c01a7336-1ef43d08cedmr100034105ad.11.1715581895877; Sun, 12 May 2024 23:31:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715581895; cv=pass; d=google.com; s=arc-20160816; b=eOXIHMk9tStQrWLAJ+bq0XWJLU9M0z3L4e6tfebX5LCXYrpk5egZmRnW7ft4xGHto3 sQWF5jWg9PpX76fkqg5fDxGTKmG0gT2MBRrLHmNHpmVerBw2a1S072yNUjOEkEUt3R2y WMFB0azWRroKclqnxPbLzD8JPDLNFvT2Lf24oTjkVrYDCRRdUqpvE6TRzFF5ABP1f379 7vYIseDWKqyu9p3aEdd4gAuQ6sjer1d8YEhelT+nq3E4LHnwFyILuTUgIwIylHkfdayT 7Ic671AaWWNDQ2HhDhZ+Pnk21hW0zr7vCKBeBkLNnOpgu3XbAUNu02M2nfooqwlNDuS5 3DmQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:mail-followup-to:message-id:subject:cc:to:from:date :dkim-signature; bh=VfRoAFfC/1PV/3iC+jAvDAhNdr3/rvOcMyIFh+A5RLE=; fh=Ho1ih99otIxrSgkL55hqXdr8J1mkOueX1O0QQqCYknQ=; b=aRUNIGP+2K7kOKbX0bDnlT6vcpClsW0tAoVmB3j/exv2eOBTQQib7y4o7xykIgJ+XJ ZUt4S7jgSjtOhDcjYJhqohLhSDAm5k5nVRgK4xGq6JJKPMueyIZPxzMUd7h/XJmw1dDx dq7PCdJw3E1/q8sfEwlO0SHfyB9SSwfRBpVzTwFfL6a9bFkNpDW+CQI79BkSzM89j6Kk AGINzXs3bz/IBwUWT4su/9643tnk3G8zqOKkMxWluCbF5B9x6dCcXRkjKEVG1ik7BQBg d7nEaDIPS/dgj5ophRGQlCjGaJbx9M/kBgik1lvltDS1+i/kyv29iamca8gN08Qex6wz uw1g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=D94ZXrYs; 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-177203-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177203-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d9443c01a7336-1ef0c147174si81654875ad.468.2024.05.12.23.31.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 May 2024 23:31:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-177203-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=D94ZXrYs; 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-177203-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177203-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 400C0B20D95 for ; Mon, 13 May 2024 06:31:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5411243AD6; Mon, 13 May 2024 06:31:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="D94ZXrYs" 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 B44798468 for ; Mon, 13 May 2024 06:31:27 +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=1715581890; cv=none; b=LWCl2CntvV3ehvy5pLnYXkgn3leH+q6jH1SQPqA1KDR+ALjn0ReHIc9ximVuecbXdibrkTsF1obawZNAEAiyuQppbCxx9hAEFIpoKgb5t5MyHy0KCptTokLo1EAs1Ni9gUVcMSSnlFhyAnPo8QW9PBUtW/tW9+h/3N8tSGG8MwU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715581890; c=relaxed/simple; bh=teoP5Ie0rPmTaLcIaPhr5DO8lyp0/D9rBsJF9A6I4Vw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=HhRW5K47+loX94ZEHPKeV6P+CUXTTV9xqxco8lsjA6E3nB6VAMaHztclhzXXJEZW7ZPFiOfmEZE06GjLOQJUMYtXdHhaXov5R2QFKHNy+7P7t+tSgCn8F45Ii5hRapEN58ROAvWeYSafGflt15Y0/5vkUpYUkBF3gVXy0uUxO7E= 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=D94ZXrYs; 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 59EABE0009; Mon, 13 May 2024 06:31:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1715581879; 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=VfRoAFfC/1PV/3iC+jAvDAhNdr3/rvOcMyIFh+A5RLE=; b=D94ZXrYsv0C3e3g1KLqfGtvFsrQmwc5/78CFWP+o/WShVTsybRFJLQ2Pg8IcyaRue3JkDD ADn7ebqLAmz7Vp7+YW7qkeNxnjcViTJX/Axrp+LKxIrSwLL/7tKFkOPTZay7DYxJVvmjRD GTJYx6SzalaL4eGRfOHLWWAJiDo9w82cXlQxmPREzhtutkYxOgVz0ZLQqoW94GYMX9subN P9/Vrw0UhFRyQ1DTmS+dDvXv/+qP1yMNqien+fSxBtV52xpDx17ix3ORlbVZKaAD6fxQ4L yD0tsfJHGjbJQ4+s4o5AxK7hZv0yOp+fzv8C2PPeqiyMTzICbVpRlH57N11Teg== Date: Mon, 13 May 2024 08:31:15 +0200 From: Louis Chauvet To: Pekka Paalanen Cc: Rodrigo Siqueira , Melissa Wen , =?iso-8859-1?Q?Ma=EDra?= Canal , Haneen Mohammed , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , rdunlap@infradead.org, arthurgrillo@riseup.net, Jonathan Corbet , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, jeremie.dautheribes@bootlin.com, miquel.raynal@bootlin.com, thomas.petazzoni@bootlin.com, seanpaul@google.com, marcheu@google.com, nicolejadeyee@google.com Subject: Re: [PATCH v6 03/17] drm/vkms: write/update the documentation for pixel conversion and pixel write functions Message-ID: Mail-Followup-To: Pekka Paalanen , Rodrigo Siqueira , Melissa Wen , =?iso-8859-1?Q?Ma=EDra?= Canal , Haneen Mohammed , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , rdunlap@infradead.org, arthurgrillo@riseup.net, Jonathan Corbet , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, jeremie.dautheribes@bootlin.com, miquel.raynal@bootlin.com, thomas.petazzoni@bootlin.com, seanpaul@google.com, marcheu@google.com, nicolejadeyee@google.com References: <20240409-yuv-v6-0-de1c5728fd70@bootlin.com> <20240409-yuv-v6-3-de1c5728fd70@bootlin.com> <20240422133358.59fb6221.pekka.paalanen@collabora.com> 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=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240422133358.59fb6221.pekka.paalanen@collabora.com> X-GND-Sasl: louis.chauvet@bootlin.com Le 22/04/24 - 13:33, Pekka Paalanen a ?crit : > On Tue, 09 Apr 2024 15:25:21 +0200 > Louis Chauvet wrote: > > > Add some documentation on pixel conversion functions. > > Update of outdated comments for pixel_write functions. > > > > Signed-off-by: Louis Chauvet > > --- > > drivers/gpu/drm/vkms/vkms_composer.c | 7 ++++ > > drivers/gpu/drm/vkms/vkms_drv.h | 15 ++++++++- > > drivers/gpu/drm/vkms/vkms_formats.c | 62 ++++++++++++++++++++++++++++++------ > > 3 files changed, 74 insertions(+), 10 deletions(-) > > > > diff --git a/drivers/gpu/drm/vkms/vkms_composer.c b/drivers/gpu/drm/vkms/vkms_composer.c > > index c6d9b4a65809..da0651a94c9b 100644 > > --- a/drivers/gpu/drm/vkms/vkms_composer.c > > +++ b/drivers/gpu/drm/vkms/vkms_composer.c > > @@ -189,6 +189,13 @@ static void blend(struct vkms_writeback_job *wb, > > > > size_t crtc_y_limit = crtc_state->base.crtc->mode.vdisplay; > > > > + /* > > + * The planes are composed line-by-line to avoid heavy memory usage. It is a necessary > > + * complexity to avoid poor blending performance. > > + * > > + * The function vkms_compose_row is used to read a line, pixel-by-pixel, into the staging > > + * buffer. > > + */ > > for (size_t y = 0; y < crtc_y_limit; y++) { > > fill_background(&background_color, output_buffer); > > > > diff --git a/drivers/gpu/drm/vkms/vkms_drv.h b/drivers/gpu/drm/vkms/vkms_drv.h > > index b4b357447292..a86cb537d6aa 100644 > > --- a/drivers/gpu/drm/vkms/vkms_drv.h > > +++ b/drivers/gpu/drm/vkms/vkms_drv.h > > @@ -25,6 +25,17 @@ > > > > #define VKMS_LUT_SIZE 256 > > > > +/** > > + * struct vkms_frame_info - structure to store the state of a frame > > + * > > + * @fb: backing drm framebuffer > > + * @src: source rectangle of this frame in the source framebuffer > > + * @dst: destination rectangle in the crtc buffer > > Are both src and dst using whole pixel units, or is src using 1/65536th > pixel units? dst is in whole pixels, src in 1/65536 yes, I will clarify. > Asking because UAPI has src rect in 16.16 fixed-point, IIRC. > > With that clarified: > > Acked-by: Pekka Paalanen [...] -- Louis Chauvet, Bootlin Embedded Linux and Kernel engineering https://bootlin.com