Re: [PATCH] drm/i915/lvds: Only act on lid notify when the device is on

2011-04-21 Thread Chris Wilson
On Fri, 22 Apr 2011 16:13:27 +1000, Dave Airlie  wrote:
> On Fri, Apr 22, 2011 at 3:58 PM, Chris Wilson  
> wrote:
> > On Thu, 21 Apr 2011 16:08:14 -0600, Alex Williamson 
> >  wrote:
> >> If we're using vga switcheroo, the device may be turned off
> >> and poking at it can cause an oops.
> >
> > I'm unfamiliar with what actually happens here after it is turned off. Can
> > you post an OOPS for an example?
> 
> The device will be in D3, so I'm guessing we read back some register
> and get 0x,
> and later fail.

That's sounds reasonable. A bit of explanation does wonders if I (or
anyone else reading through the history *or* code) ever encounter
similar bug reports.

Is anyone else concerned by the acpi_lid_notifier never being decoupled
when the module is unloaded? And the randomness of int_lvds_connector?

I love our code, every time you read it you find another bug.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 33812] radeon with modeset option causes oops as secondary adapter (vgaswitcheroo)

2011-04-21 Thread bugzilla-dae...@bugzilla.kernel.org
https://bugzilla.kernel.org/show_bug.cgi?id=33812





--- Comment #1 from Johannes Engel   2011-04-21 
23:15:31 ---
Created an attachment (id=54952)
 --> (https://bugzilla.kernel.org/attachment.cgi?id=54952)
lspci output

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are watching the assignee of the bug.

--
Fulfilling the Lean Software Promise
Lean software platforms are now widely adopted and the benefits have been 
demonstrated beyond question. Learn why your peers are replacing JEE 
containers with lightweight application servers - and what you can gain 
from the move. http://p.sf.net/sfu/vmware-sfemails
--
___
Dri-devel mailing list
Dri-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 33812] New: radeon with modeset option causes oops as secondary adapter (vgaswitcheroo)

2011-04-21 Thread bugzilla-dae...@bugzilla.kernel.org
https://bugzilla.kernel.org/show_bug.cgi?id=33812

   Summary: radeon with modeset option causes oops as secondary
adapter (vgaswitcheroo)
   Product: Drivers
   Version: 2.5
Kernel Version: 2.6.38.3
  Platform: All
OS/Version: Linux
  Tree: Mainline
Status: NEW
  Severity: high
  Priority: P1
 Component: Video(DRI - non Intel)
AssignedTo: drivers_video-dri at kernel-bugs.osdl.org
ReportedBy: jcnengel at googlemail.com
Regression: Yes


