Re: [Nouveau] nouveau_subdev misc patches

2012-05-21 Thread Ben Skeggs
On Mon, May 21, 2012 at 12:14:49AM +0100, Emil Velikov wrote:
 Hello all, this series includes a wide range of fixes - from a few
 month's old one-liners from Andreas Heider regarding vga_switcheroo, via a
 null pointer dereference and double memory allocation, to a buffer overflow.
Hey,

Thanks for these!  I've pulled most of them directly for the moment, comments
on specific patches will follow.

Cheers,
Ben.

 
 Please review and comment
 
 ---
  drivers/gpu/drm/nouveau/nouveau_acpi.c   |3 ++-
  drivers/gpu/drm/nouveau/nouveau_device.c |   26 +++---
  drivers/gpu/drm/nouveau/nouveau_fb.h |1 -
  drivers/gpu/drm/nouveau/nouveau_gpio.h   |3 ---
  drivers/gpu/drm/nouveau/nouveau_gpuobj.c |   12 
  drivers/gpu/drm/nouveau/nouveau_perf.c   |2 +-
  drivers/gpu/drm/nouveau/nouveau_pm.c |6 +++---
  drivers/gpu/drm/nouveau/nouveau_state.c  |2 ++
  drivers/gpu/drm/nouveau/nouveau_therm.c  |   63 
 +--
  drivers/gpu/drm/nouveau/nv04_instmem.c   |3 +--
  drivers/gpu/drm/nouveau/nv10_fb.c|4 
  drivers/gpu/drm/nouveau/nv10_gpio.c  |   16 
  drivers/gpu/drm/nouveau/nv30_fb.c|3 +--
  drivers/gpu/drm/nouveau/nv40_fanpwm.c|   14 +++---
  drivers/gpu/drm/nouveau/nv40_fb.c|   11 ---
  drivers/gpu/drm/nouveau/nv50_bar.c   |2 --
  drivers/gpu/drm/nouveau/nv50_fanpwm.c|   20 ++--
  drivers/gpu/drm/nouveau/nv50_gpio.c  |   16 
  drivers/gpu/drm/nouveau/nv50_instmem.c   |   10 +++---
  drivers/gpu/drm/nouveau/nvc0_instmem.c   |   10 +++---
  drivers/gpu/drm/nouveau/nvd0_gpio.c  |   16 
  21 files changed, 129 insertions(+), 114 deletions(-)
 
 
 ___
 Nouveau mailing list
 Nouveau@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/nouveau
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


Re: [Nouveau] [PATCH 03/14] drm/nouveau/device: Simplify init, fini fuction

2012-05-21 Thread Ben Skeggs
On Mon, May 21, 2012 at 12:14:52AM +0100, Emil Velikov wrote:
 Removes unnecessary goto statement
I dropped these changes from this patch for the moment, I might want them yet.

 fini subdevices before destroying them
