diff mbox series

[03/15] drm/amd/display: stop using connector->override_edid

Message ID 8620697ae6a13bb9202db9edbc26ff30d9f4e2e8.1665496046.git.jani.nikula@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/edid: EDID override refactoring and fixes | expand

Commit Message

Jani Nikula Oct. 11, 2022, 1:49 p.m. UTC
The connector->override_edid flag is strictly for EDID override debugfs
management, and drivers have no business using it.

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Xinhui Pan <Xinhui.Pan@amd.com>
Cc: amd-gfx@lists.freedesktop.org
Signed-off-by: Jani Nikula <jani.nikula@intel.com>

---

I really have no idea what the functional impact here is. I can only
guess that the intention is to abuse ->override_edid to block EDID
property updates. In any case, this use needs to go.

It also seems really curious we get here via connector .get_modes hook!
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Harry Wentland Oct. 11, 2022, 2:07 p.m. UTC | #1
On 2022-10-11 09:49, Jani Nikula wrote:
> The connector->override_edid flag is strictly for EDID override debugfs
> management, and drivers have no business using it.
> 
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: Christian König <christian.koenig@amd.com>
> Cc: Xinhui Pan <Xinhui.Pan@amd.com>
> Cc: amd-gfx@lists.freedesktop.org
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> 
> ---
> 
> I really have no idea what the functional impact here is. I can only
> guess that the intention is to abuse ->override_edid to block EDID
> property updates. In any case, this use needs to go.
> 
> It also seems really curious we get here via connector .get_modes hook!
> ---
>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> 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 4c73727e0b7d..d96877196a7f 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -6109,7 +6109,6 @@ static void create_eml_sink(struct amdgpu_dm_connector *aconnector)
>  				aconnector->base.name);
>  
>  		aconnector->base.force = DRM_FORCE_OFF;
> -		aconnector->base.override_edid = false;

I'm not even sure the DRM_FORCE_OFF business is right.

Either way, I don't think amdgpu should be messing with
override_edid, so this is
Reviewed-by: Harry Wentland <harry.wentland@amd.com>

Harry

>  		return;
>  	}
>  
> @@ -6144,8 +6143,6 @@ static void handle_edid_mgmt(struct amdgpu_dm_connector *aconnector)
>  		link->verified_link_cap.link_rate = LINK_RATE_HIGH2;
>  	}
>  
> -
> -	aconnector->base.override_edid = true;
>  	create_eml_sink(aconnector);
>  }
>
Jani Nikula Oct. 11, 2022, 2:11 p.m. UTC | #2
On Tue, 11 Oct 2022, Harry Wentland <harry.wentland@amd.com> wrote:
> On 2022-10-11 09:49, Jani Nikula wrote:
>> The connector->override_edid flag is strictly for EDID override debugfs
>> management, and drivers have no business using it.
>> 
>> Cc: Alex Deucher <alexander.deucher@amd.com>
>> Cc: Christian König <christian.koenig@amd.com>
>> Cc: Xinhui Pan <Xinhui.Pan@amd.com>
>> Cc: amd-gfx@lists.freedesktop.org
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>> 
>> ---
>> 
>> I really have no idea what the functional impact here is. I can only
>> guess that the intention is to abuse ->override_edid to block EDID
>> property updates. In any case, this use needs to go.
>> 
>> It also seems really curious we get here via connector .get_modes hook!
>> ---
>>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ---
>>  1 file changed, 3 deletions(-)
>> 
>> 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 4c73727e0b7d..d96877196a7f 100644
>> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> @@ -6109,7 +6109,6 @@ static void create_eml_sink(struct amdgpu_dm_connector *aconnector)
>>  				aconnector->base.name);
>>  
>>  		aconnector->base.force = DRM_FORCE_OFF;
>> -		aconnector->base.override_edid = false;
>
> I'm not even sure the DRM_FORCE_OFF business is right.
>
> Either way, I don't think amdgpu should be messing with
> override_edid, so this is
> Reviewed-by: Harry Wentland <harry.wentland@amd.com>

