The billions of subsidies have gone to several manufacturers including GM and Ford in the form of rebates, Tesla didn't get all of this amount.  All car manufacturers get tax breaks and incentives for setting up manufacturing plants.
 
As for the patents Musk has made them available to anyone wanting to use the technology in Tesla cars for free much like open source software.  You should get informed about Tesla before the truth knocks you over.