Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp2170992rdf; Mon, 6 Nov 2023 06:46:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IFjVTeL/CJz7znMk1QXHGMZRLYr+WiZDDocW7hf+W6ZmokXgtFh17ebAKFWuZ7KjfC+4Rhf X-Received: by 2002:a05:6870:ebcf:b0:1e9:ae68:fda3 with SMTP id cr15-20020a056870ebcf00b001e9ae68fda3mr30187489oab.12.1699281981554; Mon, 06 Nov 2023 06:46:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699281981; cv=none; d=google.com; s=arc-20160816; b=NmaYWwhhMOMn8muXhGn+CVsUpgTZY1HrlnPzxmb0OutN2rxawkmr16G5Ntm6/LuCAh Ekhml5H2oXhYsoGK3bXaGHOcXskmrJq5hiuFBpgj8qw2PKWMKx9FIc5QaqWG3bxWC3gR lz/fMBTVAGtTaZixAxAB2Cokqmhpc02fjcp5bx2Ta57BWOYtUsbHL+LK7cuUiE2sx3p6 UTmiyYJ9bHjqzSVG5PiV8j545bvt9fVNIvhXY6k7dJh/eXTA4lbcgzjEwLVcdPw91wVS cpj3RWe/xl5d+aWb0W5q12vPVtH1MPL3wYkf7j5aR77KPWE7Lyb1ySW8+H+rZLZbp+v3 Rdrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=0ozCNkfIaOT1QypY/TY4MhVY662+GKlrWU7zq65orrU=; fh=Q8tWW7erSS8Gwm0UW6a17KRTsVD+tURgw0MeLaWISiU=; b=JTEayHvlR2U1tHkITayCNaQA6Sz2aXF5U2cloRxiiDEAtu6W4xQsWxIvwg2Qb10iL4 asntzDGwwA90G7scI1BkbJWJ282NqyyEc8WajAqIDaEmMfc6nZ7xoge9L6ol/WvKiwtZ /KuwtaWtIYRltYQ/NqwkmPfAjiWzpQyH82qgtjxELOX8fa8UW4YnWPxp92K74NAhGcUV hyzGgnzpA96sVZHJ8KJoxe7JSHlZhIMun2SEj3Vs8MMIHtaNqtjqaoPJtKMQNPl4m5qj FWI56UBhnObIGGm76vfexUrjOkRliPL7f3UTv68ap5OWFtfJiW0OCD2V0yUdTNQHgKx3 1foQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IjUNNP4G; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id o17-20020a656a51000000b0059b70e69eddsi9066487pgu.300.2023.11.06.06.46.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 06:46:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IjUNNP4G; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 9B2658082DE1; Mon, 6 Nov 2023 06:45:16 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231630AbjKFOoy (ORCPT + 99 others); Mon, 6 Nov 2023 09:44:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231794AbjKFOos (ORCPT ); Mon, 6 Nov 2023 09:44:48 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 202B5BB; Mon, 6 Nov 2023 06:44:46 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6ED10C433C9; Mon, 6 Nov 2023 14:44:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1699281885; bh=7L3lZ+M6F/MppCLKLJ3iMRw+h1ZtHpfsvkLcJii+LsA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=IjUNNP4Gt06LniIuHdfYaXlzq3i4Mb37385CLH7PiVnaf2MlUqv+G6hRGDzHdKoz+ 3yg6gp2iA0AFuSRNn7q8XfR7NmNdW/QdgR0a5nuJIlsG8NMxHBKwUfKIZAudcsf3kb Phvbgfu25RYjdyIO0n9+MTPoVRiorHVNHmBax6VRf/xevRbD8jbaN0BVMpsd9uB24z GHHcG5Aic/vRwhRKGO5V8r/w6fQGW/H8tThg5HmEbU3y6gJXeHyuyk6OpW3UjZqOPx +bHa05Lpel4pt+oBEc8YJ+XFxEqUWFaxmTty2qkUhjb83HSh6MPYjA7S4XMgqmrFiC +zaoNzXbBLahQ== Date: Mon, 6 Nov 2023 15:44:43 +0100 From: Maxime Ripard To: Hans Verkuil Cc: Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Emma Anholt , Jonathan Corbet , Sandy Huang , Heiko =?utf-8?Q?St=C3=BCbner?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , 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 RFC v3 12/37] drm/connector: hdmi: Create Infoframe DebugFS entries Message-ID: References: <20231031-kms-hdmi-connector-state-v3-0-328b0fae43a7@kernel.org> <20231031-kms-hdmi-connector-state-v3-12-328b0fae43a7@kernel.org> <806f2ad3-c80b-41e5-9388-f1af7bace8e3@xs4all.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="iqczjmp6rdkak4lg" Content-Disposition: inline In-Reply-To: <806f2ad3-c80b-41e5-9388-f1af7bace8e3@xs4all.nl> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 06 Nov 2023 06:45:16 -0800 (PST) --iqczjmp6rdkak4lg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Hans, On Fri, Nov 03, 2023 at 10:05:18AM +0100, Hans Verkuil wrote: > Hi Maxime, >=20 > Thank you for posting v3, this time it runs fine on my RPi 4, thank you f= or > fixing that. >=20 > I'll start working on a conformity checker for this. Awesome :) > > +static int create_hdmi_infoframe_files(struct drm_connector *connector, > > + struct dentry *parent) > > +{ > > + int ret; > > + > > + ret =3D CREATE_HDMI_INFOFRAME_FILE(connector, parent, audio); > > + if (ret) > > + return ret; > > + > > + ret =3D CREATE_HDMI_INFOFRAME_FILE(connector, parent, avi); > > + if (ret) > > + return ret; > > + > > + ret =3D CREATE_HDMI_INFOFRAME_FILE(connector, parent, drm); >=20 > Hmm, I had to look into the code to figure out that 'drm' stands for > Dynamic Range and Mastering InfoFrame. While entirely correct, it is > also very confusing in the context of the 'drm' subsystem. >=20 > I am not quite certain what the best approach is here. >=20 > Internally in the drm code it is talking about 'hdr' or 'hdr metadata', > but that's a bit confusing as well since there is also an HDR Dynamic > Metadata Extended InfoFrame defined in CTA-861, even though support for > that is not (yet) implemented in drm. >=20 > At minimum there should be a comment in the code explaining what drm > stands for in this context. >=20 > One option to consider is renaming this file to hdr_drm, thus indicating > that this is HDR related. I ended up doing both, thanks for the suggestion > > + if (ret) > > + return ret; > > + > > + ret =3D CREATE_HDMI_INFOFRAME_FILE(connector, parent, spd); > > + if (ret) > > + return ret; > > + > > + ret =3D CREATE_HDMI_INFOFRAME_FILE(connector, parent, vendor); >=20 > There may be multiple vendor specific InfoFrames in the future, so how > would that be handled? Perhaps add a comment here that currently only one > vendor specific InfoFrame is supported, but suggest how to handle multiple > VSIFs in the future. >=20 > What would actually be nice (although probably not that easy to fix) is if > the name of the file would be "vendor-XXXXXX' where 'XXXXXX' is the IEEE = OUI > number. I guess it's not entirely clear to me what that would look like. In order for the framework to create the debugfs files, we would need some enumeration mechanism (probably through a callback?), and then the driver would generate the entire content of that file. Which makes me question whether the framework should be initialised at all? Maybe the simpler would be to just have drivers maintain their own debugfs files and storing the content in their own, private, structure. Maxime --iqczjmp6rdkak4lg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCZUj72wAKCRDj7w1vZxhR xfojAP95jr0AZ4P/3Y/Vc2+1qdxUbHRPfB06V4FUfB1vOsUxEQD+IT5SF4zDLWqj FlE+HCqFEp49j6+Zd9e2tvMQ73psaAw= =G/8d -----END PGP SIGNATURE----- --iqczjmp6rdkak4lg--