Add pvdrm cast functions