Created an attachment (id=54942)
 --> (https://bugzilla.kernel.org/attachment.cgi?id=54942)
kernel log

System: Lenovo ThinkPad T500
00:02.0 VGA compatible controller: Intel Corporation Mobile 4 Series Chipset
Integrated Graphics Controller (rev 07)
01:00.0 VGA compatible controller: ATI Technologies Inc Mobility Radeon HD 3650
using vgaswitcheroo

Trying to load radeon (as a module or in kernel) with modeset not explicitly
disabled causes a kernel NULL pointer dereference if i915 has initialised the
fb console already. 
That behaviour did not occur in 2.6.38, only after upgrading to 2.6.38.3
(haven't had the time to bisect yet).

If I disable switching in the BIOS and move to the radeon card as exclusive
adapter, everything works fine. with dual graphics stack

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are watching the assignee of the bug.

--
Fulfilling the Lean Software Promise
Lean software platforms are now widely adopted and the benefits have been 
demonstrated beyond question. Learn why your peers are replacing JEE 
containers with lightweight application servers - and what you can gain 
from the move. http://p.sf.net/sfu/vmware-sfemails
--
___
Dri-devel mailing list
Dri-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: [PATCH] drm/i915/lvds: Only act on lid notify when the device is on

2011-04-21 Thread Dave Airlie
On Fri, Apr 22, 2011 at 3:58 PM, Chris Wilson  wrote:
> On Thu, 21 Apr 2011 16:08:14 -0600, Alex Williamson 
>  wrote:
>> If we're using vga switcheroo, the device may be turned off
>> and poking at it can cause an oops.
>
> I'm unfamiliar with what actually happens here after it is turned off. Can
> you post an OOPS for an example?

The device will be in D3, so I'm guessing we read back some register
and get 0x,
and later fail.

Dave.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH] drm/i915/lvds: Only act on lid notify when the device is on

2011-04-21 Thread Chris Wilson
On Thu, 21 Apr 2011 16:08:14 -0600, Alex Williamson 
 wrote:
> If we're using vga switcheroo, the device may be turned off
> and poking at it can cause an oops.

I'm unfamiliar with what actually happens here after it is turned off. Can
you post an OOPS for an example?
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[REGRESSION] [2.6.39-rc3] Wrong resolution in framebuffer and X Window

2011-04-21 Thread Maciej Rutecki
(add LKML)

On niedziela, 17 kwietnia 2011 o 18:04:04 Maciej Rutecki wrote:
> Hi
> 
> Last known good: 2.6.38
> Failing kernel: 2.6.39-rc3
> Subsystem: Intel graphics driver.
> 
> Description:
> PC should work with 1440x900 resolution. But console (and after) X Window
> start work with 1024x768.
> 
> I attach dmesg and Xorg.0.log with drm.debug=14 log_buf_len=16M options:
> http://unixy.pl/maciek/download/kernel/2.6.39-rc1/zlom/kms/
> 
> seems that driver cannot detect resolution higher than 1024x768.
> 
> Also I boot kernel replace "i915.modeset=1" with "nomodeset" option:
> http://unixy.pl/maciek/download/kernel/2.6.39-rc1/zlom/nomodeset/
> 
> But then X Window fails to start and got message: "(EE) No devices
> detected."
> 
> Config for 2.6.39-rc3:
> http://unixy.pl/maciek/download/kernel/2.6.39-rc1/zlom/config-2.6.39-rc3
> 
> Best regards

Device:
00:02.0 VGA compatible controller: Intel Corporation 82G33/G31 Express 
Integrated Graphics Controller (rev 02)

-- 
Maciej Rutecki
http://www.maciek.unixy.pl


[PATCH 1/4] drm: add plane support

2011-04-21 Thread Jesse Barnes
Planes are a bit like half-CRTCs.  They have a location and fb, but
don't drive outputs directly.  Add support for handling them to the core
KMS code.

Signed-off-by: Jesse Barnes 
---
 drivers/gpu/drm/drm_crtc.c |  241 +++-
 drivers/gpu/drm/drm_drv.c  |3 +
 include/drm/drm.h  |3 +
 include/drm/drm_crtc.h |   79 ++-
 include/drm/drm_mode.h |   33 ++
 5 files changed, 356 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index fe738f0..cea209a 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -535,6 +535,48 @@ void drm_encoder_cleanup(struct drm_encoder *encoder)
 }
 EXPORT_SYMBOL(drm_encoder_cleanup);

