Cross licensing is fairly common in cases like this as well. Every car company has enough R&D as to produce some interesting patents. Want our more comfortable seats in your luxury car - give us good terms for your patent and we will give you good terms.
It isn't unheard of for companies to automatically freely license safety related patents. (someone who doesn't die in a competitors car might buy your car next time) So there is another option that might happen.
The above assumes there actually is a breakthrough that is patentable. If all we need is a large enough machine learning data set - those are easy enough to create (just very tedious), and so there are not patents to take out. If your system depends on some sensor - there are lots of different ways to make a sensor and work around the patent.
The idea of self driving has been around for long enough that you can't patent it. There is plenty of prior work to cite. Companies have been known to be working on it long enough that any idea patents would have expired before now.