All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Hoffmann <chrmhoffmann@gmail.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Andrew Morton <akpm@osdl.org>,
	linux-fbdev-devel@lists.sourceforge.net,
	Christian Hoffmann <Christian.Hoffmann@wallstreetsystems.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Solomon Peachy <pizza@shaftnet.org>, Pavel Machek <pavel@ucw.cz>
Subject: Re: Fwd: [Suspend-devel] resume not working on acer ferrari 4005 with radeonfb enabled
Date: Thu, 16 Nov 2006 23:17:26 +0100	[thread overview]
Message-ID: <200611162317.30880.chrmhoffmann@gmail.com> (raw)
In-Reply-To: <200611151109.06956.rjw@sisk.pl>


[-- Attachment #1.1: Type: text/plain, Size: 1917 bytes --]


> >
> > Well, if you acquire the console sem you need to release it too :-)
>
> Or the console semaphore is acquired too many times.
>
> Christian, could you please add release_console_sem() before 'return 0'
> and see if that makes the code work again?  If not, could you add a
> printk() in kernel/printk.c/acquire_console_sem() to see how many times it
> is called?

Ok, I did that and the machine resumes OK. Now I have the impression that 
accessing the rinfo struct here:

if (pdev->dev.power.power_state.event == PM_EVENT_SUSPEND) {
                /* Wakeup chip. Check from config space if we were powered off
                 * (todo: additionally, check CLK_PIN_CNTL too)
                 */
                if ((rinfo->pm_mode & radeon_pm_off) &&
                        radeon_restore_pci_cfg(rinfo)) {
                        if (rinfo->reinit_func != NULL) {
                                rinfo->reinit_func(rinfo);
                                }
                        else {
                                goto bail;
                        }
                }
                /* If we support D2, try to resume... we should check what was 
our
                 * state though... (were we really in D2 state ?). Right now, 
this code
                 * is only enable on Macs so it's fine.
                 */
                else if (rinfo->pm_mode & radeon_pm_d2){
                        radeon_set_suspend(rinfo, 0);
                }
                rinfo->asleep = 0; ////makes it crash
        } else {
                radeon_engine_idle();
        }

makes the resume fail. The machine locks up. I started xorg without drm/dri 
and then it goes a little further and locks up in the next steps:        

/* Restore display & engine */
radeon_write_mode (rinfo, &rinfo->state, 1);

