Thalamus is concerned with the relay of visual information from the retina to the visual cortex. Interestingly, the information transfer is strongly mediated by nonlinear dynamics of the neurons. In particular, experiments have shown that the thalamic neurons process visual input in two distinct nonlinear dynamic modes, the so-called tonic mode and the burst mode. This paper is concerned with a bifurcation analysis of the Hodgkin-Huxley type models of thalamic neurons. The analysis is used to show that the tonic mode arises as a type of global bifurcation where a homoclinic orbit interacts with a saddle node bifurcation in equilibria. Such a bifurcation is very efficient at the kind of rate coding that has been experimentally observed in the tonic mode. The burst mode is consistent with a subcritical Hopf bifurcation in slow currents. Finally, for both modes, the electrophysiological role of the so-called slow and fast currents is also discussed.