Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp2076154ybf; Mon, 2 Mar 2020 01:20:09 -0800 (PST) X-Google-Smtp-Source: ADFU+vuwyVOfVGKpnZmfDz0M/M7oxRUWzTU+vLgm1PBrek72e3+H/mdG3z8W/b8J3hJ0/+qdt6Bi X-Received: by 2002:a05:6808:301:: with SMTP id i1mr2210145oie.19.1583140808991; Mon, 02 Mar 2020 01:20:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583140808; cv=none; d=google.com; s=arc-20160816; b=PwPuqtW0ja6e6AMX81kLuUft1AGiyYaz/v+NI6nZPfdJMYRO/WaEuWMR27qTeuvM6Y 2FQn6IBNPwKgUpE0CxvzaE2x12RQPqAMOTZC8TlqasCmZmie6oZM69mdMK4EBH34XDA7 DheYkLtZRLaimZCKTefT11QPUjvFa+BgUC1GTSJETKJOxvOco8PjLfuXODdS2liBvJNq ZGSyiPPfnv5QVUUIr2yxuzlUhkJUBAXihhUbg7MsIGImEtzGNlbjxxkBRGcD+1nDb2gv JjhMXbvsMxc0fzuqgPFfELHvnJpUGoVShmfW2zk3U5j94snG741XXVB7PI+DUUeGTESc 0Fvw== 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:dkim-signature; bh=UMuhgC8aelJl6AK1jS9Aepc7KI53D/RbvaRMLmYs4PY=; b=Sa9TG0AtfmdRasvHR4/WdXV1/RSKG8nUM9XFLQoCOTIx0L6VWWxZlSxYw7tdRFW0QS 9vyv2euChkCCHvBZmmhHU3TrYFYsQsbzQcmf9+Bw/qZ5ly4IPigAqXoQBhl9A6JBrfkT wK3KenQkfuHbN6bppY/MSKiAY8gi1M5/LEE1aGVnfWS5NmxXZEFqdGSfEJXg8EPIPYy6 kXujmZMU0oyvmQWjZMII457fA8dHIfn0M5IztEUPPm0cGTlph/fD4h5TnAC/pNgPeIfl h0Up1JLCe/EX2yUt90YQWBVLXyDTX6tPZZsoktXvSemLFqZPK4QkMbxntxPAuQmxAXOW omtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b="Zt/3yA7P"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 2si6006633ois.221.2020.03.02.01.19.56; Mon, 02 Mar 2020 01:20:08 -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; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b="Zt/3yA7P"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727060AbgCBJSq (ORCPT + 99 others); Mon, 2 Mar 2020 04:18:46 -0500 Received: from perceval.ideasonboard.com ([213.167.242.64]:50250 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726144AbgCBJSq (ORCPT ); Mon, 2 Mar 2020 04:18:46 -0500 Received: from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 0614654A; Mon, 2 Mar 2020 10:18:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1583140724; bh=bWSWnRlEnxgw/Jwkv+DDpLesF0UhMGYrILmgH0Qtapw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Zt/3yA7PpTzJsecJt56a6UHocBjCjfwDIIKR7c4qy2MfGDvzcZF/wB9G70unntQtS /KwBMmScCjYDFPEGhg2ub76ouw7LxQKPHZgdFroo6oYpsj1WcpDhP6iet5OkrVa8cY aaWRFDWDjOyXhQkzHqbeWdgP2xatlV4C0knL0oiQ= Date: Mon, 2 Mar 2020 11:18:18 +0200 From: Laurent Pinchart To: Neil Armstrong Cc: Jernej =?utf-8?Q?=C5=A0krabec?= , a.hajda@samsung.com, jonas@kwiboo.se, boris.brezillon@collabora.com, linux-amlogic@lists.infradead.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Daniel Vetter Subject: Re: [PATCH v4 02/11] drm/bridge: dw-hdmi: add max bpc connector property Message-ID: <20200302091818.GC11960@pendragon.ideasonboard.com> References: <20200206191834.6125-1-narmstrong@baylibre.com> <20200206191834.6125-3-narmstrong@baylibre.com> <11463907.O9o76ZdvQC@jernej-laptop> <09d315b8-22f3-a25a-1aea-9c5d50c634d6@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <09d315b8-22f3-a25a-1aea-9c5d50c634d6@baylibre.com> 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 Hi Neil and Jonas, (CC'ing Daniel for a framework question) Thank you for the patch. On Fri, Feb 21, 2020 at 09:50:18AM +0100, Neil Armstrong wrote: > On 17/02/2020 07:38, Jernej Škrabec wrote: > > Dne četrtek, 06. februar 2020 ob 20:18:25 CET je Neil Armstrong napisal(a): > >> From: Jonas Karlman > >> > >> Add the max_bpc property to the dw-hdmi connector to prepare support > >> for 10, 12 & 16bit output support. > >> > >> Signed-off-by: Jonas Karlman > >> Signed-off-by: Neil Armstrong > >> --- > >> drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 4 ++++ > >> 1 file changed, 4 insertions(+) > >> > >> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > >> b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c index > >> 9e0927d22db6..051001f77dd4 100644 > >> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > >> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > >> @@ -2406,6 +2406,10 @@ static int dw_hdmi_bridge_attach(struct drm_bridge > >> *bridge) DRM_MODE_CONNECTOR_HDMIA, > >> hdmi->ddc); > >> > >> + drm_atomic_helper_connector_reset(connector); > > > > Why is this reset needed? > > I assume it's to allocate a new connector state to attach a the bpc propery. > > But indeed, this helper is never used here, but only as callback to the drm_connector_funcs->reset. > > But, amdgpu calls : > /* > * Some of the properties below require access to state, like bpc. > * Allocate some default initial connector state with our reset helper. > */ > if (aconnector->base.funcs->reset) > aconnector->base.funcs->reset(&aconnector->base); > > which is the same. A comment would be useful: /* * drm_connector_attach_max_bpc_property() requires the * connector to have a state. */ drm_atomic_helper_connector_reset(connector); drm_connector_attach_max_bpc_property(connector, 8, 16); I don't like this much though, it feels like the initial reset performed by drm_mode_config_reset() should set default values for all state members that are related to properties. Daniel, what's the rationale behind the current implementation ? This is a DRM core issue that shouldn't block this patch though, so Reviewed-by: Laurent Pinchart > >> + > >> + drm_connector_attach_max_bpc_property(connector, 8, 16); > >> + > >> if (hdmi->version >= 0x200a && hdmi->plat_data->use_drm_infoframe) > >> drm_object_attach_property(&connector->base, > >> connector->dev- > >> mode_config.hdr_output_metadata_property, 0); -- Regards, Laurent Pinchart