Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp8018253ioo; Fri, 3 Jun 2022 20:06:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygNKWRzlOUNtpsDHIqg+fdgylh10qiHa1hc12JAOSZfVX30A56o2JIJ63ksN1QMl4vOmr8 X-Received: by 2002:a05:6402:528c:b0:42d:cf7e:bc87 with SMTP id en12-20020a056402528c00b0042dcf7ebc87mr14417268edb.70.1654312000026; Fri, 03 Jun 2022 20:06:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654312000; cv=none; d=google.com; s=arc-20160816; b=jy6MbOdC8XQOL+3hMFspbFddTwfmbMWNZQQ7pBZrFGlqeYIfFWI2D6e7TbubxqkmN1 KT8YNM872nmihDefBVlDccV/PjeBChdSaf1b3Jjshy5djEjlP8KDWyv5xIc7vh3ocQHp GJPRlUPixyQ/F9HDHFwyLBelxVYl4Ses/zasSouu6gqhBeUHDMHG8RQ8jHCYYQaLOLaf 9EEmy/HgE8QvbZIG0AfkHKFttOhEf0cdwPbB2Nqt7wdq1rnwSWIxVlqXIH/1P480KWDP 9yShWy0oHCNhe97YlAjfv8ok7tdI3XQUvHHH6QJmhm30kFlbLPRTQVkSOMIDaElG8/2f Uacg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=9egMonS4xdxOgQS+ajnqcSmFBqc/f2gRBFWF00OFM2A=; b=ro12ZEWgrUFsZ40td1ggdclZHdFQHFnzY2YzW/5uFY58N3RvASQfG7Nvhu1DPJNp66 xooqbQ4WITYZ2wx+oR4IDZXVXBAEWZSyUBtDk/6yVwcXKTU2o8bdhGdPOFFvJ1ROEF8S nxAdEC9TTqzD7zVm9x4fCexUjt24nU/dnpb5Z5u3wwzCUo66DngJsKM7FCUCxWSBK1DM 3lOcZGm6ZKR5pNCvLMOXpm0Bf9rAbH3zcSjpVWZllGBBQVnAEwcW32KOLCFoqJrGQYvn mf5/TSAV1XbeL1Qm1/kbAUZhOUY3y/Y6JqZKu3t7zPbXSu9RrXqAFWhYdsxoheKad2/X ltxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=VS+hCyb8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y13-20020aa7ca0d000000b0042b61c014fasi8825135eds.38.2022.06.03.20.06.04; Fri, 03 Jun 2022 20:06:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=VS+hCyb8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237394AbiFBRNR (ORCPT + 99 others); Thu, 2 Jun 2022 13:13:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230138AbiFBRNP (ORCPT ); Thu, 2 Jun 2022 13:13:15 -0400 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDC3B170F3B for ; Thu, 2 Jun 2022 10:13:11 -0700 (PDT) Received: by mail-wr1-x435.google.com with SMTP id e29so1521756wra.11 for ; Thu, 02 Jun 2022 10:13:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=9egMonS4xdxOgQS+ajnqcSmFBqc/f2gRBFWF00OFM2A=; b=VS+hCyb8GERzrt1YCfMxAWT1BrmEOBGdq/wx9c743zw1S3rBLQmESyUGUFuDCOdOSj xbQ6yJ0HGQkXdrXUcxAQu7kN64j8QHzz40+HpIPiO+HXiRWkbyci2VNATlEccSQL4iNs psDfdXjuDFS0rda3Yxx6uMr9HjD3Ms3BKUSwRVVFvS2jveh1gdfOBtrHIvL2ibA9CoGx IJgSqtcpKrARebanmkwEQOb0ItKkAfxRtA7VgeCGw94p3xuBvICJU9NqigNA+LdXqPJe yg3Ufk/MjDnALdn2iugRTXtDVrSImkiRQOiZhWzSh8PG6UcpyxJUH63dSNKPUDqR1MKD aJsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=9egMonS4xdxOgQS+ajnqcSmFBqc/f2gRBFWF00OFM2A=; b=vwz4f2XHTVaIsqML7QPP5i4b7QAYxfzZGjatLo+b3gvbqRienxy0bsB5hrq1+DynsU uNEs2VjnhUwB1frSBL8wuaKGdWfBCiDy2qcVgNnQuhnggp/EJKi8VlajCZ5NsLajqo/C xdzFG/fmLjf6zSb4fKdTlTgGxza5ytpLf6LNm7Lo+4V2KNMIfIPEUFqmdOTQsVSr1Nte dsJxnLdPYqQo6W4mMbUe2bjaROlC8+IQYGOHYWeRjdlx6gF7qUwmBj+l+mPgZkOtJgPS KtOlTZfixL4VGLjbX6M5MB6ie7BL+0OyxJ5b6f6GmrXnWSSJAzc5gC0WSsbVdegepfkO fZcg== X-Gm-Message-State: AOAM530PUqoCWJsL/s00ZHLQK97b0UHVzTiBgLKorU04C+2R+ydElCB4 dx16x1V2R4fyeoWlZdEUllW/S4Up80hhF+VBI+tUVg== X-Received: by 2002:a5d:5342:0:b0:210:c508:956d with SMTP id t2-20020a5d5342000000b00210c508956dmr4584749wrv.205.1654189990220; Thu, 02 Jun 2022 10:13:10 -0700 (PDT) MIME-Version: 1.0 References: <20220530102017.471865-1-jose.exposito89@gmail.com> <20220530102017.471865-2-jose.exposito89@gmail.com> <20220530131158.kqq2mohxoh52xpeg@penduick> <20220530162903.GA6546@elementary> In-Reply-To: <20220530162903.GA6546@elementary> From: David Gow Date: Thu, 2 Jun 2022 10:12:59 -0700 Message-ID: Subject: Re: [RFC PATCH 1/1] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_rgb332() To: =?UTF-8?B?Sm9zw6kgRXhww7NzaXRv?= Cc: Maxime Ripard , KUnit Development , Javier Martinez Canillas , tzimmermann@suse.de, maarten.lankhorst@linux.intel.com, David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 30, 2022 at 9:29 AM Jos=C3=A9 Exp=C3=B3sito wrote: > > Hi Maxime, > > On Mon, May 30, 2022 at 03:11:58PM +0200, Maxime Ripard wrote: > > > > Hi, > > > > On Mon, May 30, 2022 at 12:20:17PM +0200, Jos=C3=A9 Exp=C3=B3sito wrote= : > > > Test the conversion from XRGB8888 to RGB332. > > > > > > What is tested? > > > > > > - Different values for the X in XRGB8888 to make sure it is ignored > > > - Different clip values: Single pixel and full and partial buffer > > > - Well know colors: White, black, red, green, blue, magenta, yellow > > > and cyan > > > - Other colors: Randomly picked > > > - Destination pitch > > > > > > Suggested-by: Javier Martinez Canillas > > > Signed-off-by: Jos=C3=A9 Exp=C3=B3sito > > > > It looks mostly good to me, but I think we should Cc > > kunit-dev@googlegroups.com to have their feedback. > > Thanks a lot for the quick feedback. > > I just cc'ed kunit-dev@googlegroups.com. For anyone joining the > conversation, here is the link to the patch and the cover letter with > some questions: > > https://lore.kernel.org/dri-devel/20220530102017.471865-1-jose.exposito89= @gmail.com/T/ > > > > > > --- > > > drivers/gpu/drm/Kconfig | 12 ++ > > > drivers/gpu/drm/Makefile | 3 + > > > drivers/gpu/drm/drm_format_helper_test.c | 166 +++++++++++++++++++++= ++ > > > 3 files changed, 181 insertions(+) > > > create mode 100644 drivers/gpu/drm/drm_format_helper_test.c > > > > > > diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig > > > index e88c497fa010..d92be6faef15 100644 > > > --- a/drivers/gpu/drm/Kconfig > > > +++ b/drivers/gpu/drm/Kconfig > > > @@ -76,6 +76,18 @@ config DRM_KMS_HELPER > > > help > > > CRTC helpers for KMS drivers. > > > > > > +config DRM_FORMAR_HELPER_TEST > > > + bool "drm_format_helper tests" if !KUNIT_ALL_TESTS > > > + depends on DRM && KUNIT=3Dy > > > + select DRM_KMS_HELPER > > > + default KUNIT_ALL_TESTS > > > + help > > > + KUnit tests for the drm_format_helper APIs. This option is not > > > + useful for distributions or general kernels, but only for kerne= l > > > + developers working on DRM and associated drivers. > > > + > > > + If in doubt, say "N". > > > + > > > > AFAIK, kunit test cases are supposed to have a .kunitconfig too to > > enable the kunit tests easily. > > > > Maxime > > A .kuniconfig example is present in the cover letter. (...) FYI: it's also possible to run these tests under UML with the extra options= : CONFIG_VIRTIO_UML=3Dy CONFIG_UML_PCI_OVER_VIRTIO=3Dy I suspect it's probably better not to add those to your .kunitconfig, as they're UML-specific and will therefore break other architectures, but it does mean the tests can be run with, for example: ./tools/testing/kunit/kunit.py run --kunitconfig drivers/gpu/drm/.kunitconfig --kconfig_add CONFIG_VIRTIO_UML=3Dy --kconfig_add CONFIG_UML_PCI_OVER_VIRTIO=3Dy Or, without the .kunitconfig: ./tools/testing/kunit/kunit.py run --kconfig_add CONFIG_DRM=3Dy --kconfig_add CONFIG_DRM_FORMAR_HELPER_TEST=3Dy --kconfig_add CONFIG_VIRTIO_UML=3Dy --kconfig_add CONFIG_UML_PCI_OVER_VIRTIO=3Dy 'drm-*' Cheers, -- David