A judge said a man potentially faces a lengthy prison term after police allegedly found a "wholesale" amount of cocaine hidden in a tent on his vehicle's roof.