PATCH: FrameBuffer Monitor Functions

Carlos Manuel Duclos Vergara (carlos@embedded.cl)
Tue, 26 Feb 2002 12:28:21 -0300


This is a multi-part message in MIME format.

--Multipart_Tue__26_Feb_2002_12:28:21_-0300_08b31920
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

Hi,
this patch is to avoid the cooking of monitors from inside the
framebuffer subsystem. Normally this would be made by
fbmon_valid_timings function, but actually this function does nothing.
So i start writing a new implementation that will make some checks, note
that is not the full answer because it requires to user use another data
structures normally don't used, but for now it checks the basic stuff.
(i will continue improving this, i use this on uclinux not on linux so i
probably have another things in mind when i create this patches)

bye

-- 
"Solo me arrepiento de unos * de menos y unos ++ de sobra"
Carlos Manuel Duclos Vergara

--Multipart_Tue__26_Feb_2002_12:28:21_-0300_08b31920 Content-Type: application/octet-stream; name="fbmon_c.patch" Content-Disposition: attachment; filename="fbmon_c.patch" Content-Transfer-Encoding: base64

LS0tIHVjbGludXgtMi40LngvZHJpdmVycy92aWRlby9mYm1vbi5jCVdlZCBNYXIgIDggMTU6MTg6 MjUgMjAwMAorKysgZWNsLXVjbGludXgtMi40LngvZHJpdmVycy92aWRlby9mYm1vbi5jCU1vbiBG ZWIgMjUgMTQ6MjA6MjUgMjAwMgpAQCAtNDYsMzEgKzQ2LDU0IEBACiBpbnQgZmJtb25fdmFsaWRf dGltaW5ncyh1X2ludCBwaXhjbG9jaywgdV9pbnQgaHRvdGFsLCB1X2ludCB2dG90YWwsCiAgICAg ICAgICAgICAgICAgICAgICAgICBjb25zdCBzdHJ1Y3QgZmJfaW5mbyAqZmJfaW5mbykKIHsKLSNp ZiAwCiAgIC8qCi0gICAqIGxvbmcgbG9uZyBkaXZpc2lvbnMgLi4uLiAkIyUlIyQKKyAgICogT2ho aCwgaSBkaXNjb3ZlciB0aGUgU2VjcmV0IG9mIFJhbXNlcyBJSSB0b21iIQorICAgKiBfUExFQVNF XyBub3RlIHRoYXQgdGhpcyBpcyBvbmx5IHdvcnRoIGlmI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b25nIGxv bmcgaHBpY29zLCB2cGljb3M7Ci0gICAgY29uc3QgdW5zaWduZWQgbG9uZyBsb25nIF8xZTEyID0g MTAwMDAwMDAwMDAwMFVMTDsKLSAgICBjb25zdCBzdHJ1Y3QgZmJfbW9uc3BlY3MgKm1vbnNwZWNz ID0gJmZiX2luZm8tPm1vbnNwZWNzOwogCi0gICAgaHBpY29zID0gKHVuc2lnbmVkIGxvbmcgbG9u ZylodG90YWwqKHVuc2lnbmVkIGxvbmcgbG9uZylwaXhjbG9jazsKLSAgICB2cGljb3MgPSAodW5z aWduZWQgbG9uZyBsb25nKXZ0b3RhbCoodW5zaWduZWQgbG9uZyBsb25nKWhwaWNvczsKLSAgICBp ZiAoIXZwaWNvcykKLSAgICAgIHJldHVybiAwOwotICAgIAotICAgIGlmIChtb25zcGVjcy0+aGZt aW4gPT0gMCkKKyAgaWYoICFmYl9pbmZvLT5tb25zcGVjcyApCisgICAgeworICAgICAgLyoKKyAg ICAgICAqIERlYXIgR29kLi4uCisgICAgICAgKi8KKyAgICAgIHByaW50ayggS0VSTl9JTkZPICJm YjogV2UgY291bGQgbm90IGNoZWNrIHlvdXIgbW9uaXRvciwgZHVlIGxhY2sgb2YgbW9uc3BlY3Mh XG4iICk7CiAgICAgICByZXR1cm4gMTsKLSAgICAKLSAgICBpZiAoaHBpY29zKm1vbnNwZWNzLT5o Zm1pbiA+IF8xZTEyIHx8IGhwaWNvcyptb25zcGVjcy0+aGZtYXggPCBfMWUxMiB8fAotICAgICAg ICB2cGljb3MqbW9uc3BlY3MtPnZmbWluID4gXzFlMTIgfHwgdnBpY29zKm1vbnNwZWNzLT52Zm1h eCA8IF8xZTEyKQorICAgIH0KKworICBpZiggcGl4ZWxjbG9jayA+IChmYl9pbmZvLT5tb25zcGVj cy5oZm1heCAqIGh0b3RhbCkgKQorICAgIHsKKyAgICAgIC8qIAorICAgICAgICogV2Ugd2lsbCBj b29rIHRoaXMgbW9uaXRvciEKKyAgICAgICAqLworICAgICAgcHJpbnRrKCBLRVJOX0lORk8gImZi OiBUbyBhdm9pZCBjb29raW5nIHlvdXIgbW9uaXRvciB3ZSB3b24ndCB1c2UgdGhpcyByZXNvbHV0 aW9uIVxuIiApOwogICAgICAgcmV0dXJuIDA7Ci0jZW5kaWYKLSAgICByZXR1cm4gMTsKKyAgICB9 CisKKyAgLyoKKyAgICogSWYgd2UgZ2V0IGhlcmUsIHdlJ3JlIHNhZmUgKGFsbW9zdCkKKyAgICov CisKKyAgcmV0dXJuIDE7CiB9CiAKIGludCBmYm1vbl9kcG1zKGNvbnN0IHN0cnVjdCBmYl9pbmZv ICpmYl9pbmZvKQogeworICBpZiggIWZiX2luZm8tPm1vbnNwZWNzICkKKyAgICB7CisgICAgICBw cmludGsoIEtFUk5fSU5GTyAiZmI6IE5vIG1vbnNwZWNzIVxuIiApOworICAgICAgcmV0dXJuIC1F SU5WQUw7CisgICAgfQogICByZXR1cm4gZmJfaW5mby0+bW9uc3BlY3MuZHBtczsKIH0KIAo=

--Multipart_Tue__26_Feb_2002_12:28:21_-0300_08b31920-- - 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/