2022-05-30 13:42:20

by Lin, Tsung-hua (Ryan)

[permalink] [raw]
Subject: [PATCH] BACKPORT: drm/amdgpu/disply: set num_crtc earlier

From: Alex Deucher <[email protected]>

To avoid a recently added warning:
Bogus possible_crtcs: [ENCODER:65:TMDS-65] possible_crtcs=0xf (full crtc mask=0x7)
WARNING: CPU: 3 PID: 439 at drivers/gpu/drm/drm_mode_config.c:617 drm_mode_config_validate+0x178/0x200 [drm]
In this case the warning is harmless, but confusing to users.

Fixes: 0df108237433 ("drm: Validate encoder->possible_crtcs")
Bug: https://bugzilla.kernel.org/show_bug.cgi?id=209123
Reviewed-by: Daniel Vetter <[email protected]>
Reviewed-by: Nicholas Kazlauskas <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Cc: [email protected]

Conflicts:
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
[Ryan Lin: Fixed the conflict, remove the non-main changed part
of this patch]

---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 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 fb918b7890ac..5ef88a2d2161 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -766,9 +766,6 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
goto error;
}

- /* Update the actual used number of crtc */
- adev->mode_info.num_crtc = adev->dm.display_indexes_num;
-
/* TODO: Add_display_info? */

/* TODO use dynamic cursor width */
@@ -2448,6 +2445,10 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
enum dc_connection_type new_connection_type = dc_connection_none;
const struct dc_plane_cap *plane;

+ dm->display_indexes_num = dm->dc->caps.max_streams;
+ /* Update the actual used number of crtc */
+ adev->mode_info.num_crtc = adev->dm.display_indexes_num;
+
link_cnt = dm->dc->caps.max_links;
if (amdgpu_dm_mode_config_init(dm->adev)) {
DRM_ERROR("DM: Failed to initialize mode config\n");
@@ -2509,8 +2510,6 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
goto fail;
}

- dm->display_indexes_num = dm->dc->caps.max_streams;
-
/* loops over all connectors on the board */
for (i = 0; i < link_cnt; i++) {
struct dc_link *link = NULL;
--
2.25.1



2022-05-30 14:13:23

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH] BACKPORT: drm/amdgpu/disply: set num_crtc earlier

On Mon, May 30, 2022 at 05:29:02PM +0800, Ryan Lin wrote:
> From: Alex Deucher <[email protected]>
>
> To avoid a recently added warning:
> Bogus possible_crtcs: [ENCODER:65:TMDS-65] possible_crtcs=0xf (full crtc mask=0x7)
> WARNING: CPU: 3 PID: 439 at drivers/gpu/drm/drm_mode_config.c:617 drm_mode_config_validate+0x178/0x200 [drm]
> In this case the warning is harmless, but confusing to users.
>
> Fixes: 0df108237433 ("drm: Validate encoder->possible_crtcs")
> Bug: https://bugzilla.kernel.org/show_bug.cgi?id=209123
> Reviewed-by: Daniel Vetter <[email protected]>
> Reviewed-by: Nicholas Kazlauskas <[email protected]>
> Signed-off-by: Alex Deucher <[email protected]>
> Cc: [email protected]


Why did you not sign off on this?

And what is the git id of this in Linus's tree?

> Conflicts:
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> [Ryan Lin: Fixed the conflict, remove the non-main changed part
> of this patch]

No need for this here, right?

thanks,

greg k-h

2022-06-01 21:08:49

by Lin, Tsung-hua (Ryan)

[permalink] [raw]
Subject: RE: [PATCH] BACKPORT: drm/amdgpu/disply: set num_crtc earlier

[AMD Official Use Only - General]

Hi Greg,

Thanks for your advice. I have modified the commit and submitted it to Gerrit and it's under code review now.

Many thanks,
Ryan Lin.

-----Original Message-----
From: Greg KH <[email protected]>
Sent: Monday, May 30, 2022 9:05 PM
To: Lin, Tsung-hua (Ryan) <[email protected]>
Cc: Li, Leon <[email protected]>; Swarnakar, Praful <[email protected]>; S, Shirish <[email protected]>; Li, Ching-shih (Louis) <[email protected]>; Deucher, Alexander <[email protected]>; Daniel Vetter <[email protected]>; Kazlauskas, Nicholas <[email protected]>; [email protected]; Wentland, Harry <[email protected]>; Li, Sun peng (Leo) <[email protected]>; Koenig, Christian <[email protected]>; David (ChunMing) Zhou <[email protected]>; David Airlie <[email protected]>; Bas Nieuwenhuizen <[email protected]>; Sean Paul <[email protected]>; Sasha Levin <[email protected]>; Mark Yacoub <[email protected]>; Li, Roman <[email protected]>; Ikshwaku Chauhan <[email protected]>; Simon Ser <[email protected]>; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH] BACKPORT: drm/amdgpu/disply: set num_crtc earlier

On Mon, May 30, 2022 at 05:29:02PM +0800, Ryan Lin wrote:
> From: Alex Deucher <[email protected]>
>
> To avoid a recently added warning:
> Bogus possible_crtcs: [ENCODER:65:TMDS-65] possible_crtcs=0xf (full
> crtc mask=0x7)
> WARNING: CPU: 3 PID: 439 at drivers/gpu/drm/drm_mode_config.c:617
> drm_mode_config_validate+0x178/0x200 [drm] In this case the warning is harmless, but confusing to users.
>
> Fixes: 0df108237433 ("drm: Validate encoder->possible_crtcs")
> Bug:
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugz
> illa.kernel.org%2Fshow_bug.cgi%3Fid%3D209123&amp;data=05%7C01%7Ctsung-
> hua.lin%40amd.com%7Cad089e5485984cd0cc1f08da423d097f%7C3dd8961fe4884e6
> 08e11a82d994e183d%7C0%7C0%7C637895127184900879%7CUnknown%7CTWFpbGZsb3d
> 8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C
> 3000%7C%7C%7C&amp;sdata=0UcR%2BZszfxXaFz6LUqGq5eYgeqxDdrhySBL7mDmFPKc%
> 3D&amp;reserved=0
> Reviewed-by: Daniel Vetter <[email protected]>
> Reviewed-by: Nicholas Kazlauskas <[email protected]>
> Signed-off-by: Alex Deucher <[email protected]>
> Cc: [email protected]


Why did you not sign off on this?

And what is the git id of this in Linus's tree?

> Conflicts:
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> [Ryan Lin: Fixed the conflict, remove the non-main changed part
> of this patch]

No need for this here, right?

thanks,

greg k-h

2022-06-06 04:53:20

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH] BACKPORT: drm/amdgpu/disply: set num_crtc earlier

A: http://en.wikipedia.org/wiki/Top_post
Q: Were do I find info about this thing called top-posting?
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

A: No.
Q: Should I include quotations after my reply?

http://daringfireball.net/2007/07/on_top

On Wed, Jun 01, 2022 at 04:04:45AM +0000, Lin, Tsung-hua (Ryan) wrote:
> [AMD Official Use Only - General]
>
> Hi Greg,
>
> Thanks for your advice. I have modified the commit and submitted it to Gerrit and it's under code review now.

This makes no sense to me, we do not use gerrit for kernel development.

confused,

greg k-h