I took this hunk, and reworded the commit message to match.

 
 Signed-off-by: Emil Velikov emil.l.veli...@gmail.com
 ---
  drivers/gpu/drm/nouveau/nouveau_device.c |   26 +++---
  1 file changed, 15 insertions(+), 11 deletions(-)
 
 diff --git a/drivers/gpu/drm/nouveau/nouveau_device.c 
 b/drivers/gpu/drm/nouveau/nouveau_device.c
 index 9cc21d1..38ed71a 100644
 --- a/drivers/gpu/drm/nouveau/nouveau_device.c
 +++ b/drivers/gpu/drm/nouveau/nouveau_device.c
 @@ -55,13 +55,13 @@ nouveau_device_init(struct nouveau_device *ndev)
  
   for (i = 0; i  NVDEV_SUBDEV_NR; i++) {
   ret = nouveau_subdev_init(ndev, i, 0);
 - if (ret)
 - goto error;
 + if (ret) {
 + for (--i; i = 0; i--)
 + nouveau_subdev_fini(ndev, i, false);
 + break;
 + }
   }
  
 -error:
 - for (--i; ret  i = 0; i--)
 - nouveau_subdev_fini(ndev, i, false);
   return ret;
  }
  
 @@ -72,13 +72,13 @@ nouveau_device_fini(struct nouveau_device *ndev, bool 
 suspend)
  
   for (i = NVDEV_SUBDEV_NR - 1; i = 0; i--) {
   ret = nouveau_subdev_fini(ndev, i, suspend);
 - if (ret)
 - goto error;
 + if (ret) {
 + for (--i; i = 0; i--)
 + nouveau_subdev_init(ndev, i, 0);
 + break;
 + }
   }
  
 -error:
 - for (--i; ret  i = 0; i--)
 - nouveau_subdev_init(ndev, i, 0);
   return ret;
  }
  
 @@ -96,6 +96,7 @@ nouveau_device_create(struct nouveau_device *ndev)
  {
   int disable = nouveau_noaccel;
   int ret = 0;
 + int i;
  
   /* mask out any engines that are known not to work as they should,
* these can be overridden by the user
 @@ -553,7 +554,10 @@ nouveau_device_create(struct nouveau_device *ndev)
   break;
   }
  
 - if (ret)
 + if (ret) {
 + for (i = NVDEV_SUBDEV_NR - 1; i = 0; i--)
 + nouveau_subdev_fini(ndev, i, false);
   nouveau_device_destroy(ndev);
 + }
   return ret;
  }
 -- 
 1.7.10.2
 
 ___
 Nouveau mailing list
 Nouveau@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/nouveau
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


Re: [Nouveau] [PATCH 14/14] drm/nouveau/therm: Rework nouveau_therm_create()

2012-05-21 Thread Ben Skeggs
On Mon, May 21, 2012 at 12:15:03AM +0100, Emil Velikov wrote:
 It contains a few changes mainly targeting the following
  * Therm table is present in BIT vbios
  * Parse the vbios table before hooking temp_get(), as it contains the therm
 sensor calibration data
  * Add dummy_therm_temp_get() function to prevent multiple null dereff's

I didn't take this patch at all yet.  I'll let Martin put his input into
this instead.  I didn't really touch the thermal stuff aside from matching
APIs because he's got an overhaul pending anyway.

Comments on specific pieces inline as they may be useful.

 
 Signed-off-by: Emil Velikov emil.l.veli...@gmail.com
 ---
  drivers/gpu/drm/nouveau/nouveau_pm.c|2 +-
  drivers/gpu/drm/nouveau/nouveau_therm.c |   63 
 ---
  2 files changed, 50 insertions(+), 15 deletions(-)
 
 diff --git a/drivers/gpu/drm/nouveau/nouveau_pm.c 
 b/drivers/gpu/drm/nouveau/nouveau_pm.c
 index 9dd34fe..1b4422b 100644
 --- a/drivers/gpu/drm/nouveau/nouveau_pm.c
 +++ b/drivers/gpu/drm/nouveau/nouveau_pm.c
 @@ -693,7 +693,7 @@ nouveau_hwmon_init(struct nouveau_device *ndev)
   }
  
   /* if the card can read the fan rpm */
 - if (nouveau_gpio_func_valid(ndev, DCB_GPIO_FAN_SENSE)) {
 + if (pfan  pfan-sense(pfan) = 0) {
   ret = sysfs_create_group(dev-pdev-dev.kobj,
hwmon_fan_rpm_attrgroup);
   if (ret)
 diff --git a/drivers/gpu/drm/nouveau/nouveau_therm.c 
 b/drivers/gpu/drm/nouveau/nouveau_therm.c
 index acf81a9..91095be 100644
 --- a/drivers/gpu/drm/nouveau/nouveau_therm.c
 +++ b/drivers/gpu/drm/nouveau/nouveau_therm.c
 @@ -30,6 +30,12 @@
  #include nouveau_pm.h
  #include nouveau_therm.h
  
 +static inline int
 +dummy_therm_temp_get(struct nouveau_therm *ptherm)
 +{
 + return 0;
 +}
 +
I don't really like this, if we can't expose any thermal data I think we
just shouldn't create a thermal subdev?

  static int
  nv40_sensor_setup(struct nouveau_therm *ptherm)
  {
 @@ -181,7 +187,7 @@ nouveau_therm_vbios_parse(struct nouveau_therm *ptherm, 
 u8 *temp)
   temp = temp + headerlen;
  
   /* Read the entries from the table */
 - for (i = 0; i  entries; i++) {
 + for (i = 0; i  entries; i++, temp += recordlen) {
   s16 value = ROM16(temp[1]);
  
   switch (temp[0]) {
 @@ -228,7 +234,6 @@ nouveau_therm_vbios_parse(struct nouveau_therm *ptherm, 
 u8 *temp)
   ptherm-fan.pwm_freq = value;
   break;
   }
 - temp += recordlen;
   }
  
   nouveau_therm_safety_checks(ptherm);
 @@ -299,6 +304,12 @@ nouveau_therm_probe_i2c(struct nouveau_device *ndev)
probe_monitoring_device, NV_I2C_DEFAULT(0));
  }
  
 +static void
 +nouveau_ptherm_destroy(struct nouveau_device *ndev, int subdev)
 +{
 +// XXX: Undo probe_monitoring_device
 +}
 +
  int
  nouveau_therm_create(struct nouveau_device *ndev, int subdev)
  {
 @@ -307,29 +318,53 @@ nouveau_therm_create(struct nouveau_device *ndev, int 
 subdev)
   u8 *temp = NULL;
   int ret;
  
 - ret = nouveau_subdev_create(ndev, subdev, THERM, thermal, ptherm);
 - if (ret)
 - return ret;
 + if (bios-type == NVBIOS_BIT) {
 + if (bit_table(ndev, 'P', P))
 + return 0;
The BIT check isn't necessary, bit_table() will fail if it's not a BIT BIOS.

  
 - if (ndev-chipset = 0x40  ndev-chipset  0x84)
 - ptherm-temp_get = nv40_therm_temp_get;
 - else
 - if (ndev-chipset = 0xd9)
 - ptherm-temp_get = nv84_therm_temp_get;
 -
 - if (bit_table(ndev, 'P', P) == 0) {
   if (P.version == 1)
   temp = ROMPTR(ndev, P.data[12]);
   else
   if (P.version == 2)
   temp = ROMPTR(ndev, P.data[16]);
 - else
 + else {
   NV_WARN(ndev, unknown temp for BIT P %d\n, P.version);
 + }
 + } else {
 + return 0;
 + }
  
 - nouveau_therm_vbios_parse(ptherm, temp);
 + if (!temp) {
 + NV_DEBUG(ndev, temp table pointer invalid\n);
 + return 0;
   }
  
 + ret = nouveau_subdev_create(ndev, subdev, THERM, thermal, ptherm);
 + if (ret)
 + return ret;
 +
 + nouveau_therm_vbios_parse(ptherm, temp);
   nouveau_therm_probe_i2c(ndev);
  
 + ptherm-base.destroy = nouveau_ptherm_destroy;
 + switch (ndev-card_type) {
 + case NV_40:
 + case NV_50:
 + case NV_C0:
 + case NV_D0:
 + case NV_E0:
 + if (ndev-chipset  0x84) {
 + ptherm-temp_get = nv40_therm_temp_get;
 + break;
 + } else
 + if (ndev-chipset = 0xd9) {
 + ptherm-temp_get = nv84_therm_temp_get;
 + break;
 + }
 + default:
 + 

Re: [Nouveau] [PATCH 14/14] drm/nouveau/therm: Rework nouveau_therm_create()

2012-05-21 Thread Maarten Maathuis
On Mon, May 21, 2012 at 8:30 AM, Ben Skeggs skeg...@gmail.com wrote:
 On Mon, May 21, 2012 at 12:15:03AM +0100, Emil Velikov wrote:
 It contains a few changes mainly targeting the following
  * Therm table is present in BIT vbios
  * Parse the vbios table before hooking temp_get(), as it contains the therm
 sensor calibration data
  * Add dummy_therm_temp_get() function to prevent multiple null dereff's

 I didn't take this patch at all yet.  I'll let Martin put his input into
 this instead.  I didn't really touch the thermal stuff aside from matching
 APIs because he's got an overhaul pending anyway.

 Comments on specific pieces inline as they may be useful.


 Signed-off-by: Emil Velikov emil.l.veli...@gmail.com
 ---
  drivers/gpu/drm/nouveau/nouveau_pm.c    |    2 +-
  drivers/gpu/drm/nouveau/nouveau_therm.c |   63 
 ---
  2 files changed, 50 insertions(+), 15 deletions(-)

 diff --git a/drivers/gpu/drm/nouveau/nouveau_pm.c 
 b/drivers/gpu/drm/nouveau/nouveau_pm.c
 index 9dd34fe..1b4422b 100644
 --- a/drivers/gpu/drm/nouveau/nouveau_pm.c
 +++ b/drivers/gpu/drm/nouveau/nouveau_pm.c
 @@ -693,7 +693,7 @@ nouveau_hwmon_init(struct nouveau_device *ndev)
       }

       /* if the card can read the fan rpm */
 -     if (nouveau_gpio_func_valid(ndev, DCB_GPIO_FAN_SENSE)) {
 +     if (pfan  pfan-sense(pfan) = 0) {
               ret = sysfs_create_group(dev-pdev-dev.kobj,
                                        hwmon_fan_rpm_attrgroup);
               if (ret)
 diff --git a/drivers/gpu/drm/nouveau/nouveau_therm.c 
 b/drivers/gpu/drm/nouveau/nouveau_therm.c
 index acf81a9..91095be 100644
 --- a/drivers/gpu/drm/nouveau/nouveau_therm.c
 +++ b/drivers/gpu/drm/nouveau/nouveau_therm.c
 @@ -30,6 +30,12 @@
  #include nouveau_pm.h
  #include nouveau_therm.h

 +static inline int
 +dummy_therm_temp_get(struct nouveau_therm *ptherm)
 +{
 +     return 0;
 +}
 +
 I don't really like this, if we can't expose any thermal data I think we
 just shouldn't create a thermal subdev?

  static int
  nv40_sensor_setup(struct nouveau_therm *ptherm)
  {
 @@ -181,7 +187,7 @@ nouveau_therm_vbios_parse(struct nouveau_therm *ptherm, 
 u8 *temp)
       temp = temp + headerlen;

       /* Read the entries from the table */
 -     for (i = 0; i  entries; i++) {
 +     for (i = 0; i  entries; i++, temp += recordlen) {
               s16 value = ROM16(temp[1]);

               switch (temp[0]) {
 @@ -228,7 +234,6 @@ nouveau_therm_vbios_parse(struct nouveau_therm *ptherm, 
 u8 *temp)
                       ptherm-fan.pwm_freq = value;
                       break;
               }
 -             temp += recordlen;
       }

       nouveau_therm_safety_checks(ptherm);
 @@ -299,6 +304,12 @@ nouveau_therm_probe_i2c(struct nouveau_device *ndev)
                            probe_monitoring_device, NV_I2C_DEFAULT(0));
  }

 +static void
 +nouveau_ptherm_destroy(struct nouveau_device *ndev, int subdev)
 +{
 +// XXX: Undo probe_monitoring_device
 +}
 +
  int
  nouveau_therm_create(struct nouveau_device *ndev, int subdev)
  {
 @@ -307,29 +318,53 @@ nouveau_therm_create(struct nouveau_device *ndev, int 
 subdev)
       u8 *temp = NULL;
       int ret;

 -     ret = nouveau_subdev_create(ndev, subdev, THERM, thermal, ptherm);
 -     if (ret)
 -             return ret;
 +     if (bios-type == NVBIOS_BIT) {
 +             if (bit_table(ndev, 'P', P))
 +                     return 0;
 The BIT check isn't necessary, bit_table() will fail if it's not a BIT BIOS.


 -     if (ndev-chipset = 0x40  ndev-chipset  0x84)
 -             ptherm-temp_get = nv40_therm_temp_get;
 -     else
 -     if (ndev-chipset = 0xd9)
 -             ptherm-temp_get = nv84_therm_temp_get;
 -
 -     if (bit_table(ndev, 'P', P) == 0) {
               if (P.version == 1)
                       temp = ROMPTR(ndev, P.data[12]);
               else
               if (P.version == 2)
                       temp = ROMPTR(ndev, P.data[16]);
 -             else
 +             else {
                       NV_WARN(ndev, unknown temp for BIT P %d\n, 
 P.version);
 +             }
 +     } else {
 +             return 0;
 +     }

 -             nouveau_therm_vbios_parse(ptherm, temp);
 +     if (!temp) {
 +             NV_DEBUG(ndev, temp table pointer invalid\n);
 +             return 0;
       }

 +     ret = nouveau_subdev_create(ndev, subdev, THERM, thermal, ptherm);
 +     if (ret)
 +             return ret;
 +
 +     nouveau_therm_vbios_parse(ptherm, temp);
       nouveau_therm_probe_i2c(ndev);

 +     ptherm-base.destroy = nouveau_ptherm_destroy;
 +     switch (ndev-card_type) {
 +     case NV_40:
 +     case NV_50:
 +     case NV_C0:
 +     case NV_D0:
 +     case NV_E0:
 +             if (ndev-chipset  0x84) {
 +                     ptherm-temp_get = nv40_therm_temp_get;
 +                     break;
 +             } else
 +             if (ndev-chipset = 0xd9) {
 +                     ptherm-temp_get = nv84_therm_temp_get;
 +                     break;
 +     

Re: [Nouveau] [PATCH 14/14] drm/nouveau/therm: Rework nouveau_therm_create()

2012-05-21 Thread Emil Velikov
On Mon, 21 May 2012 07:36:13 +0100, Maarten Maathuis  
madman2...@gmail.com wrote:



Does chipset 0x50 really use the NV40 function?



Unfortunately it does.
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


Re: [Nouveau] [PATCH 14/14] drm/nouveau/therm: Rework nouveau_therm_create()

2012-05-21 Thread Emil Velikov

On Mon, 21 May 2012 07:30:32 +0100, Ben Skeggs skeg...@gmail.com wrote:


On Mon, May 21, 2012 at 12:15:03AM +0100, Emil Velikov wrote:

It contains a few changes mainly targeting the following
 * Therm table is present in BIT vbios
 * Parse the vbios table before hooking temp_get(), as it contains the  
therm

sensor calibration data
 * Add dummy_therm_temp_get() function to prevent multiple null dereff's


I didn't take this patch at all yet.  I'll let Martin put his input into
this instead.  I didn't really touch the thermal stuff aside from  
matching

APIs because he's got an overhaul pending anyway.

Comments on specific pieces inline as they may be useful.

Point taken, I believe the whole therm subdev will need some love after
the connection with the i2c devices have been finalised





Signed-off-by: Emil Velikov emil.l.veli...@gmail.com
---
 drivers/gpu/drm/nouveau/nouveau_pm.c|2 +-
 drivers/gpu/drm/nouveau/nouveau_therm.c |   63  
---

 2 files changed, 50 insertions(+), 15 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_pm.c  
b/drivers/gpu/drm/nouveau/nouveau_pm.c

index 9dd34fe..1b4422b 100644
--- a/drivers/gpu/drm/nouveau/nouveau_pm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_pm.c
@@ -693,7 +693,7 @@ nouveau_hwmon_init(struct nouveau_device *ndev)
}

/* if the card can read the fan rpm */
-   if (nouveau_gpio_func_valid(ndev, DCB_GPIO_FAN_SENSE)) {
+   if (pfan  pfan-sense(pfan) = 0) {
ret = sysfs_create_group(dev-pdev-dev.kobj,
 hwmon_fan_rpm_attrgroup);
if (ret)
diff --git a/drivers/gpu/drm/nouveau/nouveau_therm.c  
b/drivers/gpu/drm/nouveau/nouveau_therm.c

index acf81a9..91095be 100644
--- a/drivers/gpu/drm/nouveau/nouveau_therm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_therm.c
@@ -30,6 +30,12 @@
 #include nouveau_pm.h
 #include nouveau_therm.h

+static inline int
+dummy_therm_temp_get(struct nouveau_therm *ptherm)
+{
+   return 0;
+}
+

I don't really like this, if we can't expose any thermal data I think we
just shouldn't create a thermal subdev?
It boils to the point of - what is the reasonable approach to get out of  
the
situation - call nouveau_subdev_fini()? How about cards that may not have  
on

die sensor but have one via i2c ?

Regards
Emil Velikov
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


Re: [Nouveau] [PATCH 14/14] drm/nouveau/therm: Rework nouveau_therm_create()

2012-05-21 Thread Ben Skeggs
On Mon, May 21, 2012 at 07:13:54AM +0100, Emil Velikov wrote:
 On Mon, 21 May 2012 07:30:32 +0100, Ben Skeggs skeg...@gmail.com wrote:
 
 On Mon, May 21, 2012 at 12:15:03AM +0100, Emil Velikov wrote:
 It contains a few changes mainly targeting the following
  * Therm table is present in BIT vbios
  * Parse the vbios table before hooking temp_get(), as it
 contains the therm
 sensor calibration data
  * Add dummy_therm_temp_get() function to prevent multiple null dereff's
 
 I didn't take this patch at all yet.  I'll let Martin put his input into
 this instead.  I didn't really touch the thermal stuff aside from
 matching
 APIs because he's got an overhaul pending anyway.
 
 Comments on specific pieces inline as they may be useful.
 Point taken, I believe the whole therm subdev will need some love after
 the connection with the i2c devices have been finalised
 
 
 
 Signed-off-by: Emil Velikov emil.l.veli...@gmail.com
 ---
  drivers/gpu/drm/nouveau/nouveau_pm.c|2 +-
  drivers/gpu/drm/nouveau/nouveau_therm.c |   63
 ---
  2 files changed, 50 insertions(+), 15 deletions(-)
 
 diff --git a/drivers/gpu/drm/nouveau/nouveau_pm.c
 b/drivers/gpu/drm/nouveau/nouveau_pm.c
 index 9dd34fe..1b4422b 100644
 --- a/drivers/gpu/drm/nouveau/nouveau_pm.c
 +++ b/drivers/gpu/drm/nouveau/nouveau_pm.c
 @@ -693,7 +693,7 @@ nouveau_hwmon_init(struct nouveau_device *ndev)
 }
 
 /* if the card can read the fan rpm */
 -   if (nouveau_gpio_func_valid(ndev, DCB_GPIO_FAN_SENSE)) {
 +   if (pfan  pfan-sense(pfan) = 0) {
 ret = sysfs_create_group(dev-pdev-dev.kobj,
  hwmon_fan_rpm_attrgroup);
 if (ret)
 diff --git a/drivers/gpu/drm/nouveau/nouveau_therm.c
 b/drivers/gpu/drm/nouveau/nouveau_therm.c
 index acf81a9..91095be 100644
 --- a/drivers/gpu/drm/nouveau/nouveau_therm.c
 +++ b/drivers/gpu/drm/nouveau/nouveau_therm.c
 @@ -30,6 +30,12 @@
  #include nouveau_pm.h
  #include nouveau_therm.h
 
 +static inline int
 +dummy_therm_temp_get(struct nouveau_therm *ptherm)
 +{
 +   return 0;
 +}
 +
 I don't really like this, if we can't expose any thermal data I think we
 just shouldn't create a thermal subdev?
 It boils to the point of - what is the reasonable approach to get
 out of the
 situation - call nouveau_subdev_fini()? How about cards that may not
 have on
 die sensor but have one via i2c ?
My vision for this, not being overly experienced with the whole subsystem,
is that nouveau_thermal_create() will detect what sensors are needed,
instantiate the modules to control them and hook them up with the relevant
cooling devices etc.

If this isn't necessary for a given board, nouveau_subdev_create() should
never be called (or at least, destroyed again before returing from
nouveau_therm_create()), and return 0 (so init doesn't completely fail).

Ben.

 
 Regards
 Emil Velikov
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [PATCH] drm/nouveau/nvd9: Fix GPIO initialisation sequence.

2012-05-21 Thread Marcin Kościelnicki
Signed-off-by: Marcin Kościelnicki koria...@0x04.net
---
 drivers/gpu/drm/nouveau/nouveau_gpio.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_gpio.c 
b/drivers/gpu/drm/nouveau/nouveau_gpio.c
index f75ad66..a0911af 100644
--- a/drivers/gpu/drm/nouveau/nouveau_gpio.c
+++ b/drivers/gpu/drm/nouveau/nouveau_gpio.c
@@ -369,7 +369,7 @@ nouveau_gpio_reset(struct nouveau_device *ndev)
if (ndev-card_type = NV_D0) {
nv_mask(ndev, 0x00d610 + (line * 4), 0xff, unk0);
if (unk1--)
-   nv_mask(ndev, 0x00d640 + (unk1 * 4), 0xff, 
line);
+   nv_mask(ndev, 0x00d740 + (unk1 * 4), 0xff, 
line);
} else
if (ndev-card_type = NV_50) {
static const u32 regs[] = { 0xe100, 0xe28c };
-- 
1.7.10.2

___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 50175] New: [regression kernel 3.4] : nouveau detects internal laptop display as disconnected / screen is turned off

2012-05-21 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=50175

 Bug #: 50175
   Summary: [regression kernel 3.4] : nouveau detects internal
laptop display as disconnected / screen is turned
off
Classification: Unclassified
   Product: xorg
   Version: unspecified
  Platform: x86-64 (AMD64)
OS/Version: Linux (All)
Status: NEW
  Severity: major
  Priority: medium
 Component: Driver/nouveau
AssignedTo: nouveau@lists.freedesktop.org
ReportedBy: mus@gmail.com
 QAContact: xorg-t...@lists.x.org


Created attachment 61914
  -- https://bugs.freedesktop.org/attachment.cgi?id=61914
dmesg output

After upgrading from kernel 3.3.6 to 3.4.0 the internal display of my laptop
turns off as soon as the nouveau driver / KMS is loaded. xrandr detects the
LVDS-1 connection as disconnected while my external HDMI display works fine.
Downgrading back to 3.3.6 fixes the problem.

Note that this is NOT an Optimus laptop, the integrated Intel graphic chip is
disabled.

Sony Vaio S (VPCS11C5E)
NVIDIA GeForce 310M
Intel Core i5 M520
Arch Linux x64 (testing)

Although I assume this is irrelevant since this is obviously not an X problem:
xorg-server 1.12.1.902
xf86-video-nouveau 0.0.16_git20120512
libdrm 2.4.33
libdrm-nouveau 2.4.34
nouveau-dri 8.0.3

output of dmesg, lspci and xrandr are attached.

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


[Nouveau] [Bug 50175] [regression kernel 3.4] : nouveau detects internal laptop display as disconnected / screen is turned off

2012-05-21 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=50175

mus@gmail.com changed:

   What|Removed |Added

  Attachment #61914|application/octet-stream|text/plain
  mime type||

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


[Nouveau] [Bug 50175] [regression kernel 3.4] : nouveau detects internal laptop display as disconnected / screen is turned off

2012-05-21 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=50175

--- Comment #1 from mus@gmail.com 2012-05-21 07:21:51 PDT ---
Created attachment 61915
  -- https://bugs.freedesktop.org/attachment.cgi?id=61915
output of lspci -vv

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


[Nouveau] [Bug 50175] [regression kernel 3.4] : nouveau detects internal laptop display as disconnected / screen is turned off

2012-05-21 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=50175

--- Comment #2 from mus@gmail.com 2012-05-21 07:22:12 PDT ---
Created attachment 61916
  -- https://bugs.freedesktop.org/attachment.cgi?id=61916
xrandr output

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


[Nouveau] [Bug 49061] HDMI output clipped since commit of 'enable sending of avi/audio infoframes'

2012-05-21 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=49061

--- Comment #4 from Emil Velikov emil.l.veli...@gmail.com 2012-05-21 12:34:22 
PDT ---
Would you mind trying the patch in bug 47846 comment 10

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


[Nouveau] [Bug 45421] regression: nouveau.ko fails to load

2012-05-21 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=45421

Emil Velikov emil.l.veli...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

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


[Nouveau] [Bug 45421] regression: nouveau.ko fails to load

2012-05-21 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=45421

Jesse Brandeburg jesse.brandeb...@intel.com changed:

   What|Removed |Added

 Status|RESOLVED|CLOSED

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


Re: [Nouveau] [PATCH] drm/nouveau/nvd9: Fix GPIO initialisation sequence.

2012-05-21 Thread Ben Skeggs
On Mon, May 21, 2012 at 02:51:50PM +0200, Marcin Kościelnicki wrote:
 Signed-off-by: Marcin Kościelnicki koria...@0x04.net
Applied, thanks!

 ---
  drivers/gpu/drm/nouveau/nouveau_gpio.c |2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/gpu/drm/nouveau/nouveau_gpio.c 
 b/drivers/gpu/drm/nouveau/nouveau_gpio.c
 index f75ad66..a0911af 100644
 --- a/drivers/gpu/drm/nouveau/nouveau_gpio.c
 +++ b/drivers/gpu/drm/nouveau/nouveau_gpio.c
 @@ -369,7 +369,7 @@ nouveau_gpio_reset(struct nouveau_device *ndev)
   if (ndev-card_type = NV_D0) {
   nv_mask(ndev, 0x00d610 + (line * 4), 0xff, unk0);
   if (unk1--)
 - nv_mask(ndev, 0x00d640 + (unk1 * 4), 0xff, 
 line);
 + nv_mask(ndev, 0x00d740 + (unk1 * 4), 0xff, 
 line);
   } else
   if (ndev-card_type = NV_50) {
   static const u32 regs[] = { 0xe100, 0xe28c };
 -- 
 1.7.10.2
 
 ___
 Nouveau mailing list
 Nouveau@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/nouveau
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau