Received: by 2002:a05:7208:3188:b0:7e:5202:c8b4 with SMTP id r8csp792104rbd; Fri, 23 Feb 2024 03:58:10 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVI16Ywd9XuyUq2DEEZRY5dhKrc40DpssV4w9eP7RifxU0Mcaua+i12thNJU52uaQ8kar8UySujYmx1taDX4CV8KZQAlv+vD1KLVJbStg== X-Google-Smtp-Source: AGHT+IEU7TuyobmwQ+oCjiP1rjooISyjqxySk5zfxog40C3ucg2oRxyV96sLCPDnW3ZT59lvrMaQ X-Received: by 2002:a05:6870:3c0c:b0:21f:aa57:4637 with SMTP id gk12-20020a0568703c0c00b0021faa574637mr854822oab.58.1708689489985; Fri, 23 Feb 2024 03:58:09 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708689489; cv=pass; d=google.com; s=arc-20160816; b=Ev6MZZiAUa7vMG84XSxA9Vc7xXdxUKQIaoTd8kHYGc7kaTO3m7RtoLg2yLAAOJuHOr VJBahFdoyI4R9Hf6171T1ZKkZdjBpbNu3gjlpqt1l969oZ7K9zY2Qpk2W6FLN9WD+JRv ZlVi3Oc7zPzKDORpI6c8BAB7iRcVuGrqGujiNaonShFUhvJYkpcQ/oopvHVrItdqu2PY c7LZ7IRInIIbSQwWOXHuvSGyV8o5E9fYDMd86Z9GvmxSsuoqZybrASPzSFb1DCDQVn61 3iGE612huEPjeN2nX6tJsaJwFU+w4HvM1mfZULu/I8D4B8JzFMqenLSAIzhl7x0DZ7wk CAeQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=fkGKhLouHdENbNHMCQJmihm4d2KVjEEjsY5UV/uQzZw=; fh=Zrpuyen6hFtRGwsEIMCtK1Z1u23sEi1gLI0x4qW9uU8=; b=0oHvsF5yiGlIpEHG3VhoD4NzEDN28mMt+fVHVYmu6T6dDlgm3IZwrKusp7yG1MZ0SO frKyjssjnXCWUWo1P1juhcVhnw6zRaqLZcfR9OsxqGXbuPp1kY5XKnJ09gzwDAY4kLP6 Coqk9B+M9Dhsz1R2t1MYDGA0TdkI0qRRlY+hS7rSszYDv2SsPmWCGa0fPZq/VkSdUWGp +79gLeLz8wn5bTQfbnW65dbRtuEN57ib2NfKzxUaZdoLPsommDB+NpgU1/tn4W4nLN+M BgDByaD3FynbeNUwMaIfz6ULuicIgRuBb0p/EjBcHoM9D7YZ2Nc08yca5na41wnTYM0A bWIw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@riseup.net header.s=squak header.b=VFx8LYLO; arc=pass (i=1 spf=pass spfdomain=riseup.net dkim=pass dkdomain=riseup.net dmarc=pass fromdomain=riseup.net); spf=pass (google.com: domain of linux-kernel+bounces-78259-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78259-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=riseup.net Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id e19-20020a63ee13000000b005d8c5595ddbsi11719242pgi.271.2024.02.23.03.58.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 03:58:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78259-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@riseup.net header.s=squak header.b=VFx8LYLO; arc=pass (i=1 spf=pass spfdomain=riseup.net dkim=pass dkdomain=riseup.net dmarc=pass fromdomain=riseup.net); spf=pass (google.com: domain of linux-kernel+bounces-78259-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78259-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=riseup.net 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 6745E285B8F for ; Fri, 23 Feb 2024 11:58:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9C6167AE71; Fri, 23 Feb 2024 11:58:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=riseup.net header.i=@riseup.net header.b="VFx8LYLO" Received: from mx1.riseup.net (mx1.riseup.net [198.252.153.129]) (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 A0B3C7AE65 for ; Fri, 23 Feb 2024 11:58:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.252.153.129 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708689483; cv=none; b=pYIg6kncaZ5/qMSrKV2B3+Apeh7bKzYoN8OXJMHH5DnIN5esBYSqvdHt3xWn09MqzZ5KJm7p+WIARq9IQ1VODf7GhlnDF1qtePDdATmgc4gJ5tL591Y9E62Utv0Z4qNOrsexxhnGDWao/FWOAnWYljcQWvG5KoClMaIo5EZSlJI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708689483; c=relaxed/simple; bh=OUmiIYV1ZOxPQwwDzWBugUjrO/94kZzGcCCUhw19TKo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=UwjVC8f71FLQZpOlJIWK5dfACeKKfT/E1XqDH1PcIy0s6koi/nv1DoDgDyLfOXxvb/9iZ7HAfGA9oEhQZihK93N9jX0JUVlmYbpUWLbtVZ4prWRUyevC2NV3V8V5RmVKRDb9ScLguzQ4e65OWT0Xk8AVv130xb5e6HKQitCIR/g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=riseup.net; spf=pass smtp.mailfrom=riseup.net; dkim=pass (1024-bit key) header.d=riseup.net header.i=@riseup.net header.b=VFx8LYLO; arc=none smtp.client-ip=198.252.153.129 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=riseup.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=riseup.net Received: from mx0.riseup.net (mx0-pn.riseup.net [10.0.1.42]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx1.riseup.net (Postfix) with ESMTPS id 4Th7g32jqZzDqP1 for ; Fri, 23 Feb 2024 11:52:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1708689167; bh=OUmiIYV1ZOxPQwwDzWBugUjrO/94kZzGcCCUhw19TKo=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=VFx8LYLOZmIhQp8rg646zyQMKTWhjrjgJOKt4Q4GITfYo6/MMPpsCPkqpJQx1u1QK 4SRtKwTasjQzUWK6A3hqzLP9tzNaMwQiRe2h5tGHu+NJ5apgU6a4U9C6CY9df6zfNq N/mvBySley4kW3od04tNf4CnDkBY7u8woeH4nzfc= Received: from fews02-sea.riseup.net (fews02-sea-pn.riseup.net [10.0.1.112]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx0.riseup.net (Postfix) with ESMTPS id 4Th7fx1tgFz9wx0; Fri, 23 Feb 2024 11:52:41 +0000 (UTC) X-Riseup-User-ID: 0EF8E654CC1AEAB381F9584BCE1A40612DF66BFDD921DB16F4891EE24A96A184 Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews02-sea.riseup.net (Postfix) with ESMTPSA id 4Th7fr1hYYzFsSY; Fri, 23 Feb 2024 11:52:35 +0000 (UTC) Message-ID: <282a368c-6713-4c36-8713-4e081025b0bb@riseup.net> Date: Fri, 23 Feb 2024 08:52:33 -0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH v2 0/9] drm/vkms: Reimplement line-per-line pixel conversion for plane reading Content-Language: en-US To: Louis Chauvet , Rodrigo Siqueira , Melissa Wen , Haneen Mohammed , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , arthurgrillo@riseup.net, Jonathan Corbet Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, jeremie.dautheribes@bootlin.com, miquel.raynal@bootlin.com, thomas.petazzoni@bootlin.com References: <20240223-yuv-v2-0-aa6be2827bb7@bootlin.com> From: Maira Canal In-Reply-To: <20240223-yuv-v2-0-aa6be2827bb7@bootlin.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi Louis, On 2/23/24 08:37, Louis Chauvet wrote: > This patchset is the second version of [1]. It is almost a complete > rewrite to use a line-by-line algorithm for the composition. > It can be divided in three parts: > - PATCH 1 to 4: no functional change is intended, only some formatting and > documenting > (PATCH 2 is taken from [2]) > - PATCH 5: main patch for this series, it reintroduce the > line-by-line algorithm > - PATCH 6 to 9: taken from Arthur's series [2], with sometimes adaptation > to use the pixel-by-pixel algorithm. > > The PATCH 5 aims to restore the line-by-line pixel reading algorithm. It > was introduced in 8ba1648567e2 ("drm: vkms: Refactor the plane composer to > accept new formats") but removed in 8ba1648567e2 ("drm: vkms: Refactor the > plane composer to accept new formats") in a over-simplification effort. > At this time, nobody noticed the performance impact of this commit. After > the first iteration of my series, poeple notice performance impact, and it > was the case. Pekka suggested to reimplement the line-by-line algorithm. > > Expiriments on my side shown great improvement for the line-by-line > algorithm, and the performances are the same as the original line-by-line > algorithm. I targeted my effort to make the code working for all the > rotations and translations. The usage of helpers from drm_rect_* avoid > reimplementing existing logic. > > The only "complex" part remaining is the clipping of the coordinate to > avoid reading/writing outside of src/dst. Thus I added a lot of comments > to help when someone will want to add some features (framebuffer resizing > for example). > > The YUV part is not mandatory for this series, but as my first effort was > to help the integration of YUV, I decided to rebase Arthur's series on > mine to help. I took [3], [4], [5] and [6] and adapted them to use the > line-by-line reading. If I did something wrong here, please let me > know. > > My series was mainly tested with: > - kms_plane (for color conversions) > - kms_rotation_crc (for rotations of planes) > - kms_cursor_crc (for translations) > The benchmark used to measure the improvment was done with: > - kms_fb_stress > > [1]: https://lore.kernel.org/r/20240201-yuv-v1-0-3ca376f27632@bootlin.com > [2]: https://lore.kernel.org/all/20240110-vkms-yuv-v2-0-952fcaa5a193@riseup.net/ > [3]: https://lore.kernel.org/all/20240110-vkms-yuv-v2-3-952fcaa5a193@riseup.net/ > [4]: https://lore.kernel.org/all/20240110-vkms-yuv-v2-5-952fcaa5a193@riseup.net/ > [5]: https://lore.kernel.org/all/20240110-vkms-yuv-v2-6-952fcaa5a193@riseup.net/ > [6]: https://lore.kernel.org/all/20240110-vkms-yuv-v2-7-952fcaa5a193@riseup.net/ > > To: Rodrigo Siqueira > To: Melissa Wen > To: Maíra Canal > To: Haneen Mohammed > To: Daniel Vetter > To: Maarten Lankhorst > To: Maxime Ripard > To: Thomas Zimmermann > To: David Airlie > To: arthurgrillo@riseup.net > To: Jonathan Corbet > Cc: dri-devel@lists.freedesktop.org > Cc: linux-kernel@vger.kernel.org > Cc: jeremie.dautheribes@bootlin.com > Cc: miquel.raynal@bootlin.com > Cc: thomas.petazzoni@bootlin.com > Signed-off-by: Louis Chauvet > > Note: after my changes, those tests seems to pass, so [7] may need > updating (I did not check, it was maybe already the case): > - kms_cursor_legacy@flip-vs-cursor-atomic > - kms_pipe_crc_basic@nonblocking-crc > - kms_pipe_crc_basic@nonblocking-crc-frame-sequence > - kms_writeback@writeback-pixel-formats > - kms_writeback@writeback-invalid-parameters > - kms_flip@flip-vs-absolute-wf_vblank-interruptible > And those tests pass, I did not investigate why the runners fails: > - kms_flip@flip-vs-expired-vblank-interruptible > - kms_flip@flip-vs-expired-vblank > - kms_flip@plain-flip-fb-recreate > - kms_flip@plain-flip-fb-recreate-interruptible > - kms_flip@plain-flip-ts-check-interruptible > - kms_cursor_legacy@cursorA-vs-flipA-toggle > - kms_pipe_crc_basic@nonblocking-crc > - kms_prop_blob@invalid-get-prop > - kms_flip@flip-vs-absolute-wf_vblank-interruptible > - kms_invalid_mode@zero-hdisplay > - kms_invalid_mode@bad-vtotal > - kms_cursor_crc.* (everything is SUCCEED or SKIP, but no fails) This is great news! Could you just adjust the series fixing the compiling errors? Best Regards, - Maíra > > [7]: https://lore.kernel.org/all/20240201065346.801038-1-vignesh.raman@collabora.com/ > > Changes in v2: > - Rebased the series on top of drm-misc/drm-misc-net > - Extract the typedef for pixel_read/pixel_write > - Introduce the line-by-line algorithm per pixel format > - Add some documentation for existing and new code > - Port the series [1] to use line-by-line algorithm > - Link to v1: https://lore.kernel.org/r/20240201-yuv-v1-0-3ca376f27632@bootlin.com > > --- > Arthur Grillo (5): > drm/vkms: Use drm_frame directly > drm/vkms: Add YUV support > drm/vkms: Add range and encoding properties to pixel_read function > drm/vkms: Drop YUV formats TODO > drm/vkms: Create KUnit tests for YUV conversions > > Louis Chauvet (4): > drm/vkms: Code formatting > drm/vkms: write/update the documentation for pixel conversion and pixel write functions > drm/vkms: Add typedef and documentation for pixel_read and pixel_write functions > drm/vkms: Re-introduce line-per-line composition algorithm > > Documentation/gpu/vkms.rst | 3 +- > drivers/gpu/drm/vkms/Makefile | 1 + > drivers/gpu/drm/vkms/tests/.kunitconfig | 4 + > drivers/gpu/drm/vkms/tests/Makefile | 3 + > drivers/gpu/drm/vkms/tests/vkms_format_test.c | 155 +++++++ > drivers/gpu/drm/vkms/vkms_composer.c | 233 ++++++++--- > drivers/gpu/drm/vkms/vkms_crtc.c | 6 +- > drivers/gpu/drm/vkms/vkms_drv.c | 3 +- > drivers/gpu/drm/vkms/vkms_drv.h | 56 ++- > drivers/gpu/drm/vkms/vkms_formats.c | 565 +++++++++++++++++++++----- > drivers/gpu/drm/vkms/vkms_formats.h | 13 +- > drivers/gpu/drm/vkms/vkms_plane.c | 50 ++- > drivers/gpu/drm/vkms/vkms_writeback.c | 14 +- > 13 files changed, 916 insertions(+), 190 deletions(-) > --- > base-commit: aa1267e673fe5307cf00d02add4017d2878598b6 > change-id: 20240201-yuv-1337d90d9576 > > Best regards,