Re: [PATCHES] further radeon drm kms hw i2c fixes

2010-02-08 Thread Rafał Miłecki
2010/2/6 Alex Deucher alexdeuc...@gmail.com:
 These patches add further fixes to the hw i2c code.  Still left to do:
 - Find a way to not expose the internal bit algo bus used by radeon algo
 - Figure out why hw i2c isn't working for LVDS on mac laptops
 - Any other remaining bugs

 Alex

Ups, my PM bug. Thanks for fixing.

-- 
Rafał

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: Radeon hwmon driver

2010-02-08 Thread Domenico Andreoli
[i'm subscribed to this list, thanks]

On Mon, Feb 08, 2010 at 01:32:33AM -0500, Alex Deucher wrote:
 On Sun, Feb 7, 2010 at 6:12 PM, Domenico Andreoli ca...@dandreoli.com wrote:
 
  I'd like to write a hwmon driver for the Radeon GPUs. I made a quick
  search in the M56 and M76 register references on AMD's site but didn't
  find anything. I then wrote to gpudriverdevsupp...@amd.com and now I'm
  waiting for some response. In the meanwhile, has anybody of you seen
  anything related to this task while working at the graphic drivers?
 
 The thermal and fan chips are generally 3rd party chips connected via
 i2c.  I think most of the chips used have hwmon drivers already.  You
 can look up the chip and i2c address in the power tables in the bios.
 See the PowerPlayInfo table definitions in atombios.h.  I've started
 work on cleaning up the radeon i2c buses for external use in the
 drm-radeon-testing branch of Dave's drm tree:
 http://git.kernel.org/?p=linux/kernel/git/airlied/drm-2.6.git;a=summary

how this tree is managed? reset or rebased at every release?

-[ Domenico Andreoli, aka cavok
 --[ http://www.dandreoli.com/gpgkey.asc
   ---[ 3A0F 2F80 F79C 678A 8936  4FEE 0677 9033 A20E BC50

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: Radeon hwmon driver

2010-02-08 Thread Dave Airlie
On Mon, Feb 8, 2010 at 6:48 PM, Domenico Andreoli ca...@dandreoli.com wrote:
 [i'm subscribed to this list, thanks]

 On Mon, Feb 08, 2010 at 01:32:33AM -0500, Alex Deucher wrote:
 On Sun, Feb 7, 2010 at 6:12 PM, Domenico Andreoli ca...@dandreoli.com 
 wrote:
 
  I'd like to write a hwmon driver for the Radeon GPUs. I made a quick
  search in the M56 and M76 register references on AMD's site but didn't
  find anything. I then wrote to gpudriverdevsupp...@amd.com and now I'm
  waiting for some response. In the meanwhile, has anybody of you seen
  anything related to this task while working at the graphic drivers?

 The thermal and fan chips are generally 3rd party chips connected via
 i2c.  I think most of the chips used have hwmon drivers already.  You
 can look up the chip and i2c address in the power tables in the bios.
 See the PowerPlayInfo table definitions in atombios.h.  I've started
 work on cleaning up the radeon i2c buses for external use in the
 drm-radeon-testing branch of Dave's drm tree:
 http://git.kernel.org/?p=linux/kernel/git/airlied/drm-2.6.git;a=summary

 how this tree is managed? reset or rebased at every release?

That branch isn't managed that well, its pretty much rebased when
I want, its just all the patches that are in flux for 2.6.34. Though
nearly everything in there will end up in a form close to that in 2.6.34.

I may squash some commits together to make bisection useful.

Dave.

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: [PATCH] i915 / PM: Fix crash while aborting hibernation (Re: [linux-pm] [regression] drm/i915: implement new pm ops disables irq on aborted s2disk)

2010-02-08 Thread Rafael J. Wysocki
On Monday 08 February 2010, Alan Jenkins wrote:
 Rafael J. Wysocki wrote:
  On Thursday 04 February 2010, Zhenyu Wang wrote:

  On 2010.02.03 23:44:41 +0100, Rafael J. Wysocki wrote:
  
  On Wednesday 03 February 2010, Alan Jenkins wrote:

  Hi
 
  I found this regression on my EeePC 701 with modesetting enabled.  When 
  I hibernate using s2disk, I can abort the hibernation by pressing the 
  backspace key.  Doing so breaks X on 2.6.32-rc6 (but not 2.6.32).
  
  Yeah.
 
  To be honest, I knew that's going to happen, but didn't have the time to 
  take
  care of it.
 
  The problem is that i915 does literally _nothing_ in its .thaw() callback,
  although it should at least reverse whatever .freeze() did to the hardware
  (and memory allocations and so on), so that the adapter is functional
  after creating the image.
 
  Fixing this requires some thought, though, because at the moment .freeze()
  thinks it's .suspend(), which is not the case as this report clearly 
  shows.
  So, in fact i915_pci_suspend() has to be split into the .freeze() part and
  the poweroff part cleanly and that's not  so simple (at least to me).
 

  Right, I think that'll be more clean, stuff in i915_save/restore_state() 
  need
  to be splited too, especially isolate stuff for mode setting and other 
  device
  state, as what my original purpose for this is to remove extra mode 
  setting 
  cycle in old behavior so not waste time for hibernate.
  
 
  We can't really do that, because we'll need to restore the saved state at 
  the
  resume-from-hibernation stage.
 
  The appended patch fixes the issue for me, although it's been only tested
  a little.  It sort of defeats the purpose of commit
  cbda12d77ea590082edb6d30bd342a67ebc459e0, but I don't see any less invasive
  way to fix this except maybe for reverting that commit entirely.
 
  Note that the drm_irq_[un]install() thing may be unnecessary, but I wasn't 
  sure
  about that and surely wouldn't suggest doing that for 2.6.33.  Also it 
  looks like
  some things from the freeze and thaw parts may be moved to the low-level
  suspend and resume parts, respectively, but that would require some
  i915_gem_* surgery I was too scared to do.
 
  Alan, please test, i915 guys, please review.
 
  Rafael

 
 The patch works very nicely on my eeepc.

Great, thanks for testing.

 Thanks
 (and thanks again for all your hard work this cycle, and specifically 
 for pointing me to the s2disk hang-fix)

You're welcome. :-)

Rafael

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 26087] Stalls with RV635 with KMS

2010-02-08 Thread bugzilla-daemon
http://bugs.freedesktop.org/show_bug.cgi?id=26087





--- Comment #11 from Pauli suok...@gmail.com  2010-02-08 03:33:13 PST ---
Ok. I found out what is shown there now.

Documentation/lockstat.txt for explanation of all the fields.

Time values are in micro seconds. Read from shed_clock that returns
nanoseconds and in output divided by 1k.

So any value that is more than few thousands in hold time is causing
some user visible stalling if contented.

 --- Comment #10 from Jerome Glisse gli...@freedesktop.org  2010-02-08 
 02:52:28 PST ---
 Some lock statistics
 http://people.freedesktop.org/~suokko/stalls_locl_stats




-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 26470] New: Spare space when using two screens filled with white on r700

2010-02-08 Thread bugzilla-daemon
http://bugs.freedesktop.org/show_bug.cgi?id=26470

   Summary: Spare space when using two screens filled with white on
r700
   Product: DRI
   Version: XOrg CVS
  Platform: Other
OS/Version: All
Status: NEW
  Severity: normal
  Priority: medium
 Component: DRM/Radeon
AssignedTo: dri-devel@lists.sourceforge.net
ReportedBy: a...@sannes.org


I have two screens one 4:3 and one 16:9, since Linux 2.6.33rc1 the spare
space (bottom of one screen, on the right on the other) between two have been
filled with white in the console. (Other than that everything seems to work
great). Maybe change the color to black?

My card: ATI Technologies Inc RV770 [Radeon HD 4870]

It was filled with black on Linux 2.6.32.x .. :)

Not sure if this is the place to report a KMS/kernel related problem, if this
is the wrong forum please push me in the right direction..


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

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 15166] Changing brightness of backlight freezes kernel with radeon kms enabled.

2010-02-08 Thread bugzilla-daemon
http://bugzilla.kernel.org/show_bug.cgi?id=15166





--- Comment #17 from Manuel Ullmann ullman.b...@gmx.de  2010-02-08 13:32:53 
---
Sorry, that this took so long. I was offline for 2 days.

I guess you mean the Ctrl+Alt+Fn key-combo, because laptops have usually also a
key with the keycode 'SWITCHVIDEOMODE' on a Fn+Fx key-combo.

Well, display switching works fine. Switching from console to X takes ca. 2
seconds. The switchvideomode-key (for me Fn+F4) switches backwards through
consoles from F12 to F1, while there is actually a 13th X interface (this would
be F13) before switching to F12 (/var/log/messages). But maybe it is reserved
for something else. Using Fn+F4 writes also 'p' out to console and X.

Since a comparison with the kernel behaviour of a desktop pc, I know now what
the kernel is trying to do after this time amount of 5 min. in console. It
tries to blank the screen. But with kms enabled, the monitor is instead
switched off and the system freezes. So it´s not necessary to close the lid.
You just have to wait 5 minutes doing nothing. But the LED of the
sound-mute-button is still working then. (in contrast to a system freeze with
lid closed)

-- 
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are watching the assignee of the bug.
--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: [PATCHES] further radeon drm kms hw i2c fixes

2010-02-08 Thread Alex Deucher
2010/2/8 Rafał Miłecki zaj...@gmail.com:
 2010/2/6 Alex Deucher alexdeuc...@gmail.com:
 These patches add further fixes to the hw i2c code.  Still left to do:
 - Find a way to not expose the internal bit algo bus used by radeon algo
 - Figure out why hw i2c isn't working for LVDS on mac laptops
 - Any other remaining bugs

 Alex

 Ups, my PM bug. Thanks for fixing.

What was your PM bug?

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 26470] Spare space when using two screens filled with white on r700

