An appeals court on Monday upheld the bulk of Apple’s patent victory against Samsung Electronics in 2012, but overturned part of the decision and said that a lower court should reduce the total amount that Samsung would have to pay.

The United States Court of Appeals for the Federal Circuit, which deals with patent lawsuit appeals, said that the overall aesthetic of the iPhone — a rectangular product with rounded corners, black borders and a flat, clear surface — could not be protected and part of the damages would have to be recalculated.

Apple had accused Samsung of diluting its brand by copying the overall look of its iPhones. But the court said Apple failed to prove that the iPhone aesthetic was not “functional.” In other words, giving Apple protection for the overall look and shape of a smartphone would essentially grant it a perpetual monopoly over making smartphones work better, and the three-judge panel decided not to go in that direction.

“We therefore vacate the jury’s damages awards against the Samsung products that were found liable for trade dress dilution and remand for further proceedings consistent with this opinion,” the appeals court wrote in its decision.