But it starts to get too complicated for me :(

Chris

[-- Attachment #1.2: Type: application/pgp-signature, Size: 827 bytes --]

[-- Attachment #2: Type: text/plain, Size: 347 bytes --]

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

[-- Attachment #3: Type: text/plain, Size: 182 bytes --]

_______________________________________________
Linux-fbdev-devel mailing list
Linux-fbdev-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel

WARNING: multiple messages have this Message-ID (diff)
From: Christian Hoffmann <chrmhoffmann@gmail.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	linux-fbdev-devel@lists.sourceforge.net,
	Christian Hoffmann <Christian.Hoffmann@wallstreetsystems.com>,
	Andrew Morton <akpm@osdl.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Solomon Peachy <pizza@shaftnet.org>, Pavel Machek <pavel@ucw.cz>
Subject: Re: [Linux-fbdev-devel] Fwd: [Suspend-devel] resume not working on acer ferrari 4005 with radeonfb enabled
Date: Thu, 16 Nov 2006 23:17:26 +0100	[thread overview]
Message-ID: <200611162317.30880.chrmhoffmann@gmail.com> (raw)
In-Reply-To: <200611151109.06956.rjw@sisk.pl>

[-- Attachment #1: Type: text/plain, Size: 1917 bytes --]


> >
> > Well, if you acquire the console sem you need to release it too :-)
>
> Or the console semaphore is acquired too many times.
>
> Christian, could you please add release_console_sem() before 'return 0'
> and see if that makes the code work again?  If not, could you add a
> printk() in kernel/printk.c/acquire_console_sem() to see how many times it
> is called?

Ok, I did that and the machine resumes OK. Now I have the impression that 
accessing the rinfo struct here:

if (pdev->dev.power.power_state.event == PM_EVENT_SUSPEND) {
                /* Wakeup chip. Check from config space if we were powered off
                 * (todo: additionally, check CLK_PIN_CNTL too)
                 */
                if ((rinfo->pm_mode & radeon_pm_off) &&
                        radeon_restore_pci_cfg(rinfo)) {
                        if (rinfo->reinit_func != NULL) {
                                rinfo->reinit_func(rinfo);
                                }
                        else {
                                goto bail;
                        }
                }
                /* If we support D2, try to resume... we should check what was 
our
                 * state though... (were we really in D2 state ?). Right now, 
this code
                 * is only enable on Macs so it's fine.
                 */
                else if (rinfo->pm_mode & radeon_pm_d2){
                        radeon_set_suspend(rinfo, 0);
                }
                rinfo->asleep = 0; ////makes it crash
        } else {
                radeon_engine_idle();
        }

makes the resume fail. The machine locks up. I started xorg without drm/dri 
and then it goes a little further and locks up in the next steps:        

/* Restore display & engine */
radeon_write_mode (rinfo, &rinfo->state, 1);

But it starts to get too complicated for me :(

Chris

[-- Attachment #2: Type: application/pgp-signature, Size: 827 bytes --]

  reply	other threads:[~2006-11-16 22:17 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-13 22:08 Fwd: [Suspend-devel] resume not working on acer ferrari 4005 with radeonfb enabled Christian Hoffmann
2006-11-13 22:08 ` Christian Hoffmann
2006-11-13 23:08 ` Rafael J. Wysocki
2006-11-14 18:51   ` Christian Hoffmann
2006-11-14 18:51     ` [Linux-fbdev-devel] " Christian Hoffmann
2006-11-14 21:47   ` Christian Hoffmann
2006-11-14 21:47     ` [Linux-fbdev-devel] " Christian Hoffmann
2006-11-14 22:07     ` Benjamin Herrenschmidt
2006-11-14 22:07       ` [Linux-fbdev-devel] " Benjamin Herrenschmidt
2006-11-15  0:54       ` Christian Hoffmann
2006-11-15  0:54         ` [Linux-fbdev-devel] " Christian Hoffmann
2006-11-15  1:48         ` Benjamin Herrenschmidt
2006-11-15  1:48           ` [Linux-fbdev-devel] " Benjamin Herrenschmidt
2006-11-15 10:09           ` Rafael J. Wysocki
2006-11-15 10:09             ` [Linux-fbdev-devel] " Rafael J. Wysocki
2006-11-16 22:17             ` Christian Hoffmann [this message]
2006-11-16 22:17               ` Christian Hoffmann
2006-11-16 22:44               ` Rafael J. Wysocki
2006-11-16 22:44                 ` [Linux-fbdev-devel] " Rafael J. Wysocki
2006-11-17  5:27                 ` Stuffed Crust
2006-11-17  6:17                   ` Benjamin Herrenschmidt
2006-11-17  6:17                     ` [Linux-fbdev-devel] " Benjamin Herrenschmidt
2006-11-17 14:36                     ` Stuffed Crust
2006-11-17 21:57                       ` Benjamin Herrenschmidt
2006-11-17 21:57                         ` [Linux-fbdev-devel] " Benjamin Herrenschmidt
2006-11-17  6:07               ` Stuffed Crust
2006-11-17 15:41                 ` Stuffed Crust
2006-11-17 15:41                   ` [Linux-fbdev-devel] " Stuffed Crust
2006-11-17 20:33                   ` Christian Hoffmann
2006-11-17 20:33                     ` [Linux-fbdev-devel] " Christian Hoffmann
2006-11-17 21:59                     ` Benjamin Herrenschmidt
2006-11-17 21:59                       ` [Linux-fbdev-devel] " Benjamin Herrenschmidt
2006-11-17 22:02                       ` [Linux-fbdev-devel] Fwd: [Suspend-devel] resume not working onacer " Christian Hoffmann
2006-11-17 22:02                         ` Christian Hoffmann
2006-11-17 22:34                         ` Benjamin Herrenschmidt
2006-11-17 22:34                           ` [Linux-fbdev-devel] " Benjamin Herrenschmidt
2006-11-14 22:36     ` [Linux-fbdev-devel] Fwd: [Suspend-devel] resume not working on acer " Rafael J. Wysocki
2006-11-14 22:56     ` Pavel Machek
2006-11-14 22:56       ` [Linux-fbdev-devel] " Pavel Machek
2006-11-14 22:57       ` Rafael J. Wysocki
2006-11-14 23:12         ` Pavel Machek
2006-11-14 23:12           ` [Linux-fbdev-devel] " Pavel Machek
  -- strict thread matches above, loose matches on Subject: below --
2006-11-13 10:51 Christian Hoffmann
2006-11-13 10:51 ` Christian Hoffmann
2006-11-13 14:06 ` Rafael J. Wysocki
2006-11-13 17:07 ` Pavel Machek
2006-11-13 17:07   ` Pavel Machek
2006-11-11 23:02 Christian Hoffmann
2006-11-11 14:27 Christian Hoffmann
2006-11-11 11:36 Christian Hoffmann
2006-11-11 11:36 ` Christian Hoffmann
2006-11-11 22:49 ` Benjamin Herrenschmidt
2006-11-11 22:49   ` Benjamin Herrenschmidt
2006-11-12 12:13   ` Pavel Machek
2006-11-12 12:28     ` Rafael J. Wysocki
2006-11-11 10:17 Christian Hoffmann
2006-11-11 10:17 ` Christian Hoffmann
2006-11-10 23:31 Rafael J. Wysocki
2006-11-11  1:49 ` Benjamin Herrenschmidt
2006-11-11  1:49   ` Benjamin Herrenschmidt
2006-11-11  2:02   ` Andrew Morton
2006-11-11  2:02     ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200611162317.30880.chrmhoffmann@gmail.com \
    --to=chrmhoffmann@gmail.com \
    --cc=Christian.Hoffmann@wallstreetsystems.com \
    --cc=akpm@osdl.org \
    --cc=benh@kernel.crashing.org \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=pizza@shaftnet.org \
    --cc=rjw@sisk.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.