drm/amdgpu: Add new mode 2560x1440
Subsystems (3)
PATCH 1/3 drm/amdgpu: Add new mode 2560x1440
--- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/dce_virtual.c +3 -2
@@ -324,7 +324,7 @@ static int dce_virtual_get_modes(struct drm_connector *connector)static const struct mode_size {int w;int h; - } common_modes[21 ] = { + } common_modes[] = { {640 ,480 }, {720 ,480 }, {800 ,600 },
@@ -342,13 +342,14 @@ static int dce_virtual_get_modes(struct drm_connector *connector) {1600, 1200}, {1920, 1080}, {1920, 1200}, + {2560, 1440}, {4096, 3112}, {3656, 2664}, {3840, 2160}, {4096, 2160}, }; -for (i =0 ; i <21 ; i++) { +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); }
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 2/3 drm/amdgpu: Correct the read sclk for navi10
--- drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c +1 -1
@@ -1673,7 +1673,7 @@ static int navi10_read_sensor(struct smu_context *smu, *size =4 ;break ;case AMDGPU_PP_SENSOR_GFX_SCLK : - ret =navi10_get_current_clk_freq_by_table (smu,SMU_GFXCLK , (uint32_t *)data); + ret =navi10_get_smu_metrics_data (smu,METRICS_AVERAGE_GFXCLK , (uint32_t *)data); *(uint32_t *)data *=100 ; *size =4 ;break ;
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
RE: [PATCH 2/3] drm/amdgpu: Correct the read sclk for navi10
[AMD Official Use Only - Internal Distribution Only]
What's the issue with original implementation?
And does other clock domains(e.g uclk) need this fix also?
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Emily.Deng
Sent: Tuesday, January 5, 2021 4:37 PM
To: [email protected]
Cc: Deng, Emily <[email protected]>
Subject: [PATCH 2/3] drm/amdgpu: Correct the read sclk for navi10
--- drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c +1 -1
@@ -1673,7 +1673,7 @@ static int navi10_read_sensor(struct smu_context *smu, *size =4 ;break ;case AMDGPU_PP_SENSOR_GFX_SCLK : -ret =navi10_get_current_clk_freq_by_table (smu,SMU_GFXCLK , (uint32_t *)data); +ret =navi10_get_smu_metrics_data (smu,METRICS_AVERAGE_GFXCLK , (uint32_t *)data); *(uint32_t *)data *=100 ; *size =4 ;break ;
--
2.25.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7Cevan.quan%40amd.com%7C8f2af901fd044c0978a408d8b155289f%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637454326608630462%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=mzE040qzS6j1%2Fy85pZgUE1q3Pl6LLYOIe6Z7S3zsxJw%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
RE: [PATCH 2/3] drm/amdgpu: Correct the read sclk for navi10
[AMD Official Use Only - Internal Distribution Only]
Quoted 11 lines
-----Original Message-----
From: Quan, Evan <[email protected]>
Sent: Tuesday, January 5, 2021 5:07 PM
To: Deng, Emily <[email protected]>; [email protected]
Cc: Deng, Emily <[email protected]>
Subject: RE: [PATCH 2/3] drm/amdgpu: Correct the read sclk for navi10[AMD Official Use Only - Internal Distribution Only]
What's the issue with original implementation? And does other clock domains(e.g uclk) need this fix also?
According to smu team, after navi10, it will use dfll mode, for sclk read from CurrClock is not correct, need to read from AverageGfxclkFrequency in SmuMetrics_t. Will add this in comment.
Quoted 31 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Emily.Deng
Sent: Tuesday, January 5, 2021 4:37 PM
To: [email protected]
Cc: Deng, Emily <[email protected]>
Subject: [PATCH 2/3] drm/amdgpu: Correct the read sclk for navi10Signed-off-by Emily.Deng <[email protected]>---
drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c +2
-2@@ -1673,7 +1673,7 @@ static int navi10_read_sensor(struct smu_context *smu, *size =4 ;break ;case AMDGPU_PP_SENSOR_GFX_SCLK : -ret =navi10_get_current_clk_freq_by_table (smu,SMU_GFXCLK , (uint32_t *)data); +ret =navi10_get_smu_metrics_data (smu,METRICS_AVERAGE_GFXCLK , +(uint32_t *)data); *(uint32_t *)data *=100 ; *size =4 ;break ; --2.25.1
Quoted 10 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.f
reedesktop.org%2Fmailman%2Flistinfo%2Famd- gfx&data=04%7C01%7Cevan.quan%40amd.com%7C8f2af901fd044c097 8a408d8b155289f%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C 637454326608630462%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM DAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata =mzE040qzS6j1%2Fy85pZgUE1q3Pl6LLYOIe6Z7S3zsxJw%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 3/3 drm/amdgpu:Limit the resolution for virtual_display
In reply to Emily.DengLimit the resolution not bigger than 16384, which means dev->mode_info.num_crtc * common_modes[i].w not bigger than 16384.
--- 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 <=4 || common_modes[i].w <=2560 ) { + 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
Re: [PATCH 3/3] drm/amdgpu:Limit the resolution for virtual_display
Quoted 22 lines · Emily.Deng
Limit the resolution not bigger than 16384, which means
dev->mode_info.num_crtc* common_modes[i].w not bigger than 16384.Signed-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 struct mode_size {
drivers/gpu/drm/amd/amdgpu/dce_virtual.c static int dce_virtual_get_modes(struct drm_connector *connector) · line 354
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/dce_virtual.c +1
-2@@ -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 <=4 || common_modes[i].w <=2560 ) {
You are also limiting the number of crtcs here. Intended? Won't this break 5 or 6 crtc configs?
Alex
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/dce_virtual.c +3
-1+ 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 ; --2.25.1
Quoted 4 lines
_______________________________________________
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
RE: [PATCH 3/3] drm/amdgpu:Limit the resolution for virtual_display
[AMD Official Use Only - Internal Distribution Only]
Quoted 36 lines
-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Wednesday, January 6, 2021 1:23 AM
To: Deng, Emily <[email protected]>
Cc: amd-gfx list <[email protected]>
Subject: Re: [PATCH 3/3] drm/amdgpu:Limit the resolution forvirtual_displayQuoted 23 lines · Emily.Deng
Limit the resolution not bigger than 16384, which means
dev->mode_info.num_crtc* common_modes[i].w not bigger than 16384.Signed-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 struct mode_size { @@ -350,8 +351,10 @@ staticint
dce_virtual_get_modes(struct drm_connector *connector)Quoted 4 lines
}; 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);
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/dce_virtual.c
Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/dce_virtual.c +2
-1-drm_mode_probed_add (connector, mode); +if (adev->mode_info.num_crtc <=4 || + common_modes[i].w <=2560 ) {You are also limiting the number of crtcs here. Intended? Won't this break 5 or 6 crtc configs?
Alex
Yes, it is intended, for num_crtc bigger then 4, don't support resolution bigger then 2560, because of the max supported width is 16384 for xcb protocol.
Quoted 21 lines
Quoted 2 lines
+ mode = drm_cvt_mode(dev, common_modes[i].w,
common_modes[i].h, 60, false, false, false);
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/dce_virtual.c +2
-1+drm_mode_probed_add (connector, mode); + } }return 0 ; --2.25.1
Quoted 5 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist
s.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7CEm
Quoted 1 line
ily.Deng%40amd.com%7Ce17ab0515ecf483eff6a08d8b19ea565%7C3dd8961f e4884e
Quoted 1 line
Quoted 9 lines
608e11a82d994e183d%7C0%7C0%7C637454642229402978%7CUnknown%7 CTWFpbGZsb3
Quoted 1 line
d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0% 3D%7
Quoted 1 line
C1000&sdata=YEVtCVJZ8JSe3kjyAGmjltHN1O4i4yvjvXjDZhWhZSY%3D&a mp;res
Quoted 1 line
erved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH 3/3] drm/amdgpu:Limit the resolution for virtual_display
Quoted 34 lines · Emily
Quoted 34 lines
From: Alex Deucher <[email protected]>
Quoted 23 lines · Emily.Deng
Limit the resolution not bigger than 16384, which means
dev->mode_info.num_crtc* common_modes[i].w not bigger than 16384.Signed-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 struct mode_size { @@ -350,8 +351,10 @@ staticint
dce_virtual_get_modes(struct drm_connector *connector)Quoted 4 lines
}; 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);
Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/dce_virtual.c +2
-1-drm_mode_probed_add (connector, mode); +if (adev->mode_info.num_crtc <=4 || + common_modes[i].w <=2560 ) {
Quoted 5 lines
Quoted 4 lines
You are also limiting the number of crtcs here. Intended? Won't this break 5 or 6 crtc configs?
Alex
Yes, it is intended, for
num_crtcbigger then 4, don't support resolution bigger then 2560, because of the max supported width is 16384 for xcb protocol.
There's no such limitation with Wayland. I'd recommend against artificially imposing limits from X11 to the kernel.
(As a side note, the X11 protocol limit should actually be 32768; the 16384 limit exposed in the RANDR extension comes from the kernel driver, specifically drmModeGetResources's max_width/height)
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
RE: [PATCH 3/3] drm/amdgpu:Limit the resolution for virtual_display
[AMD Official Use Only - Internal Distribution Only]
Quoted 51 lines
-----Original Message-----
From: Michel Dänzer <[email protected]>
Sent: Wednesday, January 6, 2021 11:25 PM
To: Deng, Emily <[email protected]>; Alex Deucher <[email protected]>
Cc: amd-gfx list <[email protected]>
Subject: Re: [PATCH 3/3] drm/amdgpu:Limit the resolution forvirtual_displayQuoted 34 lines · Emily
Quoted 34 lines
From: Alex Deucher <[email protected]> On Tue, Jan 5, 2021 at
Quoted 23 lines · Emily.Deng
Limit the resolution not bigger than 16384, which means
dev->mode_info.num_crtc* common_modes[i].w not bigger than 16384.Signed-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 struct mode_size { @@ -350,8 +351,10 @@ staticint
dce_virtual_get_modes(struct drm_connector *connector)Quoted 4 lines
}; 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);
Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/dce_virtual.c +2
-1-drm_mode_probed_add (connector, mode); +if (adev->mode_info.num_crtc <=4 || + common_modes[i].w <=2560 ) {Quoted 5 lines
Quoted 4 lines
You are also limiting the number of crtcs here. Intended? Won't this break 5 or 6 crtc configs?
Alex
Yes, it is intended, for
num_crtcbigger then 4, don't support resolutionbigger then 2560, because of the max supported width is 16384 for xcb protocol.
Quoted 7 lines
There's no such limitation with Wayland. I'd recommend against artificially imposing limits from X11 to the kernel.
(As a side note, the X11 protocol limit should actually be 32768; the 16384 limit exposed in the RANDR extension comes from the kernel driver, specifically drmModeGetResources's max_width/height)
It is our test and debug result, that the follow variable only have 16bit. Will limit the resolution to 16384. glamor_pixmap_from_fd(ScreenPtr screen,
int fd,
CARD16 width,
CARD16 height,
CARD16 stride, CARD8 depth, CARD8 bpp)
Quoted 12 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%7Ca822927192 e54d50539c08d8b2574439%7C3dd8961fe4884e608e11a82d994e183d%7C0% 7C0%7C637455435178758996%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4 wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&a mp;sdata=5u7%2Bz2q52PTyPEg9LWcLGVGLERYupc%2B5nKJiIHZTTKw%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
Re: [PATCH 3/3] drm/amdgpu:Limit the resolution for virtual_display
Quoted 51 lines · Emily
Quoted 44 lines
From: Michel Dänzer <[email protected]>
Quoted 34 lines · Emily
Quoted 34 lines
From: Alex Deucher <[email protected]> On Tue, Jan 5, 2021 at
Quoted 23 lines · Emily.Deng
Limit the resolution not bigger than 16384, which means
dev->mode_info.num_crtc* common_modes[i].w not bigger than 16384.Signed-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 struct mode_size { @@ -350,8 +351,10 @@ staticint
dce_virtual_get_modes(struct drm_connector *connector)Quoted 4 lines
}; 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);
Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/dce_virtual.c +2
-1-drm_mode_probed_add (connector, mode); +if (adev->mode_info.num_crtc <=4 || + common_modes[i].w <=2560 ) {Quoted 5 lines
Quoted 4 lines
You are also limiting the number of crtcs here. Intended? Won't this break 5 or 6 crtc configs?
Alex
Yes, it is intended, for
num_crtcbigger then 4, don't support resolutionbigger then 2560, because of the max supported width is 16384 for xcb protocol.
Quoted 7 lines
There's no such limitation with Wayland. I'd recommend against artificially imposing limits from X11 to the kernel.
(As a side note, the X11 protocol limit should actually be 32768; the 16384 limit exposed in the RANDR extension comes from the kernel driver, specifically drmModeGetResources's max_width/height)
Quoted 6 lines
It is our test and debug result, that the follow variable only have 16bit. Will limit the resolution to 16384. glamor_pixmap_from_fd(ScreenPtr screen,
int fd,
CARD16 width,
CARD16 height,
CARD16 stride, CARD8 depth, CARD8 bpp)
I assume you're referring to the stride parameter, which is in bytes.
This function is only used for pixmaps created from a dma-buf via DRI3. It does not limit the size of other pixmaps, so it does not limit the size of the screen pixmap (which corresponds to the framebuffer size in the RANDR extension) in general.
Also, this is an implementation detail, the limitation could be lifted by changing the type of the parameter (though that would be an ABI break for Xorg).
Xwayland isn't affected by this:
Screen 0: minimum 16 x 16, current 1920 x 1200, maximum 32767 x 32767
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
RE: [PATCH 3/3] drm/amdgpu:Limit the resolution for virtual_display
[AMD Official Use Only - Internal Distribution Only]
Quoted 77 lines
-----Original Message-----
From: Michel Dänzer <[email protected]>
Sent: Thursday, January 7, 2021 4:42 PM
To: Deng, Emily <[email protected]>; Alex Deucher <[email protected]>
Cc: amd-gfx list <[email protected]>
Subject: Re: [PATCH 3/3] drm/amdgpu:Limit the resolution forvirtual_displayQuoted 7 lines · Emily
Quoted 7 lines
From: Michel Dänzer <[email protected]> On 2021-01-06 11:40 a.m.,
Quoted 5 lines · Emily
Quoted 5 lines
From: Alex Deucher <[email protected]> On Tue, Jan 5, 2021 at
Quoted 3 lines · Emily.Deng
Limit the resolution not bigger than 16384, which means
dev->mode_info.num_crtc* common_modes[i].w not bigger than16384.
Quoted 38 lines
Quoted 38 lines
Quoted 29 lines
Quoted 29 lines
Quoted 20 lines
Signed-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 struct mode_size { @@ -350,8 +351,10 @@static int
dce_virtual_get_modes(struct drm_connector *connector)Quoted 4 lines
}; 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);
Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/dce_virtual.c +2
-1-drm_mode_probed_add (connector, mode); +if (adev->mode_info.num_crtc <=4 || + common_modes[i].w <=2560 ) {Quoted 6 lines
Quoted 4 lines
You are also limiting the number of crtcs here. Intended? Won't this break 5 or 6 crtc configs?
Alex
Yes, it is intended, for
num_crtcbigger then 4, don't support resolutionbigger then 2560, because of the max supported width is 16384 for xcb protocol.
Quoted 8 lines
Quoted 7 lines
There's no such limitation with Wayland. I'd recommend against artificially imposing limits from X11 to the kernel.
(As a side note, the X11 protocol limit should actually be 32768; the 16384 limit exposed in the RANDR extension comes from the kernel driver, specifically drmModeGetResources's max_width/height)
It is our test and debug result, that the follow variable only have 16bit. Will
limit the resolution to 16384.
Quoted 5 lines
glamor_pixmap_from_fd(ScreenPtr screen,
int fd,
CARD16 width,
CARD16 height,
CARD16 stride, CARD8 depth, CARD8 bpp)I assume you're referring to the stride parameter, which is in bytes.
This function is only used for pixmaps created from a dma-buf via DRI3. It does not limit the size of other pixmaps, so it does not limit the size of the screen pixmap (which corresponds to the framebuffer size in the RANDR extension) in general.
Quoted 7 lines
Also, this is an implementation detail, the limitation could be lifted by changing the type of the parameter (though that would be an ABI break for Xorg).
Xwayland isn't affected by this:
Screen 0: minimum 16 x 16, current 1920 x 1200, maximum 32767 x 32767
Yes, openGL driver will refer to the stride. As we have tried resolution bigger than 16384, the screen won't display well. And seem no body has verified this. So we want to limit the max supported modes to not bigger than 16384.
Quoted 12 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%7C6279eb2390 0b436337b408d8b2e82635%7C3dd8961fe4884e608e11a82d994e183d%7C0% 7C0%7C637456057455424961%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4 wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&a mp;sdata=u%2FuKB%2ByxJMzCr3nfU8rkFyjjI37gc%2BZ2rmHP9riZB5w%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
Quoted 1 line · Emily.Deng
Please add a patch description. With that fixed this patch is:
Quoted 37 lines
Signed-off-by Emily.Deng <[email protected]>--- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/dce_virtual.c +3
-3@@ -324,7 +324,7 @@ static int dce_virtual_get_modes(struct drm_connector *connector)static const struct mode_size {int w;int h; - } common_modes[21 ] = { + } common_modes[] = { {640 ,480 }, {720 ,480 }, {800 ,600 },@@ -342,13 +342,14 @@ static int dce_virtual_get_modes(struct drm_connector *connector) {1600, 1200}, {1920, 1080}, {1920, 1200}, + {2560, 1440}, {4096, 3112}, {3656, 2664}, {3840, 2160}, {4096, 2160}, }; -for (i =0 ; i <21 ; i++) { +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); } --2.25.1
Quoted 4 lines
_______________________________________________
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