drm: add encoder free function