mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Abhinav Kumar <quic_abhinavk@quicinc.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: "Andrzej Hajda" <andrzej.hajda@intel.com>,
	"Neil Armstrong" <neil.armstrong@linaro.org>,
	"Robert Foss" <rfoss@kernel.org>,
	"Laurent Pinchart" <Laurent.pinchart@ideasonboard.com>,
	"Jonas Karlman" <jonas@kwiboo.se>,
	"Jernej Skrabec" <jernej.skrabec@gmail.com>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"David Airlie" <airlied@gmail.com>,
	"Daniel Vetter" <daniel@ffwll.ch>,
	"Dave Stevenson" <dave.stevenson@raspberrypi.com>,
	"igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>,
	"Petri Latvala" <adrinael@adrinael.net>,
	"Kamil Konieczny" <kamil.konieczny@linux.intel.com>,
	"Ville Syrjälä" <ville.syrjala@linux.intel.com>,
	"Rob Clark" <robdclark@gmail.com>,
	dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] drm/connector: automatically set immutable flag for max_bpc property
Date: Mon, 24 Jun 2024 15:55:56 -0700	[thread overview]
Message-ID: <30fa4e53-5a03-4030-2be5-f383a1c60077@quicinc.com> (raw)
In-Reply-To: <CAA8EJppcH-z275m6xDQaigsxmVhnfJkLVsq68GHLFoAq_p_2GA@mail.gmail.com>



On 6/24/2024 3:46 PM, Dmitry Baryshkov wrote:
> On Tue, 25 Jun 2024 at 01:39, Abhinav Kumar <quic_abhinavk@quicinc.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.
> 

True, then does DRM_MODE_PROP_IMMUTABLE need a doc update too indicating 
that even if the min and max is same, property will be interpreted as 
immutable.

>>
>>
>>> Fixes: aadb3e16b8f3 ("drm/connector: hdmi: Add output BPC to the connector state")
>>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>>> ---
>>>    drivers/gpu/drm/drm_connector.c | 7 ++++++-
>>>    1 file changed, 6 insertions(+), 1 deletion(-)
> 
> With best wishes
> Dmitry

  reply	other threads:[~2024-06-24 22:56 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-23  5:40 [PATCH v2 0/2] drm: fix two issues related to HDMI Connector implementation Dmitry Baryshkov
2024-06-23  5:40 ` [PATCH v2 1/2] drm/bridge-connector: reset the HDMI connector state Dmitry Baryshkov
2024-06-24 22:28   ` Abhinav Kumar
2024-06-24 22:31     ` Dmitry Baryshkov
2024-06-25 15:02   ` Maxime Ripard
2024-06-25 15:05     ` Dmitry Baryshkov
2024-06-25 15:49       ` Maxime Ripard
2024-06-25 16:38         ` Dmitry Baryshkov
2024-07-01 12:49           ` Maxime Ripard
2024-06-23  5:40 ` [PATCH v2 2/2] drm/connector: automatically set immutable flag for max_bpc property Dmitry Baryshkov
2024-06-24 22:39   ` Abhinav Kumar
2024-06-24 22:46     ` Dmitry Baryshkov
2024-06-24 22:55       ` Abhinav Kumar [this message]
2024-06-25  6:21         ` Dmitry Baryshkov
2024-06-25  7:19           ` Maxime Ripard
2024-06-25  7:23             ` Dmitry Baryshkov
2024-06-25 13:58               ` Maxime Ripard
2024-06-25 14:31                 ` Dmitry Baryshkov

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=30fa4e53-5a03-4030-2be5-f383a1c60077@quicinc.com \
    --to=quic_abhinavk@quicinc.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=adrinael@adrinael.net \
    --cc=airlied@gmail.com \
    --cc=andrzej.hajda@intel.com \
    --cc=daniel@ffwll.ch \
    --cc=dave.stevenson@raspberrypi.com \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=kamil.konieczny@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=rfoss@kernel.org \
    --cc=robdclark@gmail.com \
    --cc=tzimmermann@suse.de \
    --cc=ville.syrjala@linux.intel.com \
    /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

all inboxes | Powered by JetHome®