Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: imre.deak@intel.com,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Flush power delayed put when connector init failed
Date: Fri, 02 Jun 2023 20:42:39 +0300	[thread overview]
Message-ID: <878rd1dals.fsf@intel.com> (raw)
In-Reply-To: <Y6S/msVyeS9dZoGH@ideak-desk.fi.intel.com>

On Thu, 22 Dec 2022, Imre Deak <imre.deak@intel.com> wrote:
> On Thu, Dec 22, 2022 at 09:18:04PM +0100, Maarten Lankhorst wrote:
>> When intel_dp_init_connector fails, some power wells used in dp aux
>> communication may not be completely disabled yet. This may result in a
>> null pointer dereference when icl_aux_pw_to_phy() is called from
>> icl_combo_phy_aux_power_well_disable() after the encoder and connector
>> are already freed.
>> 
>> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>> Cc: Imre Deak <imre.deak@intel.com>
>> Cc: Jani Nikula <jani.nikula@intel.com>
>> ---
>> This approach better?
>
> Looks ok to me, thanks for fixing it. I think Jani's idea is good to
> refactor things wrt. the encoder hooks, but imo that could be done later
> keeping the fix simpler, so:
>
> Acked-by: Imre Deak <imre.deak@intel.com>

I missed this one. Pushed to din now, thanks for the patch and ack.

BR,
Jani.


>
>> 
>>  drivers/gpu/drm/i915/display/intel_dp.c | 1 +
>>  1 file changed, 1 insertion(+)
>> 
>> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
>> index bf80f296a8fd..8cf1d6ca86f4 100644
>> --- a/drivers/gpu/drm/i915/display/intel_dp.c
>> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
>> @@ -5492,6 +5492,7 @@ intel_dp_init_connector(struct intel_digital_port *dig_port,
>>  	return true;
>>  
>>  fail:
>> +	intel_display_power_flush_work(dev_priv);
>>  	drm_connector_cleanup(connector);
>>  
>>  	return false;
>> -- 
>> 2.37.2
>> 

-- 
Jani Nikula, Intel Open Source Graphics Center

  reply	other threads:[~2023-06-02 17:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-22 20:18 [Intel-gfx] [PATCH] drm/i915: Flush power delayed put when connector init failed Maarten Lankhorst
2022-12-22 20:35 ` Imre Deak
2023-06-02 17:42   ` Jani Nikula [this message]
2022-12-22 21:11 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2022-12-23  3:16 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork

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=878rd1dals.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=maarten.lankhorst@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