Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Thu, 22 Aug 2002 14:29:19 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Thu, 22 Aug 2002 14:29:19 -0400 Received: from avocet.mail.pas.earthlink.net ([207.217.120.50]:4021 "EHLO avocet.mail.pas.earthlink.net") by vger.kernel.org with ESMTP id ; Thu, 22 Aug 2002 14:29:11 -0400 Date: Thu, 22 Aug 2002 11:27:56 -0700 (PDT) From: James Simmons X-X-Sender: To: Antonino Daplas , Paul Mackerras cc: fbdev , Linux Kernel Mailing List Subject: Re: [Linux-fbdev-devel] cfbimgblt.c In-Reply-To: <1029972099.551.3.camel@daplas> Message-ID: MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323584-231102479-1030040762=:9077" Content-ID: Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 15683 Lines: 288 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. --8323584-231102479-1030040762=:9077 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-ID: > Hi, > > I want to address some of the limitations of cfbimgblt.c, but > unfortunately I ended up practically rewriting the whole code. In > theory, the code (slow_imageblit): Done. > a. supports all possible bit depths Needs to added. > b. should be able to handle destination writes that are not aligned by > an unsigned long Not added. > c. should be able to handle fix->line_length not a multiple of an > unsigned long Access is also a unsigned long but currently is not aligned. It will be fixed. > d. framebuffer access is always the size of an unsigned long and aligned Yeah!!! > e. preliminary code for drawing the logo. Paul please test the code. > f. added Paul Mackerra's endianness patch (plus some of my own), but I > have no big-endian machine, so it's untested, and perhaps incorrect. > The only tests I've done for slow_imageblit is at 8, 16, 24, and 32 bpp, > and forcibly misaligning image->dx by 1 pixel. The code is slow, so I > included fast_imageblit for 8, 16 and 32 bpp which is an implementation > of fbcon-cfb8/16/32.c. Will begin testing today. MS: (n) 1. A debilitating and surprisingly widespread affliction that renders the sufferer barely able to perform the simplest task. 2. A disease. James Simmons [jsimmons@users.sf.net] ____/| fbdev/console/gfx developer \ o.O| http://www.linux-fbdev.org =(_)= http://linuxgfx.sourceforge.net U http://linuxconsole.sourceforge.net --8323584-231102479-1030040762=:9077 Content-Type: TEXT/PLAIN; NAME="cfbimgblt.c" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: ATTACHMENT; FILENAME="cfbimgblt.c" LyoNCiAqICBHZW5lcmljIEJpdEJMVCBmdW5jdGlvbiBmb3IgZnJhbWUgYnVm ZmVyIHdpdGggcGFja2VkIHBpeGVscyBvZiBhbnkgZGVwdGguDQogKg0KICog ICAgICBDb3B5cmlnaHQgKEMpICBKdW5lIDIwMDIgSmFtZXMgU2ltbW9ucyA8 anNpbW1vbnNAdXNlcnMuc2YubmV0Pg0KIDgJCQkJIEFudG9uaW5vIERhcGxh cyA8YWRhcGxhc0Bwb2wubmV0Pg0KICoNCiAqICBUaGlzIGZpbGUgaXMgc3Vi amVjdCB0byB0aGUgdGVybXMgYW5kIGNvbmRpdGlvbnMgb2YgdGhlIEdOVSBH ZW5lcmFsIFB1YmxpYw0KICogIExpY2Vuc2UuICBTZWUgdGhlIGZpbGUgQ09Q WUlORyBpbiB0aGUgbWFpbiBkaXJlY3Rvcnkgb2YgdGhpcyBhcmNoaXZlIGZv cg0KICogIG1vcmUgZGV0YWlscy4NCiAqDQogKiBOT1RFUzoNCiAqDQogKiAg ICBUaGlzIGZ1bmN0aW9uIGNvcHlzIGEgaW1hZ2UgZnJvbSBzeXN0ZW0gbWVt b3J5IHRvIHZpZGVvIG1lbW9yeS4gVGhlDQogKiAgaW1hZ2UgY2FuIGJlIGEg Yml0bWFwIHdoZXJlIGVhY2ggMCByZXByZXNlbnRzIHRoZSBiYWNrZ3JvdW5k IGNvbG9yIGFuZA0KICogIGVhY2ggMSByZXByZXNlbnRzIHRoZSBmb3JlZ3Jv dW5kIGNvbG9yLiBHcmVhdCBmb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WZn Y29sb3IgPSBpbWFnZS0+ZmdfY29sb3I7DQoJCQliZ2NvbG9yID0gaW1hZ2Ut PmJnX2NvbG9yOw0KCQl9CQ0KIA0KCQlpZiAoQklUU19QRVJfTE9ORyAlIGJw cCA9PSAwICYmICFzdGFydF9pbmRleCAmJiAhcGl0Y2hfaW5kZXggJiYgDQoJ CSAgICBicHAgPj0gOCAmJiBicHAgPD0gMzIpIA0KCQkJZmFzdF9pbWFnZWJs aXQoaW1hZ2UsIHAsIGRzdDEsIGZnY29sb3IsIGJnY29sb3IpOw0KCQllbHNl IA0KCQkJc2xvd19pbWFnZWJsaXQoaW1hZ2UsIHAsIGRzdDEsIGZnY29sb3Is IGJnY29sb3IsIHN0YXJ0X2luZGV4LCBwaXRjaF9pbmRleCk7DQoJfQ0KCWVs c2UgaWYgKGltYWdlLT5kZXB0aCA9PSBicHApIA0KCQljb2xvcl9pbWFnZWJs aXQoaW1hZ2UsIHAsIGRzdDEsIHN0YXJ0X2luZGV4LCBwaXRjaF9pbmRleCk7 DQp9DQo= --8323584-231102479-1030040762=:9077-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/