2010-02-08 Thread bugzilla-daemon
http://bugs.freedesktop.org/show_bug.cgi?id=26470


Alex Deucher ag...@yahoo.com changed:

   What|Removed |Added

   Severity|normal  |enhancement




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

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 26471] New: Missing background graphics/texture in frogatto with R600 (RV670)

2010-02-08 Thread bugzilla-daemon
http://bugs.freedesktop.org/show_bug.cgi?id=26471

   Summary: Missing background graphics/texture in frogatto with
R600 (RV670)
   Product: Mesa
   Version: git
  Platform: x86-64 (AMD64)
OS/Version: Linux (All)
Status: NEW
  Severity: normal
  Priority: medium
 Component: Drivers/DRI/R600
AssignedTo: dri-devel@lists.sourceforge.net
ReportedBy: crazy-ivano...@gmx.net


Created an attachment (id=33154)
 -- (http://bugs.freedesktop.org/attachment.cgi?id=33154)
scene1, hardware accelerated, broken background

I have a problem with the background texture as used in frogatto (a
sidescrolling jumprun). The problem can be seen in the attached screenshots
frogatto_texture-prob1.jpg and frogatto_texture-prob2.jpg. The expected result
can be observed in frogatto_software-mode_scene1.jpg and
frogatto_software-mode_scene2.jpg (created using the software renderer via
LIBGL_ALWAYS_SOFTWARE=1). My graphics card is a generic HD3850 (RV670) with
512MB ram.

To reproduce this issues you will first have to get frogatto and build it
yourself, to do so do the following steps:
0) get the build dependencies, I am not sure about those. From the flags used
in the command I'd assume these: 
- libsdl
- sdl-image
- sdl-ttf
- sdl-mixer (probably with vorbis support)
- boost-{regex, system, thread, iostreams}
- x11
- mesa (GL and GLU required)
- glew
1) get the svn checkout eg using svn checkout
http://frogatto.googlecode.com/svn/trunk/ frogatto-read-only
2) cd frogatto-read-only
3) edit Makefile and remove every occurence of -lprofiler (seems to break
building due to whatever reason, not fixed yet for upstream, but this way it is
possible to compile+run it)
4) compile using make
5) run the resulting binary by typing ./game (controls are the arrow keys
plus 'a' and 's', exit the game by pushing 'esc')

After step 5) you should see the missing background texture when using the git
version of mesa (currently as of today 7.8-devel). There is no problem when
using the software renderer and there is also no problem on a system with an
Intel i945 based chip and mesa 7.7 or mesa 7.6. I don't know if it ever worked
for r6xx hardware with mesa.
Someone yesterday mentioned in #radeon that s3tc is broken on r600. I don't
know if s3tc is used, but I don't think so. Is there some easy way to check
this in the sources?

Here is the software stack used:
Gentoo unstable (arch: amd64)
mesa, xf86-video-radeon and libdrm from git-master
KMS active
kernel 2.6.33-rc7


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

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 26471] Missing background graphics/texture in frogatto with R600 (RV670)

