Validation experiments have been conducted using 6 and 15 MV photons in inhomogeneous (water/lung/water) media to benchmark the accuracy of the DPM Monte Carlo code for photon beam dose calculations. Small field sizes (down to 2 x 2 cm2) and low-density media were chosen for this investigation because the intent was to test the DPM code under conditions where lateral electronic disequilibrium effects are emphasized. The treatment head components of a Varian 21EX linear accelerator, including the jaws (defining field sizes of 2 x 2, 3 x 3 and 10 x 10 cm2), were simulated using the BEAMnrc code. The phase space files were integrated within the DPM code system, and central axis depth dose and profile calculations were compared against diode measurements in a homogeneous water phantom in order to validate the phase space. Results of the homogeneous phantom study indicated that the relative differences between DPM calculations and measurements were within +/- 1% (based on the rms deviation) for the depth dose curves; relative profile dose differences were on average within +/- 1%/1 mm. Depth dose and profile measurements were carried out using an ion-chamber and film, within an inhomogeneous phantom consisting of a 6 cm slab of lung-equivalent material embedded within solid water. For the inhomogeneous phantom experiment, DPM depth dose calculations were within +/- 1% (based on the rms deviation) of measurements; relative profile differences at depths within and beyond the lung were, on average, within +/- 2% in the inner and outer beam regions, and within 1-2 mm distance-to-agreement within the penumbral region. Relative point differences on the order of 2-3% were within the estimated experimental uncertainties. This work demonstrates that the DPM Monte Carlo code is capable of accurate photon beam dose calculations in situations where lateral electron disequilibrium effects are pronounced.