linux-amlogic.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Neil Armstrong <narmstrong@baylibre.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: "Jernej Škrabec" <jernej.skrabec@siol.net>,
	jonas@kwiboo.se, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org, a.hajda@samsung.com,
	boris.brezillon@collabora.com, "Daniel Vetter" <daniel@ffwll.ch>,
	linux-amlogic@lists.infradead.org
Subject: Re: [PATCH v4 02/11] drm/bridge: dw-hdmi: add max bpc connector property
Date: Mon, 2 Mar 2020 16:55:37 +0100	[thread overview]
Message-ID: <6eede520-cbd8-51e5-6b56-afd727d50ab0@baylibre.com> (raw)
In-Reply-To: <20200302091818.GC11960@pendragon.ideasonboard.com>

On 02/03/2020 10:18, Laurent Pinchart wrote:
> 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 <jonas@kwiboo.se>
>>>>
>>>> Add the max_bpc property to the dw-hdmi connector to prepare support
>>>> for 10, 12 & 16bit output support.
>>>>
>>>> Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
>>>> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
>>>> ---
>>>>  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);
> 

Done

> 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

I'll investigate why, but I haven't found out how the intel driver got the
connector state initialized since they don't use the atomic helpers....

> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> 
>>>> +
>>>> +	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);
> 


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

  reply	other threads:[~2020-03-02 15:55 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-06 19:18 [PATCH v4 00/11] drm/bridge: dw-hdmi: implement bus-format negotiation and YUV420 support Neil Armstrong
2020-02-06 19:18 ` [PATCH v4 01/11] drm/bridge: dw-hdmi: set mtmdsclock for deep color Neil Armstrong
2020-03-02  9:05   ` Laurent Pinchart
2020-03-02  9:21     ` Neil Armstrong
2020-03-02 15:54     ` Neil Armstrong
2020-03-02 16:01       ` Laurent Pinchart
2020-02-06 19:18 ` [PATCH v4 02/11] drm/bridge: dw-hdmi: add max bpc connector property Neil Armstrong
2020-02-17  6:38   ` Jernej Škrabec
2020-02-21  8:50     ` Neil Armstrong
2020-03-02  9:18       ` Laurent Pinchart
2020-03-02 15:55         ` Neil Armstrong [this message]
2020-02-06 19:18 ` [PATCH v4 03/11] drm/bridge: dw-hdmi: Plug atomic state hooks to the default implementation Neil Armstrong
2020-02-07 10:57   ` Boris Brezillon
2020-03-02  9:56   ` Laurent Pinchart
2020-03-02 15:55     ` Neil Armstrong
2020-02-06 19:18 ` [PATCH v4 04/11] drm/bridge: synopsys: dw-hdmi: add bus format negociation Neil Armstrong
2020-02-07 11:02   ` Boris Brezillon
2020-02-07 13:36     ` Neil Armstrong
2020-02-29  7:42   ` Jernej Škrabec
2020-02-29 10:09     ` Jonas Karlman
2020-02-29 11:07       ` Jernej Škrabec
2020-02-29 12:15         ` Jonas Karlman
2020-02-29 14:42           ` Jernej Škrabec
2020-03-02  8:08       ` Neil Armstrong
2020-03-02  8:04     ` Neil Armstrong
2020-03-02 10:18   ` Laurent Pinchart
2020-03-02 15:57     ` Neil Armstrong
2020-02-06 19:18 ` [PATCH v4 05/11] drm/bridge: synopsys: dw-hdmi: allow ycbcr420 modes for >= 0x200a Neil Armstrong
2020-02-07 13:38   ` Neil Armstrong
2020-03-02 10:03   ` Laurent Pinchart
2020-03-02 15:58     ` Neil Armstrong
2020-02-06 19:18 ` [PATCH v4 06/11] drm/meson: venc: make drm_display_mode const Neil Armstrong
2020-02-07 13:39   ` Neil Armstrong
2020-03-02  9:59   ` Laurent Pinchart
2020-02-06 19:18 ` [PATCH v4 07/11] drm/meson: meson_dw_hdmi: add bridge and switch to drm_bridge_funcs Neil Armstrong
2020-02-07 14:57   ` Boris Brezillon
2020-02-07 15:36     ` Neil Armstrong
2020-02-06 19:18 ` [PATCH v4 08/11] drm/meson: dw-hdmi: stop enforcing input_bus_format Neil Armstrong
2020-02-06 19:18 ` [PATCH v4 09/11] drm/meson: venc: add support for YUV420 setup Neil Armstrong
2020-02-06 19:18 ` [PATCH v4 10/11] drm/meson: vclk: " Neil Armstrong
2020-02-06 19:18 ` [PATCH v4 11/11] drm/meson: Add YUV420 output support Neil Armstrong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6eede520-cbd8-51e5-6b56-afd727d50ab0@baylibre.com \
    --to=narmstrong@baylibre.com \
    --cc=a.hajda@samsung.com \
    --cc=boris.brezillon@collabora.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@siol.net \
    --cc=jonas@kwiboo.se \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).