[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAA8EJppcH-z275m6xDQaigsxmVhnfJkLVsq68GHLFoAq_p_2GA@mail.gmail.com>
Date: Tue, 25 Jun 2024 01:46:20 +0300
From: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
To: Abhinav Kumar <quic_abhinavk@...cinc.com>
Cc: Andrzej Hajda <andrzej.hajda@...el.com>, Neil Armstrong <neil.armstrong@...aro.org>,
Robert Foss <rfoss@...nel.org>, Laurent Pinchart <Laurent.pinchart@...asonboard.com>,
Jonas Karlman <jonas@...boo.se>, Jernej Skrabec <jernej.skrabec@...il.com>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>, Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>, David Airlie <airlied@...il.com>, Daniel Vetter <daniel@...ll.ch>,
Dave Stevenson <dave.stevenson@...pberrypi.com>,
"igt-dev@...ts.freedesktop.org" <igt-dev@...ts.freedesktop.org>, Petri Latvala <adrinael@...inael.net>,
Kamil Konieczny <kamil.konieczny@...ux.intel.com>,
Ville Syrjälä <ville.syrjala@...ux.intel.com>,
Rob Clark <robdclark@...il.com>, dri-devel@...ts.freedesktop.org,
freedreno@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] drm/connector: automatically set immutable flag
for max_bpc property
On Tue, 25 Jun 2024 at 01:39, Abhinav Kumar <quic_abhinavk@...cinc.com> wrote:
>
> + IGT dev
>
> On 6/22/2024 10:40 PM, Dmitry Baryshkov wrote:
> > With the introduction of the HDMI Connector framework the driver might
> > end up creating the max_bpc property with min = max = 8. IGT insists
> > that such properties carry the 'immutable' flag. Automatically set the
> > flag if the driver asks for the max_bpc property with min == max.
> >
>
> This change does not look right to me.
>
> I wonder why we need this check because DRM_MODE_PROP_IMMUTABLE means
> that as per the doc, userspace cannot change the property.
>
> * DRM_MODE_PROP_IMMUTABLE
> * Set for properties whose values cannot be changed by
> * userspace. The kernel is allowed to update the value of
> these
> * properties. This is generally used to expose probe state to
> * userspace, e.g. the EDID, or the connector path property
> on DP
> * MST sinks. Kernel can update the value of an immutable
> property
> * by calling drm_object_property_set_value().
> */
>
> Here we are allowing userspace to change max_bpc
>
>
> drm_atomic_connector_set_property()
> {
> **********
>
> } else if (property == connector->max_bpc_property) {
> state->max_requested_bpc = val;
>
> **********
> }
>
> I believe you are referring to this IGT check right?
>
> https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/blob/master/tests/kms_properties.c#L428
Yes
>
> I think we should fix IGT in this case unless there is some reason we
> are missing. Because just because it has the same min and max does not
> mean its immutable by the doc of the IMMUTABLE flag.
Well, having the same min and max means that it is impossible to
change the property. So the property is immutable, but doesn't have
the flag.
>
>
> > Fixes: aadb3e16b8f3 ("drm/connector: hdmi: Add output BPC to the connector state")
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
> > ---
> > drivers/gpu/drm/drm_connector.c | 7 ++++++-
> > 1 file changed, 6 insertions(+), 1 deletion(-)
With best wishes
Dmitry
Powered by blists - more mailing lists