OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

2 Pages V  < 1 2  
Reply to this topicStart new topic
> Console Response After Running X, slow console response after quitting X
iamasmith
post Aug 3 2006, 06:09 AM
Post #16





Group: Members
Posts: 1,248
Joined: 6-July 04
Member No.: 3,928



OK, for now I have put out the word on arm@openbsd.org whilst I rebuild my environment using OpenBSD 4.0. Started from scratch since it has been upgraded quite a lot and was long overdue.

Will take a look at it again as soon as X has finished building.

-Andy
Go to the top of the page
 
+Quote Post
iamasmith
post Aug 5 2006, 08:15 AM
Post #17





Group: Members
Posts: 1,248
Joined: 6-July 04
Member No.: 3,928



I think I have a reasonable handle on what is causing this to happen now, although there are some areas of complexity that I need to understand and the PXA270 programmers guide is tough reading.

Basically the console is handled as follows..

wsdisplay interfaces with pxa2x0_lcd.c and the function pxa_lcd_new_screen is used to create the memory map for the display (using bus_dmamem_alloc) and then map that into a kernel virtual address using bus_dmamem_map. This address becomes the internal frame buffer address that is used to render the text consoles which are actually implemented through the rasops library since the display is bitmap only.

When the dma map is created to give the kernel the address of the buffer a particular flag is used, BUS_DMA_COHERENT, which should ensure that writes to this region are immediately sent to the device on the other end of the DMA channel (the display).

As long as you are working in text mode and don't change anything then the frame buffer DMA doesn't get upset.

To access the bitmap display from userland such that graphical applications function it is necessary to perform two steps, step one is to send an IOCTL to the frame buffer to say that it should go into dumb mode (theoretically this should perform extra initialisations and store some flag information for the system to say that the normal text display isn't available any more) and then a call to the system call mmap is used to obtain a memory mapped region with which to communicate with the display.

The mmap call is implemented again in pxa2x0_lcd.c and what it actually does is very simply to use bus_dmamem_mmap to obtain another virtual address region corresponding to the previously allocated buffer created in pxa_lcd_new_screen. This is necessary since a process virtual address space will be different to the kernel virtual address space. This call is made, again, using the BUS_DMA_COHERENT flag to ensure that anything written to this region is immediately written to the device on the other end of the DMA channel.

bus_dmamem_mmap/map deals with virtual addresses but I suspect that, since the DMA controller of the PXA is an integrated device, it also deals with descriptors that map virtual addresses to physical addresses. This being the case what happens when a second descriptor is created to a region for transfer when a descriptor already exists? (as in the case of bus_dmamem_mmap during mmap call following bus_dmamem_map during text frame buffer creation) - my suspicion at this stage is that the controller will handle only the last initialised DMA transfer in a coherent state. This would explain why a return to the text buffer starts to experience transfer slowness in the rasops library that is used to render the text display. (upon return the kernel bitmap used for this display is no longer flagged coherent and is subject to writeback cache built into the DMA controller).

I hope to fix this by implementing an IOCTL handler within the pxa2x0_lcd.c for the WSDISPLAY_SMODE message that restores the coherency to the original (kernel) bitmapped region used by the rasops functions so that this region returns to its original snappy state. This is the area that I am tinkering with at the moment.

-Andy
Go to the top of the page
 
+Quote Post
mathemajikian
post Sep 16 2006, 05:14 AM
Post #18





Group: Members
Posts: 304
Joined: 8-July 06
From: United Kingdom for now....
Member No.: 10,349



Have you had any luck sorting this out? ph34r.gif

QUOTE(iamasmith @ Aug 5 2006, 04:15 PM)
controller).

I hope to fix this by implementing an IOCTL handler within the pxa2x0_lcd.c for the WSDISPLAY_SMODE message that restores the coherency to the original (kernel) bitmapped region used by the rasops functions so that this region returns to its original snappy state. This is the area that I am tinkering with at the moment.

-Andy
*
Go to the top of the page
 
+Quote Post
mathemajikian
post May 6 2007, 04:33 AM
Post #19





Group: Members
Posts: 304
Joined: 8-July 06
From: United Kingdom for now....
Member No.: 10,349



QUOTE(wilkes @ Jun 13 2006, 02:11 PM)
I'm running a 03-Jun-06 snap, but I noticed this behavior on the 3.9 release as well.

When I run startx (or startxfec4) from the console and subsequently quit X and return to the console, response sucks; noticeable lag echoing typed characters, etc.  It's bad enough that I have to reboot to get a normal acting console again.

Anyone else seeing this?  Is there a cure?  (Other than always rebooting after X, that is...)

-jw-

This has been fixed in 4.1-current .
Go to the top of the page
 
+Quote Post
Antikx
post May 6 2007, 04:54 AM
Post #20





