login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
April
»
12
Re: [PATCH] drm: add locked variant of drm_fb_helper_force_kernel_mode
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Jesse Barnes
Subject:
Re: [PATCH] drm: add locked variant of drm_fb_helper_force_kernel_mode
Date: Monday, April 12, 2010 - 8:46 am
On Mon, 12 Apr 2010 10:05:00 +1000 Dave Airlie <airlied@gmail.com> wrote:
quoted text
> On Sat, Apr 10, 2010 at 8:11 AM, Jesse Barnes <jbarnes@virtuousgeek.org> wrote: > > Needed for panic and kdb, since we need to avoid taking the mode_config > > mutex. > > One comment below. > > > > > Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> > > --- > > drivers/gpu/drm/drm_fb_helper.c | 42 +++++++++++++++++++++++++++++++++----- > > 1 files changed, 36 insertions(+), 6 deletions(-) > > > > diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c > > index 6929f5b..962eadb 100644 > > --- a/drivers/gpu/drm/drm_fb_helper.c > > +++ b/drivers/gpu/drm/drm_fb_helper.c > > @@ -242,18 +242,22 @@ static int drm_fb_helper_parse_command_line(struct drm_fb_helper *fb_helper) > > return 0; > > } > > > > -bool drm_fb_helper_force_kernel_mode(void) > > +bool drm_fb_helper_force_kernel_mode_locked(void) > > { > > int i = 0; > > bool ret, error = false; > > struct drm_fb_helper *helper; > > - > > - if (list_empty(&kernel_fb_helper_list)) > > - return false; > > + struct drm_mode_set *mode_set; > > + struct drm_crtc *crtc; > > > > list_for_each_entry(helper, &kernel_fb_helper_list, kernel_fb_list) { > > for (i = 0; i < helper->crtc_count; i++) { > > - struct drm_mode_set *mode_set = &helper->crtc_info[i].mode_set; > > + mode_set = &helper->crtc_info[i].mode_set; > > + crtc = helper->crtc_info[i].mode_set.crtc; > > + > > + if (!crtc->enabled) > > + continue; > > + > > ret = drm_crtc_helper_set_config(mode_set); > > if (ret) > > error = true; > > @@ -262,11 +266,37 @@ bool drm_fb_helper_force_kernel_mode(void) > > return error; > > } > > > > +bool drm_fb_helper_force_kernel_mode(void) > > +{ > > + bool ret; > > + struct drm_device *dev; > > + struct drm_fb_helper *helper; > > + struct drm_mode_set *mode_set; > > + > > + if (list_empty(&kernel_fb_helper_list)) { > > + DRM_DEBUG_KMS("no fb helper list??\n"); > > + return false; > > + } > > + > > + /* Get the DRM device */ > > + helper = list_first_entry(&kernel_fb_helper_list, > > + struct drm_fb_helper, > > + kernel_fb_list); > > + mode_set = &helper->crtc_info[0].mode_set; > > + dev = mode_set->crtc->dev; > > + > > + mutex_lock(&dev->mode_config.mutex); > > + ret = drm_fb_helper_force_kernel_mode_locked(); > > + mutex_unlock(&dev->mode_config.mutex); > > + > > + return ret; > > +} > > + > > int drm_fb_helper_panic(struct notifier_block *n, unsigned long ununsed, > > void *panic_str) > > { > > DRM_ERROR("panic occurred, switching back to text console\n"); > > - return drm_fb_helper_force_kernel_mode(); > > + drm_fb_helper_force_kernel_mode_locked(); > > Any reason to drop the return here? > > not just remove the return 0?
Oh no; I don't think the return value is checked anywhere but we may as well return it anyway. -- Jesse Barnes, Intel Open Source Technology Center --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[RFC] Try a bit harder to get output on the screen at pani ...
, Jesse Barnes
, (Fri Apr 9, 3:10 pm)
[PATCH] drm: add locked variant of drm_fb_helper_force_ker ...
, Jesse Barnes
, (Fri Apr 9, 3:11 pm)
[PATCH] vt: try harder to print output when panicing
, Jesse Barnes
, (Fri Apr 9, 3:12 pm)
[PATCH] fbcon: assume console is active if panicing
, Jesse Barnes
, (Fri Apr 9, 3:12 pm)
Re: [PATCH] drm: add locked variant of drm_fb_helper_force ...
, Dave Airlie
, (Sun Apr 11, 5:05 pm)
Re: [PATCH] drm: add locked variant of drm_fb_helper_force ...
, Jesse Barnes
, (Mon Apr 12, 8:46 am)
Re: [PATCH] drm: add locked variant of drm_fb_helper_force ...
, Jesse Barnes
, (Mon Apr 12, 9:05 am)
Re: [RFC] Try a bit harder to get output on the screen at ...
, Jesse Barnes
, (Mon Apr 19, 3:05 pm)
Re: [RFC] Try a bit harder to get output on the screen at ...
, Jesse Barnes
, (Wed May 19, 5:34 pm)
Re: [RFC] Try a bit harder to get output on the screen at ...
, Maxim Levitsky
, (Wed May 19, 6:13 pm)
Re: [RFC] Try a bit harder to get output on the screen at ...
, Maxim Levitsky
, (Wed May 19, 6:27 pm)
Re: [RFC] Try a bit harder to get output on the screen at ...
, Jesse Barnes
, (Thu May 20, 9:28 am)
Re: [RFC] Try a bit harder to get output on the screen at ...
, Maxim Levitsky
, (Thu May 20, 2:14 pm)
Re: [RFC] Try a bit harder to get output on the screen at ...
, Maxim Levitsky
, (Fri May 21, 2:57 pm)
Re: [RFC] Try a bit harder to get output on the screen at ...
, Jesse Barnes
, (Fri May 21, 3:02 pm)
Re: [RFC] Try a bit harder to get output on the screen at ...
, Maxim Levitsky
, (Fri May 21, 3:26 pm)
Re: [RFC] Try a bit harder to get output on the screen at ...
, Maxim Levitsky
, (Sun May 30, 7:48 am)
Re: [RFC] Try a bit harder to get output on the screen at ...
, James Simmons
, (Sun Jun 6, 9:36 am)
Re: [RFC] Try a bit harder to get output on the screen at ...
, Jesse Barnes
, (Tue Jun 8, 4:20 pm)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Rusty Russell
Re: 2.6.22-rc3-mm1
Bill Fink
Re: [PATCH] net: add ability to clear stats via ethtool - e1000/pcnet32
Jeffrey V. Merkey
Re: Versioning file system
Alexey Dobriyan
Re: [2.6.22.2 review 09/84] Fix rfkill IRQ flags.
Luben Tuikov
Re: Integration of SCST in the mainstream Linux kernel
git-commits-head
:
Linux Kernel Mailing List
V4L/DVB: tm6000: add special usb request to quit i2c tuner transfer
Linux Kernel Mailing List
OMAP: DSS2: SDI driver
Linux Kernel Mailing List
PCI: introduce pci_pcie_cap()
Linux Kernel Mailing List
drivers/acpi: use kasprintf
Linux Kernel Mailing List
PCI hotplug: acpiphp: remove superfluous _HPP/_HPX evaluation
linux-netdev
:
David Miller
Re: [2.6.30-rc3] powerpc: compilation error of mace module
Rafael J. Wysocki
Re: [PATCH] igb: fix kexec with igb
Patrick McHardy
Re: [rfc 02/13] [RFC 02/13] netfilter: nf_conntrack_sip: Add callid parser
webmaster Maintenance
&#32852;&#31995;&#31995;&#32479;&#31649;&#29702;&#21592;
Krzysztof Oledzki
Re: Error: an inet prefix is expected rather than "0/0".
openbsd-misc
:
Ted Bullock
Re: Proliant DL380 G3 cannot get on network
Jack J. Woehr
Re: Real men don't attack straw men
Úlfar M. E. Johnson
installing openbsd in xen
Eric Furman
Re: Defending OpenBSD Performance
Tony Abernethy
Re: The Atheros story in much fewer words
git
:
Oliver Kullmann
Re: how to move with history?
Junio C Hamano
Re: [PATCH 2/3] git-add--interactive: remove hunk coalescing
Shawn O. Pearce
Re: Bugs in Gitosis
Alex Riesen
Re: git exclude patterns for directory
David Kastrup
Re: I'm a total push-over..
Colocation donated by:
Syndicate