drm/kms: move driver specific fb common code to helper functions (v2)