mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm/fbdev-generic: Remove a redundant assignment clause
@ 2023-06-14  1:30 Sui Jingfeng
  2023-06-14  5:29 ` Thomas Zimmermann
  0 siblings, 1 reply; 3+ messages in thread
From: Sui Jingfeng @ 2023-06-14  1:30 UTC (permalink / raw)
  To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Daniel Vetter
  Cc: dri-devel, linux-kernel

The assignment "dst = map;" in the drm_fbdev_generic_damage_blit() function
is redundant because it has already been copied when the call to
drm_client_buffer_vmap() is finished. Therefore, this patch saves a useless
copy. No functional change.

Signed-off-by: Sui Jingfeng <suijingfeng@loongson.cn>
---
 drivers/gpu/drm/drm_fbdev_generic.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/drm_fbdev_generic.c b/drivers/gpu/drm/drm_fbdev_generic.c
index 98ae703848a0..aa6924e3a58c 100644
--- a/drivers/gpu/drm/drm_fbdev_generic.c
+++ b/drivers/gpu/drm/drm_fbdev_generic.c
@@ -182,7 +182,7 @@ static int drm_fbdev_generic_damage_blit(struct drm_fb_helper *fb_helper,
 					 struct drm_clip_rect *clip)
 {
 	struct drm_client_buffer *buffer = fb_helper->buffer;
-	struct iosys_map map, dst;
+	struct iosys_map map;
 	int ret;
 
 	/*
@@ -202,8 +202,7 @@ static int drm_fbdev_generic_damage_blit(struct drm_fb_helper *fb_helper,
 	if (ret)
 		goto out;
 
-	dst = map;
-	drm_fbdev_generic_damage_blit_real(fb_helper, clip, &dst);
+	drm_fbdev_generic_damage_blit_real(fb_helper, clip, &map);
 
 	drm_client_buffer_vunmap(buffer);
 
-- 
2.25.1


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

* Re: [PATCH] drm/fbdev-generic: Remove a redundant assignment clause
  2023-06-14  1:30 [PATCH] drm/fbdev-generic: Remove a redundant assignment clause Sui Jingfeng
@ 2023-06-14  5:29 ` Thomas Zimmermann
  2023-06-14  8:17   ` Sui Jingfeng
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Zimmermann @ 2023-06-14  5:29 UTC (permalink / raw)
  To: Sui Jingfeng, Maarten Lankhorst, Maxime Ripard, David Airlie,
	Daniel Vetter
  Cc: dri-devel, linux-kernel


[-- Attachment #1.1: Type: text/plain, Size: 1700 bytes --]

Hi

Am 14.06.23 um 03:30 schrieb Sui Jingfeng:
> The assignment "dst = map;" in the drm_fbdev_generic_damage_blit() function
> is redundant because it has already been copied when the call to
> drm_client_buffer_vmap() is finished. Therefore, this patch saves a useless
> copy. No functional change.

Isn't that what we discussed here?

https://lore.kernel.org/dri-devel/20230325074636.136833-1-15330273260@189.cn/

Best regards
Thomas

> 
> Signed-off-by: Sui Jingfeng <suijingfeng@loongson.cn>
> ---
>   drivers/gpu/drm/drm_fbdev_generic.c | 5 ++---
>   1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_fbdev_generic.c b/drivers/gpu/drm/drm_fbdev_generic.c
> index 98ae703848a0..aa6924e3a58c 100644
> --- a/drivers/gpu/drm/drm_fbdev_generic.c
> +++ b/drivers/gpu/drm/drm_fbdev_generic.c
> @@ -182,7 +182,7 @@ static int drm_fbdev_generic_damage_blit(struct drm_fb_helper *fb_helper,
>   					 struct drm_clip_rect *clip)
>   {
>   	struct drm_client_buffer *buffer = fb_helper->buffer;
> -	struct iosys_map map, dst;
> +	struct iosys_map map;
>   	int ret;
>   
>   	/*
> @@ -202,8 +202,7 @@ static int drm_fbdev_generic_damage_blit(struct drm_fb_helper *fb_helper,
>   	if (ret)
>   		goto out;
>   
> -	dst = map;
> -	drm_fbdev_generic_damage_blit_real(fb_helper, clip, &dst);
> +	drm_fbdev_generic_damage_blit_real(fb_helper, clip, &map);
>   
>   	drm_client_buffer_vunmap(buffer);
>   

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)

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

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

* Re: [PATCH] drm/fbdev-generic: Remove a redundant assignment clause
  2023-06-14  5:29 ` Thomas Zimmermann
@ 2023-06-14  8:17   ` Sui Jingfeng
  0 siblings, 0 replies; 3+ messages in thread
From: Sui Jingfeng @ 2023-06-14  8:17 UTC (permalink / raw)
  To: Thomas Zimmermann, Maarten Lankhorst, Maxime Ripard,
	David Airlie, Daniel Vetter
  Cc: dri-devel, linux-kernel

Hi,

On 2023/6/14 13:29, Thomas Zimmermann wrote:
> Hi
>
> Am 14.06.23 um 03:30 schrieb Sui Jingfeng:
>> The assignment "dst = map;" in the drm_fbdev_generic_damage_blit() 
>> function
>> is redundant because it has already been copied when the call to
>> drm_client_buffer_vmap() is finished. Therefore, this patch saves a 
>> useless
>> copy. No functional change.
>
> Isn't that what we discussed here?
>
Yeah,

Lucas say he would like to take a deeper look in later time.

Then, two and half a mouths passed, it seem that no one send

fix patch.

I thinks this is an exercise for me, I resend this patch again.

Any idea?

> https://lore.kernel.org/dri-devel/20230325074636.136833-1-15330273260@189.cn/ 
>
>
> Best regards
> Thomas
>
>>
>> Signed-off-by: Sui Jingfeng <suijingfeng@loongson.cn>
>> ---
>>   drivers/gpu/drm/drm_fbdev_generic.c | 5 ++---
>>   1 file changed, 2 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/drm_fbdev_generic.c 
>> b/drivers/gpu/drm/drm_fbdev_generic.c
>> index 98ae703848a0..aa6924e3a58c 100644
>> --- a/drivers/gpu/drm/drm_fbdev_generic.c
>> +++ b/drivers/gpu/drm/drm_fbdev_generic.c
>> @@ -182,7 +182,7 @@ static int drm_fbdev_generic_damage_blit(struct 
>> drm_fb_helper *fb_helper,
>>                        struct drm_clip_rect *clip)
>>   {
>>       struct drm_client_buffer *buffer = fb_helper->buffer;
>> -    struct iosys_map map, dst;
>> +    struct iosys_map map;
>>       int ret;
>>         /*
>> @@ -202,8 +202,7 @@ static int drm_fbdev_generic_damage_blit(struct 
>> drm_fb_helper *fb_helper,
>>       if (ret)
>>           goto out;
>>   -    dst = map;
>> -    drm_fbdev_generic_damage_blit_real(fb_helper, clip, &dst);
>> +    drm_fbdev_generic_damage_blit_real(fb_helper, clip, &map);
>>         drm_client_buffer_vunmap(buffer);
>
-- 
Jingfeng


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

end of thread, other threads:[~2023-06-14  8:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-14  1:30 [PATCH] drm/fbdev-generic: Remove a redundant assignment clause Sui Jingfeng
2023-06-14  5:29 ` Thomas Zimmermann
2023-06-14  8:17   ` Sui Jingfeng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®