Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp250785lqs; Tue, 5 Mar 2024 00:19:35 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUjHrmHg6FsCTA90f+KDP6E8Ih+8G5c8B4j0xrCQa/t1w6nzWtHTF67KELkR1s0G7ASiQoVTleoybeO+frufrpAzTZtd2xMSz+VrZP5QQ== X-Google-Smtp-Source: AGHT+IHqaFN1+WChYfWyezyuPWDAJKuK6LhhA/62rgZG8E6Zs7GCPsmTvNEW9yvPcgwJO7qxMKT8 X-Received: by 2002:a05:6a00:4f8d:b0:6e6:16b5:2eac with SMTP id ld13-20020a056a004f8d00b006e616b52eacmr6764275pfb.29.1709626775564; Tue, 05 Mar 2024 00:19:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709626775; cv=pass; d=google.com; s=arc-20160816; b=QzseCF5Z6xhV9/zAKWPxD3TUml37eDof4jlldAft6nvDZnNcRsxd5Nk9Q3AgIHLoW5 5hetqvJLFtnQsuo3Fdwxpf7lthrIsRyvoVEjF9TBtDysn07e2/M+kodS7YaNQKGgXZAr jMbdmPyxwpT/4xhco25VD5nvteS0euiz7XErDA8BEEGjfpSLZ8Rlwmmx33j3PX9pBzAA 9uDdO/NPTDyvsM1Ko4z8E5dXZuFHjQvsbhpfCpaSlm4CQ0VGVGpOLWKFfhYlaDZPQ+mo cmjCvyVXdG++IqNkDRJKthqujekjDdx8UaVqY+G+hXcTaQVfKt1f2+Fn2EWfAMQF1j0c OvAA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:references :organization:in-reply-to:subject:cc:to:from:dkim-signature; bh=qP3Cb+/hcXwxmvUr9blPJc39ipRG/FVFLpknPzNVE0c=; fh=v3jCaJspSM+xoApNZB6deGxicj/omJiFPbX8fIuCPJA=; b=wjokteUFnf3b5WHWscYN99HCQfdG9V0JA9hzcsKa2rOCPxXUECBjuh+CL/7KNbHHrc geXZoGWR5CNUTVTSQC5Awqe/HsOgBV0kK+Rljo+IitRpZfmt2USNdzQEW0tMkLIqWKye Fn7PdDXlw+fKlhLfI0rRukU0msfELcAdRsQ0ZqBMLn4/bmncY+Z7uRokRcSqLqQMChsq CI0SmyZY/sTWv1nHP+AdmfF9l+A8UN8fFNNLrqh9JhrOeb6me1SyzScSQTzD3Y5xb0T3 1grFmAIQQfXg4mhfN3tUFSWo7iyqYJV+r8G3Ofk485KnTBJnbfmqGIr845BotdFGkxwa Wb3A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=TsUMR+fG; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-91879-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91879-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id a7-20020a056a000c8700b006e0f5035435si9865981pfv.126.2024.03.05.00.19.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 00:19:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-91879-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=TsUMR+fG; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-91879-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91879-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id BC94AB20CC3 for ; Tue, 5 Mar 2024 08:14:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0CEAD7F48F; Tue, 5 Mar 2024 08:13:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="TsUMR+fG" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) (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 99DD17EF18 for ; Tue, 5 Mar 2024 08:12:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709626381; cv=none; b=md9VgTIeCC6VXFr1mL9xGYnMbJAAoUF0z0R92YE4Y7NOxofgaDsBORG6iiZCIjLeoqnh/3phkeEP7yAnJlCwMh2EEVQqg3tSuo37Luzkfqynyaqd9IcTmMynGgKbyBgDTJFGTn9zqi/JvQ2qidowKtoxqql++/a2FAvECH7sQSI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709626381; c=relaxed/simple; bh=IxofcRReTS1GVC8uDxeeDlw/tDFak2/5TsEbHr6Ca50=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=A2npSF4YnX2DJsb4GclRAegVAYdtHt2jYxpVQAEWAt/RaMJGAAok0ejwp4Jm2Yyu3HfrVvQ0jcDDSkdKTazxjoKJ7xA8XYgwuuQpYIRm+4/2plgxfPku67TPN/hjU8ntJfaq794ankzp0AnRpH4cZUgXaxZSo8LDRgqscq08nhI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=TsUMR+fG; arc=none smtp.client-ip=192.198.163.18 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709626380; x=1741162380; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version:content-transfer-encoding; bh=IxofcRReTS1GVC8uDxeeDlw/tDFak2/5TsEbHr6Ca50=; b=TsUMR+fGwcPgdBWypE3YldNwUS1eSUHfz+IcXEyQYVu7Mzx+OSiH2VQv estKYqbj7+V+LdW7TVlXR+1UXrsHRt2U1EH8Ilz70p9kebqqyGQGstXNO wMmEqzVuDIWyaKOzmW6ga6/MjfeCfd36onDFxfO+KhpoOgOxC/zHimrjO 9Sh2YVEK89HEHKm7jldI1RCBFWRL8d2XOzNHU62uMp6nY7lkLzKl2cm1N HecRU2/qbv3FQY3Cb8kOPB1ohKg28Tn09sd1d+LF1MiNtoIsKQHTE/HQ4 FguMYI01nNB5EIq9mA4ClCKBc7SG6gLdRZhFoFff5evbolljZG9wh3+T3 A==; X-IronPort-AV: E=McAfee;i="6600,9927,11003"; a="4024630" X-IronPort-AV: E=Sophos;i="6.06,205,1705392000"; d="scan'208";a="4024630" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Mar 2024 00:12:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,205,1705392000"; d="scan'208";a="9465960" Received: from omakhlou-mobl4.amr.corp.intel.com (HELO localhost) ([10.252.51.143]) by fmviesa006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Mar 2024 00:12:50 -0800 From: Jani Nikula To: Hsin-Yi Wang Cc: Douglas Anderson , 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, Dmitry Baryshkov Subject: Re: [PATCH v3 2/4] drm/edid: Add a function to check monitor string In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20240304195214.14563-1-hsinyi@chromium.org> <20240304195214.14563-3-hsinyi@chromium.org> <87a5nd4tsg.fsf@intel.com> <874jdl4k01.fsf@intel.com> Date: Tue, 05 Mar 2024 10:12:46 +0200 Message-ID: <871q8p3xmp.fsf@intel.com> 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=utf-8 Content-Transfer-Encoding: quoted-printable On Mon, 04 Mar 2024, Hsin-Yi Wang wrote: > On Mon, Mar 4, 2024 at 4:09=E2=80=AFPM Jani Nikula wrote: >> >> On Mon, 04 Mar 2024, Hsin-Yi Wang wrote: >> > To clarify: >> > struct drm_edid currently is only internal to drm_edid.c. So with >> > change we will have to move it to the header drm_edid.h >> >> Absolutely not, struct drm_edid must remain an opaque type. The point is >> that you ask drm_edid.c if there's a match or not, and the panel code >> does not need to care what's inside struct drm_edid. >> > > Sorry I might be misunderstanding about the requests here: > > If drm_edid should remain opaque, then struct drm_edid remains opaque, > drm_edid_match() should take struct edid *edid as a parameter? just as > other exposed functions in drm_edid. No, it should take struct drm_edid *. > If panel edp doesn't hold drm_edid returned from > drm_edid_read_base_block(), what should it use to iterate the > edp_panels array? Panel edp can hold a *pointer* to struct drm_edid * without knowing the full type. This is one of the points of struct drm_edid. Focus more of the EDID parsing within drm_edid.c instead of having everyone parse it to varying degrees of correctness. > > for (panel =3D edp_panels; panel->panel_id; panel++) > if(drm_edid_match(drm_edid, panel->ident)) > ... > BR, Jani. --=20 Jani Nikula, Intel