As prices for individual photovoltaic (PV) panels fall and company revenue numbers drop, solar power may be facing a long and difficult transition on the path towards grid parity.

Released Tuesday morning, SunPower’s second quarter 2011 results illustrate the broader struggles that is many of the players in the global solar business. The company lost $147.9 million for the quarter, as compared with only a $2.1 million loss the in the first quarter of 2011 and a $6.2 loss million in the second quarter of 2010.

The company’s margins contracted, even when generally accepted accounting principles were put aside. Non-GAAP gross margin were reported down from 26.3% in Q2 2010 and 20.3% in Q1 2011 to only 12.5% in Q2 2011. A general slowing in government subsidies for utility scale solar farms, particularly in Italy, as well as increased competition from Chinese manufacturing, have affected the numbers.

“Mix changes related to market conditions in Germany and Italy impacted our margins,” said SunPower President and CEO Tom Werner in a company statement.

As a result of the abrupt changes in the Italian market, we have restructured and realigned the company to address the preference for small scale solar systems in Europe. – Werner

But Werner was optimistic the company could turn around and meet 2011 goals by year’s end.

“Our industry-leading, high efficiency technology is ideally suited for roofs and parking structures and we are well positioned to profitably grow share in key markets this year,” he said.

He said the company has freed new cash to allow for more flexibility as the company tries to survive the tightening margins. With the earning announcement, SunPower said it had received $771 million credit line through the French oil and gas company Total’s credit line. In June, Total has bought a significant portion of SunPower’s shares in exchange for $1 billion in credit support.

“Since successfully closing our strategic investment by Total at the end of the second quarter, we have been working closely with them to improve our balance sheet,” Werner said. “Today we signed a new $771 million letter of credit facility using Total’s $1 billion credit support agreement, giving us access to approximately $200 million of previously restricted cash to support our growth.”