Thanks for the swift review; is it okay to merge this via drm-misc-next
along with the rest (once they've been reviewed, of course)?

BR,
Jani.

>
> Harry
>
>>  		return;
>>  	}
>>  
>> @@ -6144,8 +6143,6 @@ static void handle_edid_mgmt(struct amdgpu_dm_connector *aconnector)
>>  		link->verified_link_cap.link_rate = LINK_RATE_HIGH2;
>>  	}
>>  
>> -
>> -	aconnector->base.override_edid = true;
>>  	create_eml_sink(aconnector);
>>  }
>>  
>
Alex Deucher Oct. 11, 2022, 2:19 p.m. UTC | #3
On Tue, Oct 11, 2022 at 10:12 AM Jani Nikula <jani.nikula@intel.com> wrote:
>
> On Tue, 11 Oct 2022, Harry Wentland <harry.wentland@amd.com> wrote:
> > On 2022-10-11 09:49, Jani Nikula wrote:
> >> The connector->override_edid flag is strictly for EDID override debugfs
> >> management, and drivers have no business using it.
> >>
> >> Cc: Alex Deucher <alexander.deucher@amd.com>
> >> Cc: Christian König <christian.koenig@amd.com>
> >> Cc: Xinhui Pan <Xinhui.Pan@amd.com>
> >> Cc: amd-gfx@lists.freedesktop.org
> >> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> >>
> >> ---
> >>
> >> I really have no idea what the functional impact here is. I can only
> >> guess that the intention is to abuse ->override_edid to block EDID
> >> property updates. In any case, this use needs to go.
> >>
> >> It also seems really curious we get here via connector .get_modes hook!
> >> ---
> >>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ---
> >>  1 file changed, 3 deletions(-)
> >>
> >> 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 4c73727e0b7d..d96877196a7f 100644
> >> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> >> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> >> @@ -6109,7 +6109,6 @@ static void create_eml_sink(struct amdgpu_dm_connector *aconnector)
> >>                              aconnector->base.name);
> >>
> >>              aconnector->base.force = DRM_FORCE_OFF;
> >> -            aconnector->base.override_edid = false;
> >
> > I'm not even sure the DRM_FORCE_OFF business is right.
> >
> > Either way, I don't think amdgpu should be messing with
> > override_edid, so this is
> > Reviewed-by: Harry Wentland <harry.wentland@amd.com>
>
> Thanks for the swift review; is it okay to merge this via drm-misc-next
> along with the rest (once they've been reviewed, of course)?

Sure.  No problem.

Alex

>
> BR,
> Jani.
>
> >
> > Harry
> >
> >>              return;
> >>      }
> >>
> >> @@ -6144,8 +6143,6 @@ static void handle_edid_mgmt(struct amdgpu_dm_connector *aconnector)
> >>              link->verified_link_cap.link_rate = LINK_RATE_HIGH2;
> >>      }
> >>
> >> -
> >> -    aconnector->base.override_edid = true;
> >>      create_eml_sink(aconnector);
> >>  }
> >>
> >
>
> --
> Jani Nikula, Intel Open Source Graphics Center
diff mbox series

Patch

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 4c73727e0b7d..d96877196a7f 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -6109,7 +6109,6 @@  static void create_eml_sink(struct amdgpu_dm_connector *aconnector)
 				aconnector->base.name);
 
 		aconnector->base.force = DRM_FORCE_OFF;
-		aconnector->base.override_edid = false;
 		return;
 	}
 
@@ -6144,8 +6143,6 @@  static void handle_edid_mgmt(struct amdgpu_dm_connector *aconnector)
 		link->verified_link_cap.link_rate = LINK_RATE_HIGH2;
 	}
 
-
-	aconnector->base.override_edid = true;
 	create_eml_sink(aconnector);
 }