dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/mgag200: Enable caching for SHMEM pages
@ 2020-06-18 13:34 Thomas Zimmermann
  2020-06-22 15:00 ` Rong Chen
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Zimmermann @ 2020-06-18 13:34 UTC (permalink / raw)
  To: airlied, daniel, sam, kraxel, emil.velikov
  Cc: John Donnelly, Rong Chen, Daniel Vetter, Krzysztof Kozlowski,
	dri-devel, Thomas Zimmermann

We've had reports about performance regressions after switching
mgag200 from VRAM helpers to SHMEM helpers. SHMEM pages use
writecombine caching by default, but can also use the platform's
default page caching. Doing so improves the performance of I/O
on the framebuffer.

Mgag200's hardware does not access framebuffer pages directly (i.e.,
via DMA), so enabling caching does not have an effect on consistency
of the framebuffer memory or the displayed data.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: 913ec479bb5c ("drm/mgag200: Replace VRAM helpers with SHMEM helpers")
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Emil Velikov <emil.velikov@collabora.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Rong Chen <rong.a.chen@intel.com>
Cc: John Donnelly <john.p.donnelly@Oracle.com>
Link: https://lore.kernel.org/dri-devel/20200617092252.GA5279@shao2-debian/
---
 drivers/gpu/drm/mgag200/mgag200_drv.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.c b/drivers/gpu/drm/mgag200/mgag200_drv.c
index e19660f4a637..7189c7745baf 100644
--- a/drivers/gpu/drm/mgag200/mgag200_drv.c
+++ b/drivers/gpu/drm/mgag200/mgag200_drv.c
@@ -36,6 +36,7 @@ static struct drm_driver mgag200_driver = {
 	.major = DRIVER_MAJOR,
 	.minor = DRIVER_MINOR,
 	.patchlevel = DRIVER_PATCHLEVEL,
+	.gem_create_object = drm_gem_shmem_create_object_cached,
 	DRM_GEM_SHMEM_DRIVER_OPS,
 };
 
-- 
2.27.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/mgag200: Enable caching for SHMEM pages
  2020-06-18 13:34 [PATCH] drm/mgag200: Enable caching for SHMEM pages Thomas Zimmermann
@ 2020-06-22 15:00 ` Rong Chen
  2020-06-22 15:12   ` Thomas Zimmermann
  0 siblings, 1 reply; 4+ messages in thread
From: Rong Chen @ 2020-06-22 15:00 UTC (permalink / raw)
  To: Thomas Zimmermann
  Cc: John Donnelly, Krzysztof Kozlowski, Daniel Vetter, dri-devel,
	kraxel, airlied, sam, emil.velikov

Hi Thomas,

I tested the patch based on commit 24b806b0a1dd3, the regression
of phoronix-test-suite.glmark2.1024x768.score still exists:

1f58fcaf27cb7 drm/mgag200: Enable caching for SHMEM pages                                            2 2 2
24b806b0a1dd3 drm-tip: 2020y-06m-22d-07h-52m-06s UTC integration manifest                            2 2 2 2 2
913ec479bb5cc drm/mgag200: Replace VRAM helpers with SHMEM helpers                                   2 2 2 2 2
88fabb75ea9ed drm/mgag200: Convert to simple KMS helper                                              165 168 167 165 164

Best Regards,
Rong Chen

On Thu, Jun 18, 2020 at 03:34:35PM +0200, Thomas Zimmermann wrote:
> We've had reports about performance regressions after switching
> mgag200 from VRAM helpers to SHMEM helpers. SHMEM pages use
> writecombine caching by default, but can also use the platform's
> default page caching. Doing so improves the performance of I/O
> on the framebuffer.
> 
> Mgag200's hardware does not access framebuffer pages directly (i.e.,
> via DMA), so enabling caching does not have an effect on consistency
> of the framebuffer memory or the displayed data.
> 
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> Fixes: 913ec479bb5c ("drm/mgag200: Replace VRAM helpers with SHMEM helpers")
> Cc: Thomas Zimmermann <tzimmermann@suse.de>
> Cc: Emil Velikov <emil.velikov@collabora.com>
> Cc: Dave Airlie <airlied@redhat.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Krzysztof Kozlowski <krzk@kernel.org>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: Rong Chen <rong.a.chen@intel.com>
> Cc: John Donnelly <john.p.donnelly@Oracle.com>
> Link: https://lore.kernel.org/dri-devel/20200617092252.GA5279@shao2-debian/
> ---
>  drivers/gpu/drm/mgag200/mgag200_drv.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.c b/drivers/gpu/drm/mgag200/mgag200_drv.c
> index e19660f4a637..7189c7745baf 100644
> --- a/drivers/gpu/drm/mgag200/mgag200_drv.c
> +++ b/drivers/gpu/drm/mgag200/mgag200_drv.c
> @@ -36,6 +36,7 @@ static struct drm_driver mgag200_driver = {
>  	.major = DRIVER_MAJOR,
>  	.minor = DRIVER_MINOR,
>  	.patchlevel = DRIVER_PATCHLEVEL,
> +	.gem_create_object = drm_gem_shmem_create_object_cached,
>  	DRM_GEM_SHMEM_DRIVER_OPS,
>  };
>  
> -- 
> 2.27.0
> 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/mgag200: Enable caching for SHMEM pages
  2020-06-22 15:00 ` Rong Chen
