All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH] drm/i915/display: compute config for audio
@ 2022-08-23 22:21 Borah, Chaitanya Kumar
  2022-08-24  6:06 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Borah, Chaitanya Kumar @ 2022-08-23 22:21 UTC (permalink / raw)
  To: intel-gfx; +Cc: kai.vehmanen, Borah

In certain scenarios, we might have to filter out some audio
configuration depending on HW limitation. For example, in
GLK DP port more than 2 channels are not supported for audio.
A monitor provides information of it's supported audio configurations
through SAD (Short Audio Descriptors) which are part of the ELD/EDID.
In this patch we add a bit mask to indicate which SADs are supported.
The bit mask is updated in the function intel_eld_compute_config().
Based on this bit mask, we prune SADs which are not supported in
the function i915_audio_component_get_eld() before sending out the
data to the audio driver.

We use a bit mask instead of operating on the eld data directly as
eld data can get updated after intel_eld_compute_config() and before
i915_audio_component_get_eld() is called

fixes: https://gitlab.freedesktop.org/drm/intel/-/issues/5368

Signed-off-by: Borah, Chaitanya Kumar <chaitanya.kumar.borah@intel.com>
---
 drivers/gpu/drm/drm_edid.c                    | 36 ++++++++++
 drivers/gpu/drm/i915/display/intel_audio.c    | 65 ++++++++++++++++++-
 drivers/gpu/drm/i915/display/intel_audio.h    |  3 +
 drivers/gpu/drm/i915/display/intel_ddi.c      |  2 +
 .../drm/i915/display/intel_display_types.h    |  9 +++
 include/drm/drm_edid.h                        |  9 +++
 6 files changed, 123 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 90a5e26eafa8..3495af8d8596 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -6988,3 +6988,39 @@ static void _drm_update_tile_info(struct drm_connector *connector,
 		connector->tile_group = NULL;
 	}
 }
+
+/*
+ * drm_sad_to_format - extract format of an SAD
+ * @sad: pointer to an sad
+ *
+ * extract the format of an SAD from byte 0
+ */
+int drm_sad_to_format(const u8 *sad)
+{
+	return (sad[0] & DRM_ELD_SAD_FORMAT_MASK) >> DRM_ELD_SAD_FORMAT_SHIFT;
+}
+EXPORT_SYMBOL(drm_sad_to_format);
+
+/*
+ * drm_sad_to_format - extract channels of an SAD
+ * @sad: pointer to an sad
+ *
+ * extract number of supported channels from byte 0 of SAD
+ */
+int drm_sad_to_channels(const u8 *sad)
+{
+	return (sad[0] & DRM_ELD_SAD_CHANNELS_MASK) + 1;
+}
+EXPORT_SYMBOL(drm_sad_to_channels);
+
+/*
+ * drm_sad_to_format - extract supported rates of an SAD
+ * @sad: pointer to an sad
+ *
+ * extract supported rates from byte 1 of SAD
+ */
+int drm_sad_to_rates(const u8 *sad)
+{
+	return sad[1] & DRM_ELD_SAD_RATES_MASK;
+}
+EXPORT_SYMBOL(drm_sad_to_rates);
diff --git a/drivers/gpu/drm/i915/display/intel_audio.c b/drivers/gpu/drm/i915/display/intel_audio.c
index 6c9ee905f132..ac425b652331 100644
--- a/drivers/gpu/drm/i915/display/intel_audio.c
+++ b/drivers/gpu/drm/i915/display/intel_audio.c
@@ -1235,7 +1235,33 @@ static int i915_audio_component_get_eld(struct device *kdev, int port,
 	if (*enabled) {
 		eld = intel_encoder->audio_connector->eld;
 		ret = drm_eld_size(eld);
-		memcpy(buf, eld, min(max_bytes, ret));
+
+		if (intel_encoder->sad_mask_valid) {
+			int i;
+			u8 *temp_buf;
+			u8 *sad;
+
+			temp_buf = kzalloc(ret, GFP_KERNEL);
+
+			if (!temp_buf) {
+				mutex_unlock(&dev_priv->audio.mutex);
+				return -ENOMEM;
+			}
+
+			memcpy(temp_buf, eld, ret);
+
+			sad = (u8 *)drm_eld_sad(temp_buf);
+
+			for (i = 0; i < drm_eld_sad_count(temp_buf); i++, sad += 3) {
+				if (!(intel_encoder->supported_sads & (1 << i)))
+					memset(&sad[0], 0, 3);
+			}
+
+			memcpy(buf, temp_buf, min(max_bytes, ret));
+			kfree(temp_buf);
+		} else {
+			memcpy(buf, eld, min(max_bytes, ret));
+		}
 	}
 
 	mutex_unlock(&dev_priv->audio.mutex);
@@ -1408,3 +1434,40 @@ void intel_audio_deinit(struct drm_i915_private *dev_priv)
 	else
 		i915_audio_component_cleanup(dev_priv);
 }
+
+void intel_eld_compute_config(struct intel_encoder *encoder,
+			      const struct intel_crtc_state *pipe_config,
+			      const struct drm_connector_state *conn_state)
+{
+		struct drm_connector *connector = conn_state->connector;
+		u8 *eld = connector->eld;
+		const u8 *sad = drm_eld_sad(eld);
+		struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
+		u32 *supported_sads = &encoder->supported_sads;
+		int i, channels;
+
+		mutex_lock(&dev_priv->audio.mutex);
+
+		/* reset information about supported sads to default */
+		*supported_sads = 0;
+		encoder->sad_mask_valid = false;
+
+		/* Currently filtering SADs is necessary only for GLK due to it's
+		 * hardware limitations. However, this function can be scaled
+		 * to any scenario where display driver has to filter out certain
+		 * SADs before exposing them to the audio driver.
+		 */
+		if (IS_GEMINILAKE(dev_priv) &&
+		    intel_crtc_has_type(pipe_config, INTEL_OUTPUT_DP)) {
+			encoder->sad_mask_valid = true;
+
+			for (i = 0; i < drm_eld_sad_count(eld); i++, sad += 3) {
+				channels = drm_sad_to_channels(sad);
+
+				if (channels <= 2)
+					(*supported_sads) |= 1 << i;
+			}
+		}
+		drm_dbg_kms(&dev_priv->drm, "supported_sads 0x%x\n", *supported_sads);
+		mutex_unlock(&dev_priv->audio.mutex);
+}
diff --git a/drivers/gpu/drm/i915/display/intel_audio.h b/drivers/gpu/drm/i915/display/intel_audio.h
index 63b22131dc45..17c468a9e07e 100644
--- a/drivers/gpu/drm/i915/display/intel_audio.h
+++ b/drivers/gpu/drm/i915/display/intel_audio.h
@@ -22,5 +22,8 @@ void intel_audio_cdclk_change_pre(struct drm_i915_private *dev_priv);
 void intel_audio_cdclk_change_post(struct drm_i915_private *dev_priv);
 void intel_audio_init(struct drm_i915_private *dev_priv);
 void intel_audio_deinit(struct drm_i915_private *dev_priv);
