Date: Thu, 02 Sep 2004 01:24:34 +0800 From: Deng XueFeng <dsnofe@msn.com> To: "Cyrille Lefevre" <clefevre-lists@9online.fr> Cc: current@freebsd.org Subject: Re: [BETA PATCH] VESA mode support for syscons Message-ID: <20040902012216.E864.DSNOFE@msn.com> In-Reply-To: <002f01c49020$5e9df560$7890a8c0@gits.invalid> References: <BAY11-DAV3OkevWWGxe00021773@hotmail.com> <002f01c49020$5e9df560$7890a8c0@gits.invalid>
next in thread | previous in thread | raw e-mail | index | archive | help
--------_41360548E86503B477C0_MULTIPART_MIXED_ Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit This is the new patch. but i haven't test du to the limit of opt_sche.h you can try this patch after current is not broken. I wanna go to sleep. so sleepy. Zzzzzzzz... Sincerely, Deng XueFeng MSN: dsnofe@msn.com http://www.dengh.com --------_41360548E86503B477C0_MULTIPART_MIXED_ Content-Type: application/octet-stream; name="freebsd-syscons-patch-0902.diff" Content-Disposition: attachment; filename="freebsd-syscons-patch-0902.diff" Content-Transfer-Encoding: base64 PyBmcmVlYnNkLXN5c2NvbnMtcGF0Y2gtMDkwMi5kaWZmCj8gbmV3LmRpZmYKPyBzeXNjb25zLmRp ZmYKSW5kZXg6IHNjdmVzYWN0bC5jCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KUkNTIGZpbGU6IC9ob21lL25jdnMvc3Jj L3N5cy9kZXYvc3lzY29ucy9zY3Zlc2FjdGwuYyx2CnJldHJpZXZpbmcgcmV2aXNpb24gMS4yMApk aWZmIC11IC1yMS4yMCBzY3Zlc2FjdGwuYwotLS0gc2N2ZXNhY3RsLmMJMTYgSnVuIDIwMDQgMDk6 NDY6NTggLTAwMDAJMS4yMAorKysgc2N2ZXNhY3RsLmMJMSBTZXAgMjAwNCAxNzowNDoxNSAtMDAw MApAQCAtMiw2ICsyLDkgQEAKICAqIENvcHlyaWdodCAoYykgMTk5OCBLY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luZV93aWR0aCwgcGl4ZWxfc2l6ZTsKKwlpbnQgaSwgaiwgazsKKwlp bnQgYTsKKworCWxpbmVfd2lkdGggPSBzY3AtPnNjLT5hZHAtPnZhX2xpbmVfd2lkdGg7CisJcGl4 ZWxfc2l6ZSA9IHNjcC0+c2MtPmFkcC0+dmFfaW5mby52aV9waXhlbF9zaXplOworCisJZCA9IFZJ REVPX01FTU9SWV9QT1Moc2NwLCBmcm9tLCA4ICogcGl4ZWxfc2l6ZSk7CisKKwlpZiAoZnJvbSAr IGNvdW50ID4gc2NwLT54c2l6ZSAqIHNjcC0+eXNpemUpCisJCWNvdW50ID0gc2NwLT54c2l6ZSAq IHNjcC0+eXNpemUgLSBmcm9tOworCisJZm9yIChpID0gZnJvbTsgY291bnQtLSA+IDA7ICsraSkg eworCQlhID0gc2NfdnRiX2dldGEoJnNjcC0+dnRiLCBpKTsKKworCQlpZiAoZmxpcCkgeworCQkJ Y29sMSA9ICgoKGEgJiAweDcwMDApID4+IDQpIHwgKGEgJiAweDA4MDApKSA+PiA4OworCQkJY29s MiA9ICgoKGEgJiAweDgwMDApID4+IDQpIHwgKGEgJiAweDA3MDApKSA+PiA4OworCQl9IGVsc2Ug eworCQkJY29sMSA9IChhICYgMHgwZjAwKSA+PiA4OworCQkJY29sMiA9IChhICYgMHhmMDAwKSA+ PiAxMjsKKwkJfQorCisJCWUgPSBkOworCQlmID0gJihzY3AtPmZvbnRbc2NfdnRiX2dldGMoJnNj cC0+dnRiLCBpKSAqIHNjcC0+Zm9udF9zaXplXSk7CisKKwkJZm9yIChqID0gMDsgaiA8IHNjcC0+ Zm9udF9zaXplOyArK2osICsrZikgeworCQkJZm9yIChrID0gMDsgayA8IDg7ICsraykgeworCQkJ CWNvbG9yID0gKmYgJiAoMSA8PCAoNyAtIGspKSA/IGNvbDEgOiBjb2wyOworCQkJCXZnYV9kcmF3 cHhsKGUgKyBwaXhlbF9zaXplICogaywgY29sb3IpOworCQkJfQorCisJCQllICs9IGxpbmVf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GgqaW5mby52aV9oZWlnaHQvOCA+IGluZm8udmlf d2luZG93X3NpemUpCisKKyAgICBpZiAoaW5mby52aV9tZW1fbW9kZWwgPT0gVl9JTkZPX01NX1BM QU5BUikgeworCWlmIChpbmZvLnZpX3BsYW5lcyAhPSA0KQorCSAgICByZXR1cm4gRU5PREVWOwor CisJLyoKKwkgKiBBIG1lbW9yeSBzaXplID42NEsgcmVxdWlyZXMgYmFuayBzd2l0Y2hpbmcgdG8g YWNjZXNzIHRoZSBlbnRpcmUKKwkgKiBzY3JlZW4uIFhYWAorCSAqLworCisJaWYgKGluZm8udmlf d2lkdGggKiBpbmZvLnZpX2hlaWdodCAvIDggPiBpbmZvLnZpX3dpbmRvd19zaXplKQorCSAgICBy ZXR1cm4gRU5PREVWOworICAgIH0gZWxzZSBpZiAoaW5mby52aV9tZW1fbW9kZWwgPT0gVl9JTkZP X01NX0RJUkVDVCkgeworCWlmICgoaW5mby52aV9kZXB0aCAhPSAxNSkgJiYgKGluZm8udmlfZGVw dGggIT0gMTYpICYmCisJICAgIChpbmZvLnZpX2RlcHRoICE9IDI0KSAmJiAoaW5mby52aV9kZXB0 aCAhPSAzMikpCisJICAgIHJldHVybiBFTk9ERVY7CisgICAgfSBlbHNlCiAJcmV0dXJuIEVOT0RF VjsKIAogICAgIC8qIHN0b3Agc2NyZWVuIHNhdmVyLCBldGMgKi8KSW5kZXg6IHN5c2NvbnMuYwo9 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09ClJDUyBmaWxlOiAvaG9tZS9uY3ZzL3NyYy9zeXMvZGV2L3N5c2NvbnMvc3lzY29u cy5jLHYKcmV0cmlldmluZyByZXZpc2lvbiAxLjQyNwpkaWZmIC11IC1yMS40Mjcgc3lzY29ucy5j Ci0tLSBzeXNjb25zLmMJNSBBdWcgMjAwNCAyMzo1NDowNCAtMDAwMAkxLjQyNworKysgc3lzY29u cy5jCTEgU2VwIDIwMDQ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ZCBiaW5hcnkgZm9y bXMsIHdpdGggb3Igd2l0aG91dAogICogbW9kaWZpY2F0aW9uLCBhcmUgcGVybWl0dGVkIHByb3Zp ZGVkIHRoYXQgdGhlIGZvbGxvd2luZyBjb25kaXRpb25zCkBAIC00MDUsNiArNDA3LDcgQEAKIAkJ ICAgICAgIFNJX1NVQl9EUklWRVJTLCBTSV9PUkRFUl9NSURETEUpCiAKIC8qIHJlbmRlcmVyIGZ1 bmN0aW9uIHRhYmxlICovCit0eXBlZGVmIHZvaWQJdnJfaW5pdF90KHNjcl9zdGF0ICpzY3ApOwog dHlwZWRlZiB2b2lkCXZyX2NsZWFyX3Qoc2NyX3N0YXQgKnNjcCwgaW50IGMsIGludCBhdHRyKTsK IHR5cGVkZWYgdm9pZAl2cl9kcmF3X2JvcmRlcl90KHNjcl9zdGF0ICpzY3AsIGludCBjb2xvcik7 CiB0eXBlZGVmIHZvaWQJdnJfZHJhd190KHNjcl9zdGF0ICpzY3AsIGludCBmcm9tLCBpbnQgY291 bnQsIGludCBmbGlwKTsKQEAgLTQxNiw2ICs0MTksNyBAQAogdHlwZWRlZiB2b2lkCXZyX2RyYXdf bW91c2VfdChzY3Jfc3RhdCAqc2NwLCBpbnQgeCwgaW50IHksIGludCBvbik7CiAKIHR5cGVkZWYg c3RydWN0IHNjX3JuZHJfc3cgeworCXZyX2luaXRfdAkJKmluaXQ7CiAJdnJfY2xlYXJfdAkJKmNs ZWFyOwogCXZyX2RyYXdfYm9yZGVyX3QJKmRyYXdfYm9yZGVyOwogCXZyX2RyYXdfdAkJKmRyYXc7 Cg== --------_41360548E86503B477C0_MULTIPART_MIXED_--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040902012216.E864.DSNOFE>