On Thu, 08 Jan 2026, Leo Li <[email protected]> wrote: > On 2026-01-06 12:00, Mario Limonciello (AMD) wrote: >> amdgpu verifies that a given panel is an OLED panel from extended caps >> and can provide accurate information to userspace. Attach a property >> to the DRM connector. >> >> Signed-off-by: Mario Limonciello (AMD) <[email protected]> >> --- >> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7 +++++++ >> 1 file changed, 7 insertions(+) >> >> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c >> b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c >> index 35dbc6aba4dfc..1cac5ebf50a9d 100644 >> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c >> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c >> @@ -91,6 +91,7 @@ >> #include <drm/drm_fourcc.h> >> #include <drm/drm_edid.h> >> #include <drm/drm_eld.h> >> +#include <drm/drm_mode.h> >> #include <drm/drm_utils.h> >> #include <drm/drm_vblank.h> >> #include <drm/drm_audio_component.h> >> @@ -3739,6 +3740,10 @@ static void update_connector_ext_caps(struct >> amdgpu_dm_connector *aconnector) >> caps->ext_caps = &aconnector->dc_link->dpcd_sink_ext_caps; >> caps->aux_support = false; >> >> + drm_object_property_set_value(&conn_base->base, >> + >> adev_to_drm(adev)->mode_config.panel_type_property, >> + caps->ext_caps->bits.oled ? >> DRM_MODE_PANEL_TYPE_OLED : DRM_MODE_PANEL_TYPE_UNKNOWN); >> + > > I think we'll want to pull this out into something like > `dm_set_panel_type()`, called after `update_connector_ext_caps()` and > any additional bits of edid parsing needed to make panel_type > detection more robust. I suppose that can be a future task.
I really wish you moved *all* EDID parsing to drm_edid.c instead of having your own. BR, Jani. > > Series is > Reviewed-by: Leo Li <[email protected]> > > Thanks, > Leo > >> if (caps->ext_caps->bits.oled == 1 >> /* >> * || >> @@ -9020,6 +9025,8 @@ void amdgpu_dm_connector_init_helper(struct >> amdgpu_display_manager *dm, >> if (connector_type == DRM_MODE_CONNECTOR_eDP) { >> struct drm_privacy_screen *privacy_screen; >> >> + drm_connector_attach_panel_type_property(&aconnector->base); >> + >> privacy_screen = drm_privacy_screen_get(adev_to_drm(adev)->dev, >> NULL); >> if (!IS_ERR(privacy_screen)) { >> >> drm_connector_attach_privacy_screen_provider(&aconnector->base, > -- Jani Nikula, Intel
