projects
/
linux-2.6-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b91e05f
)
drm/vmwgfx: Don't memcmp equivalent pointers
author
Ian Forbes
<ian.forbes@broadcom.com>
Thu, 28 Mar 2024 19:07:16 +0000
(14:07 -0500)
committer
Zack Rusin
<zack.rusin@broadcom.com>
Thu, 6 Jun 2024 02:38:40 +0000
(22:38 -0400)
These pointers are frequently the same and memcmp does not compare the
pointers before comparing their contents so this was wasting cycles
comparing 16 KiB of memory which will always be equal.
Fixes:
bb6780aa5a1d
("drm/vmwgfx: Diff cursors when using cmds")
Signed-off-by: Ian Forbes <ian.forbes@broadcom.com>
Signed-off-by: Zack Rusin <zack.rusin@broadcom.com>
Link:
https://patchwork.freedesktop.org/patch/msgid/20240328190716.27367-1-ian.forbes@broadcom.com
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
index 9532258a0848c03c20f3b41139b16e4589865575..00c4ff684130129d6765dc6457233c32bc4b4228 100644
(file)
--- a/
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
+++ b/
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
@@
-224,7
+224,7
@@
static bool vmw_du_cursor_plane_has_changed(struct vmw_plane_state *old_vps,
new_image = vmw_du_cursor_plane_acquire_image(new_vps);
changed = false;
- if (old_image && new_image)
+ if (old_image && new_image
&& old_image != new_image
)
changed = memcmp(old_image, new_image, size) != 0;
return changed;