[Intel-gfx] [PATCH 0/6] drm/edid: split out drm_eld.[ch], add some SAD helpers

Jani Nikula jani.nikula at intel.com
Thu Sep 7 09:28:18 UTC 2023


Split out drm_eld.[ch] from drm_edid.h, add some helpers to convert and
modify SADs.

This should make it easier and more robust to implement things like [1],
with ELD parsing details hidden in drm_eld.[ch].

	for (i = 0; i < drm_eld_sad_count(eld); i++) {
		struct cea_sad sad;

		drm_eld_sad_get(eld, i, &sad);
		/* do stuff with sad */
		drm_eld_sad_set(eld, i, &sad);
	}

struct cea_sad provides an easier way to manipulate CTA SADs.

** UNTESTED ***

Cc: Mitul Golani <mitulkumar.ajitkumar.golani at intel.com>

[1] https://patchwork.freedesktop.org/patch/msgid/20230821160004.2821445-4-mitulkumar.ajitkumar.golani@intel.com


Jani Nikula (6):
  drm/edid: split out drm_eld.h from drm_edid.h
  drm/eld: replace uint8_t with u8
  drm/edid: include drm_eld.h only where required
  drm/edid: use a temp variable for sads to drop one level of
    dereferences
  drm/edid: add helpers to get/set struct cea_sad from/to 3-byte sad
  drm/eld: add helpers to modify the SADs of an ELD

 Documentation/gpu/drm-kms-helpers.rst         |   6 +
 drivers/gpu/drm/Makefile                      |   1 +
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |   1 +
 drivers/gpu/drm/drm_edid.c                    |  42 +++--
 drivers/gpu/drm/drm_eld.c                     |  55 ++++++
 drivers/gpu/drm/drm_internal.h                |   6 +
 drivers/gpu/drm/i915/display/intel_audio.c    |   1 +
 .../drm/i915/display/intel_crtc_state_dump.c  |   1 +
 drivers/gpu/drm/i915/display/intel_sdvo.c     |   1 +
 drivers/gpu/drm/nouveau/dispnv50/disp.c       |   1 +
 drivers/gpu/drm/radeon/radeon_audio.c         |   1 +
 drivers/gpu/drm/tegra/hdmi.c                  |   1 +
 drivers/gpu/drm/tegra/sor.c                   |   1 +
 include/drm/drm_edid.h                        | 148 ----------------
 include/drm/drm_eld.h                         | 164 ++++++++++++++++++
 sound/core/pcm_drm_eld.c                      |   1 +
 sound/soc/codecs/hdac_hdmi.c                  |   1 +
 sound/soc/codecs/hdmi-codec.c                 |   1 +
 sound/x86/intel_hdmi_audio.c                  |   1 +
 19 files changed, 274 insertions(+), 160 deletions(-)
 create mode 100644 drivers/gpu/drm/drm_eld.c
 create mode 100644 include/drm/drm_eld.h

-- 
2.39.2



More information about the Intel-gfx mailing list