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: Dave Airlie
Subject:
Re: [PATCH] drm: add locked variant of drm_fb_helper_force_kernel_mode
Date: Sunday, April 11, 2010 - 5:05 pm
On Sat, Apr 10, 2010 at 8:11 AM, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
quoted text
> Needed for panic and kdb, since we need to avoid taking the mode_config > mutex.
One comment below.
quoted text
> > 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? Dave.
quoted text
> return 0; > } > EXPORT_SYMBOL(drm_fb_helper_panic); > -- > 1.6.6.1 > > >
--
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
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Frederic Weisbecker
[PATCH v2] struct sort_entry has a callback named snprintf that turns an entry int...
FUJITA Tomonori
Re: [Scst-devel] Integration of SCST in the mainstream Linux kernel
Jens Axboe
Re: [BUG] Linux 2.6.25-rc2 - Regression from 2.6.24-rc1-git1 softlockup while bo...
Andrew Morton
Re: [PATCH v3 0/4] Introduce hardware spinlock framework
Stephen Hemminger
Re: [Pv-drivers] RFC: Network Plugin Architecture (NPA) for vmxnet3
git
:
Junio C Hamano
Re: git-svnimport
Michal Sojka
[PATCHv5 1/2] filter-branch: Fix to allow replacing submodules with another content
Junio C Hamano
Re: Fwd: git status options feature suggestion
A Large Angry SCM
Re: [RFC] origin link for cherry-pick and revert
Linus Torvalds
Re: [PATCH 3/2] Enhance --early-output format
linux-netdev
:
Arnaldo Carvalho de Melo
Re: [PATCH 06/37] dccp: Limit feature negotiation to connection setup phase
Gerrit Renker
[PATCH 1/5] dccp: Initialisation framework for feature negotiation
Ursula Braun
[patch 2/8] [PATCH] af_iucv: sync sk shutdown flag if iucv path is quiesced
Daniel Lezcano
getsockopt(TCP_DEFER_ACCEPT) value change
David Miller
Re: 2.6.27.18: bnx2/tg3: BUG: "scheduling while atomic" trying to ifenslave a seco...
openbsd-misc
:
Rene Maroufi
smtpd: Aliases only work with for local alias aliases
Stephen J. Bevan
GRE over IPsec
Christophe Rioux
Implementation example of snmp
Darrin Chandler
Re: strange output on openbsd C code
Nick Holland
Re: booting openbsd on eee without cd-rom
git-commits-head
:
Linux Kernel Mailing List
ARM: S3C64XX: DMA: Callback with correct buffer pointer
Linux Kernel Mailing List
sata_mv: drop unncessary EH callback resetting
Linux Kernel Mailing List
ARM: 5905/1: ARM: Global ASID allocation on SMP
Linux Kernel Mailing List
timer: Try to survive timer callback preempt_count leak
Linux Kernel Mailing List
powerpc/kexec: Add support for FSL-BookE
Colocation donated by:
Syndicate