Re: [PATCH] nouveau: fix undefined reference to acpi_lid_open

2010-02-17 Thread Marcin Slusarz
On Wed, Feb 17, 2010 at 10:42:43AM +0100, Daniel Mack wrote:
 Fix the following compile time error:
 
 drivers/built-in.o: In function `nouveau_connector_detect':
 /home/daniel/src/linux/jup/linux-2.6/drivers/gpu/drm/nouveau/nouveau_connector.c:243:
  undefined reference to `acpi_lid_open'
 
 Signed-off-by: Daniel Mack dan...@caiaq.de
 Cc: David Airlie airl...@linux.ie
 Cc: Ben Skeggs bske...@redhat.com
 Cc: Francisco Jerez curroje...@riseup.net
 Cc: Maarten Maathuis madman2...@gmail.com
 Cc: Xavier Chantry shinin...@gmail.com
 Cc: Marcin Slusarz marcin.slus...@gmail.com
 Cc: dri-devel@lists.sourceforge.net
 ---
  drivers/gpu/drm/nouveau/nouveau_connector.c |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
 
 diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c 
 b/drivers/gpu/drm/nouveau/nouveau_connector.c
 index d2f6335..c74d45d 100644
 --- a/drivers/gpu/drm/nouveau/nouveau_connector.c
 +++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
 @@ -239,7 +239,7 @@ nouveau_connector_detect(struct drm_connector *connector)
   if (connector-connector_type == DRM_MODE_CONNECTOR_LVDS)
   nv_encoder = find_encoder_by_type(connector, OUTPUT_LVDS);
   if (nv_encoder  nv_connector-native_mode) {
 -#ifdef CONFIG_ACPI
 +#ifdef CONFIG_ACPI_BUTTON
   if (!nouveau_ignorelid  !acpi_lid_open())
   return connector_status_disconnected;
  #endif
 -- 

You are fixing CONFIG_ACPI_BUTTON=m vs CONFIG_DRM_NOUVEAU=y compilation,
but breaking runtime behaviour of CONFIG_ACPI_BUTTON=m + CONFIG_DRM_NOUVEAU=m.

I think this code should be compiled when:
#if defined(CONFIG_ACPI_BUTTON) || (defined(CONFIG_ACPI_BUTTON_MODULE)  
defined(CONFIG_DRM_NOUVEAU_MODULE))

Marcin


--
Download Intelreg; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs 
proactively, and fine-tune applications for parallel performance. 
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: [git pull] drm

2010-02-15 Thread Marcin Slusarz
On Mon, Feb 15, 2010 at 10:53:48AM +0100, Christian Borntraeger wrote:
 Am Donnerstag 11 Februar 2010 05:20:07 schrieb Dave Airlie:
 
 Dave,
 
 I just updated from to rc8 and got the a scheduling while atomic warning in
 nouveau. (see below).

Linus' tree is missing two fixes:

drm/nouveau: don't hold spin lock while calling kzalloc with GFP_KERNEL
drm/nouveau: spin_lock_init after memset'ing the bios struct

The first one fixes your bug.

http://cgit.freedesktop.org/nouveau/linux-2.6/commit/?id=ed64797d153ecf0da79b8b849642d7a109fd97fd
http://cgit.freedesktop.org/nouveau/linux-2.6/commit/?id=9da76700072a00c39e21553df0998c7b3b620d88

If they won't go into 2.6.33, they are perfect candidates for -stable.

Marcin

--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: [git pull] drm

2010-02-15 Thread Marcin Slusarz
On Mon, Feb 15, 2010 at 09:39:00PM +0100, Maarten Maathuis wrote:
 The channel/context switch lock related patches (to the best of
 knowledge) haven't even gone outside the nouveau tree, so the initial
 damage isn't even there. At least not for the first path. As for the
 2nd patch, that one was squished into the original patch for this pull
 iirc.

Ouch, you are right.
Sorry for the noise.

Marcin


--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[PATCH] efifb: fix framebuffer handoff

2010-02-10 Thread Marcin Slusarz
Commit 4410f3910947dcea8672280b3adecd53cec4e85e
(fbdev: add support for handoff from firmware to hw framebuffers)
for unknown reason didn't add fb_destroy operation to efifb.
Fix it and change aperture_size to match size passed
to request_mem_region.

http://bugzilla.kernel.org/show_bug.cgi?id=15151

Reported-by: Alex Zhavnerchik alex.vi...@gmail.com
Tested-by: Alex Zhavnerchik alex.vi...@gmail.com
Signed-off-by: Marcin Slusarz marcin.slus...@gmail.com
---
 drivers/video/efifb.c |   11 ++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/drivers/video/efifb.c b/drivers/video/efifb.c
index eb12182..d25df51 100644
--- a/drivers/video/efifb.c
+++ b/drivers/video/efifb.c
@@ -161,8 +161,17 @@ static int efifb_setcolreg(unsigned regno, unsigned red, 
unsigned green,
return 0;
 }
 
+static void efifb_destroy(struct fb_info *info)
+{
+   if (info-screen_base)
+   iounmap(info-screen_base);
+   release_mem_region(info-aperture_base, info-aperture_size);
+   framebuffer_release(info);
+}
+
 static struct fb_ops efifb_ops = {
.owner  = THIS_MODULE,
+   .fb_destroy = efifb_destroy,
.fb_setcolreg   = efifb_setcolreg,
.fb_fillrect= cfb_fillrect,
.fb_copyarea= cfb_copyarea,
@@ -281,7 +290,7 @@ static int __init efifb_probe(struct platform_device *dev)
info-par = NULL;
 
info-aperture_base = efifb_fix.smem_start;
-   info-aperture_size = size_total;
+   info-aperture_size = size_remap;
 
info-screen_base = ioremap(efifb_fix.smem_start, efifb_fix.smem_len);
if (!info-screen_base) {
-- 
1.6.6


--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel