Skip to contentSkip to conversation

Radeon FB troubles with recent kernels

DISCUSSION Vincent C Jones 4 participants 5 messages Feb 15, 2005 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

In article <[email protected]> you write:

Quoted 11 lines

On my Thinkpad T30 with a Radeon Mobility M7 LW, I get interesting console video corruption if I start GDM, switch back to text mode, then stop it again. X is Xfree86 from Debian/unstable or X.org 6.8.2.

The corruption shows up whenever the console scrolls after X has been shut down and manifests as horizontal lines spaced about 4 pixel rows apart containing contents recognizable as the X display. Switch from vt1 to vt2 and back or visual bell clears things back to normal, but corruption will reappear on the next scroll.

This has appeared in at least 2.6.11-rc3-mm2 and rc4.

On my Thinkpad X31 with a Radeon Mobility M6 LY I see a major regression going from 2.6.11-rc3 to rc4. With rc-4, the frame buffer console (using "video=radeonfb:1024x768-24@60") comes up as 640x480 expanded to 1024x768. The inability of ACPI suspend to turn off the backlight also returns. Using rc-3, frame buffer console works fine and suspend/resume appears to work reliably without needing radeontool to turn off the backlight (as long as I do it from X.org X).

Signature · 6 lines
Dr. Vincent C. Jones, PE              Expert advice and a helping hand
Computer Network Consultant           for those who want to manage and
Networking Unlimited, Inc.            control their networking destiny
Phone: +1 201 568-7810
14 Dogwood Lane, Tenafly, NJ 07670
[email protected]     http://www.networkingunlimited.com
#2 lore raw
Quoted 13 lines · Vincent C Jones

In article <[email protected]> you write:

Quoted 11 lines

On my Thinkpad T30 with a Radeon Mobility M7 LW, I get interesting console video corruption if I start GDM, switch back to text mode, then stop it again. X is Xfree86 from Debian/unstable or X.org 6.8.2.

The corruption shows up whenever the console scrolls after X has been shut down and manifests as horizontal lines spaced about 4 pixel rows apart containing contents recognizable as the X display. Switch from vt1 to vt2 and back or visual bell clears things back to normal, but corruption will reappear on the next scroll.

This has appeared in at least 2.6.11-rc3-mm2 and rc4.

Quoted 8 lines

On my Thinkpad X31 with a Radeon Mobility M6 LY I see a major regression going from 2.6.11-rc3 to rc4. With rc-4, the frame buffer console (using "video=radeonfb:1024x768-24@60") comes up as 640x480 expanded to 1024x768. The inability of ACPI suspend to turn off the backlight also returns. Using rc-3, frame buffer console works fine and suspend/resume appears to work reliably without needing radeontool to turn off the backlight (as long as I do it from X.org X).

Ok, so, about half of users are reporting an improvement, and half are reporting a regression... this is getting nasty...

As far as the mode is concerned, can you send me a complete dmesg log with the radeonfb debug output enabled in your .config ?

Now, regarding backlight and suspend, it's a more complicated problem. So far, I managed to "isolate" the issue to the type of flat panel connected to the chip. In some cases, it seems, the panel uses an inverted signal to drive the backlight. So depending on the type of panel, a given bit of code will work ... or not.

I'm in contact with ATI to try to figure out how to get some proper infos about the backlight from the BIOS (if possible at all), and some other folks are working on adapting my power management code to various model of thinkpads.

Unfortunately, I can't promise a version of radeonfb that will fix everything for everybody by 2.6.11... there are still a few "gray areas" in there, that I'm trying to clear up, hopefully ATI will provide me with the proper infos soon...

Ben.

#3 lore raw
In reply to Vincent C Jones
Quoted 9 lines

On my Thinkpad X31 with a Radeon Mobility M6 LY I see a major regression going from 2.6.11-rc3 to rc4. With rc-4, the frame buffer console (using "video=radeonfb:1024x768-24@60") comes up as 640x480 expanded to 1024x768. The inability of ACPI suspend to turn off the backlight also returns. Using rc-3, frame buffer console works fine and suspend/resume appears to work reliably without needing radeontool to turn off the backlight (as long as I do it from X.org X).

Ok, this is getting complicated. So far, I'm getting a bit more success reports that regression reports, so I'm keen to keep this new radeonfb for 2.6.11...

There are several issues involved

As far as the mode setting is concerned, I'm not sure what's going on whith your specific model, could you please enable radeonfb debug output in the kernel config and send me the complete dmesg log ?

As far as the panel blanking is concerned (either during suspend or normal console blanking), this is a tricky matter. It seems that a bit of code that works for some panels won't work with others. So far, I managed to isolate the issue to some panels relying on an inverted signal out of the chip. I'm in contact with ATI to try to solve that problem, it might be possible to get proper infos about the type of panel connected via the BIOS ROM image. Unfortunately, I don't think I'll get a definitive answer before 2.6.11 is released.

