]> git.baikalelectronics.ru Git - kernel.git/commit
drm/hisilicon/hibmc: Use GEM VRAM's prepare_fb() and cleanup_fb() helpers
authorThomas Zimmermann <tzimmermann@suse.de>
Thu, 24 Oct 2019 08:14:03 +0000 (10:14 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Thu, 24 Oct 2019 14:12:36 +0000 (16:12 +0200)
commit2f8e71dafed4c6df20d16b7642b2e83257390d2c
treed0740c34701ee2861c286eaaed035a19e91142be
parentebfe6212c159b2144df96080c84dcd6f1eb2d4f0
drm/hisilicon/hibmc: Use GEM VRAM's prepare_fb() and cleanup_fb() helpers

This patch implements prepare_fb() and cleanup_fb() in hibmc with the
GEM VRAM helpers. In the current code, pinning the BO is performed by
hibmc_plane_atomic_update(), where the operation does not belong.

This patch also fixes a bug where the pinned BO was never unpinned.
Pinning multiple BOs would have exhaused the available VRAM and further
pin operations would have failed, leaving the display in a corrupt
state.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20191024081404.6978-4-tzimmermann@suse.de
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c