AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 00/11] drm/amd/display: switch amdgpu_dm_connector to use struct drm_edid
@ 2024-07-06  3:35 Melissa Wen
  2024-07-06  3:35 ` [PATCH v4 01/11] drm/amd/display: clean unused variables for hdmi freesync parser Melissa Wen
                   ` (10 more replies)
  0 siblings, 11 replies; 25+ messages in thread
From: Melissa Wen @ 2024-07-06  3:35 UTC (permalink / raw)
  To: airlied, alexander.deucher, christian.koenig, daniel,
	harry.wentland, Rodrigo.Siqueira, sunpeng.li, Xinhui.Pan
  Cc: Alex Hung, Mario Limonciello, Jani Nikula, amd-gfx, dri-devel,
	kernel-dev

Hi,

This series is an updated version of the previous attempt to make AMD
display driver use opaque drm_edid instead of open struct edid[1]. Here
I address Jani's last review and remove the raw edid handling when
parsing edid caps by using drm_eld info and drm_edid_product_id from
Jani's series[2]. I also dropped the first patch from the previous
version since it was addressed by [3]

amd-staging-drm-next doesn't have the commits that support
drm_edid_product_id, so this version works on top of amd/drm-next
branch. Besides that, currently amd/drm-next has a bug that was already
fixed upstream by [4].

In short, this series applies to amd/drm-next + bug fix.

Patches 1-5 apply to amd-staging-drm-next.
- 1-2 basically change amd connector to store struct drm_edid instead of
  edid with some pending rework to get rid of raw edid.
- 3-5 update the driver code to use drm common-code, removing steps done
  during drm_edid updates.

Patches 6-11 depend on drm_edid_product_id, therefore, it doesn't apply
to amd-staging-drm-next (now it's on top of amd/drm-next). They parse
edid caps from drm_eld and drm_edid_product_id data, removing the need
of handling raw edid in the dm_helpers_parse_edid_caps(), since all
callers of this helper has updated display info from drm_edid at this
point.

To completely remove raw edid, I changed dc/link_detection in the last
commit because all calls of dm_helpers_parse_edid_caps in
link_add_remote_sink are preceded by the setup and update of drm_edid in
the connector, so we can always use the connector->drm_edid. If this
changed is not recommended, we can keep the dc_edid parameter, but
unused.

Finally, there are some pending drm_edid_raw to be addressed in next
iterations.

You can find a branch with amd-staging-drm-next and drm_edid missing
commits here[5].
You can also find a gitlab branch on top of amd/drm-next here[6].

Let me know your thoughts.

Melissa

Change log:
v1: https://lore.kernel.org/amd-gfx/20240126163429.56714-1-mwen@igalia.com/
- use const to fix compilation warnings (Alex Hung)
- remove unused variables
- remove driver-specific parser for connector info in favor of drm_edid
  common code

v2: https://lore.kernel.org/amd-gfx/20240327165828.288792-1-mwen@igalia.com/
- fix general protection fault on mst

v3: https://lore.kernel.org/amd-gfx/20240327214953.367126-1-mwen@igalia.com/
- rename edid to drm_edid in amdgpu_connector (Jani)
- call drm_edid_connector_update to clear edid in case of NULL (Jani)
- keep setting NULL instead of free drm_edid (Jani)
- check drm_edid not NULL, instead of valid (Jani)
- use drm_edid_product_id to parse product info
- use drm_eld info to parse edid caps

[1] https://lore.kernel.org/amd-gfx/20240327214953.367126-1-mwen@igalia.com/
[2] https://lore.kernel.org/dri-devel/cover.1712655867.git.jani.nikula@intel.com
[3] https://lore.kernel.org/amd-gfx/20240509015527.754-1-mario.limonciello@amd.com/
[4] https://lore.kernel.org/amd-gfx/20240610180401.9540-1-Arunpravin.PaneerSelvam@amd.com/
[5] https://gitlab.freedesktop.org/mwen/linux-amd/-/commits/asdn-drm_edid-migration
[6] https://gitlab.freedesktop.org/mwen/linux-amd/-/commits/drm-next-drm_edid-migration

Melissa Wen (11):
  drm/amd/display: clean unused variables for hdmi freesync parser
  drm/amd/display: switch amdgpu_dm_connector to use struct drm_edid
  drm/amd/display: switch to setting physical address directly
  drm/amd/display: always call connector_update when parsing
    freesync_caps
  drm/amd/display: remove redundant freesync parser for DP
  drm/amd/display: use drm_edid_product_id for parsing EDID product info
  drm/amd/display: don't give initial values for sad/b_count
  drm/amd/display: parse display name from drm_eld
  drm/amd/display: get SAD from drm_eld when parsing EDID caps
  drm/amd/display: get SADB from drm_eld when parsing EDID caps
  drm/amd/display: remove dc_edid handler from
    dm_helpers_parse_edid_caps

 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 198 +++++-------------
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h |   4 +-
 .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 110 +++++-----
 .../display/amdgpu_dm/amdgpu_dm_mst_types.c   |  32 +--
 drivers/gpu/drm/amd/display/dc/dm_helpers.h   |   1 -
 .../drm/amd/display/dc/link/link_detection.c  |   6 +-
 6 files changed, 128 insertions(+), 223 deletions(-)

-- 
2.43.0


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

end of thread, other threads:[~2024-07-29 13:28 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-06  3:35 [PATCH v4 00/11] drm/amd/display: switch amdgpu_dm_connector to use struct drm_edid Melissa Wen
2024-07-06  3:35 ` [PATCH v4 01/11] drm/amd/display: clean unused variables for hdmi freesync parser Melissa Wen
2024-07-25 16:23   ` Alex Hung
2024-07-29  1:32     ` Melissa Wen
2024-07-29 13:24       ` Alex Hung
2024-07-06  3:35 ` [PATCH v4 02/11] drm/amd/display: switch amdgpu_dm_connector to use struct drm_edid Melissa Wen
2024-07-25 16:35   ` Alex Hung
2024-07-29  1:59     ` Melissa Wen
2024-07-06  3:35 ` [PATCH v4 03/11] drm/amd/display: switch to setting physical address directly Melissa Wen
2024-07-25 16:36   ` Alex Hung
2024-07-06  3:35 ` [PATCH v4 04/11] drm/amd/display: always call connector_update when parsing freesync_caps Melissa Wen
2024-07-06  3:35 ` [PATCH v4 05/11] drm/amd/display: remove redundant freesync parser for DP Melissa Wen
2024-07-06  3:35 ` [PATCH v4 06/11] drm/amd/display: use drm_edid_product_id for parsing EDID product info Melissa Wen
2024-07-06  3:35 ` [PATCH v4 07/11] drm/amd/display: don't give initial values for sad/b_count Melissa Wen
2024-07-25 16:38   ` Alex Hung
2024-07-29  2:01     ` Melissa Wen
2024-07-06  3:35 ` [PATCH v4 08/11] drm/amd/display: parse display name from drm_eld Melissa Wen
2024-07-06  3:35 ` [PATCH v4 09/11] drm/amd/display: get SAD from drm_eld when parsing EDID caps Melissa Wen
2024-07-25 16:39   ` Alex Hung
2024-07-29  2:02     ` Melissa Wen
2024-07-29 13:27       ` Alex Hung
2024-07-06  3:35 ` [PATCH v4 10/11] drm/amd/display: get SADB " Melissa Wen
2024-07-25 16:40   ` Alex Hung
2024-07-06  3:35 ` [PATCH v4 11/11] drm/amd/display: remove dc_edid handler from dm_helpers_parse_edid_caps Melissa Wen
2024-07-07  2:24   ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox