Re: SURPRISING!!!!The diplay driver "changed" when system awaken.



Hey-ho! :) I talked to dump registers after the LCD state has
been restored. The idea is to see the difference in configuration
that probably causing problems on resume. So dump registers here:

void DispDrvrPowerHandler(BOOL bOff)
{
if (bOff)
{
DumpLCDRegs(); // <- Dump here before we go sleeping

... Any further processing like disabling LCD ect
comes here ...
}
else
{
... restore LCD configuration, palette, enable LCD etc ...

DumpLCDRegs(); // <- Dump here again
}
}




"cool_harber" <cool_harber@xxxxxxxxxxx> wrote in message news:uriF74d6FHA.4012@xxxxxxxxxxxxxxxxxxxxxxx
>I tried as you said,I found when system wake up,you tell me to dump lcd registers.
> But this action would cause the lcd display nothing!!
> I send my code to your email.please help me,thanks...
>
>
> "Voidcoder" <voidcoder@xxxxxxxxx> дÈëÏûÏ¢ÐÂÎÅ:e%23W0nRT6FHA.2400@xxxxxxxxxxxxxxxxxxxxxxx
>> ok, now seems to be clear. I think dumping LCD controller
>> registers prior to go sleeping and after wakeup will tell
>> You the truth. Just do it in these places:
>>
>> void DispDrvrPowerHandler(BOOL bOff)
>> {
>> if (bOff)
>> {
>> // Dump LCD registers
>>
>> ...
>> }
>> else
>> {
>> ...
>>
>> // Dump LCD registers
>> }
>> }
>>
>>
>>
>>
>>
>> "cool_harber" <cool_harber@xxxxxxxxxxx> wrote in message news:OPLxGCT6FHA.3636@xxxxxxxxxxxxxxxxxxxxxxx
>>> The SA_LCD display driver called DispDrvrSetPalette in SetPalette function.
>>>
>>> The "bad" display look means that the screen seems lose some color(gray sclale).
>>> The difference between "bad" and "good" is just like 24bit color bmp and 8bit color bmp.
>>> thanks.
>>>
>>> "Voidcoder" <voidcoder@xxxxxxxxx> дÈëÏûÏ¢ÐÂÎÅ:eX3bk3S6FHA.1276@xxxxxxxxxxxxxxxxxxxxxxx
>>>> Well, now not clear where the palette is loaded
>>>> first time? since You have commented the following
>>>> code in DispDrvrInitialize:
>>>>
>>>> // if(bpp < 16)
>>>> // {
>>>> // DispDrvrSetPalette(_rgbIdentity,0,PALETTE_SIZE);
>>>> //
>>>>
>>>> How does the "bad" display look?
>>>>
>>>>
>>>>
>>>> "cool_harber" <cool_harber@xxxxxxxxxxx> wrote in message news:uNNc6tS6FHA.3880@xxxxxxxxxxxxxxxxxxxxxxx
>>>>> //---------------------------------------------------------
>>>>> void DispDrvrPowerHandler(BOOL bOff)
>>>>> {
>>>>>
>>>>> if(bOff)
>>>>> {
>>>>> DisableLCDController();
>>>>> }
>>>>> else
>>>>> {
>>>>> // Copy the original frame buffer back in.
>>>>> CopyFrameBuffer(FALSE);
>>>>>
>>>>> // Initialize the GPIO registers for proper LCD Controller operation
>>>>> LcdSetupGPIOs();
>>>>>
>>>>> // Initialize the LCD Controller and Board Control Register
>>>>> InitLCDController();
>>>>>
>>>>> // Clear LCD Controller status register
>>>>> LCDClearStatusReg();
>>>>>
>>>>> // Enable the LCD controller
>>>>> EnableLCDController();
>>>>> DispDrvrSetPalette(_rgbIdentity,0,256); //added by cool_harber
>>>>>
>>>>> }
>>>>> }
>>>>> //---------------------------------------------------------
>>>>> "Voidcoder" <voidcoder@xxxxxxxxx> дÈëÏûÏ¢ÐÂÎÅ:eZrejWS6FHA.1420@xxxxxxxxxxxxxxxxxxxxxxx
>>>>>> Post the whole DispDrvrPowerHandler code
>>>>>> here.
>>>>>>
>>>>>> "cool_harber" <cool_harber@xxxxxxxxxxx> wrote in message news:udaqCMS6FHA.3588@xxxxxxxxxxxxxxxxxxxxxxx
>>>>>>>
>>>>>>> I use PXA255 and winCE.net 4.2.The display driver is based on
>>>>>>> Lubbock SA_LCD driver¡£
>>>>>>> In Funcion DispDrvrSetPalette,I trans the color palette to gray palette:
>>>>>>> ......
>>>>>>> for(i=firstEntry;i<end;i++)
>>>>>>> {
>>>>>>> // store 5 bits red, 6 bits green, and 5 bits blue
>>>>>>> v_pPaletteBuffer->palette[i] = (unsigned short)(
>>>>>>> (source[i].peBlue)+
>>>>>>> (source[i].peGreen)+
>>>>>>> ((source[i].peRed)
>>>>>>> )/3;
>>>>>>> }
>>>>>>> ......
>>>>>>> In Function DispDrvrInitialize,I commented follow lines:
>>>>>>> ......
>>>>>>> // if(bpp < 16)
>>>>>>> // {
>>>>>>> // DispDrvrSetPalette(_rgbIdentity,0,PALETTE_SIZE);
>>>>>>> // }
>>>>>>> ......
>>>>>>> In SCODE SA2Video::SetMode,I modified follow lines about palette:
>>>>>>> ......
>>>>>>> if(pPalette) {
>>>>>>> PALETTEENTRY Gray_Palette;
>>>>>>> for(int i=0i<256;i++)
>>>>>>> {
>>>>>>> Gray_Palette[i].peBlue =Gray_Palette[i].Blue =Gray_Palette[i].peRed = (
>>>>>>> (source[i].peBlue)+(source[i].peGreen)+((source[i].peRed))/3£»
>>>>>>> *pPalette = EngCreatePalette(PAL_INDEXED,0,Gray_Palette,0,0,0);
>>>>>>> .....
>>>>>>> In addition,I modified some LCD controller registers.
>>>>>>> Afer all these,The screen display seems Good~!
>>>>>>>
>>>>>>> But when the paltform wakeup from sleep mode.The screen display bad.As if the palette is not loaded.
>>>>>>> So I add follow line in DispDrvrPowerHandler:
>>>>>>> ......
>>>>>>> if(bOff)
>>>>>>> {
>>>>>>> DisableLCDController();
>>>>>>> }
>>>>>>> else
>>>>>>> {
>>>>>>> ........................
>>>>>>>
>>>>>>> DispDrvrSetPalette(_rgbIdentity,0,256);
>>>>>>>
>>>>>>> }
>>>>>>>
>>>>>>> ......
>>>>>>> Afer did this.
>>>>>>> When I awaken the system first,The display is wrong.when I awaker the system secondly,the display is ok again.
>>>>>>> Then,The 3rd is wrong,the 4nd is ok........in the analogy order...
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>


.



Relevant Pages

  • Re: I forgot how I to setup an HP LaserJet 5si on the network. !!HELP!!
    ... Unfortunately for me as stated the LCD panel is crapping out so reading it ... I had inputted to network configuration manually through the printers ... the printers menu functions or I think I used HP Jet Admin to set it ...
    (microsoft.public.windows.server.general)
  • Re: different resolution on notebook LCD and VGA
    ... I have a laptop with widescreen LCD and I didn't manage to have a dual head ... I have to different xorg configuration files and a set of scripts which can swtich ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: [SLE] LCD Monitors
    ... I got it working when choosing 1280x1024. ... In YaST I choose LCD ... > configuration. ...
    (SuSE)
  • Re: iMX31 Freescale GPU (PowerVR) configuration for new LCD
    ... Sometimes LCD datasheets can be a bit confusing because they ... in terms of telling me the horizontal sync, vertical front porch, back porch, ... Below is the configuration that the GPU driver in Freescale is asking for: ...
    (microsoft.public.windowsce.platbuilder)
  • Re: [SLE] LCD Monitors
    ... In YaST I choose LCD ... 1280x1024 with 70hz and was able to successfully test the ... configuration. ...
    (SuSE)