All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Imre Deak <imre.deak@intel.com>
Cc: intel-gfx@lists.freedesktop.org, Chris Wilson <chris@chris-wilson.co.uk>
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Fix DPT suspend/resume on !HAS_DISPLAY platforms
Date: Fri, 26 Nov 2021 13:10:35 +0200	[thread overview]
Message-ID: <YaDAqwQIpLbYja9b@intel.com> (raw)
In-Reply-To: <20211125171603.1775179-1-imre.deak@intel.com>

On Thu, Nov 25, 2021 at 07:16:03PM +0200, Imre Deak wrote:
> The drm.mode_config state is not initialized in case of !HAS_DISPLAY
> so taking the fb_lock and iterating the fb list won't work on those
> platforms. Skip the suspend/resume with an explicit check for this.
> 
> Fixes: 9755f055f512 ("drm/i915: Restore memory mapping for DPT FBs across system suspend/resume")
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Signed-off-by: Imre Deak <imre.deak@intel.com>

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_dpt.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dpt.c b/drivers/gpu/drm/i915/display/intel_dpt.c
> index 56755788547d2..963ca7155b064 100644
> --- a/drivers/gpu/drm/i915/display/intel_dpt.c
> +++ b/drivers/gpu/drm/i915/display/intel_dpt.c
> @@ -183,6 +183,9 @@ void intel_dpt_resume(struct drm_i915_private *i915)
>  {
>  	struct drm_framebuffer *drm_fb;
>  
> +	if (!HAS_DISPLAY(i915))
> +		return;
> +
>  	mutex_lock(&i915->drm.mode_config.fb_lock);
>  	drm_for_each_fb(drm_fb, &i915->drm) {
>  		struct intel_framebuffer *fb = to_intel_framebuffer(drm_fb);
> @@ -207,6 +210,9 @@ void intel_dpt_suspend(struct drm_i915_private *i915)
>  {
>  	struct drm_framebuffer *drm_fb;
>  
> +	if (!HAS_DISPLAY(i915))
> +		return;
> +
>  	mutex_lock(&i915->drm.mode_config.fb_lock);
>  
>  	drm_for_each_fb(drm_fb, &i915->drm) {
> -- 
> 2.27.0

-- 
Ville Syrjälä
Intel

  parent reply	other threads:[~2021-11-26 11:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-25 17:16 [Intel-gfx] [PATCH] drm/i915: Fix DPT suspend/resume on !HAS_DISPLAY platforms Imre Deak
2021-11-25 17:53 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2021-11-25 22:38 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-11-26 13:01   ` Imre Deak
2021-11-26 13:06     ` Sarvela, Tomi P
2021-11-26 13:59       ` Imre Deak
2021-11-29 17:15         ` Vudum, Lakshminarayana
2021-11-26 11:10 ` Ville Syrjälä [this message]
2021-11-29 16:10 ` [Intel-gfx] ✓ Fi.CI.IGT: success " 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=YaDAqwQIpLbYja9b@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.