+void drm_plane_init(struct drm_device *dev, struct drm_plane *plane,
+   unsigned long possible_crtcs,
+   const struct drm_plane_funcs *funcs,
+   uint32_t *formats, uint32_t format_count)
+{
+   mutex_lock(&dev->mode_config.mutex);
+
+   plane->dev = dev;
+   drm_mode_object_get(dev, &plane->base, DRM_MODE_OBJECT_PLANE);
+   plane->funcs = funcs;
+   plane->format_types = kmalloc(sizeof(uint32_t) * format_count,
+ GFP_KERNEL);
+   if (!plane->format_types) {
+   DRM_DEBUG_KMS("out of memory when allocating plane\n");
+   drm_mode_object_put(dev, &plane->base);
+   return;
+   }
+
+   memcpy(plane->format_types, formats, format_count);
+   plane->format_count = format_count;
+   plane->possible_crtcs = possible_crtcs;
+
+   list_add_tail(&plane->head, &dev->mode_config.plane_list);
+   dev->mode_config.num_plane++;
+
+   mutex_unlock(&dev->mode_config.mutex);
+}
+EXPORT_SYMBOL(drm_plane_init);
+
+void drm_plane_cleanup(struct drm_plane *plane)
+{
+   struct drm_device *dev = plane->dev;
+
+   mutex_lock(&dev->mode_config.mutex);
+   kfree(plane->format_types);
+   drm_mode_object_put(dev, &plane->base);
+   list_del(&plane->head);
+   dev->mode_config.num_plane--;
+   mutex_unlock(&dev->mode_config.mutex);
+}
+EXPORT_SYMBOL(drm_plane_cleanup);
+
 /**
  * drm_mode_create - create a new display mode
  * @dev: DRM device
@@ -866,6 +908,7 @@ void drm_mode_config_init(struct drm_device *dev)
INIT_LIST_HEAD(&dev->mode_config.encoder_list);
INIT_LIST_HEAD(&dev->mode_config.property_list);
INIT_LIST_HEAD(&dev->mode_config.property_blob_list);
+   INIT_LIST_HEAD(&dev->mode_config.plane_list);
idr_init(&dev->mode_config.crtc_idr);

mutex_lock(&dev->mode_config.mutex);
@@ -942,6 +985,7 @@ void drm_mode_config_cleanup(struct drm_device *dev)
struct drm_encoder *encoder, *enct;
struct drm_framebuffer *fb, *fbt;
struct drm_property *property, *pt;
+   struct drm_plane *plane, *plt;

list_for_each_entry_safe(encoder, enct, &dev->mode_config.encoder_list,
 head) {
@@ -966,6 +1010,10 @@ void drm_mode_config_cleanup(struct drm_device *dev)
crtc->funcs->destroy(crtc);
}

+   list_for_each_entry_safe(plane, plt, &dev->mode_config.plane_list,
+head) {
+   plane->funcs->destroy(plane);
+   }
 }
 EXPORT_SYMBOL(drm_mode_config_cleanup);

@@ -1466,6 +1514,193 @@ out:
 }

 /**
+ * drm_mode_getplane_res - get plane info
+ * @dev: DRM device
+ * @data: ioctl data
+ * @file_priv: DRM file info
+ *
+ * Return an plane count and set of IDs.
+ */
+int drm_mode_getplane_res(struct drm_device *dev, void *data,
+   struct drm_file *file_priv)
+{
+   struct drm_mode_get_plane_res *plane_resp = data;
+   struct drm_mode_config *config;
+   struct drm_plane *plane;
+   uint32_t __user *plane_ptr;
+   int copied = 0, ret = 0;
+
+   if (!drm_core_check_feature(dev, DRIVER_MODESET))
+   return -EINVAL;
+
+   mutex_lock(&dev->mode_config.mutex);
+   config = &dev->mode_config;
+
+   /*
+* This ioctl is called twice, once to determine how much space is
+* needed, and the 2nd time to fill it.
+*/
+   if (config->num_plane &&
+   (plane_resp->count_planes >= config->num_plane)) {
+   plane_ptr = (uint32_t *)(unsigned long)plane_resp->plane_id_ptr;
+
+   list_for_each_entry(plane, &config->plane_list, head) {
+   if (put_user(plane->base.id, plane_ptr + copied)) {
+   ret = -EFAULT;
+   goto out;
+   }
+   copied++;
+   }
+   }
+   plane_resp->count_planes = config->num_plane;
+
+out:
+   mutex_unlock(&dev->mode_config.mutex);
+   return ret;
+}
+
+/**
+ * drm_mode_getplane - get plane info
+ * @dev: DRM device
+ * @data: ioctl data
+ * @file_priv

[PATCH 1/5] drm: add plane support

2011-04-21 Thread Jesse Barnes
Planes are a bit like half-CRTCs.  They have a location and fb, but
don't drive outputs directly.  Add support for handling them to the core
KMS code.

Signed-off-by: Jesse Barnes 
---
 drivers/gpu/drm/drm_crtc.c |  251 +++-
 drivers/gpu/drm/drm_drv.c  |3 +
 include/drm/drm.h  |3 +
 include/drm/drm_crtc.h |   79 ++-
 include/drm/drm_mode.h |   33 ++
 5 files changed, 366 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index fe738f0..fac8043 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -321,6 +321,7 @@ void drm_framebuffer_cleanup(struct drm_framebuffer *fb)
 {
struct drm_device *dev = fb->dev;
struct drm_crtc *crtc;
+   struct drm_plane *plane;
struct drm_mode_set set;
int ret;

@@ -337,6 +338,15 @@ void drm_framebuffer_cleanup(struct drm_framebuffer *fb)
}
}

+   list_for_each_entry(plane, &dev->mode_config.plane_list, head) {
+   if (plane->fb == fb) {
+   /* should turn off the crtc */
+   ret = plane->funcs->disable_plane(plane);
+   if (ret)
+   DRM_ERROR("failed to disable plane with busy 
fb\n");
+   }
+   }
+
drm_mode_object_put(dev, &fb->base);
list_del(&fb->head);
dev->mode_config.num_fb--;
@@ -535,6 +545,48 @@ void drm_encoder_cleanup(struct drm_encoder *encoder)
 }
 EXPORT_SYMBOL(drm_encoder_cleanup);

