Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Imre Deak <imre.deak@intel.com>,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/4] drm/i915/dp_mst: Fix connector initialization in intel_dp_add_mst_connector()
Date: Mon, 18 Nov 2024 13:45:07 +0200	[thread overview]
Message-ID: <87frno4vgc.fsf@intel.com> (raw)
In-Reply-To: <20241115164159.1081675-1-imre.deak@intel.com>

On Fri, 15 Nov 2024, Imre Deak <imre.deak@intel.com> wrote:
> The connector initialization in intel_dp_add_mst_connector() depends on
> the device pointer in connector to be valid, at least by connector
> debug printing. The device pointer is initialized by drm_connector_init(),
> however that function also exposes the connector to in-kernel users,
> which can't be done before the connector is fully initialized. For now
> make sure the device pointer is valid before it's used, until a
> follow-up change moving this to DRM core.
>
> This issue was revealed by the commit in the Fixes: line below, before
> which the above debug printing checked and handled a NULL device pointer
> gracefully in DRM core.
>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Fixes: 529798bd786a ("drm/i915/mst: convert to struct intel_display")
> Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12799
> Signed-off-by: Imre Deak <imre.deak@intel.com>

I think you should send this patch alone to intel-gfx and intel-xe to
address the regression.

The others can follow later, and likely be merged via drm-misc. I have
some comments about them, but I don't want to block fixing the issue.

BR,
Jani.


> ---
>  drivers/gpu/drm/i915/display/intel_dp_mst.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> index df7edcfe885b6..f058360a26413 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> @@ -1727,6 +1727,16 @@ static struct drm_connector *intel_dp_add_mst_connector(struct drm_dp_mst_topolo
>  
>  	intel_dp_init_modeset_retry_work(intel_connector);
>  
> +	/*
> +	 * TODO: The following drm_connector specific initialization belongs
> +	 * to DRM core, however it happens atm too late in
> +	 * drm_connector_init(). That function will also expose the connector
> +	 * to in-kernel users, so it can't be called until the connector is
> +	 * sufficiently initialized; init the device pointer used by the
> +	 * following DSC setup, until a fix moving this to DRM core.
> +	 */
> +	intel_connector->base.dev = mgr->dev;
> +
>  	intel_connector->dp.dsc_decompression_aux = drm_dp_mst_dsc_aux_for_port(port);
>  	intel_dp_mst_read_decompression_port_dsc_caps(intel_dp, intel_connector);
>  	intel_connector->dp.dsc_hblank_expansion_quirk =

-- 
Jani Nikula, Intel

      parent reply	other threads:[~2024-11-18 11:45 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-15 16:41 [PATCH 1/4] drm/i915/dp_mst: Fix connector initialization in intel_dp_add_mst_connector() Imre Deak
2024-11-15 16:41 ` [PATCH 2/4] drm/dp: Add a way to init/add a connector in separate steps Imre Deak
2024-11-15 20:18   ` Rodrigo Vivi
2024-11-18 12:09   ` Jani Nikula
2024-11-18 17:54     ` Imre Deak
2024-11-15 16:41 ` [PATCH 3/4] drm/i915/dp_mst: Expose a connector to kernel users after it's properly initialized Imre Deak
2024-11-15 20:18   ` Rodrigo Vivi
2024-11-18 12:12   ` Jani Nikula
2024-11-18 12:14     ` Imre Deak
2024-11-18 12:23       ` Jani Nikula
2024-11-18 13:12         ` Imre Deak
2024-11-15 16:41 ` [PATCH 4/4] drm/i915/dp_mst: Fix error handling while adding a connector Imre Deak
2024-11-15 20:17   ` Rodrigo Vivi
2024-11-15 17:08 ` ✗ Fi.CI.SPARSE: warning for series starting with [1/4] drm/i915/dp_mst: Fix connector initialization in intel_dp_add_mst_connector() Patchwork
2024-11-15 17:08 ` ✓ Fi.CI.BAT: success " Patchwork
2024-11-15 20:20 ` [PATCH 1/4] " Rodrigo Vivi
2024-11-15 20:30   ` Imre Deak
2024-11-15 22:30     ` Rodrigo Vivi
2024-11-18  9:10     ` Jani Nikula
2024-11-18 10:48       ` Imre Deak
2024-11-15 21:56 ` ✗ Fi.CI.IGT: failure for series starting with [1/4] " Patchwork
2024-11-18 11:45 ` Jani Nikula [this message]

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=87frno4vgc.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.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