Searched hist:"07 fb1e5babd5d3d4228517295db2ea4067ce2a79" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/gpu/drm/mediatek/ |
H A D | mtk_drm_crtc.c | diff 07fb1e5babd5d3d4228517295db2ea4067ce2a79 Tue Jan 18 07:37:59 CST 2022 AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> drm/mediatek: mtk_drm_crtc: Use kmalloc in mtk_drm_crtc_duplicate_state
Optimize mtk_drm_crtc_duplicate_state() by switching from kzalloc() to kmalloc(): the only variable of this struct that gets checked in other functions is `pending_config`, but if that's set to false, then all of the remaining variables will only ever be set, but not read - so, also set `pending_config` to false. This saves us some small overhead.
Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220118133759.112458-2-angelogioacchino.delregno@collabora.com/ Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
|