Platform Builder 5.0

Problem:
According to the SMDK2410 display driver source code you can enable rotation
support by defining "ROTATE". Unfortunately this did not have any effect on
my "tiny kernel" image with touch/mouse/lcd support that launches the
default "hello world" application from eVC on startup. Then I discovered
that I needed to add the "angle" registry key entry under
"HKEY_LOCAL_MACHINE\System\GDI\Rotation" telling how the screen should be
rotated. Again, without effect. Then I concluded from looking at other
display drivers that the display driver itself should retrieve this "angle"
entry from the registry and use it, which the SMDK2410 display driver does
not, so I added the necessary code. On my 3rd attempt the mouse pointer was
rotated but my hello world application was not. To be more exact, the hello
world application was only partly drawn, the bottom 80? (320-240) or so
scanlines were black/missing.

Question:
Can anyone confirm that the SMDK2410 display driver in rotation mode work as
desribed? Am I doing something wrong?

smdk2410 lcd rotation problem by manas

manas
Sat Aug 28 05:11:21 CDT 2004

yes the rotation does work, modifying only the registry
and the the defineing ROTATE will not work, you have to
modify the code, almost every function. follow the sample
display driver code. Easier to follow MQ200.
>-----Original Message-----
>Platform Builder 5.0
>
>Problem:
>According to the SMDK2410 display driver source code you
can enable rotation
>support by defining "ROTATE". Unfortunately this did not
have any effect on
>my "tiny kernel" image with touch/mouse/lcd support that
launches the
>default "hello world" application from eVC on startup.
Then I discovered
>that I needed to add the "angle" registry key entry
under
>"HKEY_LOCAL_MACHINE\System\GDI\Rotation" telling how the
screen should be
>rotated. Again, without effect. Then I concluded from
looking at other
>display drivers that the display driver itself should
retrieve this "angle"
>entry from the registry and use it, which the SMDK2410
display driver does
>not, so I added the necessary code. On my 3rd attempt
the mouse pointer was
>rotated but my hello world application was not. To be
more exact, the hello
>world application was only partly drawn, the bottom 80?
(320-240) or so
>scanlines were black/missing.
>
>Question:
>Can anyone confirm that the SMDK2410 display driver in
rotation mode work as
>desribed? Am I doing something wrong?
>
>
>.
>

Re: smdk2410 lcd rotation problem by Tim

Tim
Mon Aug 30 14:45:49 CDT 2004

Erhm... the code *looks* like it has everything in it to support rotation
once you do the "#define ROTATE", so your "you have to modify the code,
almost every function" has already been done by Samsung and/or Microsoft.
Can anyone who has actually tried the SMDK2410 display driver rotation in PB
5.0 tell me whether or not it is supposed to work as-is? The reason that I
am doubting it will work is caused by the fact that I have already found 5
or so bugs throughout the SMDK2410 BSP/CSP and common code. For instance
(off-topic), the default calculated value for the timer3 tcnt register in
the touch driver exceeds 16 bits, the maximum allowed size for that
register, resulting in 444 interrupts per second instead of the expected
100.

> yes the rotation does work, modifying only the registry
> and the the defineing ROTATE will not work, you have to
> modify the code, almost every function. follow the sample
> display driver code. Easier to follow MQ200.



Re: smdk2410 lcd rotation problem by Tim

Tim
Thu Sep 09 14:21:09 CDT 2004

w00t! w00t! w00t!

I decided to take a closer look at the non-rotating SMDK2410 display driver
after having spent nearly 2 days fixing the bugs in the SMDK2410 audio
driver which prevented it from working on my hardware.

Guess what? Following code was also missing in the constructor of the
derived GPERotate class. After I added the missing code on top of my other
changes (see previous messages in this thread) it worked as expected.

// apply default/startup rotation
#ifdef ROTATE
((GPESurfRotate*)m_pPrimarySurface)->SetRotation( m_nScreenWidth,
m_nScreenHeight, m_iRotate);
#endif

> Erhm... the code *looks* like it has everything in it to support rotation
> once you do the "#define ROTATE", so your "you have to modify the code,
> almost every function" has already been done by Samsung and/or Microsoft.
> Can anyone who has actually tried the SMDK2410 display driver rotation in
> PB 5.0 tell me whether or not it is supposed to work as-is? The reason
> that I am doubting it will work is caused by the fact that I have already
> found 5 or so bugs throughout the SMDK2410 BSP/CSP and common code. For
> instance (off-topic), the default calculated value for the timer3 tcnt
> register in the touch driver exceeds 16 bits, the maximum allowed size for
> that register, resulting in 444 interrupts per second instead of the
> expected 100.
>
>> yes the rotation does work, modifying only the registry
>> and the the defineing ROTATE will not work, you have to
>> modify the code, almost every function. follow the sample
>> display driver code. Easier to follow MQ200.