Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp865738lqp; Thu, 23 May 2024 02:18:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUPP8qJSTBOKS9pyHjm2AKdx9zfBOJTXWskj+an/1qcovwkgIyLi6Jid84Us2LH9GSGV86Jb02/tU7QAu48XAaW7xIWY9ijuGi4BvloIQ== X-Google-Smtp-Source: AGHT+IFX1mBlNVu7lPB745OpAU7ipYOjcLDRVTfIzruhNwphHQnGQBmtyN7rmdwoKh1Z6jMbf4F0 X-Received: by 2002:a05:6870:9691:b0:23f:a97d:20ae with SMTP id 586e51a60fabf-24c68adfc59mr4813393fac.23.1716455912083; Thu, 23 May 2024 02:18:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716455912; cv=pass; d=google.com; s=arc-20160816; b=JIHWYsSse8FVK5tiBxPz/XFGbVxd5QIwgxCmE43uFUH4zffgahsRQwvySSFtHmKgHc Dg0HqXAWdYl5ePIdoaXSjIy3aJGmtPKdwVJ3Nb7du7/mNtSggAy0f31IdXI2d9ZHkVGJ 8CXTWaLk+Nlw255r77UTljfk+3phpjst0PCJovkacxnqOmfJ/gXvwT5RN3y6NbNEnDBZ AU5Clp2IQfjgnR76OD1mkKsJ2Z9A+SrnI8S67pm0iFwz+5gGlilvzl265Gl17jbsyz2z 0FKieBjZv8V6JYh0jFAPP2dnEOCk9XfvrCRTP4C6utHPG/wQEwhPogV+mWrZ4brhAZ9O SxbA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=hq01rfxiJkhZS3QzRfqemO50XhU1PhV9rUGPBC31chs=; fh=DL4T/P1WeFqCVb2fWmgkmtYcBi1QEOZOggPgRZ3ul7Q=; b=gaktuplgfS77Up9p1SQuhga4BIiwX4nNR8KKpkgPyJSvc+GMiurkK+1yLzUJ7woSXE kWycZ/mgePmJ01YUf8jxbFTfShf1AZ8QLneJsa1iBWAJ9K2QaWYQGzMc8lW99YN6AmYP bjNwvfgtmCbEH3NX0JXtRLfbOPlDOHa0TFoW/MtIEmLoxgnLK2Th8uR4/QAeUJ4t17Vb 2P9ddu7CMCdA0RsIhpRRoygwcjz38Izg0un4u+h+wdS0k2/YMqHbh2VMxMFD56D1RjYM k6SgW2938WCDFgMIDDHeU/Fe9mT55rLYxCsP1WKXQB0nL650nqVBY8iv94q7ZtuVCk+z gjBg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=duIunlHh; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-187231-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-187231-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d2e1a72fcca58-6f67a6da7f8si8796819b3a.157.2024.05.23.02.18.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 02:18:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-187231-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=duIunlHh; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-187231-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-187231-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 ADD8D281F27 for ; Thu, 23 May 2024 09:18:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2D68713D24C; Thu, 23 May 2024 09:18:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="duIunlHh" Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A018A13C9BD for ; Thu, 23 May 2024 09:18:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716455904; cv=none; b=nuzSl4gx763Tb1wZ5Ds51wVtLCe0GEeIltZdBHcxw/irg2wV60wP+YtgX47xrRqZwh/eywwp4hGLtXcHnLBZ1BfHriv8xhfL/9bqD/+ZiCneBly44irokbaRjuG+YbV0LPwKspNmNZcATPuW+OhY/4AgHRpdMQ/Plf2WWOOlw2k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716455904; c=relaxed/simple; bh=RGxM2jOVFTwquoP32KsAE1HBbRxX9MhiaEXuZQ252p4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=hbZJ2VC0lMGbThCrV8E9BzwQMmv2YzJQFt6Iy1Nuvm4VgSp6nWr1+I3aHqRmajydYldrhC1p9fXU6t7CDQNwjIy5u+3JkcQjYprkeCjMKrdWeMCRRNhJMdj8pOQZf2pfI97kO8oLAprcA51/ehdlvzj7tuyXZzGV/pRqldyJXfA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=duIunlHh; arc=none smtp.client-ip=209.85.208.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lj1-f175.google.com with SMTP id 38308e7fff4ca-2e73359b8fbso41095711fa.2 for ; Thu, 23 May 2024 02:18:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716455901; x=1717060701; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=hq01rfxiJkhZS3QzRfqemO50XhU1PhV9rUGPBC31chs=; b=duIunlHhbEkvY9GRSWx0dzNEMcEoEb4mv5KxsGMvI/ybm8E2dXOgTTEKyFdvM48nnM pIKTbk9SCPTESHlRvV1SVCRF3kwfqs2FakFwIwrKWZ5wnHK8wYYKxlFxGmBGxLQ1opye Wt/W6Cx6AllnosgtjEiWfkWEELISXjB1uJY5SJmYSdFSbUpYbMJdloAywFgVkK6T+Zfb womBoap+dfgKvrUDqqWgHYvU1sdw+s4GcDEBIf7NGKyjIDDppTgh4tNhTzaFWvTX40e6 hqyhjY2IyV/PsmHzi2GCKHYPeW2z8yOjat3JB6deo9ea/buc98AHPh5DIsdhpr9w33v4 ruYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716455901; x=1717060701; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=hq01rfxiJkhZS3QzRfqemO50XhU1PhV9rUGPBC31chs=; b=UV1DYUrYfz49V1mQzb+DhohF3WnH5ZGKvAxCwHQULO2LqWUqEc93pu1bpop37I7w+x 7rFasbhIuHpTiKBOYctTKWNqZvIO6rgIuYau8Oy/2HZXN39dvPi3jAaUL5FggDeSLGLf QFVsstOq91OuNsj5Bhylgib0sT0zk73cM32iXBGYYjowGIF2auyGPXQVCMlVrAQqz7xR Arv2se6lJhJNYvx6hhCoGvcvhlOa+oazrC9tjckQREwJ5OfChMroHordpzZx/wvEOLhg 4zDEcj74DVIFTXV3CeMTxt4vvlhwDcNr8a9S31DAcf4fKqPh0FpuRpj6q5wGTDHfcyS8 zRZg== X-Forwarded-Encrypted: i=1; AJvYcCWWvAfhUb64hdDo7DwOmugijiogbRc6jOOmLgfmkUmVXRv+FmZIfaLgiCQhuHsP8OaIUXjyOk+wmPVwnOTT2VbXv01i5Bfl88LhSKnM X-Gm-Message-State: AOJu0YydaE9ntS/NHx9I7aH8HPvc9ACm7ZSMptUVq/NT/aBstGPSFMoJ XoLp0d09Ye+jSM+0pUu77WH6lEcLoyXE22hmsyd2X5dsXmpHESBkQIx2WVWq9LE= X-Received: by 2002:a2e:a792:0:b0:2e9:564a:db29 with SMTP id 38308e7fff4ca-2e9564ade37mr5621401fa.29.1716455900802; Thu, 23 May 2024 02:18:20 -0700 (PDT) Received: from eriador.lumag.spb.ru (dzdbxzyyyyyyyyyyyykxt-3.rev.dnainternet.fi. [2001:14ba:a0c3:3a00::227]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2e5686b802asm36602901fa.95.2024.05.23.02.18.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 02:18:20 -0700 (PDT) Date: Thu, 23 May 2024 12:18:18 +0300 From: Dmitry Baryshkov To: Maxime Ripard Cc: Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Jonathan Corbet , Sandy Huang , Heiko =?utf-8?Q?St=C3=BCbner?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Andy Yan , Hans Verkuil , Sebastian Wick , Ville =?utf-8?B?U3lyasOkbMOk?= , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-sunxi@lists.linux.dev, Dave Stevenson Subject: Re: [PATCH v14 08/28] drm/tests: Add output formats tests Message-ID: References: <20240521-kms-hdmi-connector-state-v14-0-51950db4fedb@kernel.org> <20240521-kms-hdmi-connector-state-v14-8-51950db4fedb@kernel.org> 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=us-ascii Content-Disposition: inline In-Reply-To: <20240521-kms-hdmi-connector-state-v14-8-51950db4fedb@kernel.org> On Tue, May 21, 2024 at 12:13:41PM +0200, Maxime Ripard wrote: > Now that we track the HDMI output format as part of the connector state, > let's add a few tests to make sure it works as expected. > > Reviewed-by: Dave Stevenson > Signed-off-by: Maxime Ripard > --- > drivers/gpu/drm/tests/drm_connector_test.c | 99 +++++++++++++++++++++- > drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | 32 +++++++ > 2 files changed, 130 insertions(+), 1 deletion(-) > > + > +KUNIT_ARRAY_PARAM(drm_hdmi_connector_get_output_format_name_valid, > + drm_hdmi_connector_get_output_format_name_valid_tests, > + drm_hdmi_connector_get_output_format_name_valid_desc); > + > +static void drm_test_drm_hdmi_connector_get_output_format_name_invalid(struct kunit *test) > +{ > + KUNIT_EXPECT_NULL(test, drm_hdmi_connector_get_output_format_name(4)); Nit: it might be better to use a bigger value here. It's easier to miss this if other formats get added for whatever reason. Nevertheless: Reviewed-by: Dmitry Baryshkov > +}; > + > +static struct kunit_case drm_hdmi_connector_get_output_format_name_tests[] = { > + KUNIT_CASE_PARAM(drm_test_drm_hdmi_connector_get_output_format_name, > + drm_hdmi_connector_get_output_format_name_valid_gen_params), > + KUNIT_CASE(drm_test_drm_hdmi_connector_get_output_format_name_invalid), > + { } > +}; > + -- With best wishes Dmitry