This reverts commit ac1d818b. Just one declaration of kms_pipe_to_index(). It was not missing after all.