What are the main points of conflict between Tamil Nadu and Karnataka regarding the Mekedatu dam project?

I am not clear about why the Mekedatu dam project has caused disputes between these two states and what the underlying issues are.