Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1584653rbb; Mon, 26 Feb 2024 14:29:34 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX8csPkK9DJy9uMDxv7CYy7qYZLe9Ri/yCYG0CWR3F7MZBfKBLkdCirI2QYyUvIc3VNh9IQGC9wYXxPmcAP4yUlizqgLmhXGeu5GIB9UA== X-Google-Smtp-Source: AGHT+IFy1SpvpXRMrZvnGMGNcRoyzkLIt2r6eybUvdjB8bvaa+Bc/i2bKF506IcgsOMV5Nlw8lyB X-Received: by 2002:a05:620a:12ec:b0:787:3b62:d80e with SMTP id f12-20020a05620a12ec00b007873b62d80emr444752qkl.27.1708986574667; Mon, 26 Feb 2024 14:29:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708986574; cv=pass; d=google.com; s=arc-20160816; b=Sk861xocqijBj61AZZY/CYd4vWtZDmmMN8sYhB19gwD54SyOz/XJsEQSS1H8ucn7il OX4yG8IpMW3e/B6lERbrzbZuiXrsno7c/NWk98TUYoYS2GhrJ4COWxAw787+C9KsIvYx BI9vOsJhqCHz7XSWZfmlPx6i0KGdfFXpVf7A5mZzdDWe800qrpiVqSdMeWoPaNa1Bywq g7+Wti/sd88A19cjdE2DlGEMJ+NVnSJNOmFa6f22gitiJGygdLZIi/2lIxmSbuhx29eQ odBVVPFmt94vypaaiuYLf1Di3gkpGLNZjjmh8caT2LupOYJmi4BwFGXaKZ/YLUCKv3i+ 8Jdw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=HwHOxhCzVgWRYHLx5UlREeeks0w7r8W0vRg5wArpOeU=; fh=fe9o+RK7Nz3g7vIfIyzZ35JQsuIkAAy/fjP2a5CngLc=; b=nuqmw5pM/SY2zYM5oLlOzPHIHRW0pNXXmvFt+uV91vwdRbyPcjv6bnotOzUbFkWkXL ZmhbGpBz2+mHE5NRoSwAkT2n/C2NEs/Rw7y8BjZtUgGyjKn+aZSwUpzqgjPxf0fGLRI/ tcajJ3YJfYtm3qFCcpRUYy9c6RL5ySQxZWxMandOUmw7s1PChIy9/3LFm9GTpWyML4j/ 24lL8OfJJZBS0NihyE3S/cFnVd6y2n0zFinrbqcxWfLmZQlO6uFztsPF1l6QbhhDCpm2 vATNBW6vpU7CphodskRMPX1Y/1SrP1afN18HOk5MW+CUN/wbnbsMGrJpLVJ3Tdex3cTy u76A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="XkgBnM/C"; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-82404-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82404-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d3-20020a37c403000000b00785b148037dsi6133255qki.32.2024.02.26.14.29.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 14:29:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-82404-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="XkgBnM/C"; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-82404-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82404-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.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 4B20B1C2442E for ; Mon, 26 Feb 2024 22:29:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 287EC1332A4; Mon, 26 Feb 2024 22:29:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="XkgBnM/C" Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) (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 5FE1D133280 for ; Mon, 26 Feb 2024 22:29:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708986568; cv=none; b=Jg9Jp/KmGLnJMdrNsHN5sBwUiBBxXpBZkYlrGV3e/0GfXUBc3S0l00XfosNVJArSGeLUY6cZE+Ijt2bp9M3CKuSMf3Vn/RpwBo91k5GEkvKbyiquD01veXY6U8kWqPdVkgSnVSnxBCNGICZln9Ejsof02AphT7qB8xpo8vYHurY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708986568; c=relaxed/simple; bh=LPSvMg+QCFjUVfX7axRA8ovlTMn7/5woB7NWiDPw9dQ=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=fAlXvdHTDYundfY7eipencL6Rzh3e+RRASIKa50cBHr+Qw/G7wG2bUsBMWNHZ5l7HV2KVIwnRo1Oz3eN2GGPO59qm1HRBUU9nV/sbwfdALdNMCKlJr0914VUqi5cNAuxmL6YBDInyrvURIjmYHaXewJkTySJnmAp+BcMe0QXVjE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=XkgBnM/C; arc=none smtp.client-ip=209.85.208.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-564fd9eea75so4563193a12.3 for ; Mon, 26 Feb 2024 14:29:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1708986562; x=1709591362; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=HwHOxhCzVgWRYHLx5UlREeeks0w7r8W0vRg5wArpOeU=; b=XkgBnM/CvujefZjWQG6fTFjpftpIxmthb9kDwW6OZjxBJ4uw/3/OPkbweLOHLqLVjq JX4uOr/YOxXW41powiTjw1lFavx+xXmQJhZ01e1e1IOZ1Xc6upLKFv0qgDeyXTXu5/ZG AMRREz9UzDOLK9g7M3WgLBOAGHxuV/DsvfvaE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708986562; x=1709591362; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HwHOxhCzVgWRYHLx5UlREeeks0w7r8W0vRg5wArpOeU=; b=KZAQkyat2fkLvhMwVRSFfUeStfrZACfn5HbwV9QsOFb1M5pqWDJyHQyqbrQ3JwhP9N mmIzngnPAKkyL0e4OTCNKVPXKxGeP3db5D6ae+psfEwu5IWCtO1sdtgvP61y+onC+wnx +jbF/2gAip46k/3ydR0xcoOQhGcUNbjfNRdAELajWuWohu+G+r88agVb8bU0TrWtpr70 jhfAN9mKVx+bIj66zhJfi+h9oFoWpGox9GZa1dO+xxtJWtpcA6UNkvdbZdVSxQ25ded3 rVXkG4/Xhk7VjG2LKrdBCLRjvxCdEvu2Yke6serOrYEPo7bSm4kPF1vGrSRINLFRXJzu WSsw== X-Forwarded-Encrypted: i=1; AJvYcCUgPfvZDQaczOe40WlMTDZRCL4Zxv0oHEAIbybHX3o3TVe/Itd/BM+HqfXaFhsY3Xp5ts9A5No40XNSLlNEIargeLIoaFQYru3bVXjN X-Gm-Message-State: AOJu0Yy8Oi83JenxBXsdRiH2qvOdGl/bTPONDfBHMiS5vIVnUEZ/ti39 jgCRJbJK67YlOpMQF4w0ikq3K9HhXaYsV/YgtIWX0dk+oZalORrzQC7Qe+sRgn0i191LgjvMaYs f//wU X-Received: by 2002:a17:906:3397:b0:a3f:d797:e6e2 with SMTP id v23-20020a170906339700b00a3fd797e6e2mr5040491eja.28.1708986562134; Mon, 26 Feb 2024 14:29:22 -0800 (PST) Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com. [209.85.128.45]) by smtp.gmail.com with ESMTPSA id m16-20020a170906235000b00a3d153fba90sm149883eja.220.2024.02.26.14.29.21 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 26 Feb 2024 14:29:21 -0800 (PST) Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-412a9f272f4so14905e9.0 for ; Mon, 26 Feb 2024 14:29:21 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCVzZ//T3TBWDn2FyXjp0vCsLiYae+/X+PS3kU/p5ZSByeIzENPrz8rydwhPZNB0EL888LGToDxliV1gceOh8vYkWT4ZztUvyvZ1T8Gq X-Received: by 2002:a05:600c:4e15:b0:412:a786:e8a1 with SMTP id b21-20020a05600c4e1500b00412a786e8a1mr82285wmq.6.1708986560846; Mon, 26 Feb 2024 14:29:20 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240223223958.3887423-1-hsinyi@chromium.org> <20240223223958.3887423-2-hsinyi@chromium.org> In-Reply-To: <20240223223958.3887423-2-hsinyi@chromium.org> From: Doug Anderson Date: Mon, 26 Feb 2024 14:29:05 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/2] drm_edid: Add a function to get EDID base block To: Hsin-Yi Wang Cc: Neil Armstrong , Jessica Zhang , Sam Ravnborg , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, On Fri, Feb 23, 2024 at 2:40=E2=80=AFPM Hsin-Yi Wang = wrote: > > @@ -2770,58 +2770,63 @@ static u32 edid_extract_panel_id(const struct edi= d *edid) > } > > /** > - * drm_edid_get_panel_id - Get a panel's ID through DDC > - * @adapter: I2C adapter to use for DDC > + * drm_edid_get_panel_id - Get a panel's ID from EDID base block > + * @base_bock: EDID base block that contains panel ID. s/base_bock/base_block, as identified by: scripts/kernel-doc -v drivers/gpu/drm/drm_edid.c | less 2>&1 drivers/gpu/drm/drm_edid.c:2787: warning: Function parameter or struct member 'base_block' not described in 'drm_edid_get_panel_id' drivers/gpu/drm/drm_edid.c:2787: warning: Excess function parameter 'base_bock' description in 'drm_edid_get_panel_id' > * > - * This function reads the first block of the EDID of a panel and (assum= ing > + * This function uses the first block of the EDID of a panel and (assumi= ng > * that the EDID is valid) extracts the ID out of it. The ID is a 32-bit= value > * (16 bits of manufacturer ID and 16 bits of per-manufacturer ID) that'= s > * supposed to be different for each different modem of panel. > * > + * Return: A 32-bit ID that should be different for each make/model of p= anel. > + * See the functions drm_edid_encode_panel_id() and > + * drm_edid_decode_panel_id() for some details on the structure = of this > + * ID. > + */ > +u32 drm_edid_get_panel_id(void *base_block) > +{ > + return edid_extract_panel_id(base_block); > +} > +EXPORT_SYMBOL(drm_edid_get_panel_id); > + > +/** > + * drm_edid_get_base_block - Get a panel's EDID base block > + * @adapter: I2C adapter to use for DDC > + * > + * This function returns the first block of the EDID of a panel. > + * > * This function is intended to be used during early probing on devices = where > * more than one panel might be present. Because of its intended use it = must > - * assume that the EDID of the panel is correct, at least as far as the = ID > - * is concerned (in other words, we don't process any overrides here). > + * assume that the EDID of the panel is correct, at least as far as the = base > + * block is concerned (in other words, we don't process any overrides he= re). > * > * NOTE: it's expected that this function and drm_do_get_edid() will bot= h > * be read the EDID, but there is no caching between them. Since we're o= nly > * reading the first block, hopefully this extra overhead won't be too b= ig. > * > - * Return: A 32-bit ID that should be different for each make/model of p= anel. > - * See the functions drm_edid_encode_panel_id() and > - * drm_edid_decode_panel_id() for some details on the structure = of this > - * ID. > + * Caller should free the base block after use. Don't you need a "Return:" clause here to document what you're returning? Other than the kernel-doc nits, this looks fine to me. Reviewed-by: Douglas Anderson It'll probably need at least an Ack from someone else in the DRM community before it can land, though, since this is touching a core file. -Doug