From: Matt Roper <matthew.d.roper@intel.com>
To: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 3/3] drm/i915: Don't set enabled value of all CRTCs when restoring the mode
Date: Mon, 15 Jun 2015 19:00:57 -0700 [thread overview]
Message-ID: <20150616020057.GM13852@intel.com> (raw)
In-Reply-To: <1434093582-5824-4-git-send-email-ander.conselvan.de.oliveira@intel.com>
On Fri, Jun 12, 2015 at 10:19:42AM +0300, Ander Conselvan de Oliveira wrote:
> The code in intel_crtc_restore_mode() sets the enabled value of all the
> CRTCs when restoring the mode after a suspend/resume cycle. When more
> than one CRTC is enabled, that causes drm_atomic_helper_check_modeset()
> to fail if there is more than one pipe enabled, since only one CRTC has
> valid connector data. Instead, set only the enabled value for the CRTC
> passed as an argument.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90468
> References: https://bugs.freedesktop.org/show_bug.cgi?id=90396
> Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
> ---
> drivers/gpu/drm/i915/intel_display.c | 27 ++++++++++-----------------
> 1 file changed, 10 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 49c6698..736e653 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -12683,7 +12683,6 @@ void intel_crtc_restore_mode(struct drm_crtc *crtc)
> {
> struct drm_device *dev = crtc->dev;
> struct drm_atomic_state *state;
> - struct intel_crtc *intel_crtc;
> struct intel_encoder *encoder;
> struct intel_connector *connector;
> struct drm_connector_state *connector_state;
> @@ -12726,24 +12725,18 @@ void intel_crtc_restore_mode(struct drm_crtc *crtc)
> }
> }
>
> - for_each_intel_crtc(dev, intel_crtc) {
> - if (intel_crtc->new_enabled == intel_crtc->base.enabled)
> - continue;
> -
> - crtc_state = intel_atomic_get_crtc_state(state, intel_crtc);
> - if (IS_ERR(crtc_state)) {
> - DRM_DEBUG_KMS("Failed to add [CRTC:%d] to state: %ld\n",
> - intel_crtc->base.base.id,
> - PTR_ERR(crtc_state));
> - continue;
> - }
> + crtc_state = intel_atomic_get_crtc_state(state, to_intel_crtc(crtc));
> + if (IS_ERR(crtc_state)) {
> + DRM_DEBUG_KMS("Failed to add [CRTC:%d] to state: %ld\n",
> + crtc->base.id, PTR_ERR(crtc_state));
> + /* FIXME: leaking drm atomic state */
I'm not sure I understand why we need to leak here? Can't we just call
drm_atomic_state_free() before returning?
Aside from that,
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
> + return;
> + }
>
> - crtc_state->base.active = crtc_state->base.enable =
> - intel_crtc->new_enabled;
> + crtc_state->base.active = crtc_state->base.enable =
> + to_intel_crtc(crtc)->new_enabled;
>
> - if (&intel_crtc->base == crtc)
> - drm_mode_copy(&crtc_state->base.mode, &crtc->mode);
> - }
> + drm_mode_copy(&crtc_state->base.mode, &crtc->mode);
>
> intel_modeset_setup_plane_state(state, crtc, &crtc->mode,
> crtc->primary->fb, crtc->x, crtc->y);
> --
> 2.1.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Matt Roper
Graphics Software Engineer
IoTG Platform Enabling & Development
Intel Corporation
(916) 356-2795
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
prev parent reply other threads:[~2015-06-16 2:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-12 7:19 [PATCH 0/3] Couple of bug fixes for drm-intel-next-fixes Ander Conselvan de Oliveira
2015-06-12 7:19 ` [PATCH 1/3] drm/i915: Don't check modeset state in the hw state force restore path Ander Conselvan de Oliveira
2015-06-16 2:00 ` Matt Roper
2015-06-16 8:54 ` Ander Conselvan De Oliveira
2015-06-12 7:19 ` [PATCH 2/3] drm/i915: Don't update staged config during force restore modesets Ander Conselvan de Oliveira
2015-06-16 2:00 ` Matt Roper
2015-06-12 7:19 ` [PATCH 3/3] drm/i915: Don't set enabled value of all CRTCs when restoring the mode Ander Conselvan de Oliveira
2015-06-16 2:00 ` Matt Roper [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=20150616020057.GM13852@intel.com \
--to=matthew.d.roper@intel.com \
--cc=ander.conselvan.de.oliveira@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