From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v3 04/11] drm/i915: Handle adjust better in intel_pipe_config_compare
Date: Mon, 13 Nov 2017 19:24:22 +0200 [thread overview]
Message-ID: <20171113172422.GU10981@intel.com> (raw)
In-Reply-To: <20171110130245.qxdjzdnoqprb4hq6@phenom.ffwll.local>
On Fri, Nov 10, 2017 at 02:02:45PM +0100, Daniel Vetter wrote:
> On Fri, Nov 10, 2017 at 12:34:56PM +0100, Maarten Lankhorst wrote:
> > Some parameters use CHECK_BOOLL, but should really use
> > CHECK_BOOL_INCOMPLETE. We cannot currently check whether
> > the inherited infoframes and audio are set up correctly.
> >
> > Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> > ---
> > drivers/gpu/drm/i915/intel_display.c | 19 +++++++++++++++++--
> > 1 file changed, 17 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> > index 425167da560b..f5933b0719c9 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -11076,6 +11076,9 @@ intel_pipe_config_compare(struct drm_i915_private *dev_priv,
> > bool adjust)
> > {
> > bool ret = true;
> > + bool fixup_inherited = adjust &&
> > + (current_config->base.mode.private_flags & I915_MODE_FLAG_INHERITED) &&
> > + !(pipe_config->base.mode.private_flags & I915_MODE_FLAG_INHERITED);
> >
> > #define PIPE_CONF_CHECK_X(name) \
> > if (current_config->name != pipe_config->name) { \
> > @@ -11104,6 +11107,17 @@ intel_pipe_config_compare(struct drm_i915_private *dev_priv,
> > ret = false; \
> > }
> >
>
> Maybe add a comment here like
>
> /*
> * Checks state where we only read out the enabling, but not the entire
> * state itself (like full infoframes or ELD for audio). These states
> * require a full modeset on bootup to fix up.
has_audio shouldn't need the ELD. If audio is enabled then it's enabled,
otherwise it's not.
So I guess if the BIOS doesn't enable audio, then what we really need is
a way to enable it without a full modeset. And I can't immediately
recall if we can do that or not.
I'm worried that ignoring the issue will just lead to piles of bugs
where people complain that their audio doesn't work.
> */
>
> With that:
>
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>
> > +#define PIPE_CONF_CHECK_BOOL_INCOMPLETE(name) \
> > + if (!fixup_inherited || (!current_config->name && !pipe_config->name)) { \
> > + PIPE_CONF_CHECK_BOOL(name); \
> > + } else { \
> > + pipe_config_err(adjust, __stringify(name), \
> > + "unable to verify whether state matches exactly, forcing modeset (expected %s, found %s)\n", \
> > + yesno(current_config->name), \
> > + yesno(pipe_config->name)); \
> > + ret = false; \
> > + }
> > +
> > #define PIPE_CONF_CHECK_P(name) \
> > if (current_config->name != pipe_config->name) { \
> > pipe_config_err(adjust, __stringify(name), \
> > @@ -11228,10 +11242,10 @@ intel_pipe_config_compare(struct drm_i915_private *dev_priv,
> >
> > PIPE_CONF_CHECK_BOOL(hdmi_scrambling);
> > PIPE_CONF_CHECK_BOOL(hdmi_high_tmds_clock_ratio);
> > - PIPE_CONF_CHECK_BOOL(has_infoframe);
> > + PIPE_CONF_CHECK_BOOL_INCOMPLETE(has_infoframe);
> > PIPE_CONF_CHECK_BOOL(ycbcr420);
> >
> > - PIPE_CONF_CHECK_BOOL(has_audio);
> > + PIPE_CONF_CHECK_BOOL_INCOMPLETE(has_audio);
> >
> > PIPE_CONF_CHECK_FLAGS(base.adjusted_mode.flags,
> > DRM_MODE_FLAG_INTERLACE);
> > @@ -11306,6 +11320,7 @@ intel_pipe_config_compare(struct drm_i915_private *dev_priv,
> > #undef PIPE_CONF_CHECK_X
> > #undef PIPE_CONF_CHECK_I
> > #undef PIPE_CONF_CHECK_BOOL
> > +#undef PIPE_CONF_CHECK_BOOL_INCOMPLETE
> > #undef PIPE_CONF_CHECK_P
> > #undef PIPE_CONF_CHECK_FLAGS
> > #undef PIPE_CONF_CHECK_CLOCK_FUZZY
> > --
> > 2.15.0
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-11-13 17:24 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-10 11:34 [PATCH v3 01/11] drm/i915: Update watermark state correctly in sanitize_watermarks Maarten Lankhorst
2017-11-10 11:34 ` [PATCH v3 02/11] drm/i915: Remove bogus ips_enabled check Maarten Lankhorst
2017-11-10 12:57 ` Daniel Vetter
2017-11-13 17:19 ` Ville Syrjälä
2017-11-10 11:34 ` [PATCH v3 03/11] drm/i915: Check boolean options in intel_pipe_config_compare with its own macro Maarten Lankhorst
2017-11-10 12:58 ` Daniel Vetter
2017-11-10 11:34 ` [PATCH v3 04/11] drm/i915: Handle adjust better in intel_pipe_config_compare Maarten Lankhorst
2017-11-10 13:02 ` Daniel Vetter
2017-11-13 17:24 ` Ville Syrjälä [this message]
2017-11-20 10:38 ` Daniel Vetter
2017-11-20 10:53 ` Ville Syrjälä
2017-11-20 12:54 ` Daniel Vetter
2017-11-10 11:34 ` [PATCH v3 05/11] drm/i915: Only enable IPS when primary plane is visible Maarten Lankhorst
2017-11-10 13:05 ` Daniel Vetter
2017-11-10 11:34 ` [PATCH v3 06/11] drm/i915: Handle locking better in i915_sink_crc Maarten Lankhorst
2017-11-10 13:13 ` Daniel Vetter
2017-11-10 13:24 ` Daniel Vetter
2017-11-13 12:05 ` Maarten Lankhorst
2017-11-10 11:34 ` [PATCH v3 07/11] drm/i915: Pass idle crtc_state to intel_dp_sink_crc Maarten Lankhorst
2017-11-13 17:17 ` Ville Syrjälä
2017-11-10 11:35 ` [PATCH v3 08/11] drm/i915: Pass crtc_state to ips toggle functions, v2 Maarten Lankhorst
2017-11-13 17:18 ` Ville Syrjälä
2017-11-17 11:21 ` Maarten Lankhorst
2017-11-10 11:35 ` [PATCH v3 09/11] drm/i915: Handle ips_enabled in fastset, v2 Maarten Lankhorst
2017-11-10 13:15 ` Daniel Vetter
2017-11-10 20:06 ` Ville Syrjälä
2017-11-10 11:35 ` [PATCH v3 10/11] drm/i915: Enable FIFO underrun reporting after initial fastset, v3 Maarten Lankhorst
2017-11-10 13:58 ` Daniel Vetter
2017-11-10 19:48 ` Ville Syrjälä
2017-11-13 12:01 ` Maarten Lankhorst
2017-11-13 13:19 ` Ville Syrjälä
2017-11-13 14:40 ` [PATCH] drm/i915: Enable FIFO underrun reporting after initial fastset, v4 Maarten Lankhorst
2017-11-13 14:49 ` Ville Syrjälä
2017-11-10 11:35 ` [PATCH v3 11/11] drm/i915: Re-enable fastboot by default Maarten Lankhorst
2017-11-10 12:30 ` ✓ Fi.CI.BAT: success for series starting with [v3,01/11] drm/i915: Update watermark state correctly in sanitize_watermarks Patchwork
2017-11-10 13:48 ` ✓ Fi.CI.IGT: " Patchwork
2017-11-10 15:28 ` [Intel-gfx] [PATCH v3 01/11] " Ville Syrjälä
2017-11-11 14:14 ` Maarten Lankhorst
2017-11-13 14:52 ` ✗ Fi.CI.BAT: failure for series starting with [v3,01/11] drm/i915: Update watermark state correctly in sanitize_watermarks (rev2) Patchwork
2017-11-13 15:21 ` 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=20171113172422.GU10981@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=daniel@ffwll.ch \
--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