+void drm_plane_init(struct drm_device *dev, struct drm_plane *plane,
+   unsigned long possible_crtcs,
+   const struct drm_plane_funcs *funcs,
+   uint32_t *formats, uint32_t format_count)
+{
+   mutex_lock(&dev->mode_config.mutex);
+
+   plane->dev = dev;
+   drm_mode_object_get(dev, &plane->base, DRM_MODE_OBJECT_PLANE);
+   plane->funcs = funcs;
+   plane->format_types = kmalloc(sizeof(uint32_t) * format_count,
+ GFP_KERNEL);
+   if (!plane->format_types) {
+   DRM_DEBUG_KMS("out of memory when allocating plane\n");
+   drm_mode_object_put(dev, &plane->base);
+   return;
+   }
+
+   memcpy(plane->format_types, formats, format_count);
+   plane->format_count = format_count;
+   plane->possible_crtcs = possible_crtcs;
+
+   list_add_tail(&plane->head, &dev->mode_config.plane_list);
+   dev->mode_config.num_plane++;
+
+   mutex_unlock(&dev->mode_config.mutex);
+}
+EXPORT_SYMBOL(drm_plane_init);
+
+void drm_plane_cleanup(struct drm_plane *plane)
+{
+   struct drm_device *dev = plane->dev;
+
+   mutex_lock(&dev->mode_config.mutex);
+   kfree(plane->format_types);
+   drm_mode_object_put(dev, &plane->base);
+   list_del(&plane->head);
+   dev->mode_config.num_plane--;
+   mutex_unlock(&dev->mode_config.mutex);
+}
+EXPORT_SYMBOL(drm_plane_cleanup);
+
 /**
  * drm_mode_create - create a new display mode
  * @dev: DRM device
@@ -866,6 +918,7 @@ void drm_mode_config_init(struct drm_device *dev)
INIT_LIST_HEAD(&dev->mode_config.encoder_list);
INIT_LIST_HEAD(&dev->mode_config.property_list);
INIT_LIST_HEAD(&dev->mode_config.property_blob_list);
+   INIT_LIST_HEAD(&dev->mode_config.plane_list);
idr_init(&dev->mode_config.crtc_idr);

mutex_lock(&dev->mode_config.mutex);
@@ -942,6 +995,7 @@ void drm_mode_config_cleanup(struct drm_device *dev)
struct drm_encoder *encoder, *enct;
struct drm_framebuffer *fb, *fbt;
struct drm_property *property, *pt;
+   struct drm_plane *plane, *plt;

list_for_each_entry_safe(encoder, enct, &dev->mode_config.encoder_list,
 head) {
@@ -966,6 +1020,10 @@ void drm_mode_config_cleanup(struct drm_device *dev)
crtc->funcs->destroy(crtc);
}

+   list_for_each_entry_safe(plane, plt, &dev->mode_config.plane_list,
+head) {
+   plane->funcs->destroy(plane);
+   }
 }
 EXPORT_SYMBOL(drm_mode_config_cleanup);

@@ -1466,6 +1524,193 @@ out:
 }

 /**
+ * drm_mode_getplane_res - get plane info
+ * @dev: DRM device
+ * @data: ioctl data
+ * @file_priv: DRM file info
+ *
+ * Return an plane count and set of IDs.
+ */
+int drm_mode_getplane_res(struct drm_device *dev, void *data,
+   struct drm_file *file_priv)
+{
+   struct drm_mode_get_plane_res *plane_resp = data;
+   struct drm_mode_config *config;
+   struct drm_plane *plane;
+   uint32_t __user *plane_ptr;
+   int copied = 0, ret = 0;
+
+   if (!drm_core_check_feature(dev, DRIVER_MODESET))
+   return -EINVAL;
+
+   mutex_lock(&dev->mode_config.mutex);
+   config = &dev->mode_config;
+
+   /*
+* This ioctl is called twice, 

[Bug 33812] radeon with modeset option causes oops as secondary adapter (vgaswitcheroo)

2011-04-21 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=33812





--- Comment #1 from Johannes Engel   2011-04-21 
23:15:31 ---
Created an attachment (id=54952)
 --> (https://bugzilla.kernel.org/attachment.cgi?id=54952)
lspci output

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are watching the assignee of the bug.

--
Fulfilling the Lean Software Promise
Lean software platforms are now widely adopted and the benefits have been 
demonstrated beyond question. Learn why your peers are replacing JEE 
containers with lightweight application servers - and what you can gain 
from the move. http://p.sf.net/sfu/vmware-sfemails
--
___
Dri-devel mailing list
dri-de...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 33812] New: radeon with modeset option causes oops as secondary adapter (vgaswitcheroo)

2011-04-21 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=33812

   Summary: radeon with modeset option causes oops as secondary
adapter (vgaswitcheroo)
   Product: Drivers
   Version: 2.5
Kernel Version: 2.6.38.3
  Platform: All
OS/Version: Linux
  Tree: Mainline
Status: NEW
  Severity: high
  Priority: P1
 Component: Video(DRI - non Intel)
AssignedTo: drivers_video-...@kernel-bugs.osdl.org
ReportedBy: jcnen...@googlemail.com
Regression: Yes


Created an attachment (id=54942)
 --> (https://bugzilla.kernel.org/attachment.cgi?id=54942)
kernel log

System: Lenovo ThinkPad T500
00:02.0 VGA compatible controller: Intel Corporation Mobile 4 Series Chipset
Integrated Graphics Controller (rev 07)
01:00.0 VGA compatible controller: ATI Technologies Inc Mobility Radeon HD 3650
using vgaswitcheroo

Trying to load radeon (as a module or in kernel) with modeset not explicitly
disabled causes a kernel NULL pointer dereference if i915 has initialised the
fb console already. 
That behaviour did not occur in 2.6.38, only after upgrading to 2.6.38.3
(haven't had the time to bisect yet).

If I disable switching in the BIOS and move to the radeon card as exclusive
adapter, everything works fine. with dual graphics stack

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are watching the assignee of the bug.

--
Fulfilling the Lean Software Promise
Lean software platforms are now widely adopted and the benefits have been 
demonstrated beyond question. Learn why your peers are replacing JEE 
containers with lightweight application servers - and what you can gain 
from the move. http://p.sf.net/sfu/vmware-sfemails
--
___
Dri-devel mailing list
dri-de...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH] drm: select FRAMEBUFFER_CONSOLE_PRIMARY if we have FRAMEBUFFER_CONSOLE

2011-04-21 Thread Dave Airlie
From: Dave Airlie 

Multi-gpu/switcheroo relies on this option to get the console on the
correct GPU at bootup, some distros enable it but it seems some get
it wrong.

cc: sta...@kernel.org
Signed-off-by: Dave Airlie 
---
 drivers/gpu/drm/Kconfig |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index a6feb78c..9759e75 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -24,6 +24,7 @@ config DRM_KMS_HELPER
depends on DRM
select FB
select FRAMEBUFFER_CONSOLE if !EXPERT
+   select FRAMEBUFFER_CONSOLE_DETECT_PRIMARY if FRAMEBUFFER_CONSOLE
help
  FB and CRTC helpers for KMS drivers.
 
-- 
1.7.4.2

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH] drm/i915/lvds: Only act on lid notify when the device is on

2011-04-21 Thread Alex Williamson
If we're using vga switcheroo, the device may be turned off
and poking at it can cause an oops.

Signed-off-by: Alex Williamson 
---

 drivers/gpu/drm/i915/intel_lvds.c |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_lvds.c 
b/drivers/gpu/drm/i915/intel_lvds.c
index a562bd2..67cb076 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -539,6 +539,9 @@ static int intel_lid_notify(struct notifier_block *nb, 
unsigned long val,
struct drm_device *dev = dev_priv->dev;
struct drm_connector *connector = dev_priv->int_lvds_connector;

+   if (dev->switch_power_state != DRM_SWITCH_POWER_ON)
+   return NOTIFY_OK;
+
/*
 * check and update the status of LVDS connector after receiving
 * the LID nofication event.



[PATCH] drm/i915/lvds: Only act on lid notify when the device is on

2011-04-21 Thread Alex Williamson
If we're using vga switcheroo, the device may be turned off
and poking at it can cause an oops.

Signed-off-by: Alex Williamson 
---

 drivers/gpu/drm/i915/intel_lvds.c |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_lvds.c 
b/drivers/gpu/drm/i915/intel_lvds.c
index a562bd2..67cb076 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -539,6 +539,9 @@ static int intel_lid_notify(struct notifier_block *nb, 
unsigned long val,
struct drm_device *dev = dev_priv->dev;
struct drm_connector *connector = dev_priv->int_lvds_connector;
 
+   if (dev->switch_power_state != DRM_SWITCH_POWER_ON)
+   return NOTIFY_OK;
+
/*
 * check and update the status of LVDS connector after receiving
 * the LID nofication event.

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[git pull] drm/agp fixes

2011-04-21 Thread Dave Airlie
Hi Linus,

Found an AGP box to at least make sure these fixes still allow it to
boot and run,
along with one I missed from Alex yesterday for big endian support.

Dave.

The following changes since commit
5785e53ffa73f77fb19e378c899027afc07272bc:

  drm/radeon/kms: pll tweaks for r7xx (2011-04-20 09:39:37 +1000)

are available in the git repository at:
  ssh://master.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6.git
drm-fixes

C?dric Cano (1):
  drm/radeon/kms: fix IH writeback on r6xx+ on big endian machines

Vasiliy Kulikov (2):
  agp: fix OOM and buffer overflow
  agp: fix arbitrary kernel memory writes

 drivers/char/agp/generic.c |   19 +++
 drivers/gpu/drm/radeon/evergreen.c |2 +-
 drivers/gpu/drm/radeon/r600.c  |2 +-
 3 files changed, 17 insertions(+), 6 deletions(-)





Re: [REGRESSION] [2.6.39-rc3] Wrong resolution in framebuffer and X Window

2011-04-21 Thread Maciej Rutecki
(add LKML)

On niedziela, 17 kwietnia 2011 o 18:04:04 Maciej Rutecki wrote:
> Hi
> 
> Last known good: 2.6.38
> Failing kernel: 2.6.39-rc3
> Subsystem: Intel graphics driver.
> 
> Description:
> PC should work with 1440x900 resolution. But console (and after) X Window
> start work with 1024x768.
> 
> I attach dmesg and Xorg.0.log with drm.debug=14 log_buf_len=16M options:
> http://unixy.pl/maciek/download/kernel/2.6.39-rc1/zlom/kms/
> 
> seems that driver cannot detect resolution higher than 1024x768.
> 
> Also I boot kernel replace "i915.modeset=1" with "nomodeset" option:
> http://unixy.pl/maciek/download/kernel/2.6.39-rc1/zlom/nomodeset/
> 
> But then X Window fails to start and got message: "(EE) No devices
> detected."
> 
> Config for 2.6.39-rc3:
> http://unixy.pl/maciek/download/kernel/2.6.39-rc1/zlom/config-2.6.39-rc3
> 
> Best regards

Device:
00:02.0 VGA compatible controller: Intel Corporation 82G33/G31 Express 
Integrated Graphics Controller (rev 02)

-- 
Maciej Rutecki
http://www.maciek.unixy.pl
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[PULL] drm intel fixes

2011-04-21 Thread Keith Packard

Here's a couple of minor fixes for intel modesetting.

These should resolve the following bugs:

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=35977
References: https://bugs.freedesktop.org/show_bug.cgi?id=35903
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=35796
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=32612

These didn't uncover any regressions in testing compared with -rc2. We
have found an S4 resume regression in -rc2 compared with .38 on the
Piketon platform which we're still chasing.

the following changes since commit 6221f222c0ebf1acdf7abcf927178f40e1a65e2a:

  Linux 2.6.39-rc2 (2011-04-05 18:30:43 -0700)

are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/keithp/linux-2.6.git 
drm-intel-fixes

Chris Wilson (2):
  drm/i915: Sanitize the output registers after resume
  drm/i915: Initialise g4x watermarks for disabled pipes

Mathew McKernan (2):
  drm/i915/tv: Remember the detected TV type
  drm/i915/tv: Only poll for TV connections

Sitsofe Wheeler (1):
  drm/i915/tv: Fix modeset flickering introduced in 7f58aabc3

 drivers/gpu/drm/i915/intel_display.c |   73 ++---
 drivers/gpu/drm/i915/intel_tv.c  |9 ++--
 2 files changed, 45 insertions(+), 37 deletions(-)

-- 
keith.pack...@intel.com


pgpsRbTDgXwym.pgp
Description: PGP signature
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[PULL] drm intel fixes

2011-04-21 Thread Keith Packard

Here's a couple of minor fixes for intel modesetting.

These should resolve the following bugs:

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=35977
References: https://bugs.freedesktop.org/show_bug.cgi?id=35903
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=35796
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=32612

These didn't uncover any regressions in testing compared with -rc2. We
have found an S4 resume regression in -rc2 compared with .38 on the
Piketon platform which we're still chasing.

the following changes since commit 6221f222c0ebf1acdf7abcf927178f40e1a65e2a:

  Linux 2.6.39-rc2 (2011-04-05 18:30:43 -0700)

are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/keithp/linux-2.6.git 
drm-intel-fixes

Chris Wilson (2):
  drm/i915: Sanitize the output registers after resume
  drm/i915: Initialise g4x watermarks for disabled pipes

Mathew McKernan (2):
  drm/i915/tv: Remember the detected TV type
  drm/i915/tv: Only poll for TV connections

Sitsofe Wheeler (1):
  drm/i915/tv: Fix modeset flickering introduced in 7f58aabc3

 drivers/gpu/drm/i915/intel_display.c |   73 ++---
 drivers/gpu/drm/i915/intel_tv.c  |9 ++--
 2 files changed, 45 insertions(+), 37 deletions(-)

-- 
keith.packard at intel.com
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 
<http://lists.freedesktop.org/archives/dri-devel/attachments/20110421/85bf25e2/attachment.pgp>


[Bug 36455] Screen corruption when comeing back from powersave

2011-04-21 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=36455

--- Comment #1 from Alex Deucher  2011-04-21 08:36:58 PDT ---
What card do you have?  What commit are you using?  Can you bisect?  Please
attach your xorg log and dmesg output.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 36455] Screen corruption when comeing back from powersave

2011-04-21 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=36455

--- Comment #1 from Alex Deucher  2011-04-21 08:36:58 PDT 
---
What card do you have?  What commit are you using?  Can you bisect?  Please
attach your xorg log and dmesg output.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.


[Bug 36441] [RV620] Artefacts in launcher and dash (horizontal noise lines and color loss)

2011-04-21 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=36441

Alex Deucher  changed:

   What|Removed |Added

Product|xorg|Mesa
Version|7.6 |7.10
  Component|Driver/Radeon   |Drivers/Gallium/r600
 AssignedTo|xorg-driver-...@lists.x.org |dri-devel@lists.freedesktop
   ||.org
  QAContact|xorg-t...@lists.x.org   |

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 36442] [RS880] graphical corruption in launcher (Solid grey rectangles over icon text and window borders)

2011-04-21 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=36442

Alex Deucher  changed:

   What|Removed |Added

Product|xorg|Mesa
Version|7.6 |7.10
  Component|Driver/Radeon   |Drivers/Gallium/r600
 AssignedTo|xorg-driver-...@lists.x.org |dri-devel@lists.freedesktop
   ||.org
  QAContact|xorg-t...@lists.x.org   |

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 36441] [RV620] Artefacts in launcher and dash (horizontal noise lines and color loss)

2011-04-21 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=36441

Alex Deucher  changed:

   What|Removed |Added

Product|xorg|Mesa
Version|7.6 |7.10
  Component|Driver/Radeon   |Drivers/Gallium/r600
 AssignedTo|xorg-driver-ati at lists.x.org |dri-devel at 
lists.freedesktop
   ||.org
  QAContact|xorg-team at lists.x.org   |

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.


[Bug 36442] [RS880] graphical corruption in launcher (Solid grey rectangles over icon text and window borders)

2011-04-21 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=36442

Alex Deucher  changed:

   What|Removed |Added

Product|xorg|Mesa
Version|7.6 |7.10
  Component|Driver/Radeon   |Drivers/Gallium/r600
 AssignedTo|xorg-driver-ati at lists.x.org |dri-devel at 
lists.freedesktop
   ||.org
  QAContact|xorg-team at lists.x.org   |

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.


[Bug 36327] fujitsu siemens amilo li1718: ati radeon x200m does not resume from suspend

2011-04-21 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=36327

--- Comment #12 from Евгений М.  2011-04-21 08:12:17 PDT ---
Created an attachment (id=45921)
 --> (https://bugs.freedesktop.org/attachment.cgi?id=45921)
an unsuccessful wakeup attempt kernel log

As I already mentioned this in
https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-ati/+bug/577340,
repeating it here. After I tried to unsuccessfully install fglrx, which I
removed while running full 3D, I subsequently tried to suspend and resume. 
The resume did not work, however, I saw one of the vt's with the kernel log in
it. It appears to be a log of the wakeup attempt with a couple of stack traces.
Not sure if it can shed any new light on our issue and attach that piece of
kern.log here.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 36327] fujitsu siemens amilo li1718: ati radeon x200m does not resume from suspend

2011-04-21 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=36327

--- Comment #12 from ??? ?.  2011-04-21 08:12:17 PDT 
---
Created an attachment (id=45921)
 --> (https://bugs.freedesktop.org/attachment.cgi?id=45921)
an unsuccessful wakeup attempt kernel log

As I already mentioned this in
https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-ati/+bug/577340,
repeating it here. After I tried to unsuccessfully install fglrx, which I
removed while running full 3D, I subsequently tried to suspend and resume. 
The resume did not work, however, I saw one of the vt's with the kernel log in
it. It appears to be a log of the wakeup attempt with a couple of stack traces.
Not sure if it can shed any new light on our issue and attach that piece of
kern.log here.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.


[Bug 36455] New: Screen corruption when comeing back from powersave

2011-04-21 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=36455

   Summary: Screen corruption when comeing back from powersave
   Product: Mesa
   Version: git
  Platform: x86-64 (AMD64)
OS/Version: Linux (All)
Status: NEW
  Severity: normal
  Priority: medium
 Component: Drivers/Gallium/r600
AssignedTo: dri-devel@lists.freedesktop.org
ReportedBy: d.mills-...@guesny.net


Using yesterday's git (20-04-2011), when the card tries to come back from a
suspended state (laptop suspend, or just turning off the screen using
powersave) the screen stops updating and sometimes becomes garbled.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 36455] New: Screen corruption when comeing back from powersave

2011-04-21 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=36455

   Summary: Screen corruption when comeing back from powersave
   Product: Mesa
   Version: git
  Platform: x86-64 (AMD64)
OS/Version: Linux (All)
Status: NEW
  Severity: normal
  Priority: medium
 Component: Drivers/Gallium/r600
AssignedTo: dri-devel at lists.freedesktop.org
ReportedBy: d.mills-dri at guesny.net


Using yesterday's git (20-04-2011), when the card tries to come back from a
suspended state (laptop suspend, or just turning off the screen using
powersave) the screen stops updating and sometimes becomes garbled.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.