dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Leo Li <sunpeng.li@amd.com>,
	"Mario Limonciello (AMD)" <superm1@kernel.org>,
	dri-devel@lists.freedesktop.org
Cc: amd-gfx@lists.freedesktop.org, harry.wentland@amd.com,
	Xaver Hugl <xaver.hugl@gmail.com>
Subject: Re: [PATCH 2/2] drm/amd/display: Attach OLED property to eDP panels
Date: Fri, 09 Jan 2026 10:16:38 +0200	[thread overview]
Message-ID: <f62e27a385eaf07f78e7959472f2d30ac3cb9140@intel.com> (raw)
In-Reply-To: <7bcfdb56-2e9a-4d38-a0df-f941907ae4a8@amd.com>

On Thu, 08 Jan 2026, Leo Li <sunpeng.li@amd.com> 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) <superm1@kernel.org>
>> ---
>>  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 <sunpeng.li@amd.com>
>
> 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

  reply	other threads:[~2026-01-09  8:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-06 17:00 [PATCH 0/2] Add DRM property for panel type Mario Limonciello (AMD)
2026-01-06 17:00 ` [PATCH 1/2] drm/connector: Add a new 'panel_type' property Mario Limonciello (AMD)
2026-01-06 17:00 ` [PATCH 2/2] drm/amd/display: Attach OLED property to eDP panels Mario Limonciello (AMD)
2026-01-08 18:46   ` Leo Li
2026-01-09  8:16     ` Jani Nikula [this message]
2026-01-09 19:17       ` Leo Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f62e27a385eaf07f78e7959472f2d30ac3cb9140@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=sunpeng.li@amd.com \
    --cc=superm1@kernel.org \
    --cc=xaver.hugl@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox