updated jitterless kernel patch
Riccardo Magliocchetti
riccardo.magliocchetti at gmail.com
Sun Oct 31 16:08:55 CET 2010
Il 31/10/2010 12:30, Gennady Kupava ha scritto:
> Hi, list.
>
> As my jitterless proof of concept patch were inculed to all distribution
> and seem working well, i decided to write proper version.
cool :)
> Problems fixed:
> Rotation, mode switch, suspend issue
> Code written in proper way, linked via device-dependent code instead of
> direct calls from touchscreen to glamo.
>
> Things left:
> Better to place pixclock change to glamo-fb.c, but i do not want to
> write two versions of patch for glamo-fb.c and kms.
>
> Patch is not update over previous version, but contains all changes
> http://www.bsdmn.com/openmoko/jitterless/jitterless_ts_v3full.patch
There are some style issues:
>diff --git a/drivers/mfd/glamo-core.c b/drivers/mfd/glamo-core.c
>index 1d51ac1..71d0278 100644
>--- a/drivers/mfd/glamo-core.c
>+++ b/drivers/mfd/glamo-core.c
>@@ -104,6 +104,8 @@ static const struct reg_range reg_range[] = {
> /* { 0x1b00, 0x900, "3D Unit", 0 }, */
> };
>
>+struct glamo_core *default_glamo = 0;
This should be NULL.
>@@ -169,6 +184,49 @@ static inline void __reg_set_bit(struct
>glamo_core *glamo,
> __reg_write(glamo, reg, tmp);
> }
>
>+void glamo_pixclock_slow (struct glamo_core *glamo) {
>+
>+ int x,lastx=0;
>+ int timeout=1000000;
>+ int threshold=5;
>+ int fa;
>+
>+ int evcnt=0;
opening brackets should go to new line and you can use a bit more
spacing in variable assignment.
>+ //int phase=0; //wait for value changing, then for non-changing
This should be removed.
>+ for (fa=0;fa<timeout;fa++) {
>+ x = glamo_reg_read(glamo, 0x1100 + >GLAMO_REG_LCD_STATUS1) & 0x3ff;
>+
>+
>+ if (x == lastx) {
>+ evcnt++;
>+ if (evcnt == threshold)
>+ break;
>+ } else
>+ evcnt = 0;
>+
>+ lastx=x;
>+ }
lastx = x can be moved inside the else branch, no?
thanks,
riccardo
More information about the openmoko-kernel
mailing list