Re: [PATCH] typdef uintptr_t drm_handle_t; unsigned int is wrong on 64-bit.

2010-04-05 Thread Matthew W. S. Bell
On Sat, 2010-04-03 at 08:49 +0100, Dave Airlie wrote:
 No, its designed as is. We can't change it now as its ABI. We make sure 
 we only use 32-bit handles anyways.

OK, is this documented anywhere, as I'd like to pull some of that into a
comment? (It appears, on a casual glance, that this type is not used in
the kernel ABI, but only in the libdrm, and associates?, ABI, so could
be changed if the SONAME got bumped and anyone cared.)

Matthew



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


Re: [PATCH] typdef uintptr_t drm_handle_t; unsigned int is wrong on 64-bit.

2010-04-05 Thread Matthew W. S. Bell
On Sat, 2010-04-03 at 08:49 +0100, Dave Airlie wrote:
 No, its designed as is. We can't change it now as its ABI. We make sure 
 we only use 32-bit handles anyways.

Sorry, the comment about the ABI is, of course, nonsense, as the
assumption is implicit in the kernel ABI.

Matthew



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


Re: [Regression, post-rc2] Commit a5ee4eb7541 breaks OpenGL on RS780 (was: Re: Linux 2.6.34-rc3)

2010-04-05 Thread Clemens Ladisch
Rafael J. Wysocki wrote:
 From: Clemens Ladisch clem...@ladisch.de
 Subject: PCI quirk: RS780/RS880: disable MSI completely
 
 The missing initialization of the nb_cntl.strap_msi_enable does not
 seem to be the only problem that prevents MSI, so that quirk is not
 sufficient to enable MSI on all machines.  To be safe, disable MSI
 unconditionally for the internal graphics and HDMI audio on these
 chipsets.
 
 [rjw: Added the PCI_VENDOR_ID_AI quirk.]
 ...
 +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x9602, quirk_disable_msi);
 +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ASUSTEK, 0x9602, quirk_disable_msi);
 +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AI, 0x9602, quirk_disable_msi);

I fear I have to NACK this.  The fact that two OEMs have changed the vendor
ID makes it likely that this is a bug in AMD's template BIOS code, and that
we will see the same problem on other systems using other vendor IDs.

So we should not use the vendor ID of device 0x9602 to declare the quirk, but
use some other device with an ID that is known to be correct.  We already
access the configuration space of the host bridge, so we should use that.

Furthermore, the quirk in my first patch was never run at all on the ALi
system, so it is probable that the nb_cntl.strap_msi_enable detection
would actually work.  Rafael, please test this patch; if it doesn't work
on your system, we can still remove the check for the strap_msi_enable bit.

==

Subject: PCI quirk: RS780/RS880: work around wrong vendor IDs of RS780 bridge

On many RS780 systems, the vendor ID of the PCI/PCI bridge for the
internal graphics is set to that of the mainboard vendor, so the quirk
would not match and failed to notice the disabled MSI.

Since we do not know in advance all possible vendor IDs, we have to
declare the quirk on another device with an ID that is known to be
correct, and use that as a stepping stone to find the PCI/PCI bridge,
if present.

Signed-off-by: Clemens Ladisch clem...@ladisch.de
Cc: sta...@kernel.org

--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -2483,34 +2483,38 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AT
  * MSI does not work with the AMD RS780/RS880 internal graphics and HDMI audio
  * devices unless the BIOS has initialized the nb_cntl.strap_msi_enable bit.
  */
-static void __init rs780_int_gfx_disable_msi(struct pci_dev *int_gfx_bridge)
+static void __init rs780_int_gfx_disable_msi(struct pci_dev *host_bridge)
 {
+   struct pci_dev *int_gfx_bridge;
u32 nb_cntl;
 
-   if (!int_gfx_bridge-subordinate)
+   /*
+* Many OEMs change the vendor ID of the internal graphics PCI/PCI
+* bridge, so we use the possible vendor/device IDs of the host bridge
+* for the declared quirk, and search for the PCI/PCI bridge by slot
+* number.
+*/
+   int_gfx_bridge = pci_get_slot(host_bridge-bus, PCI_DEVFN(1, 0));
+   if (!int_gfx_bridge)
return;
+   if (int_gfx_bridge-device != 0x9602 || !int_gfx_bridge-subordinate)
+   goto out;
 
-   pci_bus_write_config_dword(int_gfx_bridge-bus, PCI_DEVFN(0, 0),
-  0x60, 0);
-   pci_bus_read_config_dword(int_gfx_bridge-bus, PCI_DEVFN(0, 0),
- 0x64, nb_cntl);
+   pci_write_config_dword(host_bridge, 0x60, 0);
+   pci_read_config_dword(host_bridge, 0x64, nb_cntl);
 
if (!(nb_cntl  BIT(10))) {
dev_warn(int_gfx_bridge-dev,
 FW_WARN RS780: MSI for internal graphics disabled\n);
int_gfx_bridge-subordinate-bus_flags |= PCI_BUS_FLAGS_NO_MSI;
}
-}
 
-#define PCI_DEVICE_ID_AMD_RS780_P2P_INT_GFX0x9602
+out:
+   pci_dev_put(int_gfx_bridge);
+}
 
-DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD,
-   PCI_DEVICE_ID_AMD_RS780_P2P_INT_GFX,
-   rs780_int_gfx_disable_msi);
-/* wrong vendor ID on M4A785TD motherboard: */
-DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ASUSTEK,
-   PCI_DEVICE_ID_AMD_RS780_P2P_INT_GFX,
-   rs780_int_gfx_disable_msi);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x9600, rs780_int_gfx_disable_msi);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x9601, rs780_int_gfx_disable_msi);
 
 #endif /* CONFIG_PCI_MSI */
 

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


Re: [Bug 27402] [r300g] Earth textures in celestia are partially corrupted in all rendering paths

2010-04-05 Thread Yann Vernier
On Sat,  3 Apr 2010 03:46:37 -0700 (PDT)
bugzilla-dae...@freedesktop.org wrote:

 $ git bisect start
 $ git bisect good
 $ git bisect bad f6c7b911653fb1508256c63518ef0bd15d68186e
 Some good revs are not ancestor of the bad rev.
 git bisect cannot work properly in this case.
 Maybe you mistake good and bad revs?
 
 ?? WTF ??? How can a commit that I already had last night be more
 recent (in the sense of when I added it into my local tree - which is the only
 measure that matters) than one I only picked up a few minutes ago this 
 morning?
 
 So **NO**, I am not going to use git friggin' bisect for you!

Bisect is specifically made to track down regressions - i.e. something used to 
work but doesn't anymore. It should only start from somewhere the problem 
exists.
It sounds to me like the tree you had was something like:
 A---B---C  or   A---B---D---C
  \--D
Where C had fixed a problem and D had not. In this case, bisecting from C makes 
no sense, unless you want to do it backwards to find when the issue was 
*fixed*. bad and good should probably have been called present and 
later, or some such.
If a particular revision doesn't build at all (exhibits some other problem than 
that which you're trying to track down), I guess that's when to use the skip 
command.

Basically it does a binary search down the revision history, although it might 
split along merge/branch paths. bad means after the point you look for, good 
means before, and the weighted words may be misleading.

Sorry you're having trouble and I hope this is more explanatory than annoying. 
This was meant to describe my understanding of the tool.


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


Re: [PATCH] typdef uintptr_t drm_handle_t; unsigned int is wrong on 64-bit.

2010-04-05 Thread Dave Airlie
On Sat, Apr 3, 2010 at 11:09 PM, Matthew W. S. Bell
matt...@bells23.org.uk wrote:
 On Sat, 2010-04-03 at 08:49 +0100, Dave Airlie wrote:
 No, its designed as is. We can't change it now as its ABI. We make sure
 we only use 32-bit handles anyways.

