frecon: fix ioctl DRM_IOCTL_MODE_DIRTYFB ret -13

To let DRM_IOCTL_MODE_DIRTYFB works correctly, application must take
the mastership before firing the ioctl.
On the cave project, the panel is PSR. If DRM_IOCTL_MODE_DIRTYFB
does not work correctly, the framebuffer can't be flushed to the panel
immediately. And that will cause display lag.
To fix this issue, just get the mastership before firing the ioctl.
Besides, unified function call for drm_dropmaster.

BUG=chrome-os-partner:53483
BRANCH=TOT
TEST=VT2 display smoothly

Change-Id: I5be5d585eeba687f07b2b547d4e073533e4b0114
Signed-off-by: Zhuo-hao Lee <zhuo-hao.lee@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/347710
Tested-by: Jiazi Yang <Tomato_Yang@asus.com>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
2 files changed