@ 2020-06-22 15:12   ` Thomas Zimmermann
  2020-06-23  8:41     ` Rong Chen
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Zimmermann @ 2020-06-22 15:12 UTC (permalink / raw)
  To: Rong Chen
  Cc: John Donnelly, Krzysztof Kozlowski, Daniel Vetter, dri-devel,
	kraxel, airlied, sam, emil.velikov


[-- Attachment #1.1.1: Type: text/plain, Size: 2870 bytes --]

Hi

Am 22.06.20 um 17:00 schrieb Rong Chen:
> Hi Thomas,
> 
> I tested the patch based on commit 24b806b0a1dd3, the regression

Thanks!

> of phoronix-test-suite.glmark2.1024x768.score still exists:

I expected that the test is related to drawing onto the screen. Do you
know what exactly it is testing?

Best regards
Thomas

> 
> 1f58fcaf27cb7 drm/mgag200: Enable caching for SHMEM pages                                            2 2 2
> 24b806b0a1dd3 drm-tip: 2020y-06m-22d-07h-52m-06s UTC integration manifest                            2 2 2 2 2
> 913ec479bb5cc drm/mgag200: Replace VRAM helpers with SHMEM helpers                                   2 2 2 2 2
> 88fabb75ea9ed drm/mgag200: Convert to simple KMS helper                                              165 168 167 165 164
> 
> Best Regards,
> Rong Chen
> 
> On Thu, Jun 18, 2020 at 03:34:35PM +0200, Thomas Zimmermann wrote:
>> We've had reports about performance regressions after switching
>> mgag200 from VRAM helpers to SHMEM helpers. SHMEM pages use
>> writecombine caching by default, but can also use the platform's
>> default page caching. Doing so improves the performance of I/O
>> on the framebuffer.
>>
>> Mgag200's hardware does not access framebuffer pages directly (i.e.,
>> via DMA), so enabling caching does not have an effect on consistency
>> of the framebuffer memory or the displayed data.
>>
>> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
>> Fixes: 913ec479bb5c ("drm/mgag200: Replace VRAM helpers with SHMEM helpers")
>> Cc: Thomas Zimmermann <tzimmermann@suse.de>
>> Cc: Emil Velikov <emil.velikov@collabora.com>
>> Cc: Dave Airlie <airlied@redhat.com>
>> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
>> Cc: Krzysztof Kozlowski <krzk@kernel.org>
>> Cc: Gerd Hoffmann <kraxel@redhat.com>
>> Cc: Sam Ravnborg <sam@ravnborg.org>
>> Cc: Rong Chen <rong.a.chen@intel.com>
>> Cc: John Donnelly <john.p.donnelly@Oracle.com>
>> Link: https://lore.kernel.org/dri-devel/20200617092252.GA5279@shao2-debian/
>> ---
>>  drivers/gpu/drm/mgag200/mgag200_drv.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.c b/drivers/gpu/drm/mgag200/mgag200_drv.c
>> index e19660f4a637..7189c7745baf 100644
>> --- a/drivers/gpu/drm/mgag200/mgag200_drv.c
>> +++ b/drivers/gpu/drm/mgag200/mgag200_drv.c
>> @@ -36,6 +36,7 @@ static struct drm_driver mgag200_driver = {
>>  	.major = DRIVER_MAJOR,
>>  	.minor = DRIVER_MINOR,
>>  	.patchlevel = DRIVER_PATCHLEVEL,
>> +	.gem_create_object = drm_gem_shmem_create_object_cached,
>>  	DRM_GEM_SHMEM_DRIVER_OPS,
>>  };
>>  
>> -- 
>> 2.27.0
>>

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/mgag200: Enable caching for SHMEM pages
  2020-06-22 15:12   ` Thomas Zimmermann
@ 2020-06-23  8:41     ` Rong Chen
  0 siblings, 0 replies; 4+ messages in thread
