[PATCH v3 2/7] drm/tinydrm: Add helper functions