Note that some users have successfully enabled the powerbook/ibook specific power management code I have in there for thinkpads. I intend t
o merge some of that stuff after 2.6.11 is done.

Ben.

#4 lore raw

sigwait() and 2.6

Hi,

Going on a 2.6 kernel, I have a trouble with sigwait()

When I send a kill to this program, the exit code is 143 (signal 15 and core)!

Is there a workaround ?

Thanks,

Yves

gcc -g -Wall -D_REENTRANT=1 -D_THREAD_SAFE=1 s.c -lpthread -o s

/===== début du code =====/

#include <unistd.h>
#include <stdio.h>
#include <signal.h>
#include <pthread.h>

typedef void Sigfunc(int);

#define ThreadBlockSignal() ThreadSignalAction(SIG_BLOCK)
#define ThreadUnblockSignal() ThreadSignalAction(SIG_UNBLOCK)

/*----------STATIC------------------*/
extern void ThreadSignalAction(const int how)
{
sigset_t newmask;

  if (sigemptyset(&newmask)<0){
      printf("sigemptyset failed");
      return;
  }
  if (sigaddset(&newmask,SIGTERM)<0){
      printf("sigaddset failed");
      return;
  }
  if (pthread_sigmask(how,&newmask,NULL)){
      printf("pthread_sigmask SIG_BLOCK failed");          return;

}
}

extern Sigfunc * signal_intr(int signo,Sigfunc *func) {
struct sigaction act, oact;

act.sa_handler = func;
sigemptyset(&act.sa_mask);
act.sa_flags = 0;
if (signo == SIGALRM){

#ifdef SA_INTERRUPT
      act.sa_flags |= SA_INTERRUPT;    /* Interrupt mode */

#endif /* SA_INTERRUPT */
}else{
#ifdef SA_RESTART
/*
* automatic restart of interrupted system calls except
* if they are operating on a slow device.
* For select():
* Under BSD, even if SA_RESTART is specified, select() was
* never restarted.
* Under SVR4, if SA_RESTART is specified, even select() and
* pool() are automatically restarted.
*/
act.sa_flags |= SA_RESTART;

#endif /* SA_RESTART */
      if (signo == SIGCHLD){
          act.sa_flags |= SA_NOCLDSTOP; /* Don't send SIGCHLD when 
children stop*/
      }

}

#ifdef SA_RESETHAND
act.sa_flags &= ~SA_RESETHAND; /* signal handle remains installed */
#endif /* SA_RESETHAND */

  if (sigaction(signo, &act, &oact) < 0){
      return(SIG_ERR);

}
return(oact.sa_handler);
}

extern int WaitSignal(void)
{
sigset_t newmask;
int ret;
int sig;

  if (sigemptyset(&newmask)<0){
      printf("sigemptyset failed");
      return -1;
  }
  if (sigaddset(&newmask,SIGTERM)<0){
      printf("sigaddset failed");
      return -1;
  }
  printf("Waiting signal ..."); fflush(stdout);
  ret = sigwait(&newmask,&sig);
  if (ret!=0){
      printf("WaitSignal: sigwait failed %d",ret);
  }else{
      printf("WaitSignal: sigwait sig %d",sig);

}
return sig;
}

int main(int argc,char * const argv[])
{

  if (signal_intr(SIGTERM,SIG_DFL) == SIG_ERR){
      printf("signal %d (set handle) failed",SIGTERM);

}

  /* -- Main loop */
  printf("%lu ready ...",(unsigned long)getpid()); fflush(stdout);
      int    signo;
      ThreadUnblockSignal();
      signo = WaitSignal();
      ThreadBlockSignal();
      if (signo==SIGTERM){
          printf("\nSIGTERM in main\n"); fflush(stdout);
      }else{
          printf("\n%d in main\n",signo); fflush(stdout);
      }

return 0;
}

/===== fin du code =====/

begin:vcard
fn:Yves Crespin
n:Crespin;Yves
org:Quartz
adr:Hameau du Pra - CIDEX 322;;39, rue Victor Hugo;CROLLES;;38920;France email;internet:[email protected] tel;work:04.76.92.21.91
tel;cell:06.86.42.86.81
x-mozilla-html:FALSE
url:http://crespin.quartz.free.fr/
version:2.1
end:vcard

#5 lore raw

Re: sigwait() and 2.6

Quoted 3 lines · Yves Crespin
       ThreadUnblockSignal();
       signo = WaitSignal();
       ThreadBlockSignal();

You expect this to work? Just read the POSIX spec or even the man pages. All signals sigwait() waits for must be blocked before the call. You deliberately do the opposite. Swap the ThreadUnblockSignal and ThreadBlockSignal lines and suddenly the program doesn't crash anymore.