Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp6657485ybc; Thu, 28 Nov 2019 03:15:59 -0800 (PST) X-Google-Smtp-Source: APXvYqzGK7XyDCLRYUsKg/pEt+psegIT4XRnyYqKbvX+1YYb8/3G2alOYOykeq3YzSlB8VP0bJS2 X-Received: by 2002:a05:6402:17c6:: with SMTP id s6mr32553263edy.22.1574939758965; Thu, 28 Nov 2019 03:15:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574939758; cv=none; d=google.com; s=arc-20160816; b=z+EuBDtYtrYIwyluEpgwLrq+hdTSpfnyfPUxr4ukWXLmc6U+M7bczfDuGVa+rGWwtr Tot/rPXKT9oSwdLG1xZPVrQovbygN1l+V7ZuRLrIZmHU4H4c7xin4VFq7bLdhqX4mizA 6V4lbYXjYbD7sygp0IC+OUfKH1qhyehgHQe1szNBMFgx/gDFmV1o5wfgJOQLDZQ0HNQH evSRvA9+cnAdL0d0sdH1RI2Pw6tSfboIlZXhH1OO8MgP6BfZTrBt4k4hJf29VVCRKhph R0c3sr+6+/ZYAL8Pgwvos1xOKbN59s+AVbk7jSPbIQWFGRGzKdF0uAabK0Iz51AaUJHS tbMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=B8j2OK+vYEfKSaV0Uk/smime/vKOhhQBgxCHsXQz764=; b=KA+SReJiO6X0rU1MgTCOF7Jbc1QSvLy5M1QHcdtSprv1juB1K4aarh8SQ5slKkBvIg EnG4kAKVTzH4WtO522bcfa0V+qYRCURgL/0loJYHXVxjqE2tOSGw0zXJlkXsNn6th7Yc TzY5c08iIskDRnPDdEkU3tNdIEfNDKcgIvUe+x/DZlOgvmwAP5xjbadwPLvIuLddTPyD SwA23vEISGhy3fug/j0+JuI82Tp0ivr3dytIicdx+KX3plukKVpOF1dTgasTHoY91LRh g8/vNBktYckzYXuYdGmycphLXT9BsXp3+pXNMs6686P0PDW0aNkfogu3jtKLy5RI7d63 R3Qg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j29si13323889edj.327.2019.11.28.03.15.33; Thu, 28 Nov 2019 03:15:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726657AbfK1LOX (ORCPT + 99 others); Thu, 28 Nov 2019 06:14:23 -0500 Received: from mga04.intel.com ([192.55.52.120]:64243 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726191AbfK1LOX (ORCPT ); Thu, 28 Nov 2019 06:14:23 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Nov 2019 03:14:22 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,253,1571727600"; d="scan'208";a="221298377" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.174]) by orsmga002.jf.intel.com with SMTP; 28 Nov 2019 03:14:19 -0800 Received: by stinkbox (sSMTP sendmail emulation); Thu, 28 Nov 2019 13:14:18 +0200 Date: Thu, 28 Nov 2019 13:14:18 +0200 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Laurentiu Palcu Cc: Uma Shankar , "dri-devel@lists.freedesktop.org" , Daniel Vetter , "linux-kernel@vger.kernel.org" , dl-linux-imx Subject: Re: [EXT] Re: [PATCH] drm: fix HDR static metadata type field numbering Message-ID: <20191128111418.GP1208@intel.com> References: <1574865719-24490-1-git-send-email-laurentiu.palcu@nxp.com> <20191127151703.GJ1208@intel.com> <20191128083940.GC10251@fsr-ub1664-121> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20191128083940.GC10251@fsr-ub1664-121> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 28, 2019 at 08:39:41AM +0000, Laurentiu Palcu wrote: > On Wed, Nov 27, 2019 at 05:17:03PM +0200, Ville Syrj?l? wrote: > > Caution: EXT Email > > > > On Wed, Nov 27, 2019 at 02:42:35PM +0000, Laurentiu Palcu wrote: > > > According to CTA-861 specification, HDR static metadata data block allows a > > > sink to indicate which HDR metadata types it supports by setting the SM_0 to > > > SM_7 bits. Currently, only Static Metadata Type 1 is supported and this is > > > indicated by setting the SM_0 bit to 1. > > > > > > However, the connector->hdr_sink_metadata.hdmi_type1.metadata_type is always > > > 0, because hdr_metadata_type() in drm_edid.c checks the wrong bit. > > > > > > This patch corrects the HDMI_STATIC_METADATA_TYPE1 bit position. > > > > Was confused for a while why this has even been workning, but I guess > > that's due to userspace populating the metadata infoframe blob correctly > > even if we misreported the metadata types in the parsed EDID metadata > > blob. > > > > Hmm. Actually on further inspection this all seems to be dead code. The > > only thing we seem to use from the parsed EDID metadata stuff is > > eotf bitmask. We check that in drm_hdmi_infoframe_set_hdr_metadata() > > but we don't check the metadata type. > > > > Maybe we should just nuke this EDID parsing stuff entirely? Seems > > pretty much pointless. > > I've been thinking about that but we may need the rest of the fields as > well, even though they're not currently used. I'm referring to sink's > min/max luminance data. Shouldn't we also check min/max cll, besides > eotf, to make sure the source does not pass higher/lower luminance > values, than the sink supports, for optimal content rendering? > > However, CTA-861 is not very clear on how a sink should behave if > the CLL values exceed the allowed range... :/ Also, if the CLL range or > the FALL values passed in the DRM infoframe exceed the sink's advertised > min/max values, I guess the sink cannot go lower/higher than it can > anyway. In which case, we don't really need the rest of the HDR static > metadata block and nuking that part should be ok. I'm thinking we should just conclude that such userspace is a buggy mess and deserves whatever it gets. -- Ville Syrj?l? Intel