2010-02-08 Thread bugzilla-daemon
http://bugs.freedesktop.org/show_bug.cgi?id=26471





--- Comment #1 from Nils Kneuper crazy-ivano...@gmx.net  2010-02-08 08:12:09 
PST ---
Created an attachment (id=33155)
 -- (http://bugs.freedesktop.org/attachment.cgi?id=33155)
 scene2, hardware accelerated, broken background


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

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 26471] Missing background graphics/texture in frogatto with R600 (RV670)

2010-02-08 Thread bugzilla-daemon
http://bugs.freedesktop.org/show_bug.cgi?id=26471





--- Comment #2 from Nils Kneuper crazy-ivano...@gmx.net  2010-02-08 08:12:57 
PST ---
Created an attachment (id=33156)
 -- (http://bugs.freedesktop.org/attachment.cgi?id=33156)
scene1, software mode, expected result


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

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 26471] Missing background graphics/texture in frogatto with R600 (RV670)

2010-02-08 Thread bugzilla-daemon
http://bugs.freedesktop.org/show_bug.cgi?id=26471





--- Comment #3 from Nils Kneuper crazy-ivano...@gmx.net  2010-02-08 08:13:20 
PST ---
Created an attachment (id=33157)
 -- (http://bugs.freedesktop.org/attachment.cgi?id=33157)
scene2, software mode, expected result


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

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 26471] Missing background graphics/texture in frogatto with R600 (RV670)

2010-02-08 Thread bugzilla-daemon
http://bugs.freedesktop.org/show_bug.cgi?id=26471





--- Comment #4 from Nils Kneuper crazy-ivano...@gmx.net  2010-02-08 08:21:12 
PST ---
Created an attachment (id=33158)
 -- (http://bugs.freedesktop.org/attachment.cgi?id=33158)
Xorg.0.log


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

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 26471] Missing background graphics/texture in frogatto with R600 (RV670)

2010-02-08 Thread bugzilla-daemon
http://bugs.freedesktop.org/show_bug.cgi?id=26471