From: Rong Chen @ 2020-06-23  8:41 UTC (permalink / raw)
  To: Thomas Zimmermann
  Cc: John Donnelly, Krzysztof Kozlowski, Daniel Vetter, dri-devel,
	kraxel, airlied, sam, emil.velikov



On 6/22/20 11:12 PM, Thomas Zimmermann wrote:
> Hi
>
> Am 22.06.20 um 17:00 schrieb Rong Chen:
>> Hi Thomas,
>>
>> I tested the patch based on commit 24b806b0a1dd3, the regression
> Thanks!
>
>> of phoronix-test-suite.glmark2.1024x768.score still exists:
> I expected that the test is related to drawing onto the screen.

Hi Thomas,

This server doesn't connect a monitor.

> Do you
> know what exactly it is testing?

It's a glmark2 test, please see 
https://openbenchmarking.org/test/pts/glmark2
the test command is ./glmark2 --annotate -s 1024x768

Best Regards,
Rong Chen


> Best regards
> Thomas
>
>> 1f58fcaf27cb7 drm/mgag200: Enable caching for SHMEM pages                                            2 2 2
>> 24b806b0a1dd3 drm-tip: 2020y-06m-22d-07h-52m-06s UTC integration manifest                            2 2 2 2 2
>> 913ec479bb5cc drm/mgag200: Replace VRAM helpers with SHMEM helpers                                   2 2 2 2 2
>> 88fabb75ea9ed drm/mgag200: Convert to simple KMS helper                                              165 168 167 165 164
>>
>> Best Regards,
>> Rong Chen
>>
>> On Thu, Jun 18, 2020 at 03:34:35PM +0200, Thomas Zimmermann wrote:
>>> We've had reports about performance regressions after switching
>>> mgag200 from VRAM helpers to SHMEM helpers. SHMEM pages use
>>> writecombine caching by default, but can also use the platform's
>>> default page caching. Doing so improves the performance of I/O
>>> on the framebuffer.
>>>
>>> Mgag200's hardware does not access framebuffer pages directly (i.e.,
>>> via DMA), so enabling caching does not have an effect on consistency
>>> of the framebuffer memory or the displayed data.
>>>
>>> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
>>> Fixes: 913ec479bb5c ("drm/mgag200: Replace VRAM helpers with SHMEM helpers")
>>> Cc: Thomas Zimmermann <tzimmermann@suse.de>
>>> Cc: Emil Velikov <emil.velikov@collabora.com>
>>> Cc: Dave Airlie <airlied@redhat.com>
>>> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
>>> Cc: Krzysztof Kozlowski <krzk@kernel.org>
>>> Cc: Gerd Hoffmann <kraxel@redhat.com>
>>> Cc: Sam Ravnborg <sam@ravnborg.org>
>>> Cc: Rong Chen <rong.a.chen@intel.com>
>>> Cc: John Donnelly <john.p.donnelly@Oracle.com>
>>> Link: https://lore.kernel.org/dri-devel/20200617092252.GA5279@shao2-debian/
>>> ---
>>>   drivers/gpu/drm/mgag200/mgag200_drv.c | 1 +
>>>   1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/gpu/drm/mgag200/mgag200_drv.c b/drivers/gpu/drm/mgag200/mgag200_drv.c
>>> index e19660f4a637..7189c7745baf 100644
>>> --- a/drivers/gpu/drm/mgag200/mgag200_drv.c
>>> +++ b/drivers/gpu/drm/mgag200/mgag200_drv.c
>>> @@ -36,6 +36,7 @@ static struct drm_driver mgag200_driver = {
>>>   	.major = DRIVER_MAJOR,
>>>   	.minor = DRIVER_MINOR,
>>>   	.patchlevel = DRIVER_PATCHLEVEL,
>>> +	.gem_create_object = drm_gem_shmem_create_object_cached,
>>>   	DRM_GEM_SHMEM_DRIVER_OPS,
>>>   };
>>>   
>>> -- 
>>> 2.27.0
>>>

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-06-23  8:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-18 13:34 [PATCH] drm/mgag200: Enable caching for SHMEM pages Thomas Zimmermann
2020-06-22 15:00 ` Rong Chen
2020-06-22 15:12   ` Thomas Zimmermann
2020-06-23  8:41     ` Rong Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).