OSDN Git Service

Fix cooperating with hwcomposer android-x86-7.1-r4 android-x86-8.1-r1 android-x86-8.1-r2 android-x86-8.1-r3 android-x86-8.1-r4 android-x86-8.1-r5 android-x86-9.0-r1
authorChih-Wei Huang <cwhuang@linux.org.tw>
Thu, 10 Jan 2019 17:46:51 +0000 (01:46 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Thu, 10 Jan 2019 17:46:51 +0000 (01:46 +0800)
commit1bf1880a1b8acd65f8c63b8963a7b630874fc605
tree16e930095efe5172253a96f06d43a87b13210621
parent5e9e68df957049f03966b5e0cc49ca01c6e5c241
Fix cooperating with hwcomposer

When hwcomposer is available, framebuffer_close() will be called.
Thus the allocated struct drm_framebuffer is just freed. However,
the gralloc still holds a pointer referring to the freed struct
drm_framebuffer. As a result, the following errors are repeated:

01-11 00:28:47.088  1103  1103 E drm-fb  : Failed to get handle from prime fd: 9
01-11 00:28:48.062  1103  1103 E drm-fb  : Failed to get handle from prime fd: 9

This patch fixes it by setting the pointer to NULL.
drm_framebuffer.c