Group: Members
Posts: 1,156
Joined: 5-January 05
From: Winnipeg, Manitoba
Member No.: 6,127



hmmm.. what ever happened to Iamasmith... sad.gif
Go to the top of the page
 
+Quote Post
mathemajikian
post May 6 2007, 04:57 AM
Post #21





Group: Members
Posts: 304
Joined: 8-July 06
From: United Kingdom for now....
Member No.: 10,349



QUOTE(Antikx @ May 6 2007, 12:54 PM)
hmmm.. what ever happened to Iamasmith... sad.gif

He still posts every once and awhile.
Go to the top of the page
 
+Quote Post
ZDevil
post May 12 2007, 07:24 AM
Post #22





Group: Members
Posts: 2,003
Joined: 16-April 04
From: the Netherlands && /dev/null
Member No.: 2,882



QUOTE(mathemajikian @ May 6 2007, 02:33 PM)
QUOTE(wilkes @ Jun 13 2006, 02:11 PM)
I'm running a 03-Jun-06 snap, but I noticed this behavior on the 3.9 release as well.

When I run startx (or startxfec4) from the console and subsequently quit X and return to the console, response sucks; noticeable lag echoing typed characters, etc.  It's bad enough that I have to reboot to get a normal acting console again.

Anyone else seeing this?  Is there a cure?  (Other than always rebooting after X, that is...)

-jw-

This has been fixed in 4.1-current .
*



It seems the issue is still there. Now I am using 4.1 kernel GENERIC#55 (= the 4.1 official release).
Still experiencing lag in console after exiting X.
But this is not as a big problem as the suspend issue (in the 4.1 snapshots).
Go to the top of the page
 
+Quote Post
mathemajikian
post May 12 2007, 09:43 AM
Post #23





Group: Members
Posts: 304
Joined: 8-July 06
From: United Kingdom for now....
Member No.: 10,349



QUOTE(ZDevil @ May 12 2007, 03:24 PM)
It seems the issue is still there. Now I am using 4.1 kernel GENERIC#55 (= the 4.1 official release).
Still experiencing lag in console after exiting X. 
But this is not as a big problem as the suspend issue (in the 4.1 snapshots).


Wow! I must have the golden Zaurus. Did you remember if you had the lag issue in --current? Try and use this ttys file and see if it persists:

Attached File  ttys.txt ( 21.94K ) Number of downloads: 23
rename the file to ttys and put it in /etc/ then reboot. Does the lag problem still exist?

Can anyone else verify that this problem is no longer present in 4.1 --current?
Go to the top of the page
 
+Quote Post
jpmatrix
post May 12 2007, 01:22 PM
Post #24





Group: Members
Posts: 1,019
Joined: 15-February 05
From: France
Member No.: 6,477



QUOTE(mathemajikian @ May 12 2007, 07:43 PM)
QUOTE(ZDevil @ May 12 2007, 03:24 PM)
It seems the issue is still there. Now I am using 4.1 kernel GENERIC#55 (= the 4.1 official release).
Still experiencing lag in console after exiting X. 
But this is not as a big problem as the suspend issue (in the 4.1 snapshots).


Wow! I must have the golden Zaurus. Did you remember if you had the lag issue in --current? Try and use this ttys file and see if it persists:

Attached File  ttys.txt ( 21.94K ) Number of downloads: 23
rename the file to ttys and put it in /etc/ then reboot. Does the lag problem still exist?

Can anyone else verify that this problem is no longer present in 4.1 --current?
*



i'm using 4.1 GENERIC#89 and i haven't seen it although i'm used to go forth and back from X to console
Go to the top of the page
 
+Quote Post
iamasmith
post May 12 2007, 02:33 PM
Post #25





Group: Members
Posts: 1,248
Joined: 6-July 04
Member No.: 3,928



QUOTE(mathemajikian @ May 6 2007, 12:57 PM)
QUOTE(Antikx @ May 6 2007, 12:54 PM)
hmmm.. what ever happened to Iamasmith... sad.gif

He still posts every once and awhile.
*



Heh, I'm still here and listening in from time to time. However, I have been contracting for about 9 months now and am pretty focussed upon that so I don't have as much time to tinker.

I'm working in a more strategic field right now and technology is only a small part of the problems that I face.

I will post when I can and hope to start contributing to OpenBSD again at some point... incidently - I believe that the console problems aren't fixed. What they have done is made X run on Console #2 and switch to screen 2 whilst running X.

The X server still seems to screw up the frame buffer. I believe there is still an outstanding problem with the DMA cache coherency.

BTW: I'm really sorry that I didn't follow up on Theo's request to nag the committers to include a variant of my Caps lock fixes for Kernel and X on 4.1. I have just been soooo busy. The good news is that they still seem to apply without any problems smile.gif

-Andy
Go to the top of the page
 
+Quote Post

2 Pages V  < 1 2
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 28th August 2014 - 05:19 AM