Geode driver not display Screensaver

Bug #570584 reported by Hunk Cui
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xserver-xorg-video-geode (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: xserver-xorg-video-geode

    On Ubuntu and Fedora, when the screensaver is opened and then start(after 1 minute when I set), the screen will be in chaos. Few seconds later, the screen turns to be black as usual. If the user move the mouse or press the key, the screen can not be back again. We can not assure if this bug has been reported in the community.

     You can use the xscreensaver tools link: http://www.jwz.org/xscreensaver/download.html. I don’t suggest use the gnome-screensaver to duplicated the bug on Ubuntu. Because the gnome-screensaver running on startx-desktop. The xscreensaver is a client program running on Xorg. When you installed it, you can run ‘xscreensaver-demo’ to setup the screensaver environment, after exit the demo interface, run ‘xscreensaver -nosplash’ as a Linux common user (su username), it will start the screensaver after some times.

           In my ubuntu workstation environment, when I used the VESA-driver, the phenomenon is normal after wait for 1 minute, if you move the mouse or press the key, the screen can be back again. Once use the Geode-driver, the screen will be in black after wait for 1 minute, if you move the mouse or press the key, the screen can not be back again.

    My xf86-video-geode version is 2.11.7, XServer version is 1.7.1

BTW: Before running the xscreensaver on startx-desktop, If allow any program
running on the local machine to access your X server, you must run 'xhost
+localhost' , then run 'xscreensaver -command' (as a common Linux user).

Hunk Cui (hunk-cui)
description: updated
Hunk Cui (hunk-cui)
summary: - Geode driver not dispaly Screensaver
+ Geode driver not display Screensaver
Revision history for this message
Bryce Harrington (bryce) wrote :

Hi Hunk,

Please run the command 'apport-collect BUGNUMBER', which will attach several files we need for debugging.

[This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: needs-xorglog
tags: added: needs-lspci-vvnn
Changed in xserver-xorg-video-geode (Ubuntu):
status: New → Incomplete
Revision history for this message
Hunk Cui (hunk-cui) wrote :
Changed in xserver-xorg-video-geode (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Hunk Cui (hunk-cui) wrote :
Revision history for this message
Hunk Cui (hunk-cui) wrote :

Who can support a simple screensaver program for test the Geode-driver?

Revision history for this message
Hunk Cui (hunk-cui) wrote :

Freeze bug - Geode driver not display Screensaver

Revision history for this message
Hunk Cui (hunk-cui) wrote :

    With the debug of xscreensaver (client program). I found that if eschewing “fade to black when blanking”. (the xscreensaver old version <5.0). The screensaver is properly display on Gnome-desktop. The specifically methods is modified the xscreensaver sourcecode (windows.c -> raise_window function). If your xsceensaver version >= 5.0, then you can setup the dialog box “System -> Preferences -> Screensaver -> Advanced”, Not click the “fade to block when blanking” option. If the fading is true (Default: true), then when the screensaver activates, the current contents of the screen will fade to black instead of simply winking out. This only works on certain systems. A fade will also be done when switching graphics hacks (when the cycle timer expires.).

    So through this method and setup, Now the screensaver is properly display on our Geode platform. The next phase, I will research the “fading” function is whether or not affected the parts of geode driver, then taking a deep research into other bugs reported in the community.

Changed in xserver-xorg-video-geode (Ubuntu):
status: Confirmed → Fix Committed
Hunk Cui (hunk-cui)
Changed in xserver-xorg-video-geode (Ubuntu):
status: Fix Committed → Incomplete
Revision history for this message
Hunk Cui (hunk-cui) wrote :

    Through compare the ‘fading’ option and ‘not fading’ option, print the Xserver and Geode-driver debugging information on the SSH terminal. I found the ‘fading’ option trigger the Geode-driver (lx_display.c -> lx_crtc_gamma_set function), but the ‘not fading’ option does not trigger this function.

            I had a test, the following change:

static void

lx_crtc_gamma_set(xf86CrtcPtr crtc, CARD16 * red, CARD16 * green,

    CARD16 * blue, int size)

{

    unsigned int dcfg;

    int i;

            DebugP("lx_crtc_gamma_set /by Hunk\n");

#if 0

    assert(size == 256);

    for (i = 0; i < 256; i++) {

            unsigned int val = (*red << 8) | *green | (*blue >> 8);

            df_set_video_palette_entry(i, val);

    }

    /* df_set_video_palette_entry automatically turns on

     * gamma for video - if this gets called, we assume that

     * RandR wants it set for graphics, so reverse cimarron

     */

    dcfg = READ_VID32(DF_DISPLAY_CONFIG);

    dcfg &= ~DF_DCFG_GV_PAL_BYP;

    WRITE_VID32(DF_DISPLAY_CONFIG, dcfg);

#endif
}

    After re-make the Geode-driver, when I run the ‘fading’ option, the client program ( xscreensaver ) also print the debugging information about “fading…/ fading done”, now the screensaver is properly display. So through the test, I am sure that the main reason is upper function (lx_crtc_gamma_set).

The ‘not display screensaver’ bug reason was found.

I will follow it….

Changed in xserver-xorg-video-geode (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Hunk Cui (hunk-cui) wrote :

Through compare the parts of "xf86ChangeGammaRamp" between VESA driver and Geode driver, in judge the "xf86_crtc_supports_gamma(pScrn)", the Geode driver is ture when the 'fading' option is set, but the VESA driver always are false between 'fading' and 'not fading', it can only call the CMapColor. At the same time, the red, green and blue value are 0 from ProcXF86VidModeSetGammaRamp transfer the color parameter. So using code zero to represent black if no Gamma action. It is an integrated palette RAM for gamma-correction of the data stream. So I use the following methods to fix the bug, How do you think? But the xf86-video-intel driver use the "drmModeCrtcSetGamma" (in libdrm -> xf86drmMode.c) to deal with the events.

In lx_display.c -> lx_crtc_gamma_set function:
the change is:

     assert(size == 256);

+          for (i = 0; i < size; i++) { //changed by Hunk
-   for (i = 0; i < 256; i++) {
            unsigned int val = (*red << 8) | *green | (*blue >> 8);

            df_set_video_palette_entry(i, val);

In cim_df.c -> df_set_video_palette_entry function:
the change is:
+++ cim/cim_df.c          2010-05-11 18:06:47.051406358 +0800
--- cim_df_old.c 2010-02-04 05:09:54.000000000 +0800

     /* SET A SINGLE ENTRY */

+          if (palette != 0) //added by Hunk
+          {
+          WRITE_VID32(DF_PALETTE_ADDRESS, index); //Screensaver bug keypoint by Hunk //defined in LX_databook P428 Video Processor Register Description /belong to Table 6-71
+          WRITE_VID32(DF_PALETTE_DATA, palette); //Screensaver bug keypoint by Hunk //defined in LX_databook P428 Video Processor Register Description /belong to Table 6-71
+          }
-    WRITE_VID32(DF_PALETTE_ADDRESS, index);
-    WRITE_VID32(DF_PALETTE_DATA, palette);
-
     /* ENABLE THE VIDEO PALETTE */
     /* Ensure that the video palette has an effect by routing video data */
     /* through the palette RAM and clearing the 'Bypass Both' bit.       */

Who is know the registers about the DF_PALETTE_ADDRESS and DF_PALETTE_DATA?

Revision history for this message
Hunk Cui (hunk-cui) wrote :

Hi, all,

 As mentioned in last mail about “The update of the "Xorg-geode-screensaver" issue”, our geode driver has problem on screensaver display operation. The focus point is on “fading” operations…

                I modify the code and upload a diff patch for tests (fix the Gamma Correction – fading operation), now the update methods have been test in Ubuntu desktop and Fedora desktop. (fading right)

                Welcome everyone test the code.
                Find some more other test App (client program) to reproduce every possible instance based on Graphic data and Video data.

                I’ll follow it.

Thanks,
Hunk Cui

tags: added: patch
Revision history for this message
Hunk Cui (hunk-cui) wrote :

1. Modify integrated palette RAM for gamma-correction of the data stream.
2. Let Graphic data passes through the Gamma Correction RAM.
3. Special for Screensaver Operation.

Revision history for this message
Martin-Éric Racine (q-funk) wrote :

Hunk, is this version of your patch the final one to merge upstream in GIT?

Revision history for this message
Hunk Cui (hunk-cui) wrote :

Hi, Martin,
    Yes, In GIT, my patch have updated to xorg-driver-geode mailing-list (http://lists.x.org/archives/xorg-driver-geode/2010-July/000851.html): [PATCH 1/2] Gamma Correction for fading operation.

Thanks,
Hunk Cui

Revision history for this message
Martin-Éric Racine (q-funk) wrote :

Is this issue fixed by 2.11.8-11 and newer or not?

Revision history for this message
Hunk Cui (hunk-cui) wrote :

Hi, Martin,
    Have been fixed and commited to 2.11.8-11.

Thanks,
Hunk Cui

Revision history for this message
Martin-Éric Racine (q-funk) wrote :

Can someone confirm whether Geode 2.11.9-1 resolves this issue or not?

Revision history for this message
frank huang (frankr-huang) wrote :

2.11.9 have solved the screensaver issue.
Closed.

Changed in xserver-xorg-video-geode (Ubuntu):
status: Confirmed → Fix Committed
Changed in xserver-xorg-video-geode (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.