From: Jani Nikula <jani.nikula@linux.intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 11/11] drm/i915: Implement audio fastset
Date: Mon, 13 Nov 2023 17:51:41 +0200 [thread overview]
Message-ID: <87il65tzw2.fsf@intel.com> (raw)
In-Reply-To: <20231106211915.13406-12-ville.syrjala@linux.intel.com>
On Mon, 06 Nov 2023, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> There's no real why we'd need a full modeset for audio changes.
+reason
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> So let's allow audio to be toggled during fastset. In case the
> ELD changes while has_audio isn't changing state we force both
> audio disable and enable so the new ELD gets propagated to the
> audio driver.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_display.c | 32 ++++++--------------
> 1 file changed, 10 insertions(+), 22 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index 98d4fcd28073..a87a9ac63c4a 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -996,7 +996,9 @@ static bool audio_enabling(const struct intel_crtc_state *old_crtc_state,
> if (!new_crtc_state->hw.active)
> return false;
>
> - return is_enabling(has_audio, old_crtc_state, new_crtc_state);
> + return is_enabling(has_audio, old_crtc_state, new_crtc_state) ||
> + (new_crtc_state->has_audio &&
> + memcmp(old_crtc_state->eld, new_crtc_state->eld, MAX_ELD_BYTES) != 0);
> }
>
> static bool audio_disabling(const struct intel_crtc_state *old_crtc_state,
> @@ -1005,7 +1007,9 @@ static bool audio_disabling(const struct intel_crtc_state *old_crtc_state,
> if (!old_crtc_state->hw.active)
> return false;
>
> - return is_disabling(has_audio, old_crtc_state, new_crtc_state);
> + return is_disabling(has_audio, old_crtc_state, new_crtc_state) ||
> + (old_crtc_state->has_audio &&
> + memcmp(old_crtc_state->eld, new_crtc_state->eld, MAX_ELD_BYTES) != 0);
> }
>
> #undef is_disabling
> @@ -5123,23 +5127,6 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
> } \
> } while (0)
>
> -/*
> - * 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.
> - */
> -#define PIPE_CONF_CHECK_BOOL_INCOMPLETE(name) do { \
> - if (!fixup_inherited || (!current_config->name && !pipe_config->name)) { \
> - PIPE_CONF_CHECK_BOOL(name); \
> - } else { \
> - pipe_config_mismatch(fastset, crtc, __stringify(name), \
> - "unable to verify whether state matches exactly, forcing modeset (expected %s, found %s)", \
> - str_yes_no(current_config->name), \
> - str_yes_no(pipe_config->name)); \
> - ret = false; \
> - } \
> -} while (0)
> -
> #define PIPE_CONF_CHECK_P(name) do { \
> if (current_config->name != pipe_config->name) { \
> pipe_config_mismatch(fastset, crtc, __stringify(name), \
> @@ -5327,8 +5314,10 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
> PIPE_CONF_CHECK_BOOL(enhanced_framing);
> PIPE_CONF_CHECK_BOOL(fec_enable);
>
> - PIPE_CONF_CHECK_BOOL_INCOMPLETE(has_audio);
> - PIPE_CONF_CHECK_BUFFER(eld, MAX_ELD_BYTES);
> + if (!fastset) {
> + PIPE_CONF_CHECK_BOOL(has_audio);
> + PIPE_CONF_CHECK_BUFFER(eld, MAX_ELD_BYTES);
> + }
>
> PIPE_CONF_CHECK_X(gmch_pfit.control);
> /* pfit ratios are autocomputed by the hw on gen4+ */
> @@ -5498,7 +5487,6 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
> #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_COLOR_LUT
--
Jani Nikula, Intel
next prev parent reply other threads:[~2023-11-13 15:51 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-06 21:19 [Intel-gfx] [PATCH 00/11] drm/i915: Audio fastset, and some fixes Ville Syrjala
2023-11-06 21:19 ` [Intel-gfx] [PATCH 01/11] drm/i915: Check pipe active state in {planes, vrr}_{enabling, disabling}() Ville Syrjala
2023-11-13 15:31 ` Jani Nikula
2023-11-06 21:19 ` [Intel-gfx] [PATCH 02/11] drm/i915: Call intel_pre_plane_updates() also for pipes getting enabled Ville Syrjala
2023-11-13 15:33 ` Jani Nikula
2023-11-06 21:19 ` [Intel-gfx] [PATCH 03/11] drm/i915: Polish some RMWs Ville Syrjala
2023-11-13 15:34 ` Jani Nikula
2023-11-06 21:19 ` [Intel-gfx] [PATCH 04/11] drm/i915: Push audio enable/disable further out Ville Syrjala
2023-11-13 15:35 ` Jani Nikula
2023-11-06 21:19 ` [Intel-gfx] [PATCH 05/11] drm/i915: Wrap g4x+ DP/HDMI audio enable/disable Ville Syrjala
2023-11-13 15:38 ` Jani Nikula
2023-11-06 21:19 ` [Intel-gfx] [PATCH 06/11] drm/i915: Split g4x+ DP audio presence detect from port enable Ville Syrjala
2023-11-13 15:39 ` Jani Nikula
2023-11-06 21:19 ` [Intel-gfx] [PATCH 07/11] drm/i915: Split g4x+ HDMI " Ville Syrjala
2023-11-13 15:41 ` Jani Nikula
2023-11-06 21:19 ` [Intel-gfx] [PATCH 08/11] drm/i915: Convert audio enable/disable into encoder vfuncs Ville Syrjala
2023-11-13 15:43 ` Jani Nikula
2023-11-06 21:19 ` [Intel-gfx] [PATCH 09/11] drm/i915: Hoist the encoder->audio_{enable, disable}() calls higher up Ville Syrjala
2023-11-13 15:47 ` Jani Nikula
2023-11-13 15:47 ` Jani Nikula
2023-11-06 21:19 ` [Intel-gfx] [PATCH 10/11] drm/i915: Push audio_{enable, disable}() to the pre/post pane update stage Ville Syrjala
2023-11-13 15:49 ` Jani Nikula
2023-11-14 8:57 ` Ville Syrjälä
2023-11-15 8:26 ` Ville Syrjälä
2023-11-15 8:31 ` Jani Nikula
2023-11-06 21:19 ` [Intel-gfx] [PATCH 11/11] drm/i915: Implement audio fastset Ville Syrjala
2023-11-13 15:51 ` Jani Nikula [this message]
2023-11-06 23:10 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915: Audio fastset, and some fixes Patchwork
2023-11-06 23:29 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2023-11-13 21:30 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915: Audio fastset, and some fixes (rev2) 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=87il65tzw2.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=ville.syrjala@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 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.