drm/amdgpu:Limit the resolution for virtual_display
Subsystems (2)
PATCH v2 1/1 drm/amdgpu:Limit the resolution for virtual_display
From: "Emily.Deng" <[email protected]>
Limit the resolution not bigger than 16384, which means dev->mode_info.num_crtc * common_modes[i].w not bigger than 16384.
v2:
Refine the code
--- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/dce_virtual.c +5 -2
@@ -319,6 +319,7 @@ dce_virtual_encoder(struct drm_connector *connector)static int dce_virtual_get_modes (struct drm_connector *connector) {struct drm_device *dev = connector->dev; +struct amdgpu_device *adev = dev->dev_private;struct drm_display_mode *mode =NULL ;unsigned i; static const struct mode_size {
@@ -350,8 +351,10 @@ static int dce_virtual_get_modes(struct drm_connector *connector) };for (i =0 ; i <ARRAY_SIZE (common_modes); i++) { - mode =drm_cvt_mode (dev, common_modes[i].w, common_modes[i].h,60 , false, false, false); -drm_mode_probed_add (connector, mode); +if (adev->mode_info.num_crtc * common_modes[i].w <=16384 ) { + mode =drm_cvt_mode (dev, common_modes[i].w, common_modes[i].h,60 , false, false, false); +drm_mode_probed_add (connector, mode); + } }return 0 ;
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only - Internal Distribution Only]
Ping ......
Best wishes
Emily Deng
Quoted 49 lines
-----Original Message-----
From: Emily Deng <[email protected]>
Sent: Thursday, January 7, 2021 11:29 AM
To: [email protected]
Cc: Deng, Emily <[email protected]>
Subject: [PATCH v2] drm/amdgpu:Limit the resolution forvirtual_displayFrom: "Emily.Deng" <[email protected]>
Limit the resolution not bigger than 16384, which means
dev->mode_info.num_crtc* common_modes[i].w not bigger than 16384.v2:
Refine the codeSigned-off-by Emily.Deng <[email protected]>---
drivers/gpu/drm/amd/amdgpu/dce_virtual.c| 7 +++++--1 file changed, 5 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/dce_virtual.c +3
-2@@ -319,6 +319,7 @@ dce_virtual_encoder(struct drm_connector *connector) static int dce_virtual_get_modes(struct drm_connector *connector) {struct drm_device *dev = connector->dev; +struct amdgpu_device *adev = dev->dev_private;struct drm_display_mode *mode =NULL ;unsigned i; static const struct mode_size {@@ -350,8 +351,10 @@ static int dce_virtual_get_modes(struct drm_connector *connector) };for (i =0 ; i <ARRAY_SIZE (common_modes); i++) { -mode =drm_cvt_mode (dev, common_modes[i].w, common_modes[i].h, 60, false, false, false); -drm_mode_probed_add (connector, mode); +if (adev->mode_info.num_crtc * common_modes[i].w <=16384 ) { +mode = drm_cvt_mode(dev, common_modes[i].w,common_modes[i].h, 60, false, false, false);
drivers/gpu/drm/amd/amdgpu/dce_virtual.c +2
-0+drm_mode_probed_add (connector, mode); +}}
Quoted 3 lines
return 0;
--
2.25.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 5 lines · Emily
[AMD Official Use Only - Internal Distribution Only]
Ping ......
It's not clear what problem this solves.
Alex
Quoted 54 lines
Best wishes
Emily DengQuoted 49 lines
-----Original Message-----
From: Emily Deng <[email protected]>
Sent: Thursday, January 7, 2021 11:29 AM
To: [email protected]
Cc: Deng, Emily <[email protected]>
Subject: [PATCH v2] drm/amdgpu:Limit the resolution forvirtual_displayFrom: "Emily.Deng" <[email protected]>
Limit the resolution not bigger than 16384, which means
dev->mode_info.num_crtc* common_modes[i].w not bigger than 16384.v2:
Refine the codeSigned-off-by Emily.Deng <[email protected]>---
drivers/gpu/drm/amd/amdgpu/dce_virtual.c| 7 +++++--1 file changed, 5 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/dce_virtual.c +3
-2@@ -319,6 +319,7 @@ dce_virtual_encoder(struct drm_connector *connector) static int dce_virtual_get_modes(struct drm_connector *connector) {struct drm_device *dev = connector->dev; +struct amdgpu_device *adev = dev->dev_private;struct drm_display_mode *mode =NULL ;unsigned i; static const struct mode_size {@@ -350,8 +351,10 @@ static int dce_virtual_get_modes(struct drm_connector *connector) };for (i =0 ; i <ARRAY_SIZE (common_modes); i++) { -mode =drm_cvt_mode (dev, common_modes[i].w, common_modes[i].h, 60, false, false, false); -drm_mode_probed_add (connector, mode); +if (adev->mode_info.num_crtc * common_modes[i].w <=16384 ) { +mode = drm_cvt_mode(dev, common_modes[i].w,common_modes[i].h, 60, false, false, false);
drivers/gpu/drm/amd/amdgpu/dce_virtual.c +2
-0+drm_mode_probed_add (connector, mode); +}}
Quoted 8 lines
Quoted 3 lines
return 0;
--
2.25.1_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only - Internal Distribution Only]
Yes, it just won't report bigger than 16384 mode to user mode, as it won't work properly.
Best wishes
Emily Deng
Quoted 77 lines
-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Friday, January 8, 2021 11:14 PM
To: Deng, Emily <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH v2] drm/amdgpu:Limit the resolution forvirtual_displayQuoted 5 lines · Emily
[AMD Official Use Only - Internal Distribution Only]
Ping ......
It's not clear what problem this solves.
Alex
Quoted 50 lines
Best wishes
Emily DengQuoted 45 lines
-----Original Message-----
From: Emily Deng <[email protected]>
Sent: Thursday, January 7, 2021 11:29 AM
To: [email protected]
Cc: Deng, Emily <[email protected]>
Subject: [PATCH v2] drm/amdgpu:Limit the resolution forvirtual_displayFrom: "Emily.Deng" <[email protected]>
Limit the resolution not bigger than 16384, which means
dev->mode_info.num_crtc* common_modes[i].w not bigger than 16384.v2:
Refine the codeSigned-off-by Emily.Deng <[email protected]>---
drivers/gpu/drm/amd/amdgpu/dce_virtual.c| 7 +++++--1 file changed, 5 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/dce_virtual.c +1
-0@@ -319,6 +319,7 @@ dce_virtual_encoder(struct drm_connector *connector) static int dce_virtual_get_modes(struct drm_connector *connector) {struct drm_device *dev = connector->dev; +struct amdgpu_device *adev = dev->dev_private;struct
drm_display_mode*mode = NULL; unsigned i; static const structmode_size{ @@ -350,8 +351,10 @@ static intdce_virtual_get_modes(struct drm_connector *connector)};for (i = 0; i <
ARRAY_SIZE(common_modes); i++) { -mode =drm_cvt_mode(dev, common_modes[i].w, common_modes[i].h, 60, false, false, false); -drm_mode_probed_add(connector, mode); +if (adev->mode_info.num_crtc* common_modes[i].w <= 16384) {
+mode =drm_cvt_mode(dev, common_modes[i].w, common_modes[i].h, 60, false, false, false); +drm_mode_probed_add(connector, mode); }
}Quoted 8 lines
Quoted 3 lines
return 0;
--
2.25.1_______________________________________________
amd-gfx mailing list
[email protected]
Quoted 8 lines
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.f
reedesktop.org%2Fmailman%2Flistinfo%2Famd- gfx&data=04%7C01%7CEmily.Deng%40amd.com%7C74bdfb637c914153 938508d8b3e81705%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7 C637457156687621480%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAw MDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sda ta=nDMymiTnfGo3ScIogcE8bch6ptCULS2GXSnuLcYQZEA%3D&reserved= 0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 3 lines · Emily
[AMD Official Use Only - Internal Distribution Only]
Yes, it just won't report bigger than 16384 mode to user mode, as it won't work properly.
... with Xorg / glamor. It doesn't affect other user-space.
Signature · 6 lines
Earthling Michel Dänzer | https://redhat.com Libre software enthusiast | Mesa and X developer _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 6 lines · Michel Dänzer
Quoted 3 lines · Emily
[AMD Official Use Only - Internal Distribution Only]
Yes, it just won't report bigger than 16384 mode to user mode, as it won't work properly.
... with Xorg / glamor. It doesn't affect other user-space.
Let me rephrase: This would artificially limit other user-space.
Signature · 6 lines
Earthling Michel Dänzer | https://redhat.com Libre software enthusiast | Mesa and X developer _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only - Internal Distribution Only]
Hi Michel and Alex,
Ok, let us abandon the patch, wish user mode driver could fix those issues encountered after resolution bigger than 16384.
Best wishes
Emily Deng
Quoted 20 lines
-----Original Message-----
From: Michel Dänzer <[email protected]>
Sent: Monday, January 11, 2021 7:52 PM
To: Deng, Emily <[email protected]>; Alex Deucher <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH v2] drm/amdgpu:Limit the resolution forvirtual_displayQuoted 7 lines · Michel Dänzer
Quoted 4 lines · Emily
[AMD Official Use Only - Internal Distribution Only]
Yes, it just won't report bigger than 16384 mode to user mode, as it won't work properly.
... with Xorg / glamor. It doesn't affect other user-space.
Let me rephrase: This would artificially limit other user-space.
Quoted 10 lines
--
Earthling Michel Dänzer |
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fredha
t.com%2F&data=04%7C01%7CEmily.Deng%40amd.com%7Cae76e0607c d84ddba1c308d8b6275595%7C3dd8961fe4884e608e11a82d994e183d%7C0% 7C0%7C637459627355417401%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4 wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&a mp;sdata=DoZlNXoNACkAbfn%2FcobBOM3D6Q60TgMz0bMSdCIgAVk%3D&a mp;reserved=0
Libre software enthusiast | Mesa and X developer
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx