Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1871720rbb; Tue, 27 Feb 2024 04:08:29 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVTsgqAcMFeePSsSiCbK5XDIa8OVXvudzkHDWPWnBBcgT1ekVvdJBL3cBLfnw7uv4yKtARD+iHc56F6JquO7soew9zA6Uy4Asv1BZbg9w== X-Google-Smtp-Source: AGHT+IFIe7NgMK17AdPw2rOf+TnpjBzJAMZ9JePdKcK+mWYlPHpypnB1KwEsoezCxz0NIE/lxpOt X-Received: by 2002:a05:620a:24d6:b0:787:86ab:1595 with SMTP id m22-20020a05620a24d600b0078786ab1595mr2869656qkn.31.1709035709376; Tue, 27 Feb 2024 04:08:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709035709; cv=pass; d=google.com; s=arc-20160816; b=xQv0QDlWzThCm1nitAdvIBuKsS68CQ6Fvv0jhRJaFU8tES6X5XycksRJ6WSfWzk/HQ jlA7U/V9UvSDK6q9yf84OC6D3xA732zKAfiEUgeYqb6zLG3iNo3G1Kdd2DmJBTB+9IOn EDK08mXDRHw/E2NCS3UTHrVeBC7C6cQokDLHU0PfwvuiF9xtA9LAwl6rOgzvKCgiKx7k eXoad7VH1/cFZ3cEfPGEEiqPSdYiNVon/Pd8fjmAN2iQyR9i6ZNVSB93RjvRFDdm09BT wBf1IjFRT/szi0Mf2HjA9JiuSEGhNuuSxqQYDyW20pNm43kvHD8Jt++t8Y/GpULJQSA6 h/jQ== 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=NRspKYfRmeBIJyBKxKV+Vogu5RA9hVFYIMCh1xqQ+Lg=; fh=2x90Qxl5zTP1qE3pnxbb2njd6FQrdyIFrgPH80wq0ao=; b=bv31KT2icG7cpyC3DQaPYqDWFHho6wlsD39y36+iz2dllKWseadHxV3U1RpvKxCanX +N6Fx+8mvfTtULTdQEN2qIqd80vCIS6a2GxUzr/+hNJqnvUoUkp7bIDHPqyP2Q4qeuDm rh+PdIN2LP5Cx2b75TJua4xzugQ7CfZVvdA5HiT3Jj96WVgpYdoFX1PbqtSwemRGVUp7 OyN0o0Byfq4XqHAgG5vmijVHqA1KXf3XQCjEtnbuHnjazOR5cREzIr9oISFsEjFthDh3 ULznpkWHqzNf55RQmXo9jqcq8ovMorH2VCdzKXSvXVM7QK9Cc9Bi79uquKbyvrpbHYcF v0aQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rPcOhAiN; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-83162-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83162-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id de43-20020a05620a372b00b00787bb4f7dccsi8265739qkb.14.2024.02.27.04.08.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 04:08:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-83162-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=@kernel.org header.s=k20201202 header.b=rPcOhAiN; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-83162-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83162-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 11C8D1C21978 for ; Tue, 27 Feb 2024 12:08:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9657913A866; Tue, 27 Feb 2024 12:08:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="rPcOhAiN" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 B2C8F137C20; Tue, 27 Feb 2024 12:08:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709035697; cv=none; b=lPT+vCSgt9jgAIKDWsF/JiM3Ytuh5wLCeh1BmAuF2uuVBlXPTJqu53lNgDWxUOPw8+nXLXBSnDnYhWWx/Wta8xxm+BOsDQe4KR1/VITF+ZrpvKWJxVL+AugbdE3MZ61w1w6X7uTcN64/Oxn2bSs9fF6ijMp2rpYKm+yaaq2AxQQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709035697; c=relaxed/simple; bh=ACaz7oj5ReqFoIR72ebNJXl994t4BOU7shgO5K8CUjs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=qIu6A+sgTD3lzGRrHUzM0ISvDwwTjbYh8FOPWO/DE8Gzj/srQGKcOrMeonvxYdty8sfpFq63jtpEyn8MxTqSHVHCKBOpdP/2CacP99dupwOi1Vq10PVcA2I86GLsEWhQuoSGG4xPcQmhztphDd55kiVPVD4vQA1y2gB8B5FSivE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=rPcOhAiN; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id DF9B4C43390; Tue, 27 Feb 2024 12:08:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709035697; bh=ACaz7oj5ReqFoIR72ebNJXl994t4BOU7shgO5K8CUjs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rPcOhAiN2PtkNLYRBMqmRiMbDR6p59SbOgdUHY6MdY/GfepvdtHrN4RR9v1sZYqf6 jGI2QQj99JWnXpmDj76LwUn5WOEnN2l8plI/Woy9JymhacQ8VopW5b3x8MDmW6BR3I 1mhXEPNwYTypLA8EvT5QrKq5WyQSqfjz/WuF4zmZbFCzvBEEroimeIedS523uwhWc0 uq2irP6Mmsab/1y0zyVOZI3iqcQ1Tt+elVYtsRMaL5qiHIHNgePfxDPrjcFVWcmbyP nzPJdHwMz3keyVrdNrECnvtckEFIcLNcawWXousAOSunIXQ/sdzf7RMhsqiuz0ENoH NKhxbGiV9gDEw== Date: Tue, 27 Feb 2024 13:08:14 +0100 From: Maxime Ripard To: Dmitry Baryshkov 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 , 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 Subject: Re: [PATCH v7 25/36] drm/connector: hdmi: Add Infoframes generation Message-ID: References: <20240222-kms-hdmi-connector-state-v7-0-8f4af575fce2@kernel.org> <20240222-kms-hdmi-connector-state-v7-25-8f4af575fce2@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ocit6yam46alzc5t" Content-Disposition: inline In-Reply-To: --ocit6yam46alzc5t Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Feb 25, 2024 at 05:02:51PM +0200, Dmitry Baryshkov wrote: > > @@ -476,6 +478,7 @@ EXPORT_SYMBOL(drmm_connector_init); > > */ > > int drmm_connector_hdmi_init(struct drm_device *dev, > > struct drm_connector *connector, > > + const char *vendor, const char *product, > > const struct drm_connector_funcs *funcs, > > const struct drm_connector_hdmi_funcs *hdm= i_funcs, > > int connector_type, > > @@ -485,6 +488,13 @@ int drmm_connector_hdmi_init(struct drm_device *de= v, > > { > > int ret; > > > > + if (!vendor || !product) > > + return -EINVAL; > > + > > + if ((strlen(vendor) > DRM_CONNECTOR_HDMI_VENDOR_LEN) || > > + (strlen(product) > DRM_CONNECTOR_HDMI_PRODUCT_LEN)) > > + return -EINVAL; > > + > > if (!(connector_type =3D=3D DRM_MODE_CONNECTOR_HDMIA || > > connector_type =3D=3D DRM_MODE_CONNECTOR_HDMIB)) > > return -EINVAL; > > @@ -500,6 +510,12 @@ int drmm_connector_hdmi_init(struct drm_device *de= v, > > return ret; > > > > connector->hdmi.supported_formats =3D supported_formats; > > + strtomem_pad(connector->hdmi.vendor, vendor, 0); > > + strtomem_pad(connector->hdmi.product, product, 0); > > + > > + ret =3D drmm_mutex_init(dev, &connector->hdmi.infoframes.lock); >=20 > I'd suggest moving this call to the generic __drm_connector_init(). > This way no matter how the rest of the drm code (mis)uses the > connector, the lock is always present and valid. Yeah, that makes sense, I'll change it. Thanks! Maxime --ocit6yam46alzc5t Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCZd3QrgAKCRDj7w1vZxhR xUw4AQDY/7kZ7wFpO+/Ak/W0YWywU3LNZ5pkN4Om9GBNtAUK6wD/YV9OiFjDhmlL sW/aBGeDNa/yzjkkc0NKa5D6dGQe5Qc= =FJc2 -----END PGP SIGNATURE----- --ocit6yam46alzc5t--