All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] drm/amd/display: switch amdgpu_dm_connector to
@ 2024-01-26 16:28 Melissa Wen
  2024-01-26 16:28 ` [RFC PATCH 1/2] drm/amd/display: fix null-pointer dereference on edid reading Melissa Wen
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Melissa Wen @ 2024-01-26 16:28 UTC (permalink / raw)
  To: airlied, alexander.deucher, alex.hung, christian.koenig, daniel,
	harry.wentland, jani.nikula, Rodrigo.Siqueira, sunpeng.li,
	Xinhui.Pan
  Cc: kernel-dev, dri-devel, amd-gfx

Hi,

I'm debugging a null-pointer dereference when running
igt@kms_connector_force_edid and the way I found to solve the bug is to
stop using raw edid handler in amdgpu_connector_funcs_force and
create_eml_sink in favor of managing resouces via sruct drm_edid helpers
(Patch 1). The proper solution seems to be switch amdgpu_dm_connector
from struct edid to struct drm_edid and avoid the usage of different
approaches in the driver (Patch 2). However, doing it implies a good
amount of work and validation, therefore I decided to send this RFC
first to collect opinions and check if there is any parallel work on
this side. It's a working in progress.

The null-pointer error trigger by the igt@kms_connector_force_edid test
was introduced by:
- e54ed41620f ("drm/amd/display: Remove unwanted drm edid references")

You can check the error trace in the first patch.

This series was tested with kms_hdmi_inject and kms_force_connector. No
null-pointer error, kms_hdmi_inject is successul and kms_force_connector
is sucessful after the second execution - the force-edid subtest
still fails in the first run (I'm still investigating).

There is also a couple of cast warnings to be addressed - I'm looking
for the best replacement. 

I appreciate any feedback and testing.

Melissa

Melissa Wen (2):
  drm/amd/display: fix null-pointer dereference on edid reading
  drm/amd/display: switch amdgpu_dm_connector to use struct drm_edid

 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 78 ++++++++++---------
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h |  4 +-
 .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c |  9 ++-
 .../display/amdgpu_dm/amdgpu_dm_mst_types.c   | 23 +++---
 4 files changed, 60 insertions(+), 54 deletions(-)

-- 
2.43.0


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

end of thread, other threads:[~2024-02-05 14:34 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-26 16:28 [RFC PATCH 0/2] drm/amd/display: switch amdgpu_dm_connector to Melissa Wen
2024-01-26 16:28 ` [RFC PATCH 1/2] drm/amd/display: fix null-pointer dereference on edid reading Melissa Wen
2024-01-29 14:18   ` kernel test robot
2024-01-26 16:28 ` [RFC PATCH 2/2] drm/amd/display: switch amdgpu_dm_connector to use struct drm_edid Melissa Wen
2024-01-26 19:33   ` Alex Hung
2024-02-05 14:33     ` Melissa Wen
2024-01-29  9:54   ` kernel test robot
2024-01-29 23:29   ` kernel test robot
2024-01-26 18:22 ` [RFC PATCH 0/2] drm/amd/display: switch amdgpu_dm_connector to Mario Limonciello
2024-01-29  9:30   ` Jani Nikula
2024-02-05 14:27     ` Melissa Wen

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.