From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail.phytec.co.uk ([217.6.246.34] helo=root.phytec.de) by bombadil.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1RnnHd-0003u1-0z for barebox@lists.infradead.org; Thu, 19 Jan 2012 08:23:47 +0000 From: =?UTF-8?q?Teresa=20G=C3=A1mez?= Date: Thu, 19 Jan 2012 09:23:15 +0100 Message-Id: <1326961396-19782-4-git-send-email-t.gamez@phytec.de> In-Reply-To: <1326961396-19782-1-git-send-email-t.gamez@phytec.de> References: <1326961396-19782-1-git-send-email-t.gamez@phytec.de> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: barebox-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 4/5] imx-ipu-fb: Add overlay support To: barebox@lists.infradead.org QWRkaW5nIG92ZXJsYXkgc3VwcG9ydCBmb3IgaS5NWDMgc2RjLgoKRm9yZWdyb3VuZCBjaGFubmVs IG9ubHkgd29ya3Mgd2hlbiBiYWNrZ3JvdW5kIGlzIGFsc28gZW5hYmxlZC4KVGhlIGZvcmVncm91 bmQgdmlkZW8gbW9kZSBpcyBhbHdheXMgdGhlIHNhbWUgYXMgdGhlIGJhY2tncm91bmQuCgpBbHNv IGFkZGVkIGFscGhhIGNvbW1hbmQgdG8gc2V0IHRoZSBhbHBoYSB2YWx1ZSBvZiB0aGUgZm9yZWdy b3VuZC4KClRlc3RlZCBvbiBhIHBoeUNPUkUtaS5NWDM1LgoKU2lnbmVkLW9mZi1ieTogVGVyZXNh IEfDoW1leiA8dC5nYW1lekBwaHl0ZWMuZGU+Ci0tLQogYXJjaC9hcm0vbWFjaC1pbXgvaW5jbHVk ZS9tYWNoL2lteC1pcHUtZmIuaCB8ICAgIDEgKwogZHJpdmVycy92aWRlby9LY29uZmlnICA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