Samsung Electronics Co. and Sharp Corp. agreed to end all patent-infringement litigation against each other and cross-license technology related to liquid- crystal displays.