+void intel_eld_compute_config(struct intel_encoder *encoder,
+			      const struct intel_crtc_state *pipe_config,
+			      const struct drm_connector_state *conn_state);
 
 #endif /* __INTEL_AUDIO_H__ */
diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
index 6c43a5124cb8..e7807500c88d 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi.c
@@ -3678,6 +3678,8 @@ static int intel_ddi_compute_config(struct intel_encoder *encoder,
 
 	intel_ddi_compute_min_voltage_level(dev_priv, pipe_config);
 
+	intel_eld_compute_config(encoder, pipe_config, conn_state);
+
 	return 0;
 }
 
diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
index 0da9b208d56e..5b6a694ff0cc 100644
--- a/drivers/gpu/drm/i915/display/intel_display_types.h
+++ b/drivers/gpu/drm/i915/display/intel_display_types.h
@@ -265,6 +265,15 @@ struct intel_encoder {
 	/* for communication with audio component; protected by av_mutex */
 	const struct drm_connector *audio_connector;
 
+	/* bitmask to track supported SADs for current audio connector.
+	 * According to HDA spec Rev 1.0a, ELD SAD limit is 15. Using
+	 * a 32 bit mask for future proofing; protected by av_mutex
+	 */
+	u32 supported_sads;
+
+	/* indicates if the supported_sads is a valid bitmask; protected by av_mutex */
+	bool sad_mask_valid;
+
 	/* VBT information for this encoder (may be NULL for older platforms) */
 	const struct intel_bios_encoder_data *devdata;
 };
diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h
index 2181977ae683..363f4487cdd6 100644
--- a/include/drm/drm_edid.h
+++ b/include/drm/drm_edid.h
@@ -318,6 +318,11 @@ struct detailed_timing {
 
 #define DRM_ELD_CEA_SAD(mnl, sad)	(20 + (mnl) + 3 * (sad))
 
+#define DRM_ELD_SAD_FORMAT_MASK 0x78
+#define DRM_ELD_SAD_FORMAT_SHIFT 3
+#define DRM_ELD_SAD_CHANNELS_MASK 0x7
+#define DRM_ELD_SAD_RATES_MASK 0x7f
+
 struct edid {
 	u8 header[8];
 	/* Vendor & product info */
@@ -378,6 +383,10 @@ int drm_edid_to_speaker_allocation(const struct edid *edid, u8 **sadb);
 int drm_av_sync_delay(struct drm_connector *connector,
 		      const struct drm_display_mode *mode);
 
+int drm_sad_to_format(const u8 *sad);
+int drm_sad_to_channels(const u8 *sad);
+int drm_sad_to_rates(const u8 *sad);
+
 #ifdef CONFIG_DRM_LOAD_EDID_FIRMWARE
 struct edid *drm_load_edid_firmware(struct drm_connector *connector);
 int __drm_set_edid_firmware_path(const char *path);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/display: compute config for audio
  2022-08-23 22:21 [Intel-gfx] [PATCH] drm/i915/display: compute config for audio Borah, Chaitanya Kumar
@ 2022-08-24  6:06 ` Patchwork
  2022-08-24 13:56 ` [Intel-gfx] [PATCH] " Jani Nikula
  2022-08-25  7:27 ` [Intel-gfx] ✓ Fi.CI.IGT: success for " Patchwork
  2 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2022-08-24  6:06 UTC (permalink / raw)
  To: Borah, Chaitanya Kumar; +Cc: intel-gfx

[-- Attachment #1: Type: text/plain, Size: 4988 bytes --]

== Series Details ==

Series: drm/i915/display: compute config for audio
URL   : https://patchwork.freedesktop.org/series/107647/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12018 -> Patchwork_107647v1
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/index.html

Participating hosts (38 -> 32)
------------------------------

  Missing    (6): bat-dg1-5 bat-dg2-10 bat-adlp-4 bat-rplp-1 bat-rpls-1 bat-rpls-2 

Known issues
------------

  Here are the changes found in Patchwork_107647v1 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@i915_selftest@live@gem:
    - fi-pnv-d510:        NOTRUN -> [DMESG-FAIL][1] ([i915#4528])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/fi-pnv-d510/igt@i915_selftest@live@gem.html

  * igt@i915_selftest@live@late_gt_pm:
    - fi-bdw-gvtdvm:      [PASS][2] -> [DMESG-FAIL][3] ([i915#6217])
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12018/fi-bdw-gvtdvm/igt@i915_selftest@live@late_gt_pm.html
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/fi-bdw-gvtdvm/igt@i915_selftest@live@late_gt_pm.html

  * igt@i915_suspend@basic-s3-without-i915:
    - fi-hsw-g3258:       NOTRUN -> [INCOMPLETE][4] ([i915#4817] / [i915#6598])
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/fi-hsw-g3258/igt@i915_suspend@basic-s3-without-i915.html

  * igt@runner@aborted:
    - fi-bdw-gvtdvm:      NOTRUN -> [FAIL][5] ([i915#4312])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/fi-bdw-gvtdvm/igt@runner@aborted.html

  
#### Possible fixes ####

  * igt@i915_selftest@live@gt_lrc:
    - {bat-dg2-8}:        [INCOMPLETE][6] ([i915#6670]) -> [PASS][7]
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12018/bat-dg2-8/igt@i915_selftest@live@gt_lrc.html
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/bat-dg2-8/igt@i915_selftest@live@gt_lrc.html

  * igt@i915_selftest@live@hangcheck:
    - fi-hsw-g3258:       [INCOMPLETE][8] ([i915#3303] / [i915#4785]) -> [PASS][9]
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12018/fi-hsw-g3258/igt@i915_selftest@live@hangcheck.html
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/fi-hsw-g3258/igt@i915_selftest@live@hangcheck.html

  * igt@i915_selftest@live@requests:
    - fi-pnv-d510:        [DMESG-FAIL][10] ([i915#4528]) -> [PASS][11]
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12018/fi-pnv-d510/igt@i915_selftest@live@requests.html
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/fi-pnv-d510/igt@i915_selftest@live@requests.html

  
#### Warnings ####

  * igt@i915_suspend@basic-s3-without-i915:
    - fi-elk-e7500:       [INCOMPLETE][12] ([i915#6598] / [i915#6648]) -> [INCOMPLETE][13] ([i915#6598] / [i915#6601] / [i915#6648])
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12018/fi-elk-e7500/igt@i915_suspend@basic-s3-without-i915.html
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/fi-elk-e7500/igt@i915_suspend@basic-s3-without-i915.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [i915#3303]: https://gitlab.freedesktop.org/drm/intel/issues/3303
  [i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
  [i915#4528]: https://gitlab.freedesktop.org/drm/intel/issues/4528
  [i915#4785]: https://gitlab.freedesktop.org/drm/intel/issues/4785
  [i915#4817]: https://gitlab.freedesktop.org/drm/intel/issues/4817
  [i915#5153]: https://gitlab.freedesktop.org/drm/intel/issues/5153
  [i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
  [i915#6217]: https://gitlab.freedesktop.org/drm/intel/issues/6217
  [i915#6598]: https://gitlab.freedesktop.org/drm/intel/issues/6598
  [i915#6599]: https://gitlab.freedesktop.org/drm/intel/issues/6599
  [i915#6601]: https://gitlab.freedesktop.org/drm/intel/issues/6601
  [i915#6645]: https://gitlab.freedesktop.org/drm/intel/issues/6645
  [i915#6648]: https://gitlab.freedesktop.org/drm/intel/issues/6648
  [i915#6670]: https://gitlab.freedesktop.org/drm/intel/issues/6670


Build changes
-------------

  * Linux: CI_DRM_12018 -> Patchwork_107647v1

  CI-20190529: 20190529
  CI_DRM_12018: b50fa415e25e27958bf55e048d44dad0b2f6a03f @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_6634: e01fe99f00692864b709253638c809231d1fb333 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_107647v1: b50fa415e25e27958bf55e048d44dad0b2f6a03f @ git://anongit.freedesktop.org/gfx-ci/linux


### Linux commits

356fc1f20dda drm/i915/display: compute config for audio

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/index.html

[-- Attachment #2: Type: text/html, Size: 5711 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915/display: compute config for audio
  2022-08-23 22:21 [Intel-gfx] [PATCH] drm/i915/display: compute config for audio Borah, Chaitanya Kumar
  2022-08-24  6:06 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
@ 2022-08-24 13:56 ` Jani Nikula
  2022-08-24 15:57   ` Kai Vehmanen
  2022-08-25  7:27 ` [Intel-gfx] ✓ Fi.CI.IGT: success for " Patchwork
  2 siblings, 1 reply; 6+ messages in thread
From: Jani Nikula @ 2022-08-24 13:56 UTC (permalink / raw)
  To: Borah, Chaitanya Kumar, intel-gfx; +Cc: kai.vehmanen, Borah

On Wed, 24 Aug 2022, "Borah, Chaitanya Kumar" <chaitanya.kumar.borah@intel.com> wrote:
> In certain scenarios, we might have to filter out some audio
> configuration depending on HW limitation. For example, in
> GLK DP port more than 2 channels are not supported for audio.
> A monitor provides information of it's supported audio configurations
> through SAD (Short Audio Descriptors) which are part of the ELD/EDID.
> In this patch we add a bit mask to indicate which SADs are supported.
> The bit mask is updated in the function intel_eld_compute_config().
> Based on this bit mask, we prune SADs which are not supported in
> the function i915_audio_component_get_eld() before sending out the
> data to the audio driver.
>
> We use a bit mask instead of operating on the eld data directly as
> eld data can get updated after intel_eld_compute_config() and before
> i915_audio_component_get_eld() is called
>
> fixes: https://gitlab.freedesktop.org/drm/intel/-/issues/5368
>
> Signed-off-by: Borah, Chaitanya Kumar <chaitanya.kumar.borah@intel.com>
> ---
>  drivers/gpu/drm/drm_edid.c                    | 36 ++++++++++
>  drivers/gpu/drm/i915/display/intel_audio.c    | 65 ++++++++++++++++++-
>  drivers/gpu/drm/i915/display/intel_audio.h    |  3 +
>  drivers/gpu/drm/i915/display/intel_ddi.c      |  2 +
>  .../drm/i915/display/intel_display_types.h    |  9 +++
>  include/drm/drm_edid.h                        |  9 +++

First of all, drm_edid.[ch] and i915 changes need to be separated.

>  6 files changed, 123 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index 90a5e26eafa8..3495af8d8596 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -6988,3 +6988,39 @@ static void _drm_update_tile_info(struct drm_connector *connector,
>  		connector->tile_group = NULL;
>  	}
>  }
> +
> +/*
> + * drm_sad_to_format - extract format of an SAD
> + * @sad: pointer to an sad
> + *
> + * extract the format of an SAD from byte 0
> + */
> +int drm_sad_to_format(const u8 *sad)
> +{
> +	return (sad[0] & DRM_ELD_SAD_FORMAT_MASK) >> DRM_ELD_SAD_FORMAT_SHIFT;
> +}
> +EXPORT_SYMBOL(drm_sad_to_format);
> +
> +/*
> + * drm_sad_to_format - extract channels of an SAD
> + * @sad: pointer to an sad
> + *
> + * extract number of supported channels from byte 0 of SAD
> + */
> +int drm_sad_to_channels(const u8 *sad)
> +{
> +	return (sad[0] & DRM_ELD_SAD_CHANNELS_MASK) + 1;
> +}
> +EXPORT_SYMBOL(drm_sad_to_channels);
> +
> +/*
> + * drm_sad_to_format - extract supported rates of an SAD
> + * @sad: pointer to an sad
> + *
> + * extract supported rates from byte 1 of SAD
> + */
> +int drm_sad_to_rates(const u8 *sad)
> +{
> +	return sad[1] & DRM_ELD_SAD_RATES_MASK;
> +}
> +EXPORT_SYMBOL(drm_sad_to_rates);

Not enthusiastic about adding a bunch of new functions to inspect the
sad here. Makes me think this should be parsed and stored in
drm_display_info in drm_edid_to_eld() instead if it's generally useful
data.

> diff --git a/drivers/gpu/drm/i915/display/intel_audio.c b/drivers/gpu/drm/i915/display/intel_audio.c
> index 6c9ee905f132..ac425b652331 100644
> --- a/drivers/gpu/drm/i915/display/intel_audio.c
> +++ b/drivers/gpu/drm/i915/display/intel_audio.c
> @@ -1235,7 +1235,33 @@ static int i915_audio_component_get_eld(struct device *kdev, int port,
>  	if (*enabled) {
>  		eld = intel_encoder->audio_connector->eld;
>  		ret = drm_eld_size(eld);
> -		memcpy(buf, eld, min(max_bytes, ret));
> +
> +		if (intel_encoder->sad_mask_valid) {
> +			int i;
> +			u8 *temp_buf;
> +			u8 *sad;
> +
> +			temp_buf = kzalloc(ret, GFP_KERNEL);
> +
> +			if (!temp_buf) {
> +				mutex_unlock(&dev_priv->audio.mutex);
> +				return -ENOMEM;

Please no error returns like this; use goto and common exit handling
with the unlock.

> +			}
> +
> +			memcpy(temp_buf, eld, ret);
> +
> +			sad = (u8 *)drm_eld_sad(temp_buf);

This may return NULL. And cringe about casting const away.

> +
> +			for (i = 0; i < drm_eld_sad_count(temp_buf); i++, sad += 3) {
> +				if (!(intel_encoder->supported_sads & (1 << i)))
> +					memset(&sad[0], 0, 3);

Here's the main question I have about the change, really. The ELD
(literally EDID-like-data) and SAD are supposed to describe the *sink*
capabilities. Why are we filtering the data here, telling the audio
controller driver this is what the *sink* supports, when the limitation
comes from the *source*?

I could just be clueless about how audio works, but semantically this
feels the same as modifying the EDID based on what the *source*
supports.

> +			}
> +
> +			memcpy(buf, temp_buf, min(max_bytes, ret));
> +			kfree(temp_buf);
> +		} else {
> +			memcpy(buf, eld, min(max_bytes, ret));
> +		}
>  	}
>  
>  	mutex_unlock(&dev_priv->audio.mutex);
> @@ -1408,3 +1434,40 @@ void intel_audio_deinit(struct drm_i915_private *dev_priv)
>  	else
>  		i915_audio_component_cleanup(dev_priv);
>  }
> +
> +void intel_eld_compute_config(struct intel_encoder *encoder,
> +			      const struct intel_crtc_state *pipe_config,
> +			      const struct drm_connector_state *conn_state)

It should probably be named intel_audio_compute_config().

> +{
> +		struct drm_connector *connector = conn_state->connector;
> +		u8 *eld = connector->eld;
> +		const u8 *sad = drm_eld_sad(eld);
> +		struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);

Should be named i915 for all new code.

> +		u32 *supported_sads = &encoder->supported_sads;
> +		int i, channels;
> +
> +		mutex_lock(&dev_priv->audio.mutex);
> +
> +		/* reset information about supported sads to default */
> +		*supported_sads = 0;
> +		encoder->sad_mask_valid = false;
> +
> +		/* Currently filtering SADs is necessary only for GLK due to it's
> +		 * hardware limitations. However, this function can be scaled
> +		 * to any scenario where display driver has to filter out certain
> +		 * SADs before exposing them to the audio driver.
> +		 */
> +		if (IS_GEMINILAKE(dev_priv) &&
> +		    intel_crtc_has_type(pipe_config, INTEL_OUTPUT_DP)) {
> +			encoder->sad_mask_valid = true;
> +
> +			for (i = 0; i < drm_eld_sad_count(eld); i++, sad += 3) {
> +				channels = drm_sad_to_channels(sad);
> +
> +				if (channels <= 2)
> +					(*supported_sads) |= 1 << i;
> +			}
> +		}

It's wrong to modify the encoder members in compute config. Just imagine
compute config failing after this; you've already changed the encoder
and you can't get it back.

> +		drm_dbg_kms(&dev_priv->drm, "supported_sads 0x%x\n", *supported_sads);
> +		mutex_unlock(&dev_priv->audio.mutex);

The indentation is off in the function.


BR,
Jani.

> +}
> diff --git a/drivers/gpu/drm/i915/display/intel_audio.h b/drivers/gpu/drm/i915/display/intel_audio.h
> index 63b22131dc45..17c468a9e07e 100644
> --- a/drivers/gpu/drm/i915/display/intel_audio.h
> +++ b/drivers/gpu/drm/i915/display/intel_audio.h
> @@ -22,5 +22,8 @@ void intel_audio_cdclk_change_pre(struct drm_i915_private *dev_priv);
>  void intel_audio_cdclk_change_post(struct drm_i915_private *dev_priv);
>  void intel_audio_init(struct drm_i915_private *dev_priv);
>  void intel_audio_deinit(struct drm_i915_private *dev_priv);
> +void intel_eld_compute_config(struct intel_encoder *encoder,
> +			      const struct intel_crtc_state *pipe_config,
> +			      const struct drm_connector_state *conn_state);
>  
>  #endif /* __INTEL_AUDIO_H__ */
> diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
> index 6c43a5124cb8..e7807500c88d 100644
> --- a/drivers/gpu/drm/i915/display/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/display/intel_ddi.c
> @@ -3678,6 +3678,8 @@ static int intel_ddi_compute_config(struct intel_encoder *encoder,
>  
>  	intel_ddi_compute_min_voltage_level(dev_priv, pipe_config);
>  
> +	intel_eld_compute_config(encoder, pipe_config, conn_state);
> +
>  	return 0;
>  }
>  
> diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
> index 0da9b208d56e..5b6a694ff0cc 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_types.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_types.h
> @@ -265,6 +265,15 @@ struct intel_encoder {
>  	/* for communication with audio component; protected by av_mutex */
>  	const struct drm_connector *audio_connector;
>  
> +	/* bitmask to track supported SADs for current audio connector.
> +	 * According to HDA spec Rev 1.0a, ELD SAD limit is 15. Using
> +	 * a 32 bit mask for future proofing; protected by av_mutex
> +	 */
> +	u32 supported_sads;
> +
> +	/* indicates if the supported_sads is a valid bitmask; protected by av_mutex */
> +	bool sad_mask_valid;
> +
>  	/* VBT information for this encoder (may be NULL for older platforms) */
>  	const struct intel_bios_encoder_data *devdata;
>  };
> diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h
> index 2181977ae683..363f4487cdd6 100644
> --- a/include/drm/drm_edid.h
> +++ b/include/drm/drm_edid.h
> @@ -318,6 +318,11 @@ struct detailed_timing {
>  
>  #define DRM_ELD_CEA_SAD(mnl, sad)	(20 + (mnl) + 3 * (sad))
>  
> +#define DRM_ELD_SAD_FORMAT_MASK 0x78
> +#define DRM_ELD_SAD_FORMAT_SHIFT 3
> +#define DRM_ELD_SAD_CHANNELS_MASK 0x7
> +#define DRM_ELD_SAD_RATES_MASK 0x7f
> +
>  struct edid {
>  	u8 header[8];
>  	/* Vendor & product info */
> @@ -378,6 +383,10 @@ int drm_edid_to_speaker_allocation(const struct edid *edid, u8 **sadb);
>  int drm_av_sync_delay(struct drm_connector *connector,
>  		      const struct drm_display_mode *mode);
>  
> +int drm_sad_to_format(const u8 *sad);
> +int drm_sad_to_channels(const u8 *sad);
> +int drm_sad_to_rates(const u8 *sad);
> +
>  #ifdef CONFIG_DRM_LOAD_EDID_FIRMWARE
>  struct edid *drm_load_edid_firmware(struct drm_connector *connector);
>  int __drm_set_edid_firmware_path(const char *path);

-- 
Jani Nikula, Intel Open Source Graphics Center

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915/display: compute config for audio
  2022-08-24 13:56 ` [Intel-gfx] [PATCH] " Jani Nikula
@ 2022-08-24 15:57   ` Kai Vehmanen
  2022-10-03  9:43     ` Ville Syrjälä
  0 siblings, 1 reply; 6+ messages in thread
From: Kai Vehmanen @ 2022-08-24 15:57 UTC (permalink / raw)
  To: Jani Nikula; +Cc: kai.vehmanen, Borah, intel-gfx

Hi,

On Wed, 24 Aug 2022, Jani Nikula wrote:

> On Wed, 24 Aug 2022, "Borah, Chaitanya Kumar" <chaitanya.kumar.borah@intel.com> wrote:
> > In certain scenarios, we might have to filter out some audio
> > configuration depending on HW limitation. For example, in
> > GLK DP port more than 2 channels are not supported for audio.
[...]
> > +			for (i = 0; i < drm_eld_sad_count(temp_buf); i++, sad += 3) {
> > +				if (!(intel_encoder->supported_sads & (1 << i)))
> > +					memset(&sad[0], 0, 3);
> 
> Here's the main question I have about the change, really. The ELD
> (literally EDID-like-data) and SAD are supposed to describe the *sink*
> capabilities. Why are we filtering the data here, telling the audio
> controller driver this is what the *sink* supports, when the limitation
> comes from the *source*?
> 
> I could just be clueless about how audio works, but semantically this
> feels the same as modifying the EDID based on what the *source*
> supports.

I provided early input to this patchset and I think this is a pragmatic 
approach to take. What the audio controller really wants is intersection 
of capabilities supported both by source and the sink. E.g. no need to 
advertise to the audio user-space about an audio format xyz, if the full 
pipeline, including source and sink, cannot support it.

And in practise, as the constraints depend on active display 
configuration, this is the only interface where we can pass such 
information to ALSA.

Br, Kai

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/display: compute config for audio
  2022-08-23 22:21 [Intel-gfx] [PATCH] drm/i915/display: compute config for audio Borah, Chaitanya Kumar
  2022-08-24  6:06 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
  2022-08-24 13:56 ` [Intel-gfx] [PATCH] " Jani Nikula
@ 2022-08-25  7:27 ` Patchwork
  2 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2022-08-25  7:27 UTC (permalink / raw)
  To: Borah, Chaitanya Kumar; +Cc: intel-gfx

[-- Attachment #1: Type: text/plain, Size: 22496 bytes --]

== Series Details ==

Series: drm/i915/display: compute config for audio
URL   : https://patchwork.freedesktop.org/series/107647/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12018_full -> Patchwork_107647v1_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  

Participating hosts (12 -> 12)
------------------------------

  No changes in participating hosts

Known issues
------------

  Here are the changes found in Patchwork_107647v1_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_ctx_exec@basic-nohangcheck:
    - shard-tglb:         [PASS][1] -> [FAIL][2] ([i915#6268])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12018/shard-tglb3/igt@gem_ctx_exec@basic-nohangcheck.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/shard-tglb3/igt@gem_ctx_exec@basic-nohangcheck.html

  * igt@gem_ctx_isolation@preservation-s3@rcs0:
    - shard-apl:          NOTRUN -> [INCOMPLETE][3] ([i915#6598])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/shard-apl8/igt@gem_ctx_isolation@preservation-s3@rcs0.html

  * igt@gem_exec_balancer@parallel-keep-submit-fence:
    - shard-iclb:         [PASS][4] -> [SKIP][5] ([i915#4525]) +2 similar issues
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12018/shard-iclb1/igt@gem_exec_balancer@parallel-keep-submit-fence.html
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/shard-iclb5/igt@gem_exec_balancer@parallel-keep-submit-fence.html

  * igt@gem_exec_fair@basic-none-share@rcs0:
    - shard-kbl:          [PASS][6] -> [SKIP][7] ([fdo#109271])
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12018/shard-kbl7/igt@gem_exec_fair@basic-none-share@rcs0.html
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/shard-kbl1/igt@gem_exec_fair@basic-none-share@rcs0.html

  * igt@gem_exec_fair@basic-none-solo@rcs0:
    - shard-apl:          [PASS][8] -> [FAIL][9] ([i915#2842]) +1 similar issue
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12018/shard-apl6/igt@gem_exec_fair@basic-none-solo@rcs0.html
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/shard-apl6/igt@gem_exec_fair@basic-none-solo@rcs0.html

  * igt@gem_exec_fair@basic-pace-solo@rcs0:
    - shard-kbl:          [PASS][10] -> [FAIL][11] ([i915#2842])
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12018/shard-kbl4/igt@gem_exec_fair@basic-pace-solo@rcs0.html
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/shard-kbl7/igt@gem_exec_fair@basic-pace-solo@rcs0.html

  * igt@gem_exec_fair@basic-pace@vcs0:
    - shard-glk:          [PASS][12] -> [FAIL][13] ([i915#2842])
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12018/shard-glk8/igt@gem_exec_fair@basic-pace@vcs0.html
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/shard-glk9/igt@gem_exec_fair@basic-pace@vcs0.html

  * igt@gem_exec_fair@basic-pace@vecs0:
    - shard-iclb:         [PASS][14] -> [FAIL][15] ([i915#2842]) +1 similar issue
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12018/shard-iclb2/igt@gem_exec_fair@basic-pace@vecs0.html
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/shard-iclb7/igt@gem_exec_fair@basic-pace@vecs0.html

  * igt@gem_workarounds@suspend-resume-context:
    - shard-kbl:          [PASS][16] -> [DMESG-WARN][17] ([i915#180]) +4 similar issues
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12018/shard-kbl4/igt@gem_workarounds@suspend-resume-context.html
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/shard-kbl4/igt@gem_workarounds@suspend-resume-context.html

  * igt@kms_ccs@pipe-c-random-ccs-data-y_tiled_gen12_mc_ccs:
    - shard-apl:          NOTRUN -> [SKIP][18] ([fdo#109271] / [i915#3886])
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/shard-apl8/igt@kms_ccs@pipe-c-random-ccs-data-y_tiled_gen12_mc_ccs.html

  * igt@kms_chamelium@hdmi-edid-read:
    - shard-apl:          NOTRUN -> [SKIP][19] ([fdo#109271] / [fdo#111827]) +1 similar issue
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/shard-apl8/igt@kms_chamelium@hdmi-edid-read.html

  * igt@kms_chamelium@vga-hpd-enable-disable-mode:
    - shard-glk:          NOTRUN -> [SKIP][20] ([fdo#109271] / [fdo#111827])
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/shard-glk5/igt@kms_chamelium@vga-hpd-enable-disable-mode.html

  * igt@kms_dither@fb-8bpc-vs-panel-6bpc@pipe-a-hdmi-a-1:
    - shard-glk:          NOTRUN -> [SKIP][21] ([fdo#109271])
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/shard-glk9/igt@kms_dither@fb-8bpc-vs-panel-6bpc@pipe-a-hdmi-a-1.html

  * igt@kms_flip_scaled_crc@flip-64bpp-yftile-to-16bpp-yftile-upscaling@pipe-a-default-mode:
    - shard-iclb:         NOTRUN -> [SKIP][22] ([i915#2672]) +4 similar issues
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/shard-iclb2/igt@kms_flip_scaled_crc@flip-64bpp-yftile-to-16bpp-yftile-upscaling@pipe-a-default-mode.html

  * igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-pri-indfb-draw-render:
    - shard-apl:          NOTRUN -> [SKIP][23] ([fdo#109271]) +53 similar issues
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/shard-apl1/igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-pri-indfb-draw-render.html

  * igt@kms_hdr@bpc-switch@pipe-a-dp-1:
    - shard-kbl:          [PASS][24] -> [FAIL][25] ([i915#1188])
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12018/shard-kbl4/igt@kms_hdr@bpc-switch@pipe-a-dp-1.html
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/shard-kbl7/igt@kms_hdr@bpc-switch@pipe-a-dp-1.html

  * igt@kms_plane_scaling@planes-unity-scaling-downscale-factor-0-5@pipe-a-edp-1:
    - shard-iclb:         [PASS][26] -> [SKIP][27] ([i915#5235]) +5 similar issues
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12018/shard-iclb3/igt@kms_plane_scaling@planes-unity-scaling-downscale-factor-0-5@pipe-a-edp-1.html
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/shard-iclb2/igt@kms_plane_scaling@planes-unity-scaling-downscale-factor-0-5@pipe-a-edp-1.html

  * igt@kms_psr2_su@page_flip-xrgb8888:
    - shard-iclb:         [PASS][28] -> [SKIP][29] ([fdo#109642] / [fdo#111068] / [i915#658])
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12018/shard-iclb2/igt@kms_psr2_su@page_flip-xrgb8888.html
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/shard-iclb6/igt@kms_psr2_su@page_flip-xrgb8888.html
    - shard-apl:          NOTRUN -> [SKIP][30] ([fdo#109271] / [i915#658])
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/shard-apl1/igt@kms_psr2_su@page_flip-xrgb8888.html

  * igt@kms_psr@psr2_dpms:
    - shard-iclb:         [PASS][31] -> [SKIP][32] ([fdo#109441])
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12018/shard-iclb2/igt@kms_psr@psr2_dpms.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/shard-iclb7/igt@kms_psr@psr2_dpms.html

  * igt@kms_vblank@pipe-c-ts-continuation-suspend:
    - shard-apl:          [PASS][33] -> [DMESG-WARN][34] ([i915#180])
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12018/shard-apl6/igt@kms_vblank@pipe-c-ts-continuation-suspend.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/shard-apl6/igt@kms_vblank@pipe-c-ts-continuation-suspend.html

  * igt@sysfs_clients@fair-7:
    - shard-apl:          NOTRUN -> [SKIP][35] ([fdo#109271] / [i915#2994])
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/shard-apl8/igt@sysfs_clients@fair-7.html

  
#### Possible fixes ####

  * igt@feature_discovery@psr2:
    - shard-iclb:         [SKIP][36] ([i915#658]) -> [PASS][37]
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12018/shard-iclb7/igt@feature_discovery@psr2.html
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/shard-iclb2/igt@feature_discovery@psr2.html

  * igt@gem_exec_fair@basic-deadline:
    - {shard-rkl}:        [FAIL][38] ([i915#2846]) -> [PASS][39]
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12018/shard-rkl-5/igt@gem_exec_fair@basic-deadline.html
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/shard-rkl-5/igt@gem_exec_fair@basic-deadline.html

  * igt@gem_exec_fair@basic-none@vcs1:
    - shard-kbl:          [FAIL][40] ([i915#2842]) -> [PASS][41]
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12018/shard-kbl7/igt@gem_exec_fair@basic-none@vcs1.html
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/shard-kbl1/igt@gem_exec_fair@basic-none@vcs1.html

  * igt@gem_exec_fair@basic-pace-solo@rcs0:
    - shard-apl:          [FAIL][42] ([i915#2842]) -> [PASS][43]
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12018/shard-apl3/igt@gem_exec_fair@basic-pace-solo@rcs0.html
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/shard-apl3/igt@gem_exec_fair@basic-pace-solo@rcs0.html

  * igt@gen9_exec_parse@allowed-all:
    - shard-glk:          [DMESG-WARN][44] ([i915#5566] / [i915#716]) -> [PASS][45]
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12018/shard-glk1/igt@gen9_exec_parse@allowed-all.html
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/shard-glk5/igt@gen9_exec_parse@allowed-all.html

  * igt@gen9_exec_parse@allowed-single:
    - shard-apl:          [DMESG-WARN][46] ([i915#5566] / [i915#716]) -> [PASS][47]
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12018/shard-apl6/igt@gen9_exec_parse@allowed-single.html
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/shard-apl1/igt@gen9_exec_parse@allowed-single.html

  * igt@i915_selftest@live@hangcheck:
    - shard-snb:          [INCOMPLETE][48] ([i915#3921]) -> [PASS][49]
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12018/shard-snb5/igt@i915_selftest@live@hangcheck.html
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/shard-snb2/igt@i915_selftest@live@hangcheck.html

  * igt@i915_suspend@debugfs-reader:
    - shard-apl:          [DMESG-WARN][50] ([i915#180]) -> [PASS][51]
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12018/shard-apl6/igt@i915_suspend@debugfs-reader.html
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/shard-apl8/igt@i915_suspend@debugfs-reader.html

  * igt@kms_psr@psr2_no_drrs:
    - shard-iclb:         [SKIP][52] ([fdo#109441]) -> [PASS][53] +1 similar issue
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12018/shard-iclb6/igt@kms_psr@psr2_no_drrs.html
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/shard-iclb2/igt@kms_psr@psr2_no_drrs.html

  
#### Warnings ####

  * igt@gem_eio@unwedge-stress:
    - shard-tglb:         [TIMEOUT][54] ([i915#3063]) -> [FAIL][55] ([i915#5784])
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12018/shard-tglb7/igt@gem_eio@unwedge-stress.html
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/shard-tglb5/igt@gem_eio@unwedge-stress.html

  * igt@gem_exec_balancer@parallel-ordering:
    - shard-iclb:         [SKIP][56] ([i915#4525]) -> [FAIL][57] ([i915#6117])
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12018/shard-iclb3/igt@gem_exec_balancer@parallel-ordering.html
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/shard-iclb2/igt@gem_exec_balancer@parallel-ordering.html

  * igt@kms_frontbuffer_tracking@fbcpsr-suspend:
    - shard-iclb:         [INCOMPLETE][58] ([i915#1982] / [i915#6598]) -> [INCOMPLETE][59] ([i915#6598])
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12018/shard-iclb8/igt@kms_frontbuffer_tracking@fbcpsr-suspend.html
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/shard-iclb8/igt@kms_frontbuffer_tracking@fbcpsr-suspend.html

  * igt@kms_psr2_sf@cursor-plane-move-continuous-exceed-fully-sf:
    - shard-iclb:         [SKIP][60] ([i915#2920]) -> [SKIP][61] ([i915#658])
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12018/shard-iclb2/igt@kms_psr2_sf@cursor-plane-move-continuous-exceed-fully-sf.html
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/shard-iclb6/igt@kms_psr2_sf@cursor-plane-move-continuous-exceed-fully-sf.html

  * igt@runner@aborted:
    - shard-apl:          ([FAIL][62], [FAIL][63], [FAIL][64], [FAIL][65]) ([fdo#109271] / [i915#180] / [i915#3002] / [i915#4312] / [i915#5257] / [i915#6599]) -> ([FAIL][66], [FAIL][67], [FAIL][68]) ([i915#3002] / [i915#4312] / [i915#5257] / [i915#6599])
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12018/shard-apl3/igt@runner@aborted.html
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12018/shard-apl6/igt@runner@aborted.html
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12018/shard-apl8/igt@runner@aborted.html
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12018/shard-apl6/igt@runner@aborted.html
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/shard-apl6/igt@runner@aborted.html
   [67]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/shard-apl7/igt@runner@aborted.html
   [68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/shard-apl3/igt@runner@aborted.html
    - shard-kbl:          ([FAIL][69], [FAIL][70]) ([i915#3002] / [i915#4312] / [i915#5257]) -> ([FAIL][71], [FAIL][72], [FAIL][73], [FAIL][74]) ([i915#180] / [i915#3002] / [i915#4312] / [i915#5257])
   [69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12018/shard-kbl4/igt@runner@aborted.html
   [70]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12018/shard-kbl7/igt@runner@aborted.html
   [71]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/shard-kbl4/igt@runner@aborted.html
   [72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/shard-kbl4/igt@runner@aborted.html
   [73]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/shard-kbl4/igt@runner@aborted.html
   [74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/shard-kbl1/igt@runner@aborted.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
  [fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
  [fdo#109283]: https://bugs.freedesktop.org/show_bug.cgi?id=109283
  [fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
  [fdo#109291]: https://bugs.freedesktop.org/show_bug.cgi?id=109291
  [fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
  [fdo#109303]: https://bugs.freedesktop.org/show_bug.cgi?id=109303
  [fdo#109312]: https://bugs.freedesktop.org/show_bug.cgi?id=109312
  [fdo#109313]: https://bugs.freedesktop.org/show_bug.cgi?id=109313
  [fdo#109314]: https://bugs.freedesktop.org/show_bug.cgi?id=109314
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#109506]: https://bugs.freedesktop.org/show_bug.cgi?id=109506
  [fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
  [fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
  [fdo#110542]: https://bugs.freedesktop.org/show_bug.cgi?id=110542
  [fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
  [fdo#111314]: https://bugs.freedesktop.org/show_bug.cgi?id=111314
  [fdo#111614]: https://bugs.freedesktop.org/show_bug.cgi?id=111614
  [fdo#111615]: https://bugs.freedesktop.org/show_bug.cgi?id=111615
  [fdo#111644]: https://bugs.freedesktop.org/show_bug.cgi?id=111644
  [fdo#111656]: https://bugs.freedesktop.org/show_bug.cgi?id=111656
  [fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
  [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [fdo#112283]: https://bugs.freedesktop.org/show_bug.cgi?id=112283
  [i915#1063]: https://gitlab.freedesktop.org/drm/intel/issues/1063
  [i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
  [i915#1188]: https://gitlab.freedesktop.org/drm/intel/issues/1188
  [i915#1397]: https://gitlab.freedesktop.org/drm/intel/issues/1397
  [i915#1769]: https://gitlab.freedesktop.org/drm/intel/issues/1769
  [i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
  [i915#1839]: https://gitlab.freedesktop.org/drm/intel/issues/1839
  [i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
  [i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849
  [i915#1902]: https://gitlab.freedesktop.org/drm/intel/issues/1902
  [i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
  [i915#2437]: https://gitlab.freedesktop.org/drm/intel/issues/2437
  [i915#2527]: https://gitlab.freedesktop.org/drm/intel/issues/2527
  [i915#2530]: https://gitlab.freedesktop.org/drm/intel/issues/2530
  [i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
  [i915#2658]: https://gitlab.freedesktop.org/drm/intel/issues/2658
  [i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672
  [i915#2681]: https://gitlab.freedesktop.org/drm/intel/issues/2681
  [i915#280]: https://gitlab.freedesktop.org/drm/intel/issues/280
  [i915#284]: https://gitlab.freedesktop.org/drm/intel/issues/284
  [i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
  [i915#2846]: https://gitlab.freedesktop.org/drm/intel/issues/2846
  [i915#2856]: https://gitlab.freedesktop.org/drm/intel/issues/2856
  [i915#2920]: https://gitlab.freedesktop.org/drm/intel/issues/2920
  [i915#2994]: https://gitlab.freedesktop.org/drm/intel/issues/2994
  [i915#3002]: https://gitlab.freedesktop.org/drm/intel/issues/3002
  [i915#3063]: https://gitlab.freedesktop.org/drm/intel/issues/3063
  [i915#3116]: https://gitlab.freedesktop.org/drm/intel/issues/3116
  [i915#3281]: https://gitlab.freedesktop.org/drm/intel/issues/3281
  [i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
  [i915#3291]: https://gitlab.freedesktop.org/drm/intel/issues/3291
  [i915#3297]: https://gitlab.freedesktop.org/drm/intel/issues/3297
  [i915#3299]: https://gitlab.freedesktop.org/drm/intel/issues/3299
  [i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
  [i915#3318]: https://gitlab.freedesktop.org/drm/intel/issues/3318
  [i915#3469]: https://gitlab.freedesktop.org/drm/intel/issues/3469
  [i915#3546]: https://gitlab.freedesktop.org/drm/intel/issues/3546
  [i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
  [i915#3558]: https://gitlab.freedesktop.org/drm/intel/issues/3558
  [i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
  [i915#3689]: https://gitlab.freedesktop.org/drm/intel/issues/3689
  [i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
  [i915#3804]: https://gitlab.freedesktop.org/drm/intel/issues/3804
  [i915#3826]: https://gitlab.freedesktop.org/drm/intel/issues/3826
  [i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886
  [i915#3921]: https://gitlab.freedesktop.org/drm/intel/issues/3921
  [i915#3987]: https://gitlab.freedesktop.org/drm/intel/issues/3987
  [i915#4070]: https://gitlab.freedesktop.org/drm/intel/issues/4070
  [i915#4098]: https://gitlab.freedesktop.org/drm/intel/issues/4098
  [i915#4270]: https://gitlab.freedesktop.org/drm/intel/issues/4270
  [i915#4281]: https://gitlab.freedesktop.org/drm/intel/issues/4281
  [i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
  [i915#4369]: https://gitlab.freedesktop.org/drm/intel/issues/4369
  [i915#4387]: https://gitlab.freedesktop.org/drm/intel/issues/4387
  [i915#4525]: https://gitlab.freedesktop.org/drm/intel/issues/4525
  [i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
  [i915#4991]: https://gitlab.freedesktop.org/drm/intel/issues/4991
  [i915#5176]: https://gitlab.freedesktop.org/drm/intel/issues/5176
  [i915#5235]: https://gitlab.freedesktop.org/drm/intel/issues/5235
  [i915#5257]: https://gitlab.freedesktop.org/drm/intel/issues/5257
  [i915#5286]: https://gitlab.freedesktop.org/drm/intel/issues/5286
  [i915#5287]: https://gitlab.freedesktop.org/drm/intel/issues/5287
  [i915#5288]: https://gitlab.freedesktop.org/drm/intel/issues/5288
  [i915#5289]: https://gitlab.freedesktop.org/drm/intel/issues/5289
  [i915#5325]: https://gitlab.freedesktop.org/drm/intel/issues/5325
  [i915#5327]: https://gitlab.freedesktop.org/drm/intel/issues/5327
  [i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533
  [i915#5439]: https://gitlab.freedesktop.org/drm/intel/issues/5439
  [i915#5566]: https://gitlab.freedesktop.org/drm/intel/issues/5566
  [i915#5784]: https://gitlab.freedesktop.org/drm/intel/issues/5784
  [i915#6095]: https://gitlab.freedesktop.org/drm/intel/issues/6095
  [i915#6117]: https://gitlab.freedesktop.org/drm/intel/issues/6117
  [i915#6230]: https://gitlab.freedesktop.org/drm/intel/issues/6230
  [i915#6248]: https://gitlab.freedesktop.org/drm/intel/issues/6248
  [i915#6252]: https://gitlab.freedesktop.org/drm/intel/issues/6252
  [i915#6258]: https://gitlab.freedesktop.org/drm/intel/issues/6258
  [i915#6259]: https://gitlab.freedesktop.org/drm/intel/issues/6259
  [i915#6268]: https://gitlab.freedesktop.org/drm/intel/issues/6268
  [i915#6301]: https://gitlab.freedesktop.org/drm/intel/issues/6301
  [i915#6335]: https://gitlab.freedesktop.org/drm/intel/issues/6335
  [i915#6433]: https://gitlab.freedesktop.org/drm/intel/issues/6433
  [i915#6524]: https://gitlab.freedesktop.org/drm/intel/issues/6524
  [i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
  [i915#6598]: https://gitlab.freedesktop.org/drm/intel/issues/6598
  [i915#6599]: https://gitlab.freedesktop.org/drm/intel/issues/6599
  [i915#716]: https://gitlab.freedesktop.org/drm/intel/issues/716


Build changes
-------------

  * Linux: CI_DRM_12018 -> Patchwork_107647v1

  CI-20190529: 20190529
  CI_DRM_12018: b50fa415e25e27958bf55e048d44dad0b2f6a03f @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_6634: e01fe99f00692864b709253638c809231d1fb333 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_107647v1: b50fa415e25e27958bf55e048d44dad0b2f6a03f @ git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_107647v1/index.html

[-- Attachment #2: Type: text/html, Size: 21128 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915/display: compute config for audio
  2022-08-24 15:57   ` Kai Vehmanen
@ 2022-10-03  9:43     ` Ville Syrjälä
  0 siblings, 0 replies; 6+ messages in thread
From: Ville Syrjälä @ 2022-10-03  9:43 UTC (permalink / raw)
  To: Kai Vehmanen; +Cc: kai.vehmanen, Borah, intel-gfx

On Wed, Aug 24, 2022 at 06:57:04PM +0300, Kai Vehmanen wrote:
> Hi,
> 
> On Wed, 24 Aug 2022, Jani Nikula wrote:
> 
> > On Wed, 24 Aug 2022, "Borah, Chaitanya Kumar" <chaitanya.kumar.borah@intel.com> wrote:
> > > In certain scenarios, we might have to filter out some audio
> > > configuration depending on HW limitation. For example, in
> > > GLK DP port more than 2 channels are not supported for audio.
> [...]
> > > +			for (i = 0; i < drm_eld_sad_count(temp_buf); i++, sad += 3) {
> > > +				if (!(intel_encoder->supported_sads & (1 << i)))
> > > +					memset(&sad[0], 0, 3);
> > 
> > Here's the main question I have about the change, really. The ELD
> > (literally EDID-like-data) and SAD are supposed to describe the *sink*
> > capabilities. Why are we filtering the data here, telling the audio
> > controller driver this is what the *sink* supports, when the limitation
> > comes from the *source*?
> > 
> > I could just be clueless about how audio works, but semantically this
> > feels the same as modifying the EDID based on what the *source*
> > supports.
> 
> I provided early input to this patchset and I think this is a pragmatic 
> approach to take. What the audio controller really wants is intersection 
> of capabilities supported both by source and the sink. E.g. no need to 
> advertise to the audio user-space about an audio format xyz, if the full 
> pipeline, including source and sink, cannot support it.

Yeah, I think filtering the SADs would probably be the right thing
to do, eg. depending on the available bandwidth given the current
display timings/etc.

However what this patch implements is some fairy tale constraint
of (GLK && DP && channels>2). I'm fairly sure no such limitation
exists in the hardware.

-- 
Ville Syrjälä
Intel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-10-03  9:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-23 22:21 [Intel-gfx] [PATCH] drm/i915/display: compute config for audio Borah, Chaitanya Kumar
2022-08-24  6:06 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2022-08-24 13:56 ` [Intel-gfx] [PATCH] " Jani Nikula
2022-08-24 15:57   ` Kai Vehmanen
2022-10-03  9:43     ` Ville Syrjälä
2022-08-25  7:27 ` [Intel-gfx] ✓ Fi.CI.IGT: success for " Patchwork

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.