--- Comment #6 from Nils Kneuper crazy-ivano...@gmx.net  2010-02-08 08:21:42 
PST ---
Created an attachment (id=33160)
 -- (http://bugs.freedesktop.org/attachment.cgi?id=33160)
dmesg


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

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[PATCH] drm/radeon/kms: more hw i2c fixes

2010-02-08 Thread Alex Deucher
From c33d72912856c0c8fc7586170d10a906d7f854be Mon Sep 17 00:00:00 2001
From: Alex Deucher alexdeuc...@gmail.com
Date: Mon, 8 Feb 2010 14:40:24 -0500
Subject: [PATCH] drm/radeon/kms: more hw i2c fixes

- rs300 doesn't have a pin select bit
- r200 has a different pin select setup

Signed-off-by: Alex Deucher alexdeuc...@gmail.com
---
 drivers/gpu/drm/radeon/radeon_combios.c |   12 +++-
 drivers/gpu/drm/radeon/radeon_i2c.c |   16 +++-
 2 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_combios.c
b/drivers/gpu/drm/radeon/radeon_combios.c
index 1d398af..31e4a61 100644
--- a/drivers/gpu/drm/radeon/radeon_combios.c
+++ b/drivers/gpu/drm/radeon/radeon_combios.c
@@ -513,6 +513,7 @@ static struct radeon_i2c_bus_rec
combios_setup_i2c_bus(struct radeon_device *rde
case CHIP_RS100:
case CHIP_RV200:
case CHIP_RS200:
+   case CHIP_RS300:
switch (ddc_line) {
case RADEON_GPIO_DVI_DDC:
/* in theory this should be hw capable,
@@ -526,8 +527,17 @@ static struct radeon_i2c_bus_rec
combios_setup_i2c_bus(struct radeon_device *rde
}
break;
case CHIP_R200:
+   switch (ddc_line) {
+   case RADEON_GPIO_DVI_DDC:
+   case RADEON_GPIO_MONID:
+   i2c.hw_capable = true;
+   break;
+   default:
+   i2c.hw_capable = false;
+   break;
+   }
+   break;
case CHIP_RV250:
-   case CHIP_RS300:
case CHIP_RV280:
switch (ddc_line) {
case RADEON_GPIO_VGA_DDC:
diff --git a/drivers/gpu/drm/radeon/radeon_i2c.c
b/drivers/gpu/drm/radeon/radeon_i2c.c
index b715632..272c45d 100644
--- a/drivers/gpu/drm/radeon/radeon_i2c.c
+++ b/drivers/gpu/drm/radeon/radeon_i2c.c
@@ -228,6 +228,7 @@ static int r100_hw_i2c_xfer(struct i2c_adapter *i2c_adap,
case CHIP_RS100:
case CHIP_RV200:
case CHIP_RS200:
+   case CHIP_RS300:
switch (rec-mask_clk_reg) {
case RADEON_GPIO_DVI_DDC:
/* no gpio select bit */
@@ -239,8 +240,21 @@ static int r100_hw_i2c_xfer(struct i2c_adapter *i2c_adap,
}
break;
case CHIP_R200:
+   /* only bit 4 on r200 */
+   switch (rec-mask_clk_reg) {
+   case RADEON_GPIO_DVI_DDC:
+   reg |= R200_DVI_I2C_PIN_SEL(R200_SEL_DDC1);
+   break;
+   case RADEON_GPIO_MONID:
+   reg |= R200_DVI_I2C_PIN_SEL(R200_SEL_DDC3);
+   break;
+   default:
+   DRM_ERROR(gpio not supported with hw i2c\n);
+   ret = -EINVAL;
+   goto done;
+   }
+   break;
case CHIP_RV250:
-   case CHIP_RS300:
case CHIP_RV280:
/* bits 3 and 4 */
switch (rec-mask_clk_reg) {
-- 
1.5.6.3


0001-drm-radeon-kms-more-hw-i2c-fixes.patch
Description: application/mbox
--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[PATCH] drm/radeon/kms: fix prescale calculations

2010-02-08 Thread Alex Deucher
I'd appreciate it if people with r2xx and r3xx chips could test this out.

Alex

From f0104e743ccb29bc81cc1411d52f262040b75eff Mon Sep 17 00:00:00 2001
From: Alex Deucher alexdeuc...@gmail.com
Date: Mon, 8 Feb 2010 14:34:43 -0500
Subject: [PATCH] drm/radeon/kms: fix prescale calculations

Pre-pcie chips seem to use the reference clock
rather than the sclk.

Signed-off-by: Alex Deucher alexdeuc...@gmail.com
---
 drivers/gpu/drm/radeon/radeon_i2c.c |   95 +++
 1 files changed, 85 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_i2c.c
b/drivers/gpu/drm/radeon/radeon_i2c.c
index 272c45d..d15fa5e 100644
--- a/drivers/gpu/drm/radeon/radeon_i2c.c
+++ b/drivers/gpu/drm/radeon/radeon_i2c.c
@@ -181,6 +181,87 @@ static void set_data(void *i2c_priv, int data)
WREG32(rec-en_data_reg, val);
 }

+static u32 radeon_get_i2c_prescale(struct radeon_device *rdev)
+{
+   struct radeon_pll *spll = rdev-clock.spll;
+   u32 sclk = radeon_get_engine_clock(rdev);
+   u32 prescale = 0;
+   u32 n, m;
+   u8 loop;
+   int i2c_clock;
+
+   switch (rdev-family) {
+   case CHIP_R100:
+   case CHIP_RV100:
+   case CHIP_RS100:
+   case CHIP_RV200:
+   case CHIP_RS200:
+   case CHIP_R200:
+   case CHIP_RV250:
+   case CHIP_RS300:
+   case CHIP_RV280:
+   case CHIP_R300:
+   case CHIP_R350:
+   case CHIP_RV350:
+   n = (spll-reference_freq) / (4 * 6);
+   for (loop = 1; loop  255; loop++) {
+   if ((loop * (loop - 1))  n)
+   break;
+   }
+   m = loop - 1;
+   prescale = m | (loop  8);
+   break;
+   case CHIP_RV380:
+   case CHIP_RS400:
+   case CHIP_RS480:
+   case CHIP_R420:
+   case CHIP_R423:
+   case CHIP_RV410:
+   sclk = radeon_get_engine_clock(rdev);
+   prescale = (((sclk * 10)/(4 * 128 * 100) + 1)  8) + 128;
+   break;
+   case CHIP_RS600:
+   case CHIP_RS690:
+   case CHIP_RS740:
+   /* todo */
+   break;
+   case CHIP_RV515:
+   case CHIP_R520:
+   case CHIP_RV530:
+   case CHIP_RV560:
+   case CHIP_RV570:
+   case CHIP_R580:
+   i2c_clock = 50;
+   sclk = radeon_get_engine_clock(rdev);
+   if (rdev-family == CHIP_R520)
+   prescale = (127  8) + ((sclk * 10) / (4 * 127 * 
i2c_clock));
+   else
+   prescale = (((sclk * 10)/(4 * 128 * 100) + 1)  8) + 
128;
+   break;
+   case CHIP_R600:
+   case CHIP_RV610:
+   case CHIP_RV630:
+   case CHIP_RV670:
+   /* todo */
+   break;
+   case CHIP_RV620:
+   case CHIP_RV635:
+   case CHIP_RS780:
+   case CHIP_RS880:
+   case CHIP_RV770:
+   case CHIP_RV730:
+   case CHIP_RV710:
+   case CHIP_RV740:
+   /* todo */
+   break;
+   default:
+   DRM_ERROR(i2c: unhandled radeon chip\n);
+   break;
+   }
+   return prescale;
+}
+
+
 /* hw i2c engine for r1xx-4xx hardware
  * hw can buffer up to 15 bytes
  */
@@ -192,7 +273,7 @@ static int r100_hw_i2c_xfer(struct i2c_adapter *i2c_adap,
struct radeon_i2c_bus_rec *rec = i2c-rec;
struct i2c_msg *p;
int i, j, k, ret = num;
-   u32 sclk, prescale;
+   u32 prescale;
u32 i2c_cntl_0, i2c_cntl_1, i2c_data;
u32 tmp, reg;

@@ -200,8 +281,7 @@ static int r100_hw_i2c_xfer(struct i2c_adapter *i2c_adap,
/* take the pm lock since we need a constant sclk */
mutex_lock(rdev-pm.mutex);

-   sclk = radeon_get_engine_clock(rdev);
-   prescale = (((sclk * 10)/(4 * 128 * 100) + 1)  8) + 128;
+   prescale = radeon_get_i2c_prescale(rdev);

reg = ((prescale  RADEON_I2C_PRESCALE_SHIFT) |
   RADEON_I2C_START |
@@ -444,9 +524,8 @@ static int r500_hw_i2c_xfer(struct i2c_adapter *i2c_adap,
struct radeon_device *rdev = i2c-dev-dev_private;
struct radeon_i2c_bus_rec *rec = i2c-rec;
struct i2c_msg *p;
-   int i2c_clock = 50;
int i, j, remaining, current_count, buffer_offset, ret = num;
-   u32 sclk, prescale;
+   u32 prescale;
u32 tmp, reg;
u32 saved1, saved2;

@@ -454,11 +533,7 @@ static int r500_hw_i2c_xfer(struct i2c_adapter *i2c_adap,
/* take the pm lock since we need a constant sclk */
mutex_lock(rdev-pm.mutex);

-   sclk = radeon_get_engine_clock(rdev);
-   if (rdev-family == CHIP_R520)
-   prescale = (127  8) + ((sclk * 10) / (4 * 127 * i2c_clock));
-   else
-   prescale = (((sclk * 10)/(4 * 128 * 100) + 1)  8) + 128;
+   prescale = radeon_get_i2c_prescale(rdev);

/* clear gpio mask bits */
tmp = RREG32(rec-mask_clk_reg);
-- 
1.5.6.3



Re: [PATCHES] further radeon drm kms hw i2c fixes

2010-02-08 Thread Rafał Miłecki
W dniu 8 lutego 2010 15:38 użytkownik Alex Deucher
alexdeuc...@gmail.com napisał:
 2010/2/8 Rafał Miłecki zaj...@gmail.com:
 2010/2/6 Alex Deucher alexdeuc...@gmail.com:
 These patches add further fixes to the hw i2c code.  Still left to do:
 - Find a way to not expose the internal bit algo bus used by radeon algo
 - Figure out why hw i2c isn't working for LVDS on mac laptops
 - Any other remaining bugs

 Alex

 Ups, my PM bug. Thanks for fixing.

 What was your PM bug?

I thought that I introduced I2C bug with my power management code.
When I saw you commit I thought about some old I2C fix in radeonhd:
http://cgit.freedesktop.org/xorg/driver/xf86-video-radeonhd/commit/?id=42a81085042606cd812732a13b66527d37fc625c

I thought it's the same bug Matthias was hitting with radeonhd with PM.

Btw. do we need anything like radeonhd got in
ace8f44f6cbd7fd393b5a8a30468471ccee3726c commit?

-- 
Rafał

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: 3D OpenGL applications eat CPU ressources

2010-02-08 Thread Émeric Maschino
2010/2/8 Alex Deucher alexdeuc...@gmail.com:
 Does AGP work at all on ia64?  I know on some alphas there were cache
 coherency issues or something like that that more or less prevented
 AGP from be usable at all.  It was mostly there to accommodate AGP
 form factor cards.

I would say that AGP works on ia64, or at least it used to ;-)

Indeed, ATI proprietary fglrx driver was running nicely, but was
limited to XFree86 4.1.x (there was a check of the XFree86 version at
runtime). This was during the kernel 2.4 era.

And NVIDIA proprietary driver was running fine during the kernel
2.4/early 2.6 era (I remember having used it with kernel 2.6.10).

At that time, the zx1 driver was already there. And except from
API/ABI adjustments, I don't think it has been massively rewritten
since then. That's why I tend to think that the GPU lockup probably
resides somewhere else.

Looking again at the lspci -vv output, I can read GART64- and
64bit- in this line:

Capabilities: [58] AGP version 2.0
   Status: RQ=80 Iso- ArqSz=0 Cal=0 SBA+ ITACoh- GART64-
HTrans- 64bit-
FW+ AGP3- Rate=x1,x2,x4

Are these capabilities related to 64-bit architectures or not at all?
If related, should we read GART64+ and 64bit+ on ia64 systems?

Émeric

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: [PATCHES] further radeon drm kms hw i2c fixes

2010-02-08 Thread Alex Deucher
2010/2/8 Rafał Miłecki zaj...@gmail.com:
 W dniu 8 lutego 2010 15:38 użytkownik Alex Deucher
 alexdeuc...@gmail.com napisał:
 2010/2/8 Rafał Miłecki zaj...@gmail.com:
 2010/2/6 Alex Deucher alexdeuc...@gmail.com:
 These patches add further fixes to the hw i2c code.  Still left to do:
 - Find a way to not expose the internal bit algo bus used by radeon algo
 - Figure out why hw i2c isn't working for LVDS on mac laptops
 - Any other remaining bugs

 Alex

 Ups, my PM bug. Thanks for fixing.

 What was your PM bug?

 I thought that I introduced I2C bug with my power management code.
 When I saw you commit I thought about some old I2C fix in radeonhd:
 http://cgit.freedesktop.org/xorg/driver/xf86-video-radeonhd/commit/?id=42a81085042606cd812732a13b66527d37fc625c

 I thought it's the same bug Matthias was hitting with radeonhd with PM.

 Btw. do we need anything like radeonhd got in
 ace8f44f6cbd7fd393b5a8a30468471ccee3726c commit?


Yes.

 --
 Rafał


--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 15166] Changing brightness of backlight freezes kernel with radeon kms enabled.

2010-02-08 Thread bugzilla-daemon
http://bugzilla.kernel.org/show_bug.cgi?id=15166





--- Comment #18 from Manuel Ullmann ullman.b...@gmx.de  2010-02-08 21:36:46 
---
Created an attachment (id=24955)
 -- (http://bugzilla.kernel.org/attachment.cgi?id=24955)
relevant lines of dmesg, when the kernel boots up without firmware

I found accidentally the piece of code, which causes the system freeze. I was
searching for a reason for the 20% CPU-load of X and thought this could be
radeon-ucode (I didn´t know at this point, that this is built into all
kernel-releases except for release candidates; well, i guess now that the
experimental drivers alone are the reason). So I removed radeon-ucode from
kernel configuration and rebooted. I was wondering, why the kernel took about 2
minutes to boot, but when it started, brightness control and blanking the
screen worked.

A look into dmesg (see attachement) showed me unfortunately, that the kernel
was missing firmware for radeon and had for this reason deactivated GPU
acceleration. To be specific, the firmware is:

R600_rlc.bin for me in /lib/firmware/radeon/

The kernel waits ca. 1 min. before continuing the boot sequence without it.
2.6.33-rc5 hangs without it, so it works only with 2.6.33-rc6 and rc7.
So I think, until the firmware is not updated, kms won´t be usable for me.

Any other suggestions? Do you need some more debug outputs?

-- 
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are watching the assignee of the bug.
--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 15166] Changing brightness of backlight freezes kernel with radeon kms enabled.

2010-02-08 Thread bugzilla-daemon
http://bugzilla.kernel.org/show_bug.cgi?id=15166


Manuel Ullmann ullman.b...@gmx.de changed:

   What|Removed |Added

  Attachment #24771|0   |1
is obsolete||
  Attachment #24810|0   |1
is obsolete||




--- Comment #19 from Manuel Ullmann ullman.b...@gmx.de  2010-02-08 21:40:41 
---
Created an attachment (id=24956)
 -- (http://bugzilla.kernel.org/attachment.cgi?id=24956)
kernel configration file .config of 2.6.33-rc7

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

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 15166] Changing brightness of backlight freezes kernel with radeon kms enabled.

2010-02-08 Thread bugzilla-daemon
http://bugzilla.kernel.org/show_bug.cgi?id=15166


Manuel Ullmann ullman.b...@gmx.de changed:

   What|Removed |Added

 Kernel Version|2.6.33-rc6, 2.6.32.7|2.6.33-rc7, 2.6.32.7




--- Comment #20 from Manuel Ullmann ullman.b...@gmx.de  2010-02-08 21:42:10 
---
As this bug affects also 2.6.33-rc7 (also it´s the firmware), I mark it as
affected.

-- 
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are watching the assignee of the bug.
--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 15166] Changing brightness of backlight freezes kernel with radeon kms enabled.

2010-02-08 Thread bugzilla-daemon
http://bugzilla.kernel.org/show_bug.cgi?id=15166





--- Comment #21 from Manuel Ullmann ullman.b...@gmx.de  2010-02-08 21:44:29 
---
Created an attachment (id=24957)
 -- (http://bugzilla.kernel.org/attachment.cgi?id=24957)
kernel configuration file of 2.6.32.7

@Comment 20: I meant although

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

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 26087] Stalls with RV635 with KMS

2010-02-08 Thread bugzilla-daemon
http://bugs.freedesktop.org/show_bug.cgi?id=26087





--- Comment #12 from Shawn Starr shawn.st...@rogers.com  2010-02-08 14:53:06 
PST ---
Created an attachment (id=33182)
 -- (http://bugs.freedesktop.org/attachment.cgi?id=33182)
Lock stats over 10 minutes running game


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

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[PATCH 2/2] drm/radeon/kms: add quirk for VGA without DDC on rv730 XFX card.

2010-02-08 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com

Reported on irc by nirbheek.

Signed-off-by: Dave Airlie airl...@redhat.com
---
 drivers/gpu/drm/radeon/radeon_atombios.c |9 +
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c 
b/drivers/gpu/drm/radeon/radeon_atombios.c
index fa82ca7..2dcda61 100644
--- a/drivers/gpu/drm/radeon/radeon_atombios.c
+++ b/drivers/gpu/drm/radeon/radeon_atombios.c
@@ -287,6 +287,15 @@ static bool radeon_atom_apply_quirks(struct drm_device 
*dev,
*connector_type = DRM_MODE_CONNECTOR_DVID;
}
 
+   /* XFX Pine Group device rv730 reports no VGA DDC lines
+* even though they are wired up to record 0x93
+*/
+   if ((dev-pdev-device == 0x9498) 
+   (dev-pdev-subsystem_vendor == 0x1682) 
+   (dev-pdev-subsystem_device == 0x2452)) {
+   struct radeon_device *rdev = dev-dev_private;
+   *i2c_bus = radeon_lookup_i2c_gpio(rdev, 0x93);
+   }
return true;
 }
 
-- 
1.6.5.2


--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[PATCH 1/2] drm/radeon/kms: don't crash if no DDC bus on VGA/DVI connector.

2010-02-08 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com

This is strange - like really really strange, twilight zone of strange.
VGA ports have DDC buses, but sometimes for some reasons the BIOS
says we don't and we oops - AMD mentioned bios bugs so we'll have
to add quirks.

reported on irc by nirbheek and
https://bugzilla.redhat.com/show_bug.cgi?id=554323

Signed-off-by: Dave Airlie airl...@redhat.com
---
 drivers/gpu/drm/radeon/radeon_connectors.c |   20 
 drivers/gpu/drm/radeon/radeon_display.c|   11 ++-
 2 files changed, 22 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c 
b/drivers/gpu/drm/radeon/radeon_connectors.c
index 2d8e5a7..2381885 100644
--- a/drivers/gpu/drm/radeon/radeon_connectors.c
+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
@@ -580,16 +580,18 @@ static enum drm_connector_status radeon_vga_detect(struct 
drm_connector *connect
struct radeon_connector *radeon_connector = 
to_radeon_connector(connector);
struct drm_encoder *encoder;
struct drm_encoder_helper_funcs *encoder_funcs;
-   bool dret;
+   bool dret = false;
enum drm_connector_status ret = connector_status_disconnected;
 
encoder = radeon_best_single_encoder(connector);
if (!encoder)
ret = connector_status_disconnected;
 
-   radeon_i2c_do_lock(radeon_connector-ddc_bus, 1);
-   dret = radeon_ddc_probe(radeon_connector);
-   radeon_i2c_do_lock(radeon_connector-ddc_bus, 0);
+   if (radeon_connector-ddc_bus) {
+   radeon_i2c_do_lock(radeon_connector-ddc_bus, 1);
+   dret = radeon_ddc_probe(radeon_connector);
+   radeon_i2c_do_lock(radeon_connector-ddc_bus, 0);
+   }
if (dret) {
if (radeon_connector-edid) {
kfree(radeon_connector-edid);
@@ -740,11 +742,13 @@ static enum drm_connector_status radeon_dvi_detect(struct 
drm_connector *connect
struct drm_mode_object *obj;
int i;
enum drm_connector_status ret = connector_status_disconnected;
-   bool dret;
+   bool dret = false;
 
-   radeon_i2c_do_lock(radeon_connector-ddc_bus, 1);
-   dret = radeon_ddc_probe(radeon_connector);
-   radeon_i2c_do_lock(radeon_connector-ddc_bus, 0);
+   if (radeon_connector-ddc_bus) {
+   radeon_i2c_do_lock(radeon_connector-ddc_bus, 1);
+   dret = radeon_ddc_probe(radeon_connector);
+   radeon_i2c_do_lock(radeon_connector-ddc_bus, 0);
+   }
if (dret) {
if (radeon_connector-edid) {
kfree(radeon_connector-edid);
diff --git a/drivers/gpu/drm/radeon/radeon_display.c 
b/drivers/gpu/drm/radeon/radeon_display.c
index 6a92f99..7e17a36 100644
--- a/drivers/gpu/drm/radeon/radeon_display.c
+++ b/drivers/gpu/drm/radeon/radeon_display.c
@@ -278,7 +278,7 @@ static void radeon_print_display_setup(struct drm_device 
*dev)
DRM_INFO(  %s\n, connector_names[connector-connector_type]);
if (radeon_connector-hpd.hpd != RADEON_HPD_NONE)
DRM_INFO(  %s\n, 
hpd_names[radeon_connector-hpd.hpd]);
-   if (radeon_connector-ddc_bus)
+   if (radeon_connector-ddc_bus) {
DRM_INFO(  DDC: 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 
0x%x\n,
 radeon_connector-ddc_bus-rec.mask_clk_reg,
 radeon_connector-ddc_bus-rec.mask_data_reg,
@@ -288,6 +288,15 @@ static void radeon_print_display_setup(struct drm_device 
*dev)
 radeon_connector-ddc_bus-rec.en_data_reg,
 radeon_connector-ddc_bus-rec.y_clk_reg,
 radeon_connector-ddc_bus-rec.y_data_reg);
+   } else {
+   if (connector-connector_type == DRM_MODE_CONNECTOR_VGA 
||
+   connector-connector_type == 
DRM_MODE_CONNECTOR_DVII ||
+   connector-connector_type == 
DRM_MODE_CONNECTOR_DVID ||
+   connector-connector_type == 
DRM_MODE_CONNECTOR_DVIA ||
+   connector-connector_type == 
DRM_MODE_CONNECTOR_HDMIA ||
+   connector-connector_type == 
DRM_MODE_CONNECTOR_HDMIB)
+   DRM_INFO(  DDC: no ddc bus - possible BIOS bug 
- please report to xorg-driver-...@lists.x.org\n);
+   }
DRM_INFO(  Encoders:\n);
list_for_each_entry(encoder, dev-mode_config.encoder_list, 
head) {
radeon_encoder = to_radeon_encoder(encoder);
-- 
1.6.5.2


--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without 

[Bug 26471] Missing background graphics/texture in frogatto with R600 (RV670)

2010-02-08 Thread bugzilla-daemon
http://bugs.freedesktop.org/show_bug.cgi?id=26471





--- Comment #7 from Nils Kneuper crazy-ivano...@gmx.net  2010-02-08 16:20:47 
PST ---
shadowmaster (another Wesnoth dev) just told me that he has the same problems
with frogatto. Here some info about his system:
01:05.0 VGA compatible controller: ATI Technologies Inc RS780M/RS780MN [Radeon
HD 3200 Graphics]
Linux 2.6.32.5 on Debian Squeeze
running Mesa 7.7 (release)
lastest-ish drm from the git repository
latest-ish ddx from the radeon repository
no KMS

So it looks like it does not depend on KMS and that the issue is no regression
(since it does already exist in 7.7).


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

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[PATCH] drm/radeon/kms: fix screen clearing before fbcon.

2010-02-08 Thread Dave Airlie
From: Dave Airlie airl...@redhat.com

This memset_io was added to debug something way back and got
left behind, memset the fb to black so the borders don't be all white.

Signed-off-by: Dave Airlie airl...@redhat.com
---
 drivers/gpu/drm/radeon/radeon_fb.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_fb.c 
b/drivers/gpu/drm/radeon/radeon_fb.c
index 105c678..0284031 100644
--- a/drivers/gpu/drm/radeon/radeon_fb.c
+++ b/drivers/gpu/drm/radeon/radeon_fb.c
@@ -243,7 +243,7 @@ int radeonfb_create(struct drm_device *dev,
if (ret)
goto out_unref;
 
-   memset_io(fbptr, 0xff, aligned_size);
+   memset_io(fbptr, 0x0, aligned_size);
 
strcpy(info-fix.id, radeondrmfb);
 
-- 
1.6.5.2


--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[PATCH 1/2] drm: introduce drm_gem_object_[handle_]unreference_unlocked

2010-02-08 Thread Luca Barbieri
This patch introduces the drm_gem_object_unreference_unlocked
and drm_gem_object_handle_unreference_unlocked functions that
do not require holding struct_mutex.

drm_gem_object_unreference_unlocked calls the new
-gem_free_object_unlocked entry point if available, and
otherwise just takes struct_mutex and just calls -gem_free_object

Signed-off-by: Luca Barbieri l...@luca-barbieri.com
---
 drivers/gpu/drm/drm_gem.c |   49 
 include/drm/drmP.h|   28 +++--
 2 files changed, 69 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
index 8bf3770..4018b3b 100644
--- a/drivers/gpu/drm/drm_gem.c
+++ b/drivers/gpu/drm/drm_gem.c
@@ -411,8 +411,19 @@ drm_gem_release(struct drm_device *dev, struct drm_file 
*file_private)
mutex_unlock(dev-struct_mutex);
 }
 
+static void
+drm_gem_object_free_common(struct drm_gem_object *obj)
+{
+   struct drm_device *dev = obj-dev;
+   fput(obj-filp);
+   atomic_dec(dev-object_count);
+   atomic_sub(obj-size, dev-object_memory);
+   kfree(obj);
+}
+
 /**
  * Called after the last reference to the object has been lost.
+ * Must be called holding struct_ mutex
  *
  * Frees the object
  */
@@ -427,14 +438,40 @@ drm_gem_object_free(struct kref *kref)
if (dev-driver-gem_free_object != NULL)
dev-driver-gem_free_object(obj);
 
-   fput(obj-filp);
-   atomic_dec(dev-object_count);
-   atomic_sub(obj-size, dev-object_memory);
-   kfree(obj);
+   drm_gem_object_free_common(obj);
 }
 EXPORT_SYMBOL(drm_gem_object_free);
 
 /**
+ * Called after the last reference to the object has been lost.
+ * Must be called without holding struct_mutex
+ *
+ * Frees the object
+ */
+void
+drm_gem_object_free_unlocked(struct kref *kref)
+{
+   struct drm_gem_object *obj = (struct drm_gem_object *) kref;
+   struct drm_device *dev = obj-dev;
+
+   if (dev-driver-gem_free_object_unlocked != NULL)
+   dev-driver-gem_free_object_unlocked(obj);
+   else if (dev-driver-gem_free_object != NULL) {
+   mutex_lock(dev-struct_mutex);
+   dev-driver-gem_free_object(obj);
+   mutex_unlock(dev-struct_mutex);
+   }
+
+   drm_gem_object_free_common(obj);
+}
+EXPORT_SYMBOL(drm_gem_object_free_unlocked);
+
+static void drm_gem_object_ref_bug(struct kref *list_kref)
+{
+   BUG();
+}
+
+/**
  * Called after the last handle to the object has been closed
  *
  * Removes any name for the object. Note that this must be
@@ -458,8 +495,10 @@ drm_gem_object_handle_free(struct kref *kref)
/*
 * The object name held a reference to this object, drop
 * that now.
+   *
+   * This cannot be the last reference, since the handle holds one 
too.
 */
-   drm_gem_object_unreference(obj);
+   kref_put(obj-refcount, drm_gem_object_ref_bug);
} else
spin_unlock(dev-object_name_lock);
 
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index ffac157..4a3c4e4 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -801,6 +801,7 @@ struct drm_driver {
 */
int (*gem_init_object) (struct drm_gem_object *obj);
void (*gem_free_object) (struct drm_gem_object *obj);
+   void (*gem_free_object_unlocked) (struct drm_gem_object *obj);
 
/* vga arb irq handler */
void (*vgaarb_irq)(struct drm_device *dev, bool state);
@@ -1427,6 +1428,7 @@ extern void drm_sysfs_connector_remove(struct 
drm_connector *connector);
 int drm_gem_init(struct drm_device *dev);
 void drm_gem_destroy(struct drm_device *dev);
 void drm_gem_object_free(struct kref *kref);
+void drm_gem_object_free_unlocked(struct kref *kref);
 struct drm_gem_object *drm_gem_object_alloc(struct drm_device *dev,
size_t size);
 void drm_gem_object_handle_free(struct kref *kref);
@@ -1443,10 +1445,15 @@ drm_gem_object_reference(struct drm_gem_object *obj)
 static inline void
 drm_gem_object_unreference(struct drm_gem_object *obj)
 {
-   if (obj == NULL)
-   return;
+   if (obj != NULL)
+   kref_put(obj-refcount, drm_gem_object_free);
+}
 
-   kref_put(obj-refcount, drm_gem_object_free);
+static inline void
+drm_gem_object_unreference_unlocked(struct drm_gem_object *obj)
+{
+   if (obj != NULL)
+   kref_put(obj-refcount, drm_gem_object_free_unlocked);
 }
 
 int drm_gem_handle_create(struct drm_file *file_priv,
@@ -1475,6 +1482,21 @@ drm_gem_object_handle_unreference(struct drm_gem_object 
*obj)
drm_gem_object_unreference(obj);
 }
 
+static inline void
+drm_gem_object_handle_unreference_unlocked(struct drm_gem_object *obj)
+{
+   if (obj == NULL)
+   return;
+
+   /*
+   * Must bump handle count first as this may be the last
+   * ref, in 

[PATCH 2/2] Use drm_gem_object_[handle_]unreference_unlocked where possible

2010-02-08 Thread Luca Barbieri
Mostly obvious simplifications.

The i915 pread/pwrite ioctls, intel_overlay_put_image and
nouveau_gem_new were incorrectly using the locked versions
without locking: this is also fixed in this patch.

Signed-off-by: Luca Barbieri l...@luca-barbieri.com
---
 drivers/gpu/drm/drm_gem.c  |   21 
 drivers/gpu/drm/i915/i915_gem.c|   16 ---
 drivers/gpu/drm/i915/i915_gem_tiling.c |4 +--
 drivers/gpu/drm/i915/intel_display.c   |   13 +++---
 drivers/gpu/drm/i915/intel_overlay.c   |2 +-
 drivers/gpu/drm/nouveau/nouveau_display.c  |7 +
 drivers/gpu/drm/nouveau/nouveau_fbcon.c|4 +--
 drivers/gpu/drm/nouveau/nouveau_gem.c  |   26 +--
 drivers/gpu/drm/nouveau/nouveau_notifier.c |9 ++
 drivers/gpu/drm/nouveau/nv04_crtc.c|4 +--
 drivers/gpu/drm/nouveau/nv50_crtc.c|4 +--
 drivers/gpu/drm/radeon/radeon_cs.c |7 +
 drivers/gpu/drm/radeon/radeon_cursor.c |8 +
 drivers/gpu/drm/radeon/radeon_display.c|7 +
 drivers/gpu/drm/radeon/radeon_gem.c|   36 +++-
 15 files changed, 47 insertions(+), 121 deletions(-)

diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
index 4018b3b..aa89d4b 100644
--- a/drivers/gpu/drm/drm_gem.c
+++ b/drivers/gpu/drm/drm_gem.c
@@ -192,9 +192,7 @@ drm_gem_handle_delete(struct drm_file *filp, u32 handle)
idr_remove(filp-object_idr, handle);
spin_unlock(filp-table_lock);
 
-   mutex_lock(dev-struct_mutex);
-   drm_gem_object_handle_unreference(obj);
-   mutex_unlock(dev-struct_mutex);
+   drm_gem_object_handle_unreference_unlocked(obj);
 
return 0;
 }
@@ -325,9 +323,7 @@ again:
}
 
 err:
-   mutex_lock(dev-struct_mutex);
-   drm_gem_object_unreference(obj);
-   mutex_unlock(dev-struct_mutex);
+   drm_gem_object_unreference_unlocked(obj);
return ret;
 }
 
@@ -358,9 +354,7 @@ drm_gem_open_ioctl(struct drm_device *dev, void *data,
return -ENOENT;
 
ret = drm_gem_handle_create(file_priv, obj, handle);
-   mutex_lock(dev-struct_mutex);
-   drm_gem_object_unreference(obj);
-   mutex_unlock(dev-struct_mutex);
+   drm_gem_object_unreference_unlocked(obj);
if (ret)
return ret;
 
@@ -390,7 +384,7 @@ drm_gem_object_release_handle(int id, void *ptr, void *data)
 {
struct drm_gem_object *obj = ptr;
 
-   drm_gem_object_handle_unreference(obj);
+   drm_gem_object_handle_unreference_unlocked(obj);
 
return 0;
 }
@@ -403,12 +397,10 @@ drm_gem_object_release_handle(int id, void *ptr, void 
*data)
 void
 drm_gem_release(struct drm_device *dev, struct drm_file *file_private)
 {
-   mutex_lock(dev-struct_mutex);
idr_for_each(file_private-object_idr,
 drm_gem_object_release_handle, NULL);
 
idr_destroy(file_private-object_idr);
-   mutex_unlock(dev-struct_mutex);
 }
 
 static void
@@ -516,11 +508,8 @@ EXPORT_SYMBOL(drm_gem_vm_open);
 void drm_gem_vm_close(struct vm_area_struct *vma)
 {
struct drm_gem_object *obj = vma-vm_private_data;
-   struct drm_device *dev = obj-dev;
 
-   mutex_lock(dev-struct_mutex);
-   drm_gem_object_unreference(obj);
-   mutex_unlock(dev-struct_mutex);
+   drm_gem_object_unreference_unlocked(obj);
 }
 EXPORT_SYMBOL(drm_gem_vm_close);
 
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index b4c8c02..6844ca4 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -128,9 +128,7 @@ i915_gem_create_ioctl(struct drm_device *dev, void *data,
return -ENOMEM;
 
ret = drm_gem_handle_create(file_priv, obj, handle);
-   mutex_lock(dev-struct_mutex);
-   drm_gem_object_handle_unreference(obj);
-   mutex_unlock(dev-struct_mutex);
+   drm_gem_object_handle_unreference_unlocked(obj);
 
if (ret)
return ret;
@@ -488,7 +486,7 @@ i915_gem_pread_ioctl(struct drm_device *dev, void *data,
 */
if (args-offset  obj-size || args-size  obj-size ||
args-offset + args-size  obj-size) {
-   drm_gem_object_unreference(obj);
+   drm_gem_object_unreference_unlocked(obj);
return -EINVAL;
}
 
@@ -501,7 +499,7 @@ i915_gem_pread_ioctl(struct drm_device *dev, void *data,
file_priv);
}
 
-   drm_gem_object_unreference(obj);
+   drm_gem_object_unreference_unlocked(obj);
 
return ret;
 }
@@ -961,7 +959,7 @@ i915_gem_pwrite_ioctl(struct drm_device *dev, void *data,
 */
if (args-offset  obj-size || args-size  obj-size ||
args-offset + args-size  obj-size) {
-   drm_gem_object_unreference(obj);
+   drm_gem_object_unreference_unlocked(obj);
return