From: "Michel Dänzer" <michel@daenzer.net>
To: Parag Warudkar <parag.lkml@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] radeon: Allow disabling UVD
Date: Tue, 07 May 2013 09:02:03 +0200 [thread overview]
Message-ID: <1367910123.12136.7.camel@thor.local> (raw)
In-Reply-To: <CAOULuOb79h99RiyYpMGLzzM2QeawYfG8CfrvNtk4WtJJxRn87g@mail.gmail.com>
On Mon, 2013-05-06 at 19:11 -0400, Parag Warudkar wrote:
> Apparently UVD doesn't yet work everywhere - so allow it to be
> disabled. Shaves off some reboot and suspend/resume time on machines
> where it doesn't work. Might be useful for problematic chips in the
> future as well.
>
> Patch attached as well as inline below.
>
> Signed-off-by: Parag Warudkar <parag.lkml@gmail.com>
[...]
> @@ -168,6 +169,9 @@ int radeon_fastfb = 0;
> MODULE_PARM_DESC(no_wb, "Disable AGP writeback for scratch registers");
> module_param_named(no_wb, radeon_no_wb, int, 0444);
>
> +MODULE_PARM_DESC(no_uvd, "Disable UVD");
> +module_param_named(no_uvd, radeon_no_uvd, int, 0444);
No more negative boolean options please.
> diff --git a/drivers/gpu/drm/radeon/radeon_uvd.c
> b/drivers/gpu/drm/radeon/radeon_uvd.c
> index 906e5c0..93a7dbb 100644
> --- a/drivers/gpu/drm/radeon/radeon_uvd.c
> +++ b/drivers/gpu/drm/radeon/radeon_uvd.c
> @@ -58,7 +58,8 @@ int radeon_uvd_init(struct radeon_device *rdev)
> unsigned long bo_size;
> const char *fw_name;
> int i, r;
> -
> + if (radeon_no_uvd)
> + return -EINVAL;
> INIT_DELAYED_WORK(&rdev->uvd.idle_work, radeon_uvd_idle_work_handler);
Returning -EINVAL here results in rather misleading dmesg output I
think. This should probably be handled more gracefully.
Anyway, the return statement would need to be indented per the kernel
coding style, and please leave empty lines before the if and after the
return.
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Debian, X and DRI developer
next prev parent reply other threads:[~2013-05-07 7:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-06 23:11 [PATCH] radeon: Allow disabling UVD Parag Warudkar
2013-05-07 7:02 ` Michel Dänzer [this message]
2013-05-07 8:44 ` Christian König
2013-05-07 21:13 ` Parag Warudkar
2013-05-08 9:32 ` Christian König
2013-05-08 21:39 ` Parag Warudkar
2013-05-11 3:07 ` Parag Warudkar
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=1367910123.12136.7.camel@thor.local \
--to=michel@daenzer.net \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=parag.lkml@gmail.com \
/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