diff mbox series

[3/3] drm/amd/display: drop unused count variable in create_eml_sink()

Message ID 20230517183350.314082-3-hamza.mahfooz@amd.com (mailing list archive)
State New, archived
Headers show
Series [1/3] drm/amd/display: drop redundant memset() in get_available_dsc_slices() | expand

Commit Message

Hamza Mahfooz May 17, 2023, 6:33 p.m. UTC
Since, we are only interested in having
drm_edid_override_connector_update(), update the value of
connector->edid_blob_ptr. We don't care about the return value of
drm_edid_override_connector_update() here. So, drop count.

Fixes: 068553e14f86 ("drm/amd/display: assign edid_blob_ptr with edid from debugfs")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Rodrigo Siqueira Jordao May 18, 2023, 12:04 a.m. UTC | #1
On 5/17/23 12:33, Hamza Mahfooz wrote:
> Since, we are only interested in having
> drm_edid_override_connector_update(), update the value of
> connector->edid_blob_ptr. We don't care about the return value of
> drm_edid_override_connector_update() here. So, drop count.
> 
> Fixes: 068553e14f86 ("drm/amd/display: assign edid_blob_ptr with edid from debugfs")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
> ---
>   drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +--
>   1 file changed, 1 insertion(+), 2 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 14b296e1d0f6..5a2d04f47276 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -6396,9 +6396,8 @@ static void create_eml_sink(struct amdgpu_dm_connector *aconnector)
>   		/* if connector->edid_override valid, pass
>   		 * it to edid_override to edid_blob_ptr
>   		 */
> -		int count;
>   
> -		count = drm_edid_override_connector_update(&aconnector->base);
> +		drm_edid_override_connector_update(&aconnector->base);
>   
>   		if (!aconnector->base.edid_blob_ptr) {
>   			DRM_ERROR("No EDID firmware found on connector: %s ,forcing to OFF!\n",

Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Jani Nikula Aug. 22, 2023, 11:43 a.m. UTC | #2
On Wed, 17 May 2023, Hamza Mahfooz <hamza.mahfooz@amd.com> wrote:
> Since, we are only interested in having
> drm_edid_override_connector_update(), update the value of
> connector->edid_blob_ptr. We don't care about the return value of
> drm_edid_override_connector_update() here. So, drop count.
>
> Fixes: 068553e14f86 ("drm/amd/display: assign edid_blob_ptr with edid from debugfs")

The *real* problems with that commit are:

1) It uses drm_edid_override_connector_update() *at all*. Its
   documentation says:

	Only to be used from drm_helper_probe_single_connector_modes()
	as a fallback for when DDC probe failed during drm_get_edid()
	and caused the override/firmware EDID to be skipped.

2) It messes with edid_blob_ptr directly. All drivers should stop doing
   that. It just complicates all the logic in the overrides and the
   property updates.


BR,
Jani.


> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
> ---
>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +--
>  1 file changed, 1 insertion(+), 2 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 14b296e1d0f6..5a2d04f47276 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -6396,9 +6396,8 @@ static void create_eml_sink(struct amdgpu_dm_connector *aconnector)
>  		/* if connector->edid_override valid, pass
>  		 * it to edid_override to edid_blob_ptr
>  		 */
> -		int count;
>  
> -		count = drm_edid_override_connector_update(&aconnector->base);
> +		drm_edid_override_connector_update(&aconnector->base);
>  
>  		if (!aconnector->base.edid_blob_ptr) {
>  			DRM_ERROR("No EDID firmware found on connector: %s ,forcing to OFF!\n",
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 14b296e1d0f6..5a2d04f47276 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -6396,9 +6396,8 @@  static void create_eml_sink(struct amdgpu_dm_connector *aconnector)
 		/* if connector->edid_override valid, pass
 		 * it to edid_override to edid_blob_ptr
 		 */
-		int count;
 
-		count = drm_edid_override_connector_update(&aconnector->base);
+		drm_edid_override_connector_update(&aconnector->base);
 
 		if (!aconnector->base.edid_blob_ptr) {
 			DRM_ERROR("No EDID firmware found on connector: %s ,forcing to OFF!\n",