The thing is unsigned int is correct for the handles, they are defined to
be 32-bit numbers no matter what system they are on, its the use of the
void * that is actually the problem.

Its probably not documented well anywhere, though I think the handles are
32-bit is written down somewhere.

Dave.

 OK, is this documented anywhere, as I'd like to pull some of that into a
 comment? (It appears, on a casual glance, that this type is not used in
 the kernel ABI, but only in the libdrm, and associates?, ABI, so could
 be changed if the SONAME got bumped and anyone cared.)

 Matthew


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



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


[Bug 27457] New: Blender artifacts when using box select

2010-04-05 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=27457

   Summary: Blender artifacts when using box select
   Product: Mesa
   Version: unspecified
  Platform: x86 (IA32)
OS/Version: Linux (All)
Status: NEW
  Severity: normal
  Priority: medium
 Component: Drivers/DRI/R600
AssignedTo: dri-devel@lists.sourceforge.net
ReportedBy: wasw...@hotmail.com


Created an attachment (id=34668)
 -- (https://bugs.freedesktop.org/attachment.cgi?id=34668)
blender picture showing artifacs using box select

Artifacts are drawn when using Blender box select.

To reproduce:
Start blender, keypress B for box select, and move the mouse. When the mouse
is moved, the rubber banding is not erased until the mouse button is release
again.

Blender 2.49a
xf86-video-ati  6.12.4-3
ati-dri 7.7.1-0.1
libgl 7.7.1-0.1
mesa 7.7.1-0.1
xorg-server 1.7.5.902-1
Arch linux kernel26 2.6.32.10-1

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

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


[Bug 27457] Blender artifacts when using box select

2010-04-05 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=27457

--- Comment #1 from Willem Swart wasw...@hotmail.com 2010-04-05 03:11:40 PDT 
---
ATI Technologies Inc RV770 [Radeon HD 4850]

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

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


[Bug 27224] System hangs after switching from full-screen 3D application back to X on R200

2010-04-05 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=27224

Ondrej Zary li...@rainbow-software.org changed:

   What|Removed |Added

Version|unspecified |7.6

--- Comment #3 from Ondrej Zary li...@rainbow-software.org 2010-04-05 
04:37:51 PDT ---
7.6 hangs too.

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

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


[Bug 15685] Kernel 2.6.33 fails to suspend (bisected)

2010-04-05 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=15685





--- Comment #8 from Nix n...@esperi.org.uk  2010-04-05 11:37:36 ---
Created an attachment (id=25864)
 -- (https://bugzilla.kernel.org/attachment.cgi?id=25864)
dmesg of suspend-crashing kernel

Here's the dmesg. Are you sure you want an X log as well? This crash happens if
you suspend from the textual login prompt without ever going near X, so it
seems as if it would be superfluous to me.

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

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


[Bug 15685] Kernel 2.6.33 fails to suspend (bisected)

2010-04-05 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=15685


Nix n...@esperi.org.uk changed:

   What|Removed |Added

  Attachment #25864|0   |1
is obsolete||




--- Comment #9 from Nix n...@esperi.org.uk  2010-04-05 11:39:56 ---
Created an attachment (id=25865)
 -- (https://bugzilla.kernel.org/attachment.cgi?id=25865)
dmesg of suspend-crashing kernel

Sorry, bugzilla being unhelpful: an attachment with an URI to an internal
machine that you can't get to is no use to you at all... here's the actual
file.

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

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


Re: [PATCH 01/13] drm/ttm: split no_wait argument in 2 GPU or reserve wait

2010-04-05 Thread Thomas Hellstrom
Jerome Glisse wrote:
 There is case where we want to be able to wait only for the
 GPU while not waiting for other buffer to be unreserved. This
 patch split the no_wait argument all the way down in the whole
 ttm path so that upper level can decide on what to wait on or
 not.

 This patch break the API to other modules, update to others
 driver are following in separate patches.

 Signed-off-by: Jerome Glisse jgli...@redhat.com
   

Acked-by: Thomas Hellstrom thellst...@vmware.com


 ---
  drivers/gpu/drm/ttm/ttm_bo.c  |   57 
  drivers/gpu/drm/ttm/ttm_bo_util.c |9 --
  include/drm/ttm/ttm_bo_api.h  |6 ++-
  include/drm/ttm/ttm_bo_driver.h   |   29 +++---
  4 files changed, 60 insertions(+), 41 deletions(-)

 diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
 index 9db02bb..6f51b30 100644
 --- a/drivers/gpu/drm/ttm/ttm_bo.c
 +++ b/drivers/gpu/drm/ttm/ttm_bo.c
 @@ -357,7 +357,8 @@ static int ttm_bo_add_ttm(struct ttm_buffer_object *bo, 
 bool zero_alloc)
  
  static int ttm_bo_handle_move_mem(struct ttm_buffer_object *bo,
 struct ttm_mem_reg *mem,
 -   bool evict, bool interruptible, bool no_wait)
 +   bool evict, bool interruptible,
 +   bool no_wait_reserve, bool no_wait_gpu)
  {
   struct ttm_bo_device *bdev = bo-bdev;
   bool old_is_pci = ttm_mem_reg_is_pci(bdev, bo-mem);
 @@ -402,12 +403,12 @@ static int ttm_bo_handle_move_mem(struct 
 ttm_buffer_object *bo,
  
   if (!(old_man-flags  TTM_MEMTYPE_FLAG_FIXED) 
   !(new_man-flags  TTM_MEMTYPE_FLAG_FIXED))
 - ret = ttm_bo_move_ttm(bo, evict, no_wait, mem);
 + ret = ttm_bo_move_ttm(bo, evict, no_wait_reserve, no_wait_gpu, 
 mem);
   else if (bdev-driver-move)
   ret = bdev-driver-move(bo, evict, interruptible,
 -  no_wait, mem);
 +  no_wait_reserve, no_wait_gpu, mem);
   else
 - ret = ttm_bo_move_memcpy(bo, evict, no_wait, mem);
 + ret = ttm_bo_move_memcpy(bo, evict, no_wait_reserve, 
 no_wait_gpu, mem);
  
   if (ret)
   goto out_err;
 @@ -606,7 +607,7 @@ void ttm_bo_unref(struct ttm_buffer_object **p_bo)
  EXPORT_SYMBOL(ttm_bo_unref);
  
  static int ttm_bo_evict(struct ttm_buffer_object *bo, bool interruptible,
 - bool no_wait)
 + bool no_wait_reserve, bool no_wait_gpu)
  {
   struct ttm_bo_device *bdev = bo-bdev;
   struct ttm_bo_global *glob = bo-glob;
 @@ -615,7 +616,7 @@ static int ttm_bo_evict(struct ttm_buffer_object *bo, 
 bool interruptible,
   int ret = 0;
  
   spin_lock(bo-lock);
 - ret = ttm_bo_wait(bo, false, interruptible, no_wait);
 + ret = ttm_bo_wait(bo, false, interruptible, no_wait_gpu);
   spin_unlock(bo-lock);
  
   if (unlikely(ret != 0)) {
 @@ -638,7 +639,7 @@ static int ttm_bo_evict(struct ttm_buffer_object *bo, 
 bool interruptible,
   placement.num_busy_placement = 0;
   bdev-driver-evict_flags(bo, placement);
   ret = ttm_bo_mem_space(bo, placement, evict_mem, interruptible,
 - no_wait);
 + no_wait_reserve, no_wait_gpu);
   if (ret) {
   if (ret != -ERESTARTSYS) {
   printk(KERN_ERR TTM_PFX
 @@ -650,7 +651,7 @@ static int ttm_bo_evict(struct ttm_buffer_object *bo, 
 bool interruptible,
   }
  
   ret = ttm_bo_handle_move_mem(bo, evict_mem, true, interruptible,
 -  no_wait);
 +  no_wait_reserve, no_wait_gpu);
   if (ret) {
   if (ret != -ERESTARTSYS)
   printk(KERN_ERR TTM_PFX Buffer eviction failed\n);
 @@ -670,7 +671,8 @@ out:
  
  static int ttm_mem_evict_first(struct ttm_bo_device *bdev,
   uint32_t mem_type,
 - bool interruptible, bool no_wait)
 + bool interruptible, bool no_wait_reserve,
 + bool no_wait_gpu)
  {
   struct ttm_bo_global *glob = bdev-glob;
   struct ttm_mem_type_manager *man = bdev-man[mem_type];
 @@ -687,11 +689,11 @@ retry:
   bo = list_first_entry(man-lru, struct ttm_buffer_object, lru);
   kref_get(bo-list_kref);
  
 - ret = ttm_bo_reserve_locked(bo, false, true, false, 0);
 + ret = ttm_bo_reserve_locked(bo, false, no_wait_reserve, false, 0);
  
   if (unlikely(ret == -EBUSY)) {
   spin_unlock(glob-lru_lock);
 - if (likely(!no_wait))
 + if (likely(!no_wait_gpu))
   ret = ttm_bo_wait_unreserved(bo, interruptible);
  
   kref_put(bo-list_kref, ttm_bo_release_list);
 @@ -713,7 +715,7 @@ retry:
   while (put_count--)
   

Re: [PATCH 05/13] drm/ttm: ttm_fault callback to allow driver to handle bo placement V4

2010-04-05 Thread Thomas Hellstrom
Jerome Glisse wrote:
 On fault the driver is given the opportunity to perform any operation
 it sees fit in order to place the buffer into a CPU visible area of
 memory. This patch doesn't break TTM users, nouveau, vmwgfx and radeon
 should keep working properly. Future patch will take advantage of this
 infrastructure and remove the old path from TTM once driver are
 converted.

 V2 return VM_FAULT_NOPAGE if callback return -EBUSY or -ERESTARTSYS
 V3 balance io_mem_reserve and io_mem_free call, fault_reserve_notify
is responsible to perform any necessary task for mapping to succeed
 V4 minor cleanup, atomic_t - bool as member is protected by reserve
mecanism from concurent access

 Signed-off-by: Jerome Glisse jgli...@redhat.com
   

Reviewed-by: Thomas Hellstrom thellst...@vmware.com

 ---
  drivers/gpu/drm/ttm/ttm_bo.c  |7 ++-
  drivers/gpu/drm/ttm/ttm_bo_util.c |   98 ++--
  drivers/gpu/drm/ttm/ttm_bo_vm.c   |   41 
  include/drm/ttm/ttm_bo_api.h  |   21 
  include/drm/ttm/ttm_bo_driver.h   |   16 ++-
  5 files changed, 111 insertions(+), 72 deletions(-)

 diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
 index 6f51b30..2171f86 100644
 --- a/drivers/gpu/drm/ttm/ttm_bo.c
 +++ b/drivers/gpu/drm/ttm/ttm_bo.c
 @@ -632,6 +632,7 @@ static int ttm_bo_evict(struct ttm_buffer_object *bo, 
 bool interruptible,
  
   evict_mem = bo-mem;
   evict_mem.mm_node = NULL;
 + evict_mem.bus.io_reserved = false;
  
   placement.fpfn = 0;
   placement.lpfn = 0;
 @@ -1005,6 +1006,7 @@ int ttm_bo_move_buffer(struct ttm_buffer_object *bo,
   mem.num_pages = bo-num_pages;
   mem.size = mem.num_pages  PAGE_SHIFT;
   mem.page_alignment = bo-mem.page_alignment;
 + mem.bus.io_reserved = false;
   /*
* Determine where to move the buffer.
*/
 @@ -1160,6 +1162,7 @@ int ttm_bo_init(struct ttm_bo_device *bdev,
   bo-mem.num_pages = bo-num_pages;
   bo-mem.mm_node = NULL;
   bo-mem.page_alignment = page_alignment;
 + bo-mem.bus.io_reserved = false;
   bo-buffer_start = buffer_start  PAGE_MASK;
   bo-priv_flags = 0;
   bo-mem.placement = (TTM_PL_FLAG_SYSTEM | TTM_PL_FLAG_CACHED);
 @@ -1574,7 +1577,7 @@ int ttm_bo_pci_offset(struct ttm_bo_device *bdev,
   if (ttm_mem_reg_is_pci(bdev, mem)) {
   *bus_offset = mem-mm_node-start  PAGE_SHIFT;
   *bus_size = mem-num_pages  PAGE_SHIFT;
 - *bus_base = man-io_offset;
 + *bus_base = man-io_offset + (uintptr_t)man-io_addr;
   }
  
   return 0;
 @@ -1588,8 +1591,8 @@ void ttm_bo_unmap_virtual(struct ttm_buffer_object *bo)
  
   if (!bdev-dev_mapping)
   return;
 -
   unmap_mapping_range(bdev-dev_mapping, offset, holelen, 1);
 + ttm_mem_io_free(bdev, bo-mem);
  }
  EXPORT_SYMBOL(ttm_bo_unmap_virtual);
  
 diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c 
 b/drivers/gpu/drm/ttm/ttm_bo_util.c
 index 865b2a8..878dc49 100644
 --- a/drivers/gpu/drm/ttm/ttm_bo_util.c
 +++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
 @@ -81,30 +81,59 @@ int ttm_bo_move_ttm(struct ttm_buffer_object *bo,
  }
  EXPORT_SYMBOL(ttm_bo_move_ttm);
  
 +int ttm_mem_io_reserve(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem)
 +{
 + int ret;
 +
 + if (bdev-driver-io_mem_reserve) {
 + if (!mem-bus.io_reserved) {
 + mem-bus.io_reserved = true;
 + ret = bdev-driver-io_mem_reserve(bdev, mem);
 + if (unlikely(ret != 0))
 + return ret;
 + }
 + } else {
 + ret = ttm_bo_pci_offset(bdev, mem, mem-bus.base, 
 mem-bus.offset, mem-bus.size);
 + if (unlikely(ret != 0))
 + return ret;
 + mem-bus.is_iomem = (mem-bus.size  0) ? 1 : 0;
 + }
 + return 0;
 +}
 +
 +void ttm_mem_io_free(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem)
 +{
 + if (bdev-driver-io_mem_reserve) {
 + if (mem-bus.io_reserved) {
 + mem-bus.io_reserved = false;
 + bdev-driver-io_mem_free(bdev, mem);
 + }
 + }
 +}
 +
  int ttm_mem_reg_ioremap(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem,
   void **virtual)
  {
   struct ttm_mem_type_manager *man = bdev-man[mem-mem_type];
 - unsigned long bus_offset;
 - unsigned long bus_size;
 - unsigned long bus_base;
   int ret;
   void *addr;
  
   *virtual = NULL;
 - ret = ttm_bo_pci_offset(bdev, mem, bus_base, bus_offset, bus_size);
 - if (ret || bus_size == 0)
 + ret = ttm_mem_io_reserve(bdev, mem);
 + if (ret)
   return ret;
  
 - if (!(man-flags  TTM_MEMTYPE_FLAG_NEEDS_IOREMAP))
 - addr = (void *)(((u8 *) man-io_addr) + bus_offset);
 - else {
 + if (!(man-flags  TTM_MEMTYPE_FLAG_NEEDS_IOREMAP)) {
 + addr 

Re: [PATCH 11/13] drm/vmwgfx: don't initialize TTM io memory manager field

2010-04-05 Thread Thomas Hellstrom
Jerome Glisse wrote:
 This isn't needed anymore with the new TTM fault callback

 Signed-off-by: Jerome Glisse jgli...@redhat.com
   

Reviewed-by: Thomas Hellstrom thellst...@vmware.com

 ---
  drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c |6 --
  1 files changed, 0 insertions(+), 6 deletions(-)

 diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c 
 b/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c
 index 7e28448..a0fb612 100644
 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c
 +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c
 @@ -137,9 +137,6 @@ int vmw_invalidate_caches(struct ttm_bo_device *bdev, 
 uint32_t flags)
  int vmw_init_mem_type(struct ttm_bo_device *bdev, uint32_t type,
 struct ttm_mem_type_manager *man)
  {
 - struct vmw_private *dev_priv =
 - container_of(bdev, struct vmw_private, bdev);
 -
   switch (type) {
   case TTM_PL_SYSTEM:
   /* System memory */
 @@ -151,11 +148,8 @@ int vmw_init_mem_type(struct ttm_bo_device *bdev, 
 uint32_t type,
   case TTM_PL_VRAM:
   /* On-card video ram */
   man-gpu_offset = 0;
 - man-io_offset = dev_priv-vram_start;
 - man-io_size = dev_priv-vram_size;
   man-flags = TTM_MEMTYPE_FLAG_FIXED |
   TTM_MEMTYPE_FLAG_NEEDS_IOREMAP | TTM_MEMTYPE_FLAG_MAPPABLE;
 - man-io_addr = NULL;
   man-available_caching = TTM_PL_MASK_CACHING;
   man-default_caching = TTM_PL_FLAG_WC;
   break;
   


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


Re: unmappable vram V6

2010-04-05 Thread Thomas Hellstrom
Jerome Glisse wrote:
 So in these patchset i use bool instead of atomic remove empty line
 removal, and i hope addressed standing issues. Again only compile
 tested for nouveau  vmwgfx. Tested this time only tested on RV710
 with special patch to force unmappable vram use.
 http://people.freedesktop.org/~glisse/0014-TEST-UNMAPPABLE.patch

 Seems to work flawlessly (quake3, compiz, glxgears, firefox running
 side by side)

 Cheers,
 Jerome

   

Jerome, Dave.

Apart from a small fix in patch 12/13, I'm fine with this going in. 
Unfortunately I haven't had time to look at the Nouveau / Radeon 
patches, but the ttm- and vmwgfx patches look fine.

Thanks,
Thomas


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


Re: [PATCH 08/13] drm/vmwgfx: add support for new TTM fault callback V3

2010-04-05 Thread Thomas Hellstrom
Jerome Glisse wrote:
 This add the support for the new fault callback, does change anything
 from driver point of view.

 Improvement: store the aperture base in a variable so that we don't
 call a function to get it on each fault.

 Patch hasn't been tested.

 V2 don't derefence bo-mem.mm_node as it's not NULL only for
VRAM or GTT
 V3 update after io_mem_reserve/io_mem_free callback balancing

 Signed-off-by: Jerome Glisse jgli...@redhat.com
   

Reviewed-by: Thomas Hellstrom thellst...@vmware.com


 ---
  drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c |   40 
 +++-
  1 files changed, 39 insertions(+), 1 deletions(-)

 diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c 
 b/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c
 index 825ebe3..7e28448 100644
 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c
 +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_buffer.c
 @@ -193,6 +193,41 @@ static void vmw_swap_notify(struct ttm_buffer_object *bo)
   vmw_dmabuf_gmr_unbind(bo);
  }
  
 +static int vmw_ttm_io_mem_reserve(struct ttm_bo_device *bdev, struct 
 ttm_mem_reg *mem)
 +{
 + struct ttm_mem_type_manager *man = bdev-man[mem-mem_type];
 + struct vmw_private *dev_priv = container_of(bdev, struct vmw_private, 
 bdev);
 +
 + mem-bus.is_iomem = false;
 + mem-bus.offset = 0;
 + mem-bus.size = mem-num_pages  PAGE_SHIFT;
 + mem-bus.base = 0;
 + if (!(man-flags  TTM_MEMTYPE_FLAG_MAPPABLE))
 + return -EINVAL;
 + switch (mem-mem_type) {
 + case TTM_PL_SYSTEM:
 + /* System memory */
 + return 0;
 + case TTM_PL_VRAM:
 + mem-bus.offset = mem-mm_node-start  PAGE_SHIFT;
 + mem-bus.base = dev_priv-vram_start;
 + mem-bus.is_iomem = true;
 + break;
 + default:
 + return -EINVAL;
 + }
 + return 0;
 +}
 +
 +static void vmw_ttm_io_mem_free(struct ttm_bo_device *bdev, struct 
 ttm_mem_reg *mem)
 +{
 +}
 +
 +static int vmw_ttm_fault_reserve_notify(struct ttm_buffer_object *bo)
 +{
 + return 0;
 +}
 +
  /**
   * FIXME: We're using the old vmware polling method to sync.
   * Do this with fences instead.
 @@ -248,5 +283,8 @@ struct ttm_bo_driver vmw_bo_driver = {
   .sync_obj_unref = vmw_sync_obj_unref,
   .sync_obj_ref = vmw_sync_obj_ref,
   .move_notify = vmw_move_notify,
 - .swap_notify = vmw_swap_notify
 + .swap_notify = vmw_swap_notify,
 + .fault_reserve_notify = vmw_ttm_fault_reserve_notify,
 + .io_mem_reserve = vmw_ttm_io_mem_reserve,
 + .io_mem_free = vmw_ttm_io_mem_free,
  };
   


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


Re: [PATCH 12/13] drm/ttm: remove io_ field from TTM V4

2010-04-05 Thread Thomas Hellstrom
Jerome Glisse wrote:
 All TTM driver have been converted to new io_mem_reserve/free
 interface which allow driver to choose and return proper io
 base, offset to core TTM for ioremapping if necessary. This
 patch remove what is now deadcode.

 V2 adapt to match with change in first patch of the patchset
 V3 update after io_mem_reserve/io_mem_free callback balancing
 V4 adjust to minor cleanup

 Signed-off-by: Jerome Glisse jgli...@redhat.com
   

Jerome, see comment below, apart from that, this is
Acked-by: Thomas Hellstrom thellst...@vmware.com


 ---
  drivers/gpu/drm/ttm/ttm_bo.c  |   22 --
  drivers/gpu/drm/ttm/ttm_bo_util.c |   29 +
  include/drm/ttm/ttm_bo_driver.h   |   10 --
  3 files changed, 9 insertions(+), 52 deletions(-)

 diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
 index 2171f86..1f27cf2 100644
 --- a/drivers/gpu/drm/ttm/ttm_bo.c
 +++ b/drivers/gpu/drm/ttm/ttm_bo.c
 @@ -79,8 +79,6 @@ static void ttm_mem_type_debug(struct ttm_bo_device *bdev, 
 int mem_type)
   printk(KERN_ERR TTM_PFX use_type: %d\n, man-use_type);
   printk(KERN_ERR TTM_PFX flags: 0x%08X\n, man-flags);
   printk(KERN_ERR TTM_PFX gpu_offset: 0x%08lX\n, man-gpu_offset);
 - printk(KERN_ERR TTM_PFX io_offset: 0x%08lX\n, man-io_offset);
 - printk(KERN_ERR TTM_PFX io_size: %ld\n, man-io_size);
   printk(KERN_ERR TTM_PFX size: %llu\n, man-size);
   printk(KERN_ERR TTM_PFX available_caching: 0x%08X\n,
   man-available_caching);
 @@ -1563,26 +1561,6 @@ bool ttm_mem_reg_is_pci(struct ttm_bo_device *bdev, 
 struct ttm_mem_reg *mem)
   return true;
  }
  
 -int ttm_bo_pci_offset(struct ttm_bo_device *bdev,
 -   struct ttm_mem_reg *mem,
 -   unsigned long *bus_base,
 -   unsigned long *bus_offset, unsigned long *bus_size)
 -{
 - struct ttm_mem_type_manager *man = bdev-man[mem-mem_type];
 -
 - *bus_size = 0;
 - if (!(man-flags  TTM_MEMTYPE_FLAG_MAPPABLE))
 - return -EINVAL;
 -
 - if (ttm_mem_reg_is_pci(bdev, mem)) {
 - *bus_offset = mem-mm_node-start  PAGE_SHIFT;
 - *bus_size = mem-num_pages  PAGE_SHIFT;
 - *bus_base = man-io_offset + (uintptr_t)man-io_addr;
 - }
 -
 - return 0;
 -}
 -
  void ttm_bo_unmap_virtual(struct ttm_buffer_object *bo)
  {
   struct ttm_bo_device *bdev = bo-bdev;
 diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c 
 b/drivers/gpu/drm/ttm/ttm_bo_util.c
 index 878dc49..9f9b287 100644
 --- a/drivers/gpu/drm/ttm/ttm_bo_util.c
 +++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
 @@ -83,31 +83,20 @@ EXPORT_SYMBOL(ttm_bo_move_ttm);
  
  int ttm_mem_io_reserve(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem)
  {
 - int ret;
 + int ret = 0;
  
 - if (bdev-driver-io_mem_reserve) {
 - if (!mem-bus.io_reserved) {
 - mem-bus.io_reserved = true;
 - ret = bdev-driver-io_mem_reserve(bdev, mem);
 - if (unlikely(ret != 0))
 - return ret;
 - }
 - } else {
 - ret = ttm_bo_pci_offset(bdev, mem, mem-bus.base, 
 mem-bus.offset, mem-bus.size);
 - if (unlikely(ret != 0))
 - return ret;
 - mem-bus.is_iomem = (mem-bus.size  0) ? 1 : 0;
 + if (!mem-bus.io_reserved) {
 + mem-bus.io_reserved = true;
 + ret = bdev-driver-io_mem_reserve(bdev, mem);
   }
 - return 0;
 + return ret;
  }
  
  void ttm_mem_io_free(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem)
  {
 - if (bdev-driver-io_mem_reserve) {
 - if (mem-bus.io_reserved) {
 - mem-bus.io_reserved = false;
 - bdev-driver-io_mem_free(bdev, mem);
 - }
 + if (mem-bus.io_reserved) {
 + mem-bus.io_reserved = false;
 + bdev-driver-io_mem_free(bdev, mem);
   }
  }
  
 @@ -411,7 +400,7 @@ static int ttm_bo_ioremap(struct ttm_buffer_object *bo,
  
   if (!(man-flags  TTM_MEMTYPE_FLAG_NEEDS_IOREMAP)) {
   map-bo_kmap_type = ttm_bo_map_premapped;
 - map-virtual = (void *)(((u8 *) man-io_addr) + bus_offset);
 + map-virtual = (void *)(bus_base + bus_offset);
   

I think we should completely remove TTM_MEMTYPE_FLAG_NEEDS_IOREMAP. With 
the new io_mem_reserve api that could be handled within the driver. I 
don't think there are drivers using this flag yet, and besides, i don't 
think the above code is correct anyway.



--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
--

Re: [PATCH 04/13] drm/vmwgfx: update to TTM no_wait splitted argument

2010-04-05 Thread Thomas Hellstrom
Jerome Glisse wrote:
 This patch update radeon to the new no_wait splitted argument
 TTM functionality.

 Compile tested only (but thing should run as there is no
 operating change from driver point of view)

 Signed-off-by: Jerome Glisse jgli...@redhat.com
   

Reviewed-by: Thomas Hellstrom thellst...@vmware.com

 ---
  drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c |4 ++--
  drivers/gpu/drm/vmwgfx/vmwgfx_fb.c  |4 ++--
  drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c |2 +-
  3 files changed, 5 insertions(+), 5 deletions(-)
   


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


Re: unmappable vram V6

2010-04-05 Thread Jerome Glisse
On Mon, Apr 05, 2010 at 02:23:58PM +0200, Thomas Hellstrom wrote:
 Jerome Glisse wrote:
  So in these patchset i use bool instead of atomic remove empty line
  removal, and i hope addressed standing issues. Again only compile
  tested for nouveau  vmwgfx. Tested this time only tested on RV710
  with special patch to force unmappable vram use.
  http://people.freedesktop.org/~glisse/0014-TEST-UNMAPPABLE.patch
 
  Seems to work flawlessly (quake3, compiz, glxgears, firefox running
  side by side)
 
  Cheers,
  Jerome
 

 
 Jerome, Dave.
 
 Apart from a small fix in patch 12/13, I'm fine with this going in. 
 Unfortunately I haven't had time to look at the Nouveau / Radeon 
 patches, but the ttm- and vmwgfx patches look fine.
 
 Thanks,
 Thomas

I will do a last spawn of patch with removal of
need ioremap stuff as you said this now can be
handled in the driver and so ttm doesn't have to
worry anymore.

Thanks a lot for reviewing all this :)

Cheers,
Jerome

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


[Bug 25227] X freezes on attempt to start quake3 engine based games with r300 driver

2010-04-05 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=25227

--- Comment #1 from Róbert Čerňanský hsli...@zoznam.sk 2010-04-05 09:28:04 
PDT ---
This is not reproducible with Mesa 7.5.2, xf86-video-ati-6.12.5, libdrm-2.4.15,
xorg server 1.6.5 and kernel 2.6.31.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 25228] Software renderer or freeze after X restart with radeon driver

2010-04-05 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=25228

--- Comment #2 from Róbert Čerňanský hsli...@zoznam.sk 2010-04-05 09:28:32 
PDT ---
This is not reproducible with Mesa 7.5.2, xf86-video-ati-6.12.5, libdrm-2.4.15,
xorg server 1.6.5 and kernel 2.6.31.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 27402] [r300g] Earth textures in celestia are partially corrupted in all rendering paths

2010-04-05 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=27402

--- Comment #9 from Chris Rankin ranki...@googlemail.com 2010-04-05 12:58:58 
PDT ---
Created an attachment (id=34683)
 -- (https://bugs.freedesktop.org/attachment.cgi?id=34683)
Screenshot of corrupt Earth textures in celestia (plus kernel WARNING)

And the corruption is back again. I took this screenshot using The Gimp, and in
the process triggered this kernel warning:

[ cut here ]
WARNING: at /home/chris/LINUX/linux-2.6.33/arch/x86/kernel/apic/ipi.c:109
default_send_IPI_mask_logical+0x2a/0xad()
Hardware name: Precision WorkStation 650
empty IPI mask
Modules linked in: fuse nfsd exportfs uvcvideo videodev v4l1_compat
snd_usb_audio snd_usb_lib autofs4 nfs lockd auth_rpcgss sunrpc p4_clockmod
speedstep_lib af_packet ipt_LOG xt_tcpudp nf_conntrack_ipv4 nf_defrag_ipv4
iptable_filter ip_tables ip6t_LOG nf_conntrack_ipv6 xt_state nf_conntrack
ip6table_filter ip6_tables x_tables ipv6 binfmt_misc dm_mirror dm_region_hash
dm_log dm_mod uinput snd_emu10k1_synth snd_emux_synth snd_seq_virmidi
snd_seq_midi_event snd_seq_midi_emul snd_emu10k1 snd_rawmidi snd_ac97_codec
ac97_bus snd_seq snd_pcm joydev firewire_ohci floppy usbhid snd_seq_device
i2c_i801 ppdev firewire_core pcspkr snd_timer parport_pc sg parport
snd_page_alloc snd_util_mem psmouse snd_hwdep serio_raw snd dcdbas crc_itu_t
soundcore ext3 jbd mbcache sr_mod cdrom sd_mod pata_acpi ata_piix sata_sil
uhci_hcd libata ehci_hcd scsi_mod usbcore e1000 thermal button radeon intel_agp
ttm drm_kms_helper drm agpgart i2c_algo_bit cfbcopyarea cfbimgblt cfbfillrect
[last unloaded: processor]
Pid: 4634, comm: celestia Not tainted 2.6.33.2 #1
Call Trace:
 [c102559b] ? warn_slowpath_common+0x5d/0x70
 [c10171d2] ? __cpa_flush_range+0x0/0x24
 [c10255e1] ? warn_slowpath_fmt+0x26/0x2a
 [c101274c] ? default_send_IPI_mask_logical+0x2a/0xad
 [c10171d2] ? __cpa_flush_range+0x0/0x24
 [c1011381] ? native_send_call_func_ipi+0x4f/0x56
 [c1043aa0] ? smp_call_function_many+0x161/0x17a
 [c10171d2] ? __cpa_flush_range+0x0/0x24
 [c1043ae2] ? smp_call_function+0x29/0x4f
 [c10171d2] ? __cpa_flush_range+0x0/0x24
 [c10297f9] ? on_each_cpu+0x23/0x50
 [c1017abe] ? change_page_attr_set_clr+0x24a/0x2c6
 [c11da880] ? _raw_spin_unlock+0xb/0x1f
 [c1017d44] ? _set_memory_wc+0x21/0x48
 [c1017fc4] ? set_memory_wc+0x61/0x84
 [f80bac8f] ? ttm_tt_set_caching+0xb7/0x1a5 [ttm]
 [f80bb61d] ? ttm_bo_add_ttm+0x4b/0xb0 [ttm]
 [f80bbccf] ? ttm_bo_handle_move_mem+0xd4/0x243 [ttm]
 [f80bd22b] ? ttm_bo_move_buffer+0x9b/0xe3 [ttm]
 [f80bd30f] ? ttm_bo_validate+0x9c/0xe2 [ttm]
 [f80bd5e3] ? ttm_bo_init+0x28e/0x2bc [ttm]
 [f81a0f49] ? radeon_bo_create+0xb9/0x142 [radeon]
 [f81a0fd2] ? radeon_ttm_bo_destroy+0x0/0x4a [radeon]
 [f81ad3b7] ? radeon_gem_object_create+0x64/0xcb [radeon]
 [f81ad469] ? radeon_gem_create_ioctl+0x4b/0xcf [radeon]
 [f8073223] ? drm_ioctl+0x1f7/0x281 [drm]
 [f81ad41e] ? radeon_gem_create_ioctl+0x0/0xcf [radeon]
 [c11da881] ? _raw_spin_unlock+0xc/0x1f
 [f80be520] ? ttm_bo_vm_fault+0x1f3/0x1fd [ttm]
 [c102997e] ? irq_exit+0x38/0x63
 [f819fba5] ? radeon_ttm_fault+0x14/0x19 [radeon]
 [c106fe65] ? __do_fault+0x40/0x365
 [c10e663f] ? prio_tree_insert+0xe9/0x1ce
 [c10e66a6] ? prio_tree_insert+0x150/0x1ce
 [f807302c] ? drm_ioctl+0x0/0x281 [drm]
 [c109215d] ? vfs_ioctl+0x1c/0x7d
 [c10926c1] ? do_vfs_ioctl+0x45e/0x4a2
 [c116a2f7] ? acpi_pm_read+0xb/0x15
 [c103bd07] ? getnstimeofday+0x4e/0xd2
 [c1092732] ? sys_ioctl+0x2d/0x46
 [c100270c] ? sysenter_do_call+0x12/0x22
---[ end trace 7c5ac0a8dc2bf27c ]---

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

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


Re: [PATCH 6/7] drm/i915: fix page flipping on gen3

2010-04-05 Thread Jesse Barnes
On Fri, 26 Mar 2010 13:41:08 -0700
Jesse Barnes jbar...@virtuousgeek.org wrote:

 On Fri, 26 Mar 2010 11:07:20 -0700
 Jesse Barnes jbar...@virtuousgeek.org wrote:
 
  -   if (iir  I915_DISPLAY_PLANE_A_FLIP_PENDING_INTERRUPT)
  +   if ((iir  I915_DISPLAY_PLANE_B_FLIP_PENDING_INTERRUPT) 
  +   !(pipeb_stats  pipe_vblank_mask)) {
  +   DRM_ERROR(flip complete w/o vblank irq?\n);
  +   }
 
 Oops, this hunk definitely doesn't belong here.  I'll post an update to
 this one.

Updated patch w/o the extra debug statement.

---

From 34265649a24f92a9fa004d27ca869cc3dd750fe3 Mon Sep 17 00:00:00 2001
From: Jesse Barnes jbar...@virtuousgeek.org
Date: Fri, 26 Mar 2010 10:35:20 -0700
Subject: [PATCH 1/3] drm/i915: fix page flipping on gen3

Gen3 chips have slightly different flip commands, and also contain a bit
that indicates whether a flip pending interrupt means the flip has
been queued or has been completed.

So implement support for the gen3 flip command, and make sure we use the
flip pending interrupt correctly depending on the value of ECOSKPD bit
0.

Signed-off-by: Jesse Barnes jbar...@virtuousgeek.org
---
 drivers/gpu/drm/i915/i915_dma.c  |4 
 drivers/gpu/drm/i915/i915_drv.h  |1 +
 drivers/gpu/drm/i915/i915_irq.c  |   16 
 drivers/gpu/drm/i915/i915_reg.h  |4 
 drivers/gpu/drm/i915/intel_display.c |   29 -
 drivers/gpu/drm/i915/intel_drv.h |1 +
 6 files changed, 46 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index a9f8589..193bf16 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1475,6 +1475,10 @@ static int i915_load_modeset_init(struct drm_device *dev,
if (ret)
goto destroy_ringbuffer;
 
+   /* IIR flip pending bit means done if this bit is set */
+   if (IS_GEN3(dev)  (I915_READ(ECOSKPD)  ECO_FLIP_DONE))
+   dev_priv-flip_pending_is_done = true;
+
intel_modeset_init(dev);
 
ret = drm_irq_install(dev);
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index abf2713..4e41f0f 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -608,6 +608,7 @@ typedef struct drm_i915_private {
struct drm_crtc *plane_to_crtc_mapping[2];
struct drm_crtc *pipe_to_crtc_mapping[2];
wait_queue_head_t pending_flip_queue;
+   bool flip_pending_is_done;
 
/* Reclocking support */
bool render_reclock_avail;
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index b16bb0d..79cbead 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -924,22 +924,30 @@ irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS)
mod_timer(dev_priv-hangcheck_timer, jiffies + 
DRM_I915_HANGCHECK_PERIOD);
}
 
-   if (iir  I915_DISPLAY_PLANE_A_FLIP_PENDING_INTERRUPT)
+   if (iir  I915_DISPLAY_PLANE_A_FLIP_PENDING_INTERRUPT) {
intel_prepare_page_flip(dev, 0);
+   if (dev_priv-flip_pending_is_done)
+   intel_finish_page_flip_plane(dev, 0);
+   }
 
-   if (iir  I915_DISPLAY_PLANE_B_FLIP_PENDING_INTERRUPT)
+   if (iir  I915_DISPLAY_PLANE_B_FLIP_PENDING_INTERRUPT) {
intel_prepare_page_flip(dev, 1);
+   if (dev_priv-flip_pending_is_done)
+   intel_finish_page_flip_plane(dev, 1);
+   }
 
if (pipea_stats  pipe_vblank_mask) {
vblank++;
drm_handle_vblank(dev, 0);
-   intel_finish_page_flip(dev, 0);
+   if (!dev_priv-flip_pending_is_done)
+   intel_finish_page_flip(dev, 0);
}
 
if (pipeb_stats  pipe_vblank_mask) {
vblank++;
drm_handle_vblank(dev, 1);
-   intel_finish_page_flip(dev, 1);
+   if (!dev_priv-flip_pending_is_done)
+   intel_finish_page_flip(dev, 1);
}
 
if ((pipeb_stats  PIPE_LEGACY_BLC_EVENT_STATUS) ||
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index df20187..9179b38 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -178,6 +178,7 @@
 #define   MI_OVERLAY_OFF   (0x221)
 #define MI_LOAD_SCAN_LINES_INCL MI_INSTR(0x12, 0)
 #define MI_DISPLAY_FLIPMI_INSTR(0x14, 2)
+#define MI_DISPLAY_FLIP_I915   MI_INSTR(0x14, 1)
 #define   MI_DISPLAY_FLIP_PLANE(n) ((n)  20)
 #define MI_STORE_DWORD_IMM MI_INSTR(0x20, 1)
 #define   MI_MEM_VIRTUAL   (1  22) /* 965+ only */
@@ 

[Bug 15685] Kernel 2.6.33 fails to suspend (bisected)

2010-04-05 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=15685


Rafael J. Wysocki r...@sisk.pl changed:

   What|Removed |Added

 CC||r...@sisk.pl
 Blocks||14885, 7216




--- Comment #10 from Rafael J. Wysocki r...@sisk.pl  2010-04-05 21:25:08 ---
First-Bad-Commit : 312ea8da049a1830aa50c6e2e50e30df476e

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

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


[PATCH] drm/radeon/kms: fix washed out image on legacy tv dac

2010-04-05 Thread Alex Deucher
From dd3c60875d551a2381a6819203a5f6cc2936f678 Mon Sep 17 00:00:00 2001
From: Alex Deucher alexdeuc...@gmail.com
Date: Mon, 5 Apr 2010 23:57:52 -0400
Subject: [PATCH] drm/radeon/kms: fix washed out image on legacy tv dac

bad cast was overwriting the tvdac adj values
Fixes fdo bug 27478

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

diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c
b/drivers/gpu/drm/radeon/radeon_connectors.c
index 60d5981..3fba505 100644
--- a/drivers/gpu/drm/radeon/radeon_connectors.c
+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
@@ -315,7 +315,7 @@ int radeon_connector_set_property(struct
drm_connector *connector, struct drm_pr
radeon_encoder = to_radeon_encoder(encoder);
if (!radeon_encoder-enc_priv)
return 0;
-   if (rdev-is_atom_bios) {
+   if (ASIC_IS_AVIVO(rdev) || radeon_r4xx_atom) {
struct radeon_encoder_atom_dac *dac_int;
dac_int = radeon_encoder-enc_priv;
dac_int-tv_std = val;
-- 
1.5.6.3


0001-drm-radeon-kms-fix-washed-out-image-on-legacy-tv-da.patch
Description: application/mbox
--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: [PATCH] drm/radeon/kms: fix washed out image on legacy tv dac

2010-04-05 Thread Alex Deucher
This should go to stable.  I can re-sent with the stable cc if you want.

Alex

On Tue, Apr 6, 2010 at 12:02 AM, Alex Deucher alexdeuc...@gmail.com wrote:
 From dd3c60875d551a2381a6819203a5f6cc2936f678 Mon Sep 17 00:00:00 2001
 From: Alex Deucher alexdeuc...@gmail.com
 Date: Mon, 5 Apr 2010 23:57:52 -0400
 Subject: [PATCH] drm/radeon/kms: fix washed out image on legacy tv dac

 bad cast was overwriting the tvdac adj values
 Fixes fdo bug 27478

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

 diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c
 b/drivers/gpu/drm/radeon/radeon_connectors.c
 index 60d5981..3fba505 100644
 --- a/drivers/gpu/drm/radeon/radeon_connectors.c
 +++ b/drivers/gpu/drm/radeon/radeon_connectors.c
 @@ -315,7 +315,7 @@ int radeon_connector_set_property(struct
 drm_connector *connector, struct drm_pr
                radeon_encoder = to_radeon_encoder(encoder);
                if (!radeon_encoder-enc_priv)
                        return 0;
 -               if (rdev-is_atom_bios) {
 +               if (ASIC_IS_AVIVO(rdev) || radeon_r4xx_atom) {
                        struct radeon_encoder_atom_dac *dac_int;
                        dac_int = radeon_encoder-enc_priv;
                        dac_int-tv_std = val;
 --
 1.5.6.3


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


[PATCH] drm/radeon/kms: legacy tv dac cleanup

2010-04-05 Thread Alex Deucher
From 86a4f52d0387851b73cd41c3fde515c5d35f9935 Mon Sep 17 00:00:00 2001
From: Alex Deucher alexdeuc...@gmail.com
Date: Tue, 6 Apr 2010 00:05:46 -0400
Subject: [PATCH] drm/radeon/kms: legacy tv dac cleanup

- fix formatting
- clean up tv_dac_cntl handling for tv

Signed-off-by: Alex Deucher alexdeuc...@gmail.com
---
 drivers/gpu/drm/radeon/radeon_legacy_encoders.c |   58 +--
 1 files changed, 33 insertions(+), 25 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
index f4f15dd..341df86 100644
--- a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
+++ b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
@@ -817,8 +817,8 @@ static void radeon_legacy_tv_dac_dpms(struct
drm_encoder *encoder, int mode)
crtc2_gen_cntl = ~RADEON_CRTC2_CRT2_ON;

if (rdev-family == CHIP_R420 ||
-   rdev-family == CHIP_R423 ||
-   rdev-family == CHIP_RV410)
+   rdev-family == CHIP_R423 ||
+   rdev-family == CHIP_RV410)
tv_dac_cntl |= (R420_TV_DAC_RDACPD |
R420_TV_DAC_GDACPD |
R420_TV_DAC_BDACPD |
@@ -892,35 +892,43 @@ static void radeon_legacy_tv_dac_mode_set(struct
drm_encoder *encoder,
if (rdev-family != CHIP_R200) {
tv_dac_cntl = RREG32(RADEON_TV_DAC_CNTL);
if (rdev-family == CHIP_R420 ||
-   rdev-family == CHIP_R423 ||
-   rdev-family == CHIP_RV410) {
+   rdev-family == CHIP_R423 ||
+   rdev-family == CHIP_RV410) {
tv_dac_cntl = ~(RADEON_TV_DAC_STD_MASK |
-   RADEON_TV_DAC_BGADJ_MASK |
-   R420_TV_DAC_DACADJ_MASK |
-   R420_TV_DAC_RDACPD |
-   R420_TV_DAC_GDACPD |
-   R420_TV_DAC_BDACPD |
-   R420_TV_DAC_TVENABLE);
+RADEON_TV_DAC_BGADJ_MASK |
+R420_TV_DAC_DACADJ_MASK |
+R420_TV_DAC_RDACPD |
+R420_TV_DAC_GDACPD |
+R420_TV_DAC_BDACPD |
+R420_TV_DAC_TVENABLE);
} else {
tv_dac_cntl = ~(RADEON_TV_DAC_STD_MASK |
-   RADEON_TV_DAC_BGADJ_MASK |
-   RADEON_TV_DAC_DACADJ_MASK |
-   RADEON_TV_DAC_RDACPD |
-   RADEON_TV_DAC_GDACPD |
-   RADEON_TV_DAC_BDACPD);
+RADEON_TV_DAC_BGADJ_MASK |
+RADEON_TV_DAC_DACADJ_MASK |
+RADEON_TV_DAC_RDACPD |
+RADEON_TV_DAC_GDACPD |
+RADEON_TV_DAC_BDACPD);
}

-   /*  FIXME TV */
-   if (tv_dac) {
-   struct radeon_encoder_tv_dac *tv_dac = 
radeon_encoder-enc_priv;
-   tv_dac_cntl |= (RADEON_TV_DAC_NBLANK |
-   RADEON_TV_DAC_NHOLD |
-   RADEON_TV_DAC_STD_PS2 |
-   tv_dac-ps2_tvdac_adj);
+   tv_dac_cntl |= RADEON_TV_DAC_NBLANK | RADEON_TV_DAC_NHOLD;
+
+   if (is_tv) {
+   if (tv_dac-tv_std == TV_STD_NTSC ||
+   tv_dac-tv_std == TV_STD_NTSC_J ||
+   tv_dac-tv_std == TV_STD_PAL_M ||
+   tv_dac-tv_std == TV_STD_PAL_60)
+   tv_dac_cntl |= tv_dac-ntsc_tvdac_adj;
+   else
+   tv_dac_cntl |= tv_dac-pal_tvdac_adj;
+
+   if (tv_dac-tv_std == TV_STD_NTSC ||
+   tv_dac-tv_std == TV_STD_NTSC_J)
+   tv_dac_cntl |= RADEON_TV_DAC_STD_NTSC;
+   else
+   tv_dac_cntl |= RADEON_TV_DAC_STD_PAL;
} else
-   tv_dac_cntl |= (RADEON_TV_DAC_NBLANK |
-   RADEON_TV_DAC_NHOLD |
-   RADEON_TV_DAC_STD_PS2);
+   tv_dac_cntl |= (RADEON_TV_DAC_STD_PS2 |
+   tv_dac-ps2_tvdac_adj);


[PATCH] drm/radeon/kms: clean up atom dac handling

2010-04-05 Thread Alex Deucher
From affc52fe492309291ca14902cb88e156ff3bb9ea Mon Sep 17 00:00:00 2001
From: Alex Deucher alexdeuc...@gmail.com
Date: Tue, 6 Apr 2010 01:22:41 -0400
Subject: [PATCH] drm/radeon/kms: clean up atom dac handling

- make sure legacy dac1 has an enc priv
- remove unused num var
- no need for extra tv_dac var in atom dac functions

Signed-off-by: Alex Deucher alexdeuc...@gmail.com
---
 drivers/gpu/drm/radeon/radeon_encoders.c |   21 +++--
 1 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_encoders.c
b/drivers/gpu/drm/radeon/radeon_encoders.c
index b89e287..ea1045b 100644
--- a/drivers/gpu/drm/radeon/radeon_encoders.c
+++ b/drivers/gpu/drm/radeon/radeon_encoders.c
@@ -314,12 +314,8 @@ atombios_dac_setup(struct drm_encoder *encoder, int action)
struct radeon_device *rdev = dev-dev_private;
struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
DAC_ENCODER_CONTROL_PS_ALLOCATION args;
-   int index = 0, num = 0;
+   int index = 0;
struct radeon_encoder_atom_dac *dac_info = radeon_encoder-enc_priv;
-   enum radeon_tv_std tv_std = TV_STD_NTSC;
-
-   if (dac_info-tv_std)
-   tv_std = dac_info-tv_std;

memset(args, 0, sizeof(args));

@@ -327,12 +323,10 @@ atombios_dac_setup(struct drm_encoder *encoder,
int action)
case ENCODER_OBJECT_ID_INTERNAL_DAC1:
case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1:
index = GetIndexIntoMasterTable(COMMAND, DAC1EncoderControl);
-   num = 1;
break;
case ENCODER_OBJECT_ID_INTERNAL_DAC2:
case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC2:
index = GetIndexIntoMasterTable(COMMAND, DAC2EncoderControl);
-   num = 2;
break;
}

@@ -343,7 +337,7 @@ atombios_dac_setup(struct drm_encoder *encoder, int action)
else if (radeon_encoder-active_device  (ATOM_DEVICE_CV_SUPPORT))
args.ucDacStandard = ATOM_DAC1_CV;
else {
-   switch (tv_std) {
+   switch (dac_info-tv_std) {
case TV_STD_PAL:
case TV_STD_PAL_M:
case TV_STD_SCART_PAL:
@@ -374,10 +368,6 @@ atombios_tv_setup(struct drm_encoder *encoder, int action)
TV_ENCODER_CONTROL_PS_ALLOCATION args;
int index = 0;
struct radeon_encoder_atom_dac *dac_info = radeon_encoder-enc_priv;
-   enum radeon_tv_std tv_std = TV_STD_NTSC;
-
-   if (dac_info-tv_std)
-   tv_std = dac_info-tv_std;

memset(args, 0, sizeof(args));

@@ -388,7 +378,7 @@ atombios_tv_setup(struct drm_encoder *encoder, int action)
if (radeon_encoder-active_device  (ATOM_DEVICE_CV_SUPPORT))
args.sTVEncoder.ucTvStandard = ATOM_TV_CV;
else {
-   switch (tv_std) {
+   switch (dac_info-tv_std) {
case TV_STD_NTSC:
args.sTVEncoder.ucTvStandard = ATOM_TV_NTSC;
break;
@@ -1556,12 +1546,14 @@ static const struct drm_encoder_funcs
radeon_atom_enc_funcs = {
 struct radeon_encoder_atom_dac *
 radeon_atombios_set_dac_info(struct radeon_encoder *radeon_encoder)
 {
+   struct drm_device *dev = radeon_encoder-base.dev;
+   struct radeon_device *rdev = dev-dev_private;
struct radeon_encoder_atom_dac *dac = kzalloc(sizeof(struct
radeon_encoder_atom_dac), GFP_KERNEL);

if (!dac)
return NULL;

-   dac-tv_std = TV_STD_NTSC;
+   dac-tv_std = radeon_atombios_get_tv_info(rdev);
return dac;
 }

@@ -1639,6 +1631,7 @@ radeon_add_atom_encoder(struct drm_device *dev,
uint32_t encoder_id, uint32_t su
break;
case ENCODER_OBJECT_ID_INTERNAL_DAC1:
drm_encoder_init(dev, encoder, radeon_atom_enc_funcs, 
DRM_MODE_ENCODER_DAC);
+   radeon_encoder-enc_priv = 
radeon_atombios_set_dac_info(radeon_encoder);
drm_encoder_helper_add(encoder, radeon_atom_dac_helper_funcs);
break;
case ENCODER_OBJECT_ID_INTERNAL_DAC2:
-- 
1.5.6.3


0001-drm-radeon-kms-clean-up-atom-dac-handling.patch
Description: application/mbox
--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel