linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafał Miłecki" <zajec5@gmail.com>
To: Dave Airlie <airlied@gmail.com>
Cc: linux-fbdev@vger.kernel.org, Dave Airlie <airlied@linux.ie>,
	linux-kernel@vger.kernel.org, dri-devel@lists.sf.net
Subject: Re: [PATCH 2/2] vga_switcheroo: initial implementation (v8)
Date: Thu, 25 Feb 2010 09:19:23 +0000	[thread overview]
Message-ID: <b170af451002250119y52c7097er995e7592248128c0@mail.gmail.com> (raw)
In-Reply-To: <1267074476-28347-3-git-send-email-airlied@gmail.com>

Oh, sorry, but I don't like such a hidden changes, touching not
directly related things.


2010/2/25 Dave Airlie <airlied@gmail.com>:
> diff --git a/drivers/gpu/drm/radeon/r600_audio.c b/drivers/gpu/drm/radeon/r600_audio.c
> index 0dcb690..7def989 100644
> --- a/drivers/gpu/drm/radeon/r600_audio.c
> +++ b/drivers/gpu/drm/radeon/r600_audio.c
> @@ -163,6 +163,9 @@ int r600_audio_init(struct radeon_device *rdev)
>        rdev->audio_status_bits = 0;
>        rdev->audio_category_code = 0;
>
> +       if (!radeon_audio)
> +               return 0;
> +

Good catch but not for this patch. Plus we could handle audio on/off better.


> diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
> (...)
> +static void radeon_switcheroo_set_state(struct pci_dev *pdev, enum vga_switcheroo_state state)
> +{
> +       struct drm_device *dev = pci_get_drvdata(pdev);
> +       struct radeon_device *rdev = dev->dev_private;
> +       pm_message_t pmm = { .event = PM_EVENT_SUSPEND };
> +       if (state = VGA_SWITCHEROO_ON) {
> +               printk(KERN_ERR "VGA switched radeon on\n");
> +               /* don't suspend or resume card normally */
> +               rdev->powered_down = false;
> +               radeon_resume_kms(dev);
> +               r600_audio_init(rdev);
> +       } else {
> +               printk(KERN_ERR "VGA switched radeon off\n");
> +               r600_audio_fini(rdev);
> +               radeon_suspend_kms(dev, pmm);
> +               /* don't suspend or resume card normally */
> +               rdev->powered_down = true;
> +       }
> +}

Don't mess with r600_audio_* there. You call if for all chipsets which
is not needed and break nice S&R layout, which is chipset specific.

I guess you needed that because you didn't work on branch containing my patch:
http://git.kernel.org/?p=linux/kernel/git/airlied/drm-2.6.git;a=commitdiff;h8fd2c6ff526e6a59edfa8e08f6f0724646784c4
(you commited it to drm-linus)


> diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
> index 8ba3de7..69017f2 100644
> --- a/drivers/gpu/drm/radeon/radeon_drv.c
> +++ b/drivers/gpu/drm/radeon/radeon_drv.c
> @@ -87,7 +87,7 @@ int radeon_testing = 0;
>  int radeon_connector_table = 0;
>  int radeon_tv = 1;
>  int radeon_new_pll = 1;
> -int radeon_audio = 1;
> +int radeon_audio = 0;

Why?! What for we disable this feature by default?! If you see some
reason for that, explain it to others please. I can change my mind,
but for now I don't like this. It makes audio an option from just
working-out-of-box.

-- 
Rafał

  reply	other threads:[~2010-02-25  9:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-25  5:07 fb + vga switcher patches (THE CORRECT ONES) Dave Airlie
2010-02-25  5:07 ` [PATCH 1/2] fb: for framebuffer handover don't exit the loop early Dave Airlie
2010-02-25  5:07   ` [PATCH 2/2] vga_switcheroo: initial implementation (v8) Dave Airlie
2010-02-25  9:19     ` Rafał Miłecki [this message]
2010-02-26  8:50       ` Dave Airlie
2010-02-26  8:53         ` Rafał Miłecki

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=b170af451002250119y52c7097er995e7592248128c0@mail.gmail.com \
    --to=zajec5@gmail.com \
    --cc=airlied@gmail.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.sf.net \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).