[Bug 42727] radeon KMS with CRT TV

2012-02-09 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=42727





--- Comment #3 from Michel Dänzer   2012-02-09 09:13:35 ---
Looks like the radeon driver uses NTSC output by default, can the TV handle
that?

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


Re: [PATCH 5/5] drm/vgem: properly implement mmap

2012-02-09 Thread Ben Widawsky
On 02/09/2012 12:36 AM, Chris Wilson wrote:
> On Thu,  9 Feb 2012 00:19:31 +0100, Ben Widawsky  wrote:
>> Mostly copied from i915 gtt mmaps, this will properly fault in pages as
>> the user tries to use them. The only thing of note are that no
>> prefaulting occurs, so perhaps some kind of madvise will happen later if
>> needed.
> 
> What's the goal here? Why not copy the simpler (from the driver
> perspective) CPU mmaps? I presume that this will be required for dmabuf
> in some form?
> -Chris
> 

That was what everyone seemed to want from the original RFC. I think
Eric said something about helping out valgrind. I don't recall the
other reasons.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 33038] [RADEON:KMS:R600C] celestia crashes radeon_cs_gem.c:181: cs_gem_write_reloc: Assertion `boi->space_accounted' failed

2012-02-09 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=33038

aceman  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WORKSFORME

--- Comment #10 from aceman  2012-02-09 01:21:46 PST ---
Let's close this, it does not currently happen. And also see bug 43893 comment
15.

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


[Bug 45760] World of warcraft 4.3 slow down after a hour of game

2012-02-09 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=45760

Michel Dänzer  changed:

   What|Removed |Added

  Attachment #56790|text/x-log  |text/plain
  mime type||

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


[Bug 45760] World of warcraft 4.3 slow down after a hour of game

2012-02-09 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=45760

Michel Dänzer  changed:

   What|Removed |Added

  Attachment #56791|text/x-log  |text/plain
  mime type||

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


[Bug 45760] World of warcraft 4.3 slow down after a hour of game

2012-02-09 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=45760

Michel Dänzer  changed:

   What|Removed |Added

  Attachment #56792|text/x-log  |text/plain
  mime type||

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


[Bug 45760] World of warcraft 4.3 slow down after a hour of game

2012-02-09 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=45760

--- Comment #6 from Michel Dänzer  2012-02-09 01:33:03 PST 
---
> With start of game the fps is above 30. After hour of game fps down to 10. 
> That
> may be cured by changing, for example, vertical sync in game settings, but
> after hour of game fps down to 10 again.

Hmm, sounds like maybe there's some kind of resource leak, and when you change
settings, things are reinitialized and it starts afresh...

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


Re: [PATCH 5/5] drm/vgem: properly implement mmap

2012-02-09 Thread Daniel Vetter
On Wed, Feb 08, 2012 at 11:36:22PM +, Chris Wilson wrote:
> On Thu,  9 Feb 2012 00:19:31 +0100, Ben Widawsky  wrote:
> > Mostly copied from i915 gtt mmaps, this will properly fault in pages as
> > the user tries to use them. The only thing of note are that no
> > prefaulting occurs, so perhaps some kind of madvise will happen later if
> > needed.
> 
> What's the goal here? Why not copy the simpler (from the driver
> perspective) CPU mmaps? I presume that this will be required for dmabuf
> in some form?

Yeah, for proper instead of hacked-up dma_buf mmap support I expect that
the expoerter needs to provide some sort of vm_insert_pfn_from_dma_buf
function. We need this so that non-coherent dma_buf objects can fake
coherency and also to allow (eventually) eviction. For that the exporter
needs to be able to handle page-faults, so I've figured we might want to
hack something together.

I know it's not a beauty, because drm isn't a fs yet ;-)
-Daniel
-- 
Daniel Vetter
Mail: dan...@ffwll.ch
Mobile: +41 (0)79 365 57 48
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH 1/2] intel: Mark up with valgrind intrinsics to reduce false positives

2012-02-09 Thread Chris Wilson
In particular, declare the hidden CPU mmaps to valgrind so that it knows
about those memory regions.

References: https://bugs.freedesktop.org/show_bug.cgi?id=35071
Signed-off-by: Chris Wilson 
---
 configure.ac |3 ++
 intel/Makefile.am|1 +
 intel/intel_bufmgr_gem.c |   52 +
 3 files changed, 42 insertions(+), 14 deletions(-)

diff --git a/configure.ac b/configure.ac
index 773167f..3ca7b79 100644
--- a/configure.ac
+++ b/configure.ac
@@ -258,6 +258,9 @@ if test "x$INTEL" != "xno" -o "x$RADEON" != "xno"; then
 fi
 fi
 
+PKG_CHECK_MODULES(VALGRIND, [valgrind],
+ AC_DEFINE([HAVE_VALGRIND], 1, [Use valgrind intrinsics to 
suppress false warings]),)
+
 AM_CONDITIONAL(HAVE_INTEL, [test "x$INTEL" != "xno"])
 AM_CONDITIONAL(HAVE_RADEON, [test "x$RADEON" != "xno"])
 if test "x$RADEON" = xyes; then
diff --git a/intel/Makefile.am b/intel/Makefile.am
index 581c8c0..e313614 100644
--- a/intel/Makefile.am
+++ b/intel/Makefile.am
@@ -28,6 +28,7 @@ AM_CFLAGS = \
-I$(top_srcdir)/intel \
$(PTHREADSTUBS_CFLAGS) \
$(PCIACCESS_CFLAGS) \
+   $(VALGRIND_CFLAGS) \
-I$(top_srcdir)/include/drm
 
 libdrm_intel_la_LTLIBRARIES = libdrm_intel.la
diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
index 2b4fab1..4d30e62 100644
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
@@ -62,6 +62,16 @@
 
 #include "i915_drm.h"
 
+#ifdef HAVE_VALGRIND
+#include 
+#include 
+#define VG(x) x
+#else
+#define VG(x)
+#endif
+
+#define VG_CLEAR(s) VG(memset(&s, 0, sizeof(s)))
+
 #define DBG(...) do {  \
if (bufmgr_gem->bufmgr.debug)   \
fprintf(stderr, __VA_ARGS__);   \
@@ -538,7 +548,7 @@ drm_intel_gem_bo_busy(drm_intel_bo *bo)
struct drm_i915_gem_busy busy;
int ret;
 
-   memset(&busy, 0, sizeof(busy));
+   VG_CLEAR(busy);
busy.handle = bo_gem->gem_handle;
 
ret = drmIoctl(bufmgr_gem->fd, DRM_IOCTL_I915_GEM_BUSY, &busy);
@@ -552,6 +562,7 @@ drm_intel_gem_bo_madvise_internal(drm_intel_bufmgr_gem 
*bufmgr_gem,
 {
struct drm_i915_gem_madvise madv;
 
+   VG_CLEAR(madv);
madv.handle = bo_gem->gem_handle;
madv.madv = state;
madv.retained = 1;
@@ -679,7 +690,8 @@ retry:
return NULL;
 
bo_gem->bo.size = bo_size;
-   memset(&create, 0, sizeof(create));
+
+   VG_CLEAR(create);
create.size = bo_size;
 
ret = drmIoctl(bufmgr_gem->fd,
@@ -835,7 +847,7 @@ drm_intel_bo_gem_create_from_name(drm_intel_bufmgr *bufmgr,
if (!bo_gem)
return NULL;
 
-   memset(&open_arg, 0, sizeof(open_arg));
+   VG_CLEAR(open_arg);
open_arg.name = handle;
ret = drmIoctl(bufmgr_gem->fd,
   DRM_IOCTL_GEM_OPEN,
@@ -858,7 +870,7 @@ drm_intel_bo_gem_create_from_name(drm_intel_bufmgr *bufmgr,
bo_gem->global_name = handle;
bo_gem->reusable = false;
 
-   memset(&get_tiling, 0, sizeof(get_tiling));
+   VG_CLEAR(get_tiling);
get_tiling.handle = bo_gem->gem_handle;
ret = drmIoctl(bufmgr_gem->fd,
   DRM_IOCTL_I915_GEM_GET_TILING,
@@ -889,6 +901,7 @@ drm_intel_gem_bo_free(drm_intel_bo *bo)
 
DRMLISTDEL(&bo_gem->vma_list);
if (bo_gem->mem_virtual) {
+   VG(VALGRIND_FREELIKE_BLOCK(bo_gem->mem_virtual, 0));
munmap(bo_gem->mem_virtual, bo_gem->bo.size);
bufmgr_gem->vma_count--;
}
@@ -898,7 +911,7 @@ drm_intel_gem_bo_free(drm_intel_bo *bo)
}
 
/* Close this object */
-   memset(&close, 0, sizeof(close));
+   VG_CLEAR(close);
close.handle = bo_gem->gem_handle;
ret = drmIoctl(bufmgr_gem->fd, DRM_IOCTL_GEM_CLOSE, &close);
if (ret != 0) {
@@ -1103,7 +1116,7 @@ static int drm_intel_gem_bo_map(drm_intel_bo *bo, int 
write_enable)
DBG("bo_map: %d (%s), map_count=%d\n",
bo_gem->gem_handle, bo_gem->name, bo_gem->map_count);
 
-   memset(&mmap_arg, 0, sizeof(mmap_arg));
+   VG_CLEAR(mmap_arg);
mmap_arg.handle = bo_gem->gem_handle;
mmap_arg.offset = 0;
mmap_arg.size = bo->size;
@@ -1120,12 +1133,14 @@ static int drm_intel_gem_bo_map(drm_intel_bo *bo, int 
write_enable)
pthread_mutex_unlock(&bufmgr_gem->lock);
return ret;
}
+   VG(VALGRIND_MALLOCLIKE_BLOCK(mmap_arg.addr_ptr, mmap_arg.size, 
0, 1));
bo_gem->mem_virtual = (void *)(uintptr_t) mmap_arg.addr_ptr;
}
DBG("bo_map: %d (%s) -> %p\n", bo_gem->gem_handle, bo_gem->name,
bo_gem->mem_virtual);
bo->virtual = bo_gem->mem_virtual;
 
+   VG_CLEAR(set_domain);
set_domain.handle = bo_gem->

[PATCH 2/2] intel: Detect cache domain inconsistency with valgrind

2012-02-09 Thread Chris Wilson
Every access to either the GTT or CPU pointer is supposed to be
proceeded by a set_domain ioctl so that GEM is able to manage the cache
domains correctly and for the following access to be coherent. Of
course, some people explicitly want incoherent, non-blocking access
which is going to trigger warnings by this patch but are probably better
served by explicit suppression.

Signed-off-by: Chris Wilson 
---
 intel/intel_bufmgr_gem.c |   22 ++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
index 4d30e62..d40f2cd 100644
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
@@ -1098,6 +1098,20 @@ static void drm_intel_gem_bo_unreference(drm_intel_bo 
*bo)
}
 }
 
+static void
+drm_intel_gem_bo_mark_mmaps_incoherent(drm_intel_bo *bo)
+{
+#if HAVE_VALGRIND
+   drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *) bo;
+
+   if (bo_gem->mem_virtual)
+   VALGRIND_MAKE_MEM_NOACCESS(bo_gem->mem_virtual, bo->size);
+
+   if (bo_gem->gtt_virtual)
+   VALGRIND_MAKE_MEM_NOACCESS(bo_gem->gtt_virtual, bo->size);
+#endif
+}
+
 static int drm_intel_gem_bo_map(drm_intel_bo *bo, int write_enable)
 {
drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bo->bufmgr;
@@ -1159,6 +1173,8 @@ static int drm_intel_gem_bo_map(drm_intel_bo *bo, int 
write_enable)
if (write_enable)
bo_gem->mapped_cpu_write = true;
 
+   drm_intel_gem_bo_mark_mmaps_incoherent(bo);
+   VALGRIND_MAKE_MEM_DEFINED(bo_gem->mem_virtual, bo->size);
pthread_mutex_unlock(&bufmgr_gem->lock);
 
return 0;
@@ -1239,6 +1255,8 @@ int drm_intel_gem_bo_map_gtt(drm_intel_bo *bo)
strerror(errno));
}
 
+   drm_intel_gem_bo_mark_mmaps_incoherent(bo);
+   VALGRIND_MAKE_MEM_DEFINED(bo_gem->gtt_virtual, bo->size);
pthread_mutex_unlock(&bufmgr_gem->lock);
 
return 0;
@@ -1614,6 +1632,8 @@ drm_intel_gem_bo_process_reloc(drm_intel_bo *bo)
if (target_bo == bo)
continue;
 
+   drm_intel_gem_bo_mark_mmaps_incoherent(bo);
+
/* Continue walking the tree depth-first. */
drm_intel_gem_bo_process_reloc(target_bo);
 
@@ -1638,6 +1658,8 @@ drm_intel_gem_bo_process_reloc2(drm_intel_bo *bo)
if (target_bo == bo)
continue;
 
+   drm_intel_gem_bo_mark_mmaps_incoherent(bo);
+
/* Continue walking the tree depth-first. */
drm_intel_gem_bo_process_reloc2(target_bo);
 
-- 
1.7.9

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


Re: [Intel-gfx] [PATCH 2/2] intel: Detect cache domain inconsistency with valgrind

2012-02-09 Thread Daniel Vetter
On Thu, Feb 09, 2012 at 10:43:11AM +, Chris Wilson wrote:
> Every access to either the GTT or CPU pointer is supposed to be
> proceeded by a set_domain ioctl so that GEM is able to manage the cache
> domains correctly and for the following access to be coherent. Of
> course, some people explicitly want incoherent, non-blocking access
> which is going to trigger warnings by this patch but are probably better
> served by explicit suppression.
> 
> Signed-off-by: Chris Wilson 

I think we should also mark the mmaps incoherent when putting a bo into
the libdrm cache to catch use after free issues (and issues with
concurrent set_tiling).
-Daniel
-- 
Daniel Vetter
Mail: dan...@ffwll.ch
Mobile: +41 (0)79 365 57 48
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 45825] Displayport output unusable on Llano

2012-02-09 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=45825

Alex Deucher  changed:

   What|Removed |Added

 AssignedTo|xorg-driver-...@lists.x.org |dri-devel@lists.freedesktop
   ||.org
  QAContact|xorg-t...@lists.x.org   |
Product|xorg|DRI
  Component|Driver/Radeon   |DRM/Radeon

--- Comment #3 from Alex Deucher  2012-02-09 05:19:55 PST ---
Please attach your dmesg output.  What kernel are you using?

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


[Bug 16140] [RADEON:KMS:RV250:RESUME] suspend to RAM resume broken

2012-02-09 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=16140





--- Comment #46 from Paul Bolle   2012-02-09 13:54:32 ---
(In reply to comment #45)
> I posted this workaround on the Canonical Launchpad
> bug report some time ago; I guess it hasn't been shared outside as of yet.

Could you add a link to that bug report?

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


[Bug 34096] r300: Cannot get a relocation in radeon_drm_cs_write_reloc.

2012-02-09 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=34096

--- Comment #4 from 414N  2012-02-09 06:00:05 PST ---
Having this problem too with a mesa built from a 2 days old git snapshot.
The problem occurs when trying to launch a WebGL demo
(http://www.chromeexperiments.com/detail/glass-shader/) using Firefox 10.0
(x86_64).
On the shell the following message appears:

radeon: Cannot get a relocation in radeon_drm_cs_write_reloc.

and then Firefox crashes.
Reading the previous comments I looked at dmesg too and the following happens:
1) When using a 3.1.0 kernel, some lines similar to those already mentioned in
the above comments appear;
2) When using a 3.2.5 kernel, nothing appears in dmesg anymore after Firefox
crashing.
I tried using the 3.2.5 kernel because I thought that some changes undergone in
libdrm would only be available with a newer kernel.
My system specs follow:
CPU: AMD Athlon 64 FX-55
GPU: ATI Technologies Inc R420 JP [Radeon X800XT]
OS: Slackware64 13.37
Mesa git snapshot taken on February, the 7th
libdrm-2.4.31

If more information is needed, please tell me.

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


[Bug 34096] r300: Cannot get a relocation in radeon_drm_cs_write_reloc.

2012-02-09 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=34096

--- Comment #5 from Sven Arvidsson  2012-02-09 06:05:40 PST ---
414N : It's probably a better idea to open a new bug for this, it might not be
the same problem.

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


[PATCH] Ignore LVDS on hp t5745 and hp st5747 thin client

2012-02-09 Thread Marc Gariepy
Add a no_lvds quirk for the HP t5745 and HP st5747 thin clients

dmidecode for those thin clients are attached in thoses bugs:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/911916
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/911920


Signed-off-by: Marc Gariepy 
---
Hello,

this patch was previously posted on dri-devel and this is now
reformated.

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

diff --git a/drivers/gpu/drm/i915/intel_lvds.c 
b/drivers/gpu/drm/i915/intel_lvds.c
index 798f6e1..069f9ba 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -731,6 +731,22 @@ static const struct dmi_system_id intel_no_lvds[] = {
DMI_MATCH(DMI_BOARD_NAME, "AT5NM10T-I"),
},
},
+   {
+   .callback = intel_no_lvds_dmi_callback,
+   .ident = "Hewlett-Packard t5745",
+   .matches = {
+   DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
+   DMI_MATCH(DMI_BOARD_NAME, "hp t5745"),
+   },
+   },
+   {
+   .callback = intel_no_lvds_dmi_callback,
+   .ident = "Hewlett-Packard st5747",
+   .matches = {
+   DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
+   DMI_MATCH(DMI_BOARD_NAME, "hp st5747"),
+   },
+   },
 
{ } /* terminating entry */
 };
-- 
1.7.5.4

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


Re: [PATCH 1/2] intel: Mark up with valgrind intrinsics to reduce false positives

2012-02-09 Thread Ben Widawsky
On 02/09/2012 11:43 AM, Chris Wilson wrote:
> In particular, declare the hidden CPU mmaps to valgrind so that it knows
> about those memory regions.
> 
> References: https://bugs.freedesktop.org/show_bug.cgi?id=35071
> Signed-off-by: Chris Wilson 
Acked-by: Ben Widawsky 

> ---
>  configure.ac |3 ++
>  intel/Makefile.am|1 +
>  intel/intel_bufmgr_gem.c |   52 +
>  3 files changed, 42 insertions(+), 14 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 773167f..3ca7b79 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -258,6 +258,9 @@ if test "x$INTEL" != "xno" -o "x$RADEON" != "xno"; then
>  fi
>  fi
>  
> +PKG_CHECK_MODULES(VALGRIND, [valgrind],
> +   AC_DEFINE([HAVE_VALGRIND], 1, [Use valgrind intrinsics to 
> suppress false warings]),)
> +
>  AM_CONDITIONAL(HAVE_INTEL, [test "x$INTEL" != "xno"])
>  AM_CONDITIONAL(HAVE_RADEON, [test "x$RADEON" != "xno"])
>  if test "x$RADEON" = xyes; then
> diff --git a/intel/Makefile.am b/intel/Makefile.am
> index 581c8c0..e313614 100644
> --- a/intel/Makefile.am
> +++ b/intel/Makefile.am
> @@ -28,6 +28,7 @@ AM_CFLAGS = \
>   -I$(top_srcdir)/intel \
>   $(PTHREADSTUBS_CFLAGS) \
>   $(PCIACCESS_CFLAGS) \
> + $(VALGRIND_CFLAGS) \
>   -I$(top_srcdir)/include/drm
>  
>  libdrm_intel_la_LTLIBRARIES = libdrm_intel.la
> diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
> index 2b4fab1..4d30e62 100644
> --- a/intel/intel_bufmgr_gem.c
> +++ b/intel/intel_bufmgr_gem.c
> @@ -62,6 +62,16 @@
>  
>  #include "i915_drm.h"
>  
> +#ifdef HAVE_VALGRIND
> +#include 
> +#include 
> +#define VG(x) x
> +#else
> +#define VG(x)
> +#endif
> +
> +#define VG_CLEAR(s) VG(memset(&s, 0, sizeof(s)))
> +
>  #define DBG(...) do {\
>   if (bufmgr_gem->bufmgr.debug)   \
>   fprintf(stderr, __VA_ARGS__);   \
> @@ -538,7 +548,7 @@ drm_intel_gem_bo_busy(drm_intel_bo *bo)
>   struct drm_i915_gem_busy busy;
>   int ret;
>  
> - memset(&busy, 0, sizeof(busy));
> + VG_CLEAR(busy);
>   busy.handle = bo_gem->gem_handle;
>  
>   ret = drmIoctl(bufmgr_gem->fd, DRM_IOCTL_I915_GEM_BUSY, &busy);
> @@ -552,6 +562,7 @@ drm_intel_gem_bo_madvise_internal(drm_intel_bufmgr_gem 
> *bufmgr_gem,
>  {
>   struct drm_i915_gem_madvise madv;
>  
> + VG_CLEAR(madv);
>   madv.handle = bo_gem->gem_handle;
>   madv.madv = state;
>   madv.retained = 1;
> @@ -679,7 +690,8 @@ retry:
>   return NULL;
>  
>   bo_gem->bo.size = bo_size;
> - memset(&create, 0, sizeof(create));
> +
> + VG_CLEAR(create);
>   create.size = bo_size;
>  
>   ret = drmIoctl(bufmgr_gem->fd,
> @@ -835,7 +847,7 @@ drm_intel_bo_gem_create_from_name(drm_intel_bufmgr 
> *bufmgr,
>   if (!bo_gem)
>   return NULL;
>  
> - memset(&open_arg, 0, sizeof(open_arg));
> + VG_CLEAR(open_arg);
>   open_arg.name = handle;
>   ret = drmIoctl(bufmgr_gem->fd,
>  DRM_IOCTL_GEM_OPEN,
> @@ -858,7 +870,7 @@ drm_intel_bo_gem_create_from_name(drm_intel_bufmgr 
> *bufmgr,
>   bo_gem->global_name = handle;
>   bo_gem->reusable = false;
>  
> - memset(&get_tiling, 0, sizeof(get_tiling));
> + VG_CLEAR(get_tiling);
>   get_tiling.handle = bo_gem->gem_handle;
>   ret = drmIoctl(bufmgr_gem->fd,
>  DRM_IOCTL_I915_GEM_GET_TILING,
> @@ -889,6 +901,7 @@ drm_intel_gem_bo_free(drm_intel_bo *bo)
>  
>   DRMLISTDEL(&bo_gem->vma_list);
>   if (bo_gem->mem_virtual) {
> + VG(VALGRIND_FREELIKE_BLOCK(bo_gem->mem_virtual, 0));
>   munmap(bo_gem->mem_virtual, bo_gem->bo.size);
>   bufmgr_gem->vma_count--;
>   }
> @@ -898,7 +911,7 @@ drm_intel_gem_bo_free(drm_intel_bo *bo)
>   }
>  
>   /* Close this object */
> - memset(&close, 0, sizeof(close));
> + VG_CLEAR(close);
>   close.handle = bo_gem->gem_handle;
>   ret = drmIoctl(bufmgr_gem->fd, DRM_IOCTL_GEM_CLOSE, &close);
>   if (ret != 0) {
> @@ -1103,7 +1116,7 @@ static int drm_intel_gem_bo_map(drm_intel_bo *bo, int 
> write_enable)
>   DBG("bo_map: %d (%s), map_count=%d\n",
>   bo_gem->gem_handle, bo_gem->name, bo_gem->map_count);
>  
> - memset(&mmap_arg, 0, sizeof(mmap_arg));
> + VG_CLEAR(mmap_arg);
>   mmap_arg.handle = bo_gem->gem_handle;
>   mmap_arg.offset = 0;
>   mmap_arg.size = bo->size;
> @@ -1120,12 +1133,14 @@ static int drm_intel_gem_bo_map(drm_intel_bo *bo, int 
> write_enable)
>   pthread_mutex_unlock(&bufmgr_gem->lock);
>   return ret;
>   }
> + VG(VALGRIND_MALLOCLIKE_BLOCK(mmap_arg.addr_ptr, mmap_arg.size, 
> 0, 1));
>   bo_gem->mem_virtual = (void *)(uintptr_t) mmap_arg.addr_

[Bug 45825] Displayport output unusable on Llano

2012-02-09 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=45825

--- Comment #4 from Tomi Pieviläinen  
2012-02-09 06:55:05 PST ---
Created attachment 56820
  --> https://bugs.freedesktop.org/attachment.cgi?id=56820
dmesg

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


[Bug 45825] Displayport output unusable on Llano

2012-02-09 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=45825

--- Comment #5 from Tomi Pieviläinen  
2012-02-09 06:56:30 PST ---
I have stock ubuntu oneiric kernel, linux-image-3.2.0-030200rc2-generic

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


[PATCH -next 0/0] vmwgfx updates

2012-02-09 Thread Thomas Hellstrom
A series of updates that brings in fake pageflipping support and
sets initial preferred mode in a way similar to how the legacy Xorg driver
does it. We bump minor to indicate availability of the pageflipping ioctl.

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


[PATCH 1/9] vmwgfx: Rework fence event action

2012-02-09 Thread Thomas Hellstrom
From: Jakob Bornecrantz 

Signed-off-by: Jakob Bornecrantz 
Reviewed-by: Thomas Hellstrom 
---
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.h   |   12 ++
 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c |  210 ++--
 2 files changed, 104 insertions(+), 118 deletions(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h 
b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
index dc27970..7f09db1 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
@@ -658,6 +658,18 @@ int vmw_overlay_num_overlays(struct vmw_private *dev_priv);
 int vmw_overlay_num_free_overlays(struct vmw_private *dev_priv);
 
 /**
+ * Fence function - vmwgfx_fence.c
+ */
+
+int vmw_event_fence_action_queue(struct drm_file *file_priv,
+struct vmw_fence_obj *fence,
+struct drm_pending_event *event,
+uint32_t *tv_sec,
+uint32_t *tv_usec,
+bool interruptible);
+
+
+/**
  * GMR Id manager
  */
 
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c 
b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
index 15fb260..ea9d045 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
@@ -69,12 +69,12 @@ struct vmw_user_fence {
  * be assigned the current time tv_usec val when the fence signals.
  */
 struct vmw_event_fence_action {
-   struct drm_pending_event e;
struct vmw_fence_action action;
+
+   struct drm_pending_event *event;
struct vmw_fence_obj *fence;
struct drm_device *dev;
-   struct kref kref;
-   uint32_t size;
+
uint32_t *tv_sec;
uint32_t *tv_usec;
 };
@@ -783,49 +783,6 @@ int vmw_fence_obj_unref_ioctl(struct drm_device *dev, void 
*data,
 TTM_REF_USAGE);
 }
 
-/**
- * vmw_event_fence_action_destroy
- *
- * @kref: The struct kref embedded in a struct vmw_event_fence_action.
- *
- * The vmw_event_fence_action destructor that may be called either after
- * the fence action cleanup, or when the event is delivered.
- * It frees both the vmw_event_fence_action struct and the actual
- * event structure copied to user-space.
- */
-static void vmw_event_fence_action_destroy(struct kref *kref)
-{
-   struct vmw_event_fence_action *eaction =
-   container_of(kref, struct vmw_event_fence_action, kref);
-   struct ttm_mem_global *mem_glob =
-   vmw_mem_glob(vmw_priv(eaction->dev));
-   uint32_t size = eaction->size;
-
-   kfree(eaction->e.event);
-   kfree(eaction);
-   ttm_mem_global_free(mem_glob, size);
-}
-
-
-/**
- * vmw_event_fence_action_delivered
- *
- * @e: The struct drm_pending_event embedded in a struct
- * vmw_event_fence_action.
- *
- * The struct drm_pending_event destructor that is called by drm
- * once the event is delivered. Since we don't know whether this function
- * will be called before or after the fence action destructor, we
- * free a refcount and destroy if it becomes zero.
- */
-static void vmw_event_fence_action_delivered(struct drm_pending_event *e)
-{
-   struct vmw_event_fence_action *eaction =
-   container_of(e, struct vmw_event_fence_action, e);
-
-   kref_put(&eaction->kref, vmw_event_fence_action_destroy);
-}
-
 
 /**
  * vmw_event_fence_action_seq_passed
@@ -836,18 +793,16 @@ static void vmw_event_fence_action_delivered(struct 
drm_pending_event *e)
  * This function is called when the seqno of the fence where @action is
  * attached has passed. It queues the event on the submitter's event list.
  * This function is always called from atomic context, and may be called
- * from irq context. It ups a refcount reflecting that we now have two
- * destructors.
+ * from irq context.
  */
 static void vmw_event_fence_action_seq_passed(struct vmw_fence_action *action)
 {
struct vmw_event_fence_action *eaction =
container_of(action, struct vmw_event_fence_action, action);
struct drm_device *dev = eaction->dev;
-   struct drm_file *file_priv = eaction->e.file_priv;
+   struct drm_file *file_priv = eaction->event->file_priv;
unsigned long irq_flags;
 
-   kref_get(&eaction->kref);
spin_lock_irqsave(&dev->event_lock, irq_flags);
 
if (likely(eaction->tv_sec != NULL)) {
@@ -858,7 +813,7 @@ static void vmw_event_fence_action_seq_passed(struct 
vmw_fence_action *action)
*eaction->tv_usec = tv.tv_usec;
}
 
-   list_add_tail(&eaction->e.link, &file_priv->event_list);
+   list_add_tail(&eaction->event->link, &file_priv->event_list);
wake_up_all(&file_priv->event_wait);
spin_unlock_irqrestore(&dev->event_lock, irq_flags);
 }
@@ -878,7 +833,7 @@ static void vmw_event_fence_action_cleanup(struct 
vmw_fence_action *action)
container_of(action, struct vmw_event_fence_action, action);
 
vmw_fence_obj_unreference(&eaction->fen

[PATCH 2/9] vmwgfx: Clean up pending event references to struct drm_file objects on close

2012-02-09 Thread Thomas Hellstrom
Pending events may have stale pointer references to struct drm_file objects
after a file has been closed, but before the event is supposed to be
attached to the drm file. Remove such events on file close.

Tested with "modetest".

Signed-off-by: Thomas Hellstrom 
Reviewed-by: Jakob Bornecrantz 
---
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c   |   11 ++
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.h   |1 +
 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c |   60 +++-
 drivers/gpu/drm/vmwgfx/vmwgfx_fence.h |3 ++
 4 files changed, 73 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c 
b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
index f390f5f..28f59a3c3 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
@@ -688,6 +688,15 @@ static int vmw_driver_unload(struct drm_device *dev)
return 0;
 }
 
+static void vmw_preclose(struct drm_device *dev,
+struct drm_file *file_priv)
+{
+   struct vmw_fpriv *vmw_fp = vmw_fpriv(file_priv);
+   struct vmw_private *dev_priv = vmw_priv(dev);
+
+   vmw_event_fence_fpriv_gone(dev_priv->fman, &vmw_fp->fence_events);
+}
+
 static void vmw_postclose(struct drm_device *dev,
 struct drm_file *file_priv)
 {
@@ -710,6 +719,7 @@ static int vmw_driver_open(struct drm_device *dev, struct 
drm_file *file_priv)
if (unlikely(vmw_fp == NULL))
return ret;
 
+   INIT_LIST_HEAD(&vmw_fp->fence_events);
vmw_fp->tfile = ttm_object_file_init(dev_priv->tdev, 10);
if (unlikely(vmw_fp->tfile == NULL))
goto out_no_tfile;
@@ -1102,6 +1112,7 @@ static struct drm_driver driver = {
.master_set = vmw_master_set,
.master_drop = vmw_master_drop,
.open = vmw_driver_open,
+   .preclose = vmw_preclose,
.postclose = vmw_postclose,
.fops = &vmwgfx_driver_fops,
.name = VMWGFX_DRIVER_NAME,
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h 
b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
index 7f09db1..93505ce 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
@@ -62,6 +62,7 @@
 struct vmw_fpriv {
struct drm_master *locked_master;
struct ttm_object_file *tfile;
+   struct list_head fence_events;
 };
 
 struct vmw_dma_buffer {
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c 
b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
index ea9d045..f2fb8f1 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
@@ -70,6 +70,7 @@ struct vmw_user_fence {
  */
 struct vmw_event_fence_action {
struct vmw_fence_action action;
+   struct list_head fpriv_head;
 
struct drm_pending_event *event;
struct vmw_fence_obj *fence;
@@ -783,6 +784,43 @@ int vmw_fence_obj_unref_ioctl(struct drm_device *dev, void 
*data,
 TTM_REF_USAGE);
 }
 
+/**
+ * vmw_event_fence_fpriv_gone - Remove references to struct drm_file objects
+ *
+ * @fman: Pointer to a struct vmw_fence_manager
+ * @event_list: Pointer to linked list of struct vmw_event_fence_action objects
+ * with pointers to a struct drm_file object about to be closed.
+ *
+ * This function removes all pending fence events with references to a
+ * specific struct drm_file object about to be closed. The caller is required
+ * to pass a list of all struct vmw_event_fence_action objects with such
+ * events attached. This function is typically called before the
+ * struct drm_file object's event management is taken down.
+ */
+void vmw_event_fence_fpriv_gone(struct vmw_fence_manager *fman,
+   struct list_head *event_list)
+{
+   struct vmw_event_fence_action *eaction;
+   struct drm_pending_event *event;
+   unsigned long irq_flags;
+
+   while (1) {
+   spin_lock_irqsave(&fman->lock, irq_flags);
+   if (list_empty(event_list))
+   goto out_unlock;
+   eaction = list_first_entry(event_list,
+  struct vmw_event_fence_action,
+  fpriv_head);
+   list_del_init(&eaction->fpriv_head);
+   event = eaction->event;
+   eaction->event = NULL;
+   spin_unlock_irqrestore(&fman->lock, irq_flags);
+   event->destroy(event);
+   }
+out_unlock:
+   spin_unlock_irqrestore(&fman->lock, irq_flags);
+}
+
 
 /**
  * vmw_event_fence_action_seq_passed
@@ -800,9 +838,14 @@ static void vmw_event_fence_action_seq_passed(struct 
vmw_fence_action *action)
struct vmw_event_fence_action *eaction =
container_of(action, struct vmw_event_fence_action, action);
struct drm_device *dev = eaction->dev;
-   struct drm_file *file_priv = eaction->event->file_priv;
+   struct drm_pending_event *event = eaction->event;
+   struct drm_file *file_priv;
   

[PATCH 3/9] vmwgfx: Make it possible to get fence from execbuf

2012-02-09 Thread Thomas Hellstrom
From: Jakob Bornecrantz 

Signed-off-by: Jakob Bornecrantz 
Reviewed-by: Thomas Hellstrom 
---
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.h |3 ++-
 drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c |   15 +++
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.c |   10 +-
 3 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h 
b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
index 93505ce..14c2f49 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
@@ -534,7 +534,8 @@ extern int vmw_execbuf_process(struct drm_file *file_priv,
   uint32_t command_size,
   uint64_t throttle_us,
   struct drm_vmw_fence_rep __user
-  *user_fence_rep);
+  *user_fence_rep,
+  struct vmw_fence_obj **out_fence);
 
 extern void
 vmw_execbuf_release_pinned_bo(struct vmw_private *dev_priv,
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c 
b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
index 40932fb..4acced4 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
@@ -1109,10 +1109,11 @@ int vmw_execbuf_process(struct drm_file *file_priv,
void *kernel_commands,
uint32_t command_size,
uint64_t throttle_us,
-   struct drm_vmw_fence_rep __user *user_fence_rep)
+   struct drm_vmw_fence_rep __user *user_fence_rep,
+   struct vmw_fence_obj **out_fence)
 {
struct vmw_sw_context *sw_context = &dev_priv->ctx;
-   struct vmw_fence_obj *fence;
+   struct vmw_fence_obj *fence = NULL;
uint32_t handle;
void *cmd;
int ret;
@@ -1208,8 +1209,13 @@ int vmw_execbuf_process(struct drm_file *file_priv,
vmw_execbuf_copy_fence_user(dev_priv, vmw_fpriv(file_priv), ret,
user_fence_rep, fence, handle);
 
-   if (likely(fence != NULL))
+   /* Don't unreference when handing fence out */
+   if (unlikely(out_fence != NULL)) {
+   *out_fence = fence;
+   fence = NULL;
+   } else if (likely(fence != NULL)) {
vmw_fence_obj_unreference(&fence);
+   }
 
mutex_unlock(&dev_priv->cmdbuf_mutex);
return 0;
@@ -1362,7 +1368,8 @@ int vmw_execbuf_ioctl(struct drm_device *dev, void *data,
ret = vmw_execbuf_process(file_priv, dev_priv,
  (void __user *)(unsigned long)arg->commands,
  NULL, arg->command_size, arg->throttle_us,
- (void __user *)(unsigned long)arg->fence_rep);
+ (void __user *)(unsigned long)arg->fence_rep,
+ NULL);
 
if (unlikely(ret != 0))
goto out_unlock;
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c 
b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
index b66ef0e..12619c3 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
@@ -547,7 +547,7 @@ static int do_surface_dirty_sou(struct vmw_private 
*dev_priv,
fifo_size = sizeof(*cmd) + sizeof(SVGASignedRect) * num;
cmd->header.size = cpu_to_le32(fifo_size - sizeof(cmd->header));
ret = vmw_execbuf_process(file_priv, dev_priv, NULL, cmd,
- fifo_size, 0, NULL);
+ fifo_size, 0, NULL, NULL);
 
if (unlikely(ret != 0))
break;
@@ -809,7 +809,7 @@ static int do_dmabuf_define_gmrfb(struct drm_file 
*file_priv,
cmd->body.ptr.offset = 0;
 
ret = vmw_execbuf_process(file_priv, dev_priv, NULL, cmd,
- fifo_size, 0, NULL);
+ fifo_size, 0, NULL, NULL);
 
kfree(cmd);
 
@@ -896,7 +896,7 @@ static int do_dmabuf_dirty_sou(struct drm_file *file_priv,
 
fifo_size = sizeof(*blits) * hit_num;
ret = vmw_execbuf_process(file_priv, dev_priv, NULL, blits,
- fifo_size, 0, NULL);
+ fifo_size, 0, NULL, NULL);
 
if (unlikely(ret != 0))
break;
@@ -1296,7 +1296,7 @@ int vmw_kms_present(struct vmw_private *dev_priv,
fifo_size = sizeof(*cmd) + sizeof(SVGASignedRect) * num;
cmd->header.size = cpu_to_le32(fifo_size - sizeof(cmd->header));
ret = vmw_execbuf_process(file_priv, dev_priv, NULL, cmd,
- fifo_size, 0, NULL);
+ fifo_size, 0, NULL, NULL);
 
if (unlikely(ret != 0))
break;
@@ -1409,7 +1409,7 @@ int vmw_

[PATCH 4/9] vmwgfx: Pipe fence out of screen object dirty functions

2012-02-09 Thread Thomas Hellstrom
From: Jakob Bornecrantz 

Signed-off-by: Jakob Bornecrantz 
Signed-off-by: Thomas Hellstrom 
---
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.c |   21 +++--
 1 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c 
b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
index 12619c3..24efcae 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
@@ -422,7 +422,8 @@ static int do_surface_dirty_sou(struct vmw_private 
*dev_priv,
struct vmw_framebuffer *framebuffer,
unsigned flags, unsigned color,
struct drm_clip_rect *clips,
-   unsigned num_clips, int inc)
+   unsigned num_clips, int inc,
+   struct vmw_fence_obj **out_fence)
 {
struct vmw_display_unit *units[VMWGFX_NUM_DISPLAY_UNITS];
struct drm_clip_rect *clips_ptr;
@@ -542,12 +543,15 @@ static int do_surface_dirty_sou(struct vmw_private 
*dev_priv,
if (num == 0)
continue;
 
+   /* only return the last fence */
+   if (out_fence && *out_fence)
+   vmw_fence_obj_unreference(out_fence);
 
/* recalculate package length */
fifo_size = sizeof(*cmd) + sizeof(SVGASignedRect) * num;
cmd->header.size = cpu_to_le32(fifo_size - sizeof(cmd->header));
ret = vmw_execbuf_process(file_priv, dev_priv, NULL, cmd,
- fifo_size, 0, NULL, NULL);
+ fifo_size, 0, NULL, out_fence);
 
if (unlikely(ret != 0))
break;
@@ -598,7 +602,7 @@ int vmw_framebuffer_surface_dirty(struct drm_framebuffer 
*framebuffer,
 
ret = do_surface_dirty_sou(dev_priv, file_priv, &vfbs->base,
   flags, color,
-  clips, num_clips, inc);
+  clips, num_clips, inc, NULL);
 
ttm_read_unlock(&vmaster->lock);
return 0;
@@ -821,7 +825,8 @@ static int do_dmabuf_dirty_sou(struct drm_file *file_priv,
   struct vmw_framebuffer *framebuffer,
   unsigned flags, unsigned color,
   struct drm_clip_rect *clips,
-  unsigned num_clips, int increment)
+  unsigned num_clips, int increment,
+  struct vmw_fence_obj **out_fence)
 {
struct vmw_display_unit *units[VMWGFX_NUM_DISPLAY_UNITS];
struct drm_clip_rect *clips_ptr;
@@ -894,9 +899,13 @@ static int do_dmabuf_dirty_sou(struct drm_file *file_priv,
if (hit_num == 0)
continue;
 
+   /* only return the last fence */
+   if (out_fence && *out_fence)
+   vmw_fence_obj_unreference(out_fence);
+
fifo_size = sizeof(*blits) * hit_num;
ret = vmw_execbuf_process(file_priv, dev_priv, NULL, blits,
- fifo_size, 0, NULL, NULL);
+ fifo_size, 0, NULL, out_fence);
 
if (unlikely(ret != 0))
break;
@@ -942,7 +951,7 @@ int vmw_framebuffer_dmabuf_dirty(struct drm_framebuffer 
*framebuffer,
} else {
ret = do_dmabuf_dirty_sou(file_priv, dev_priv, &vfbd->base,
  flags, color,
- clips, num_clips, increment);
+ clips, num_clips, increment, NULL);
}
 
ttm_read_unlock(&vmaster->lock);
-- 
1.7.4.4

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


[PATCH 5/9] vmwgfx: Add page flip support

2012-02-09 Thread Thomas Hellstrom
From: Jakob Bornecrantz 

Signed-off-by: Jakob Bornecrantz 
Reviewed-by: Thomas Hellstrom 
---
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.c  |   64 ++
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.h  |8 
 drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c |   34 ++
 3 files changed, 106 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c 
b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
index 24efcae..2286d47 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
@@ -1681,6 +1681,70 @@ int vmw_du_update_layout(struct vmw_private *dev_priv, 
unsigned num,
return 0;
 }
 
+int vmw_du_page_flip(struct drm_crtc *crtc,
+struct drm_framebuffer *fb,
+struct drm_pending_vblank_event *event)
+{
+   struct vmw_private *dev_priv = vmw_priv(crtc->dev);
+   struct drm_framebuffer *old_fb = crtc->fb;
+   struct vmw_framebuffer *vfb = vmw_framebuffer_to_vfb(fb);
+   struct drm_file *file_priv = event->base.file_priv;
+   struct vmw_fence_obj *fence = NULL;
+   struct drm_clip_rect clips;
+   int ret;
+
+   /* require ScreenObject support for page flipping */
+   if (!dev_priv->sou_priv)
+   return -ENOSYS;
+
+   if (!vmw_kms_screen_object_flippable(dev_priv, crtc))
+   return -EINVAL;
+
+   crtc->fb = fb;
+
+   /* do a full screen dirty update */
+   clips.x1 = clips.y1 = 0;
+   clips.x2 = fb->width;
+   clips.y2 = fb->height;
+
+   if (vfb->dmabuf)
+   ret = do_dmabuf_dirty_sou(file_priv, dev_priv, vfb,
+ 0, 0, &clips, 1, 1, &fence);
+   else
+   ret = do_surface_dirty_sou(dev_priv, file_priv, vfb,
+  0, 0, &clips, 1, 1, &fence);
+
+
+   if (ret != 0)
+   goto out_no_fence;
+   if (!fence) {
+   ret = -EINVAL;
+   goto out_no_fence;
+   }
+
+   ret = vmw_event_fence_action_queue(file_priv, fence,
+  &event->base,
+  &event->event.tv_sec,
+  &event->event.tv_usec,
+  true);
+
+   /*
+* No need to hold on to this now. The only cleanup
+* we need to do if we fail is unref the fence.
+*/
+   vmw_fence_obj_unreference(&fence);
+
+   if (vmw_crtc_to_du(crtc)->is_implicit)
+   vmw_kms_screen_object_update_implicit_fb(dev_priv, crtc);
+
+   return ret;
+
+out_no_fence:
+   crtc->fb = old_fb;
+   return ret;
+}
+
+
 void vmw_du_crtc_save(struct drm_crtc *crtc)
 {
 }
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h 
b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h
index a4f7f03..8184bc5 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h
@@ -121,6 +121,9 @@ struct vmw_display_unit {
  * Shared display unit functions - vmwgfx_kms.c
  */
 void vmw_display_unit_cleanup(struct vmw_display_unit *du);
+int vmw_du_page_flip(struct drm_crtc *crtc,
+struct drm_framebuffer *fb,
+struct drm_pending_vblank_event *event);
 void vmw_du_crtc_save(struct drm_crtc *crtc);
 void vmw_du_crtc_restore(struct drm_crtc *crtc);
 void vmw_du_crtc_gamma_set(struct drm_crtc *crtc,
@@ -154,5 +157,10 @@ int vmw_kms_init_screen_object_display(struct vmw_private 
*dev_priv);
 int vmw_kms_close_screen_object_display(struct vmw_private *dev_priv);
 int vmw_kms_sou_update_layout(struct vmw_private *dev_priv, unsigned num,
  struct drm_vmw_rect *rects);
+bool vmw_kms_screen_object_flippable(struct vmw_private *dev_priv,
+struct drm_crtc *crtc);
+void vmw_kms_screen_object_update_implicit_fb(struct vmw_private *dev_priv,
+ struct drm_crtc *crtc);
+
 
 #endif
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c 
b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
index 4defdcf..97aca0b 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
@@ -394,6 +394,7 @@ static struct drm_crtc_funcs vmw_screen_object_crtc_funcs = 
{
.gamma_set = vmw_du_crtc_gamma_set,
.destroy = vmw_sou_crtc_destroy,
.set_config = vmw_sou_crtc_set_config,
+   .page_flip = vmw_du_page_flip,
 };
 
 /*
@@ -535,3 +536,36 @@ int vmw_kms_close_screen_object_display(struct vmw_private 
*dev_priv)
 
return 0;
 }
+
+/**
+ * Returns if this unit can be page flipped.
+ * Must be called with the mode_config mutex held.
+ */
+bool vmw_kms_screen_object_flippable(struct vmw_private *dev_priv,
+struct drm_crtc *crtc)
+{
+   struct vmw_screen_object_unit *sou = vmw_crtc_to_sou(crtc);
+
+   if (!sou->base.is_implicit)
+   return true;
+
+   if

[PATCH 6/9] vmwgfx: Pick up the initial size from the width and height regs

2012-02-09 Thread Thomas Hellstrom
From: Jakob Bornecrantz 

Signed-off-by: Jakob Bornecrantz 
Signed-off-by: Thomas Hellstrom 
---
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c  |   32 
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.h  |2 ++
 drivers/gpu/drm/vmwgfx/vmwgfx_fb.c   |8 ++--
 drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c  |4 ++--
 drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c |4 ++--
 5 files changed, 40 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c 
b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
index 28f59a3c3..1227232 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
@@ -38,6 +38,10 @@
 #define VMWGFX_CHIP_SVGAII 0
 #define VMW_FB_RESERVATION 0
 
+#define VMW_MIN_INITIAL_WIDTH 800
+#define VMW_MIN_INITIAL_HEIGHT 600
+
+
 /**
  * Fully encoded drm commands. Might move to vmw_drm.h
  */
@@ -387,6 +391,31 @@ void vmw_3d_resource_dec(struct vmw_private *dev_priv,
BUG_ON(n3d < 0);
 }
 
+/**
+ * Sets the initial_[width|height] fields on the given vmw_private.
+ *
+ * It does so by reading SVGA_REG_[WIDTH|HEIGHT] regs and then
+ * capping the value to fb_max_[width|height] fields and the
+ * VMW_MIN_INITIAL_[WIDTH|HEIGHT].
+ */
+static void vmw_get_initial_size(struct vmw_private *dev_priv)
+{
+   uint32_t width;
+   uint32_t height;
+
+   width = vmw_read(dev_priv, SVGA_REG_WIDTH);
+   height = vmw_read(dev_priv, SVGA_REG_HEIGHT);
+
+   width = max_t(uint32_t, width, VMW_MIN_INITIAL_WIDTH);
+   width = min_t(uint32_t, width, dev_priv->fb_max_width);
+
+   height = max_t(uint32_t, height, VMW_MIN_INITIAL_HEIGHT);
+   height = min_t(uint32_t, height, dev_priv->fb_max_height);
+
+   dev_priv->initial_width = width;
+   dev_priv->initial_height = height;
+}
+
 static int vmw_driver_load(struct drm_device *dev, unsigned long chipset)
 {
struct vmw_private *dev_priv;
@@ -441,6 +470,9 @@ static int vmw_driver_load(struct drm_device *dev, unsigned 
long chipset)
dev_priv->mmio_size = vmw_read(dev_priv, SVGA_REG_MEM_SIZE);
dev_priv->fb_max_width = vmw_read(dev_priv, SVGA_REG_MAX_WIDTH);
dev_priv->fb_max_height = vmw_read(dev_priv, SVGA_REG_MAX_HEIGHT);
+
+   vmw_get_initial_size(dev_priv);
+
if (dev_priv->capabilities & SVGA_CAP_GMR) {
dev_priv->max_gmr_descriptors =
vmw_read(dev_priv,
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h 
b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
index 14c2f49..2866415 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
@@ -203,6 +203,8 @@ struct vmw_private {
uint32_t mmio_size;
uint32_t fb_max_width;
uint32_t fb_max_height;
+   uint32_t initial_width;
+   uint32_t initial_height;
__le32 __iomem *mmio_virt;
int mmio_mtrr;
uint32_t capabilities;
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c 
b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
index 34e51a1..39931c4 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
@@ -414,10 +414,6 @@ int vmw_fb_init(struct vmw_private *vmw_priv)
unsigned fb_bpp, fb_depth, fb_offset, fb_pitch, fb_size;
int ret;
 
-   /* XXX These shouldn't be hardcoded. */
-   initial_width = 800;
-   initial_height = 600;
-
fb_bpp = 32;
fb_depth = 24;
 
@@ -425,8 +421,8 @@ int vmw_fb_init(struct vmw_private *vmw_priv)
fb_width = min(vmw_priv->fb_max_width, (unsigned)2048);
fb_height = min(vmw_priv->fb_max_height, (unsigned)2048);
 
-   initial_width = min(fb_width, initial_width);
-   initial_height = min(fb_height, initial_height);
+   initial_width = min(vmw_priv->initial_width, fb_width);
+   initial_height = min(vmw_priv->initial_height, fb_height);
 
fb_pitch = fb_width * fb_bpp / 8;
fb_size = fb_pitch * fb_height;
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c 
b/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
index f77b184..070fb23 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
@@ -354,8 +354,8 @@ static int vmw_ldu_init(struct vmw_private *dev_priv, 
unsigned unit)
INIT_LIST_HEAD(&ldu->active);
 
ldu->base.pref_active = (unit == 0);
-   ldu->base.pref_width = 800;
-   ldu->base.pref_height = 600;
+   ldu->base.pref_width = dev_priv->initial_width;
+   ldu->base.pref_height = dev_priv->initial_height;
ldu->base.pref_mode = NULL;
ldu->base.is_implicit = true;
 
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c 
b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
index 97aca0b..6deaf2f 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
@@ -449,8 +449,8 @@ static int vmw_sou_init(struct vmw_private *dev_priv, 
unsigned unit)
sou->active_implicit = false;
 
sou->base.pref_active = (unit == 0);
-   sou->base.pref_width = 800;
-   sou->base.pref_h

[PATCH 7/9] drm/vmwgfx: Treat out-of-range initial width and height as host errors

2012-02-09 Thread Thomas Hellstrom
And assign the initial width and height to the minimum in that case.
Strange values (-1) from these registers have been reported by users.

Signed-off-by: Thomas Hellstrom 
Reviewed-by: Jakob Bornecrantz 
---
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c |   18 ++
 1 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c 
b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
index 1227232..f076f66 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
@@ -395,7 +395,9 @@ void vmw_3d_resource_dec(struct vmw_private *dev_priv,
  * Sets the initial_[width|height] fields on the given vmw_private.
  *
  * It does so by reading SVGA_REG_[WIDTH|HEIGHT] regs and then
- * capping the value to fb_max_[width|height] fields and the
+ * clamping the value to fb_max_[width|height] fields and the
+ * VMW_MIN_INITIAL_[WIDTH|HEIGHT].
+ * If the values appear to be invalid, set them to
  * VMW_MIN_INITIAL_[WIDTH|HEIGHT].
  */
 static void vmw_get_initial_size(struct vmw_private *dev_priv)
@@ -407,10 +409,18 @@ static void vmw_get_initial_size(struct vmw_private 
*dev_priv)
height = vmw_read(dev_priv, SVGA_REG_HEIGHT);
 
width = max_t(uint32_t, width, VMW_MIN_INITIAL_WIDTH);
-   width = min_t(uint32_t, width, dev_priv->fb_max_width);
-
height = max_t(uint32_t, height, VMW_MIN_INITIAL_HEIGHT);
-   height = min_t(uint32_t, height, dev_priv->fb_max_height);
+
+   if (width > dev_priv->fb_max_width ||
+   height > dev_priv->fb_max_height) {
+
+   /*
+* This is a host error and shouldn't occur.
+*/
+
+   width = VMW_MIN_INITIAL_WIDTH;
+   height = VMW_MIN_INITIAL_HEIGHT;
+   }
 
dev_priv->initial_width = width;
dev_priv->initial_height = height;
-- 
1.7.4.4

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


[PATCH 8/9] vmwgfx: Move function declaration to correct header

2012-02-09 Thread Thomas Hellstrom
Signed-off-by: Thomas Hellstrom 
Reviewed-by: Jakob Bornecrantz 
---
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.h   |   12 
 drivers/gpu/drm/vmwgfx/vmwgfx_fence.h |8 ++--
 2 files changed, 6 insertions(+), 14 deletions(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h 
b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
index 2866415..a393bdc 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
@@ -662,18 +662,6 @@ int vmw_overlay_num_overlays(struct vmw_private *dev_priv);
 int vmw_overlay_num_free_overlays(struct vmw_private *dev_priv);
 
 /**
- * Fence function - vmwgfx_fence.c
- */
-
-int vmw_event_fence_action_queue(struct drm_file *file_priv,
-struct vmw_fence_obj *fence,
-struct drm_pending_event *event,
-uint32_t *tv_sec,
-uint32_t *tv_usec,
-bool interruptible);
-
-
-/**
  * GMR Id manager
  */
 
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.h 
b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.h
index 8767fc1..faf2e78 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.h
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.h
@@ -111,6 +111,10 @@ extern int vmw_fence_event_ioctl(struct drm_device *dev, 
void *data,
 struct drm_file *file_priv);
 extern void vmw_event_fence_fpriv_gone(struct vmw_fence_manager *fman,
   struct list_head *event_list);
-
-
+extern int vmw_event_fence_action_queue(struct drm_file *filee_priv,
+   struct vmw_fence_obj *fence,
+   struct drm_pending_event *event,
+   uint32_t *tv_sec,
+   uint32_t *tv_usec,
+   bool interruptible);
 #endif /* _VMWGFX_FENCE_H_ */
-- 
1.7.4.4

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


[PATCH 9/9] drm/vmwgfx: Bump driver minor

2012-02-09 Thread Thomas Hellstrom
Bump driver minor to signal availability of the page-flip ioctl.

Signed-off-by: Thomas Hellstrom 
---
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.h |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h 
b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
index a393bdc..d0f2c07 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
@@ -40,9 +40,9 @@
 #include "ttm/ttm_module.h"
 #include "vmwgfx_fence.h"
 
-#define VMWGFX_DRIVER_DATE "20111025"
+#define VMWGFX_DRIVER_DATE "20120209"
 #define VMWGFX_DRIVER_MAJOR 2
-#define VMWGFX_DRIVER_MINOR 3
+#define VMWGFX_DRIVER_MINOR 4
 #define VMWGFX_DRIVER_PATCHLEVEL 0
 #define VMWGFX_FILE_PAGE_OFFSET 0x0010
 #define VMWGFX_FIFO_STATIC_SIZE (1024*1024)
-- 
1.7.4.4

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


Re: [PATCH -next 0/0] vmwgfx updates

2012-02-09 Thread Thomas Hellstrom

Should of course be 0/9

/Thomas


On 02/09/2012 04:56 PM, Thomas Hellstrom wrote:

A series of updates that brings in fake pageflipping support and
sets initial preferred mode in a way similar to how the legacy Xorg driver
does it. We bump minor to indicate availability of the pageflipping ioctl.

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


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


[Bug 16140] [RADEON:KMS:RV250:RESUME] suspend to RAM resume broken

2012-02-09 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=16140





--- Comment #47 from Paul Bolle   2012-02-09 16:12:36 ---
(In reply to comment #45)
> No fix in sight, but there is a workaround: set a primary password in the 
> BIOS.
> The BIOS will initialize the video card on wake-up and allow Linux to resume
> normally.

0) This wasn't on a ThinkPad, was it? Because on a ThinkPad T41 that triggers
issue there's no "primary" BIOS password. Fiddling with other BIOS passwords
doesn't seem to help: they're not even asked on resume.

1) Could you please provide some further details?

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


[Bug 16140] [RADEON:KMS:RV250:RESUME] suspend to RAM resume broken

2012-02-09 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=16140





--- Comment #48 from Wirawan Purwanto   2012-02-09 16:41:59 
---
The trick mentioned in comment #45 applies to Dell Latitude D600 model. Here is
the link to Canonical's bug report:

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/559163

Paul Bolle said correctly that this trick depends on primary BIOS password
being asked upon resuming. It did not work for me on a Dell Inspiron 600m
(which is a "consumer" sister model of D600).

FWIW here are some related bug pages on Ubuntu/Launchpad:

  "resume broken on ATI radeon RV250"
  https://bugs.launchpad.net/ubuntu/+source/linux/+bug/557224
  (affecting Thinkpad T41)

  "[Dell Computer Corporation Inspiron 600m] suspend/resume failure"
  https://bugs.launchpad.net/linux/+bug/471872
  (affecting my Dell Inspiron 600m computer)

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


[Bug 36602] Hierarchical Z support for R600

2012-02-09 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=36602

--- Comment #35 from Sven Arvidsson  2012-02-09 08:50:05 UTC ---
(In reply to comment #33)
> Created attachment 56785 [details] [review]
> Kernel patch top of lastest linux + tiling
> 
> Kernel patch on top of last linus + tiling. All seems to work ok but likely
> stuff regressed.

Didn't work very well for me, glxgears output garbled and logs full of:

[   76.197338] [drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !
[   76.197524] radeon :01:00.0: evergreen_cs_track_validate_depth:664 htile
surface too small 8192 for 9216 (48 48)
[   76.197527] radeon :01:00.0: evergreen_packet3_check:1972 invalid cmd
stream 487


System environment:
-- system architecture: 32-bit
-- Linux distribution: Debian unstable
-- GPU: REDWOOD
-- Model: XFX Radeon HD 5670 1GB
-- Display connector: DVI
-- xf86-video-ati: e20284409937d784847339b5d466a95012d85940
-- xserver: 1.11.99.901
-- mesa: 26de5273acf1ebe6730b5e72b55b3bcceba167c6 + hiz patch
-- drm: 230ec7d7bbf1e8a7e263d471b21afb08c28eba0c
-- kernel: 3.3.0-rc2 + streamout, tiling and hiz patches

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


[Bug 36602] Hierarchical Z support for R600

2012-02-09 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=36602

--- Comment #36 from Sven Arvidsson  2012-02-09 08:57:17 PST ---
(In reply to comment #35)
> Didn't work very well for me, glxgears output garbled and logs full of:

Actually scratch that, glxgears in a window doesnt work, but running it
fullscreen and it has no problems.

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


[Bug 42727] radeon KMS with CRT TV

2012-02-09 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=42727





--- Comment #4 from Aur   2012-02-09 17:48:16 ---
I don't know if this TV supports NTSC but it supports PAL and SECAM.

Is it possible to force driver to use PAL by a kernel option or by a patch ?

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


[PATCH] drm: take global drm mutex around sysfs files

2012-02-09 Thread Jesse Barnes
This prevents a race between module init and sysfs access (usually only
seen at module reload time, or if somehow your userspace starts fast
enough and pokes at /sys/class/drm while the drivers are still
initializing).

Signed-off-by: Jesse Barnes 
---
 drivers/gpu/drm/drm_sysfs.c |   75 ++
 1 files changed, 53 insertions(+), 22 deletions(-)

diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c
index 0f9ef9b..bb8bbc3 100644
--- a/drivers/gpu/drm/drm_sysfs.c
+++ b/drivers/gpu/drm/drm_sysfs.c
@@ -161,15 +161,20 @@ static ssize_t status_show(struct device *device,
enum drm_connector_status status;
int ret;
 
+   mutex_lock(&drm_global_mutex);
+
ret = mutex_lock_interruptible(&connector->dev->mode_config.mutex);
if (ret)
-   return ret;
+   goto out;
 
status = connector->funcs->detect(connector, true);
mutex_unlock(&connector->dev->mode_config.mutex);
 
-   return snprintf(buf, PAGE_SIZE, "%s\n",
-   drm_get_connector_status_name(status));
+   ret = snprintf(buf, PAGE_SIZE, "%s\n",
+  drm_get_connector_status_name(status));
+out:
+   mutex_unlock(&drm_global_mutex);
+   return ret;
 }
 
 static ssize_t dpms_show(struct device *device,
@@ -181,14 +186,20 @@ static ssize_t dpms_show(struct device *device,
uint64_t dpms_status;
int ret;
 
+   mutex_lock(&drm_global_mutex);
ret = drm_connector_property_get_value(connector,
dev->mode_config.dpms_property,
&dpms_status);
-   if (ret)
-   return 0;
+   if (ret) {
+   ret = 0;
+   goto out;
+   }
 
-   return snprintf(buf, PAGE_SIZE, "%s\n",
+   ret = snprintf(buf, PAGE_SIZE, "%s\n",
drm_get_dpms_name((int)dpms_status));
+out:
+   mutex_unlock(&drm_global_mutex);
+   return ret;
 }
 
 static ssize_t enabled_show(struct device *device,
@@ -196,9 +207,13 @@ static ssize_t enabled_show(struct device *device,
   char *buf)
 {
struct drm_connector *connector = to_drm_connector(device);
+   int ret;
 
-   return snprintf(buf, PAGE_SIZE, "%s\n", connector->encoder ? "enabled" :
-   "disabled");
+   mutex_lock(&drm_global_mutex);
+   ret = snprintf(buf, PAGE_SIZE, "%s\n", connector->encoder ? "enabled" :
+  "disabled");
+   mutex_unlock(&drm_global_mutex);
+   return ret;
 }
 
 static ssize_t edid_show(struct file *filp, struct kobject *kobj,
@@ -210,21 +225,30 @@ static ssize_t edid_show(struct file *filp, struct 
kobject *kobj,
unsigned char *edid;
size_t size;
 
-   if (!connector->edid_blob_ptr)
-   return 0;
+   mutex_lock(&drm_global_mutex);
+   if (!connector->edid_blob_ptr) {
+   count = 0;
+   goto out;
+   }
 
edid = connector->edid_blob_ptr->data;
size = connector->edid_blob_ptr->length;
-   if (!edid)
-   return 0;
+   if (!edid) {
+   count = 0;
+   goto out;
+   }
 
-   if (off >= size)
-   return 0;
+   if (off >= size) {
+   count = 0;
+   goto out;
+   }
 
if (off + count > size)
count = size - off;
memcpy(buf, edid + off, count);
 
+out:
+   mutex_unlock(&drm_global_mutex);
return count;
 }
 
@@ -236,11 +260,12 @@ static ssize_t modes_show(struct device *device,
struct drm_display_mode *mode;
int written = 0;
 
+   mutex_lock(&drm_global_mutex);
list_for_each_entry(mode, &connector->modes, head) {
written += snprintf(buf + written, PAGE_SIZE - written, "%s\n",
mode->name);
}
-
+   mutex_unlock(&drm_global_mutex);
return written;
 }
 
@@ -253,7 +278,9 @@ static ssize_t subconnector_show(struct device *device,
struct drm_property *prop = NULL;
uint64_t subconnector;
int is_tv = 0;
-   int ret;
+   int ret = 0;
+
+   mutex_lock(&drm_global_mutex);
 
switch (connector->connector_type) {
case DRM_MODE_CONNECTOR_DVII:
@@ -268,21 +295,25 @@ static ssize_t subconnector_show(struct device *device,
break;
default:
DRM_ERROR("Wrong connector type for this property\n");
-   return 0;
+   goto out;
}
 
if (!prop) {
DRM_ERROR("Unable to find subconnector property\n");
-   return 0;
+   goto out;
}
 
ret = drm_connector_property_get_value(connector, prop, &subconnector);
if (ret)
-   return 0;
+   goto out;
 
-

[Bug 42727] radeon KMS with CRT TV

2012-02-09 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=42727


Alex Deucher  changed:

   What|Removed |Added

 CC||alexdeuc...@gmail.com




--- Comment #5 from Alex Deucher   2012-02-09 18:29:24 
---
xrandr --output S-video --set "tv standard" pal
use xrandr --verbose to double check the output and attribute name for your
board.

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


[PATCH] drm/edid: Strengthen the algorithm for CRT default resolution

2012-02-09 Thread Adam Jackson
If a CRT doesn't deign to provide a preferred mode, we should try to
pick a mode with a vaguely reasonable DPI instead of whatever happens to
be biggest.

Bugzilla: https://bugzilla.redhat.com/522155

Signed-off-by: Adam Jackson 
---
 drivers/gpu/drm/drm_edid.c  |   52 +++
 drivers/gpu/drm/drm_fb_helper.c |   14 +-
 include/drm/drm_crtc.h  |3 ++
 3 files changed, 68 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index ece03fc..7d7f4dc 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -1810,3 +1810,55 @@ int drm_add_modes_noedid(struct drm_connector *connector,
return num_modes;
 }
 EXPORT_SYMBOL(drm_add_modes_noedid);
+
+/**
+ * drm_edid_analog_mode_guess - guess a mode somewhere near 96dpi
+ * @connector: connector to inspect
+ * @max_width: maximum width
+ * @max_height: maximum height
+ *
+ * Some old (usually CRT) monitors do not specify a preferred mode.  Usually
+ * they also expose very high resolutions, which leads to unreadably small
+ * text.  Instead pick something reasonable.
+ *
+ * Returns the supported mode closest to 96dpi within some tolerance, if any.
+ *
+ * Only looks at horizontal DPI, but, whatever.
+ */
+struct drm_display_mode *
+drm_edid_analog_mode_guess(struct drm_connector *connector,
+  int max_width, int max_height)
+{
+   struct drm_display_mode *mode, *best = NULL;
+   int best_dpi = 0;
+   struct edid *edid;
+   
+   edid = connector->edid_blob_ptr->data;
+   if (!edid)
+   return NULL;
+
+   if ((edid->features & DRM_EDID_INPUT_DIGITAL))
+   return NULL;
+
+   if (!edid->width_cm || !edid->height_cm)
+   return NULL;
+
+   list_for_each_entry(mode, &connector->probed_modes, head) {
+   int dpi = (mode->hdisplay * 254) / (edid->width_cm * 100);
+
+   if (mode->hdisplay > max_width || mode->vdisplay > max_height)
+   continue;
+
+   if (abs(96 - dpi) < abs(96 - best_dpi)) {
+   best_dpi = dpi;
+   best = mode;
+   }
+   }
+
+   /* if we can't get anywhere near 96dpi, we probably shouldn't try */
+   if (abs(96 - best_dpi) > 10)
+   return NULL;
+
+   return best;
+}
+EXPORT_SYMBOL(drm_edid_analog_mode_guess);
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index aada26f..14d544e 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -1177,15 +1177,27 @@ static bool drm_target_preferred(struct drm_fb_helper 
*fb_helper,
DRM_DEBUG_KMS("looking for cmdline mode on connector %d\n",
  fb_helper_conn->connector->base.id);
 
-   /* got for command line mode first */
+   /* go for command line mode first */
modes[i] = drm_pick_cmdline_mode(fb_helper_conn, width, height);
+
+   /* then edid-preferred, if any */
if (!modes[i]) {
DRM_DEBUG_KMS("looking for preferred mode on connector 
%d\n",
  fb_helper_conn->connector->base.id);
modes[i] = drm_has_preferred_mode(fb_helper_conn, 
width, height);
}
+
+   /* then something maybe near 96dpi if possible */
+   if (!modes[i] && fb_helper_conn->connector->edid_blob_ptr) {
+   DRM_DEBUG_KMS("looking for 96dpi mode on connector 
%d\n",
+ fb_helper_conn->connector->base.id);
+   modes[i] = 
drm_edid_analog_mode_guess(fb_helper_conn->connector, width, height);
+   }
+
/* No preferred modes, pick one off the list */
if (!modes[i] && 
!list_empty(&fb_helper_conn->connector->modes)) {
+   DRM_DEBUG_KMS("guessing mode on connector %d\n",
+ fb_helper_conn->connector->base.id);
list_for_each_entry(modes[i], 
&fb_helper_conn->connector->modes, head)
break;
}
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index 4cd4be2..1d04589 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -993,6 +993,9 @@ extern struct drm_display_mode *drm_gtf_mode_complex(struct 
drm_device *dev,
int GTF_2C, int GTF_K, int GTF_2J);
 extern int drm_add_modes_noedid(struct drm_connector *connector,
int hdisplay, int vdisplay);
+extern struct drm_display_mode *drm_edid_analog_mode_guess(
+   struct drm_connector *connector,
+   int max_width, int max_height);
 
 extern int drm_edid_header_is_valid(const u8 *raw_edid);
 extern 

Re: [PATCH] drm: take global drm mutex around sysfs files

2012-02-09 Thread Eugeni Dodonov
On Thu, Feb 9, 2012 at 15:56, Jesse Barnes  wrote:

> This prevents a race between module init and sysfs access (usually only
> seen at module reload time, or if somehow your userspace starts fast
> enough and pokes at /sys/class/drm while the drivers are still
> initializing).
>
> Signed-off-by: Jesse Barnes 
>

Reviewed-by: Eugeni Dodonov 

-- 
Eugeni Dodonov

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


Re: [PATCH] drm: take global drm mutex around sysfs files

2012-02-09 Thread Daniel Vetter
On Thu, Feb 9, 2012 at 21:24, Eugeni Dodonov  wrote:
> On Thu, Feb 9, 2012 at 15:56, Jesse Barnes  wrote:
>>
>> This prevents a race between module init and sysfs access (usually only
>> seen at module reload time, or if somehow your userspace starts fast
>> enough and pokes at /sys/class/drm while the drivers are still
>> initializing).
>>
>> Signed-off-by: Jesse Barnes 
> Reviewed-by: Eugeni Dodonov 

drm_global_mutex is our own little bkl and we won't ever be fixing
this disaster by spreading the disease. So lacking better reasons for
this patch:

Nacked-by: Daniel Vetter 

Yes, I know that setup/teardown in drm core is a full-blown
middlelayer screwup ...
-- 
Daniel Vetter
daniel.vet...@ffwll.ch - +41 (0) 79 365 57 48 - http://blog.ffwll.ch
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Bug 45856] New: [r300g] piglit glx-swap-pixmap leaves screen completely corrupted

2012-02-09 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=45856

 Bug #: 45856
   Summary: [r300g] piglit glx-swap-pixmap leaves screen
completely corrupted
Classification: Unclassified
   Product: Mesa
   Version: git
  Platform: Other
OS/Version: All
Status: NEW
  Severity: critical
  Priority: medium
 Component: Drivers/Gallium/r300
AssignedTo: dri-devel@lists.freedesktop.org
ReportedBy: pavel.ondra...@email.cz


When running piglit glx-swap-pixmap with my RV530 card it makes the whole
screen render garbage until restart. I'm not really sure about the component,
assigning to r300g for now. Nothing intresting gets printed neither in the
terminal, nor dmesg, not even in Xorg.0.log.

Workaround is to set vblank_mode to 0

GPU: RV530
Mesa: 67007080b716c7e51039a381f407ababd68230f7
Kernel: 3.2.3
Libdrm: 2.4.31
xf86-video-ati: 6.14.3-3.2025git534fb6e41.fc16
X.Org X Server 1.11.3

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


[PULL] drm-intel-fixes

2012-02-09 Thread Keith Packard

Here are a few bug fixes for drm/i915. This fixes switching from
interlaced to non-interlaced mode at boot time, as well as a bunch of
regressions caused by bad DP bandwidth computations.

The following changes since commit acb42a3b611d7ad4cb173c3b37674b549df2ffeb:

  Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux 
(2012-01-27 07:56:25 -0800)

are available in the git repository at:


  git://git.kernel.org/pub/scm/linux/kernel/git/keithp/linux drm-intel-fixes

for you to fetch changes up to 617cf884810b44384fe8e9431e9babeb80a2ff37:

  drm/i915: fixup interlaced bits clearing in PIPECONF on PCH_SPLIT (v2) 
(2012-02-08 13:54:18 -0800)


Chris Wilson (1):
  drm/i915:: Disable FBC on SandyBridge

Daniel Vetter (2):
  drm/i915: fixup interlaced bits clearing in PIPECONF on PCH_SPLIT
  drm/i915: no lvds quirk for AOpen MP45

Keith Packard (2):
  drm/i915: Force explicit bpp selection for intel_dp_link_required
  drm/i915: fixup interlaced bits clearing in PIPECONF on PCH_SPLIT (v2)

 drivers/gpu/drm/i915/intel_display.c |8 +---
 drivers/gpu/drm/i915/intel_dp.c  |   20 +---
 drivers/gpu/drm/i915/intel_lvds.c|8 
 3 files changed, 18 insertions(+), 18 deletions(-)

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


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


[ANNOUNCE] intel-gpu-tools 1.2

2012-02-09 Thread Daniel Vetter
Highlights:
- intel_audio_dump improvements (Wu Fengguang)
- buildsystem improvements (Gaetan Nadon)
- solaris support (Alan Coopersmith)
- massive refactoring of testcases and rendercpy extraction
- new tests
- fixed up intel_reg_read/write for platforms needing forcewake (needs a
  kernel patch which from 3.3 to work on ivb - Ben Widawsky)

Happy kernel burning!
-Daniel

Alan Coopersmith (10):
  Provide Solaris implementation of intel_get_total_ram_mb
  Solaris defines struct winsize in termios.h
  Use sched_yield instead of pthread_yield
  List out array values instead of using gcc range extension
  include  in lib/intel_mmio.c for open() prototype on Solaris
  Fix pthread compiler flags to work on Solaris and with Studio compiler
  Make benchmarks also link against libpciaccess
  Add Solaris implementation of intel_get_total_swap_mb()
  Move free(cmd) to after last use of cmd in intel_gpu_top
  Fix program name in intel_bios_dumper.man SYNOPSIS

Ben Widawsky (4):
  i-g-t: silence -Winline
  mmio: refactor reg init/fini
  intel_reg_read: use register access init/fini
  intel_reg_write: use register access init/fini

Chris Wilson (1):
  intel_bios_reader: Sanitize input to ensure all data blocks are within 
bounds

Daniel Vetter (60):
  tools/intel_error_decode: convert over to libdrm decoder
  tools/intel_error_decode: fixup new warnings
  tools/intel_audio_dump: fixup new warnings
  tools/intel_bios_dumper: fixup new warnings
  tools/intel_bios_reader: fixup new warnings
  tools/intel_dump_decode: use libdrm decoder
  tools/intel_gpu_top: fixup new warnings
  remove tools/intel_decode
  tools/intel_reg_dumper: fixup new warnings
  tools/intel_gtt: fixup new warnings
  tools/intel_stepping: fixup new warnings
  lib: fixup new compiler warnings
  lib/drmtest: extract gem_set_tiling
  lib/drmtest: extract gem_close
  lib/drmtest: extract gem_write
  lib/drmtest: extract gem_read
  tests: fixup new warnings
  lib/drmtest: extract gem_set_domain and gem_sync
  tests: use the gem_write wrapper some more
  testdisplay: fixup smaller compiler warnings
  testdisplay: rename global fd variable to drm_fd
  lib/drmtest: extract gem_create
  lib/drmtest: extract gem_mmap
  tests: add drm_vma_limiter variants that only check gtt/cpu mmaps
  lib/drmtest: extract helpers for signal interruptions
  tests: add drm_vma_limiter_cached to check libdrm cache mmap pruning
  lib/drmtest: add gpu quiescent helper
  tests: add ZZ_check_dmesg
  tests: add ZZ_hangman
  tests: update .gitignore
  lib/drmtest: extract gem_aperture_size
  lib/drmtest: add gem_mappable_aperture_size
  lib/drmtest: extract mappable aperture trasher infrastructure
  gem_stress: add buf->size
  gem_stress: remove logical_tile_no arg from render_copy functions
  gem_stress: pass batch as arg to render_copy functions
  gem_stress: move a few things out of gem_stress.h
  gem_stress: add width/height arg to rendercpy functions
  gem_stress: move option struct out of header
  gem_stress: move keep_gpu_busy stuff out of render copy functions
  gem_stress: s/gem_stress.h/rendercopy.h
  lib: extract rendercopy functions from gem_stress
  tests: make testdisplay non-optional
  tests/gem_tiled_pread_pwrite: actually try to use more than total ram
  Revert "tests/gem_tiled_pread_pwrite: actually try to use more than total 
ram"
  lib: add intel_get_total_swap_mb
  lib: extract drmtest_permute_array
  tests: add gem_tiled_swapping
  tests/gem_tiled_swapping: be more conservative with the swap requirements
  lib: forcewake is gen6+
  testdisplay: extract hotplug code
  testdisplay: make udev optional
  intel_error_decode: fixup glibc free warning
  tests: add gem_cs_prefetch
  drmtest: add progress indicator
  intel_reg_dumper: add TRANS_VSYNCSHIFT
  gem_partial_pwrite_pread: add progress indicator
  add sprite demo from Armin Reese
  lib/rendercopy: fixup make distcheck
  Release 1.2

Eugeni Dodonov (2):
  tools/intel_reg_dumper: Add support for debug register
  tools/intel_reg_dumper: retrieve rc6 residency values

Gaetan Nadon (15):
  Add mandatory COPYING file.
  Use standard .gitignore file and layout
  Man pages still showing version 1.0 in the 1.1 release
  Add mandatory ChangeLog and INSTALL files
  config: remove unrequired AM_PROG_CC_C_O
  config: remove duplicate AC_PROG_CC and AC_PROG__CC_99
  config: use project wide xorg warnings variable
  config: set-up xorg automatic rebuilding rules
  config: the minimum version for autoconf is 2.60
  config: restore the libtool minimum version to 1.5
  Debugger: convert existing makefiles to Automake.
  Benchmark: use correct src and build location
  lib: fix i

scheduling while atomic on radeon rv620, kernel 3.30-rc3

2012-02-09 Thread Mikko Vinni
Hi,

testing 3.3.0-rc3 on an HP Pavilion dv5 (last tested kernel 3.2.5 works fine)
and getting bugs apparently right after the radeon module is loaded.


Linux version 3.3.0-rc3-CUST (mikko@koni) (gcc version 4.6.2 20120120 
(prerelease) (GCC) ) #198 SMP PREEMPT Thu Feb 9 09:36:43 EET 2012
Command line: BOOT_IMAGE=Arch_GitKernel ro root=803 ro root=/dev/sda3 
init=/bin/systemd pcie_aspm=force
...
firewire_core: created device fw0: GUID 00241b00322a5501, S400
[drm] radeon defaulting to kernel modesetting.
[drm] radeon kernel modesetting enabled.
radeon :01:00.0: power state changed by ACPI to D0
radeon :01:00.0: power state changed by ACPI to D0
[drm] initializing kernel modesetting (RV620 0x1002:0x95C4 0x103C:0x3600).
[drm] register mmio base: 0xD230
[drm] register mmio size: 65536
ATOM BIOS: M82
radeon :01:00.0: VRAM: 512M 0x - 0x1FFF (512M 
used)
radeon :01:00.0: GTT: 512M 0x2000 - 0x3FFF
[drm] Detected VRAM RAM=512M, BAR=256M
[drm] RAM width 64bits DDR
[TTM] Zone  kernel: Available graphics memory: 2023082 kiB.
[TTM] Initializing pool allocator.
[TTM] Initializing DMA pool allocator.
[drm] radeon: 512M of VRAM memory ready
[drm] radeon: 512M of GTT memory ready.
[drm] Supports vblank timestamp caching Rev 1 (10.10.2010).
[drm] Driver supports precise vblank timestamp query.
radeon :01:00.0: irq 46 for MSI/MSI-X
radeon :01:00.0: radeon: using MSI.
[drm] radeon: irq initialized.
[drm] GART: num cpu pages 131072, num gpu pages 131072
[drm] radeon: ib pool ready.
[drm] Loading RV620 Microcode
usbcore: registered new interface driver usbfs
...
[drm] PCIE GART of 512M enabled (table at 0x0004).
radeon :01:00.0: WB enabled
[drm] fence driver on ring 0 use gpu addr 0x2c00 and cpu addr 
0x8801364bfc00
[drm] ring test on 0 succeeded in 1 usecs
[drm] ib test on ring 0 succeeded in 0 usecs
[drm] Radeon Display Connectors
[drm] Connector 0:
[drm]   LVDS
[drm]   Encoders:
[drm] LCD1: INTERNAL_KLDSCP_LVTMA
[drm] Connector 1:
[drm]   VGA
[drm]   DDC: 0x7e40 0x7e40 0x7e44 0x7e44 0x7e48 0x7e48 0x7e4c 0x7e4c
[drm]   Encoders:
[drm] CRT1: INTERNAL_KLDSCP_DAC1
[drm] Connector 2:
[drm]   DIN
[drm]   Encoders:
[drm] TV1: INTERNAL_KLDSCP_DAC2
[drm] Connector 3:
[drm]   HDMI-A
[drm]   HPD1
[drm]   DDC: 0x7e20 0x7e20 0x7e24 0x7e24 0x7e28 0x7e28 0x7e2c 0x7e2c
[drm]   Encoders:
[drm] DFP1: INTERNAL_UNIPHY
[drm] radeon: power management initialized

...
[drm] fb mappable at 0xC0142000
[drm] vram apper at 0xC000
[drm] size 4096000
[drm] fb depth is 24
[drm]    pitch is 5120
fbcon: radeondrmfb (fb0) is primary device
Feb  9 16:54:56 koni systemd-fsck[287]: /dev/sda5: clean, 1102549/17514496 
files, 32142735/70035359 blocks (check in 2 mounts)
Feb  9 16:54:56 koni systemd-tmpfiles[298]: Two or more conflicting lines for 
/tmp configured, ignoring.
Console: switching to colour frame buffer device 160x50
fb0: radeondrmfb frame buffer device
drm: registered panic notifier
[drm] Initialized radeon 2.13.0 20080528 for :01:00.0 on minor 0
snd_hda_intel :01:00.1: irq 47 for MSI/MSI-X
HDMI status: Codec=0 Pin=3 Presence_Detect=0 ELD_Valid=0
input: HDA ATI HDMI HDMI/DP,pcm=3 as 
/devices/pci:00/:00:02.0/:01:00.1/sound/card1/input15
EXT4-fs (sda5): mounted filesystem with ordered data mode. Opts: commit=30
BUG: scheduling while atomic: kworker/1:3/119/0x0003
Modules linked in: snd_hda_codec_hdmi uvcvideo videobuf2_vmalloc 
videobuf2_memops videobuf2_core videodev v4l2_compat_ioctl32 arc4 
snd_hda_codec_idt ohci_hcd joydev snd_hda_intel ath5k snd_hda_codec ehci_hcd 
usbcore snd_hwdep snd_pcm mac80211 radeon ath snd_page_alloc snd_timer snd 
hp_wmi sdhci_pci sparse_keymap sp5100_tco i2c_piix4 soundcore cfg80211 sdhci 
wmi usb_common drm_kms_helper jmb38x_ms hp_accel psmouse r8169 ttm mmc_core 
thermal memstick rtc_cmos lis3lv02d evdev k10temp pcspkr input_polldev 
firewire_ohci mii serio_raw rfkill battery video ac button powernow_k8 mperf 
processor autofs4 sr_mod cdrom sd_mod pata_acpi ahci libahci pata_atiixp libata 
scsi_mod
Pid: 119, comm: kworker/1:3 Not tainted 3.3.0-rc3-CUST #198
Call Trace:
[] __schedule_bug+0x5d/0x61
[] __schedule+0x84c/0x9c0
[] ? check_preempt_curr+0x84/0xa0
[] ? pull_task+0x49/0x60
[] schedule+0x3a/0x50
[] schedule_timeout+0x166/0x380
[] ? __mutex_lock_slowpath+0x235/0x340
[] ? init_timer_deferrable_key+0x20/0x20
[] radeon_pm_set_clocks+0x4ca/0x690 [radeon]
[] ? abort_exclusive_wait+0xb0/0xb0
[] radeon_dynpm_idle_work_handler+0x160/0x170 [radeon]
[] ? radeon_acpi_event+0xc0/0xc0 [radeon]
[] process_one_work+0x11b/0x4d0
[] worker_thread+0x15d/0x340
[] ? manage_workers.isra.27+0x220/0x220
[] kthread+0x8e/0xa0
[] kernel_thread_helper+0x4/0x10
[] ? kthread_freezable_should_stop+0x60/0x60
[] ? gs_change+0xb/0xb
BUG: scheduling while atomic: kworker/1:3/119/0x0003
Modules linked in: snd_hda_codec_hdmi uvcvideo videobuf2_vmalloc 
videobuf2_memops videobuf2_core videodev v4l2_

Re: [PATCH 1/2] omap2+: add drm device

2012-02-09 Thread Greg KH
On Fri, Jan 13, 2012 at 02:41:59PM -0600, Rob Clark wrote:
> From: Rob Clark 
> 
> Register OMAP DRM/KMS platform device, and reserve a CMA region for
> the device to use for buffer allocation.
> 
> v1: initial patch
> v2: move platform data structs into plat-omap to avoid having to
> #include headers from drivers/staging and cleanups
> 
> Signed-off-by: Rob Clark 
> ---
> Note: after applying this patch there will be duplicate copies of the
> platform data structs (until the 2nd patch is applied).  But I tested
> to ensure this does not cause build breaks.  So the 2nd patch which
> should go thru staging tree is safe to be held until this patch hits
> Linus's master branch.
> 
>  arch/arm/plat-omap/Makefile   |2 +-
>  arch/arm/plat-omap/common.c   |3 +-
>  arch/arm/plat-omap/drm.c  |   83 
> +
>  arch/arm/plat-omap/include/plat/drm.h |   70 +++
>  4 files changed, 156 insertions(+), 2 deletions(-)
>  create mode 100644 arch/arm/plat-omap/drm.c
>  create mode 100644 arch/arm/plat-omap/include/plat/drm.h

Did this ever get applied?  As I can't apply 2/2 without it, please feel
free to add:
Acked-by: Greg Kroah-Hartman 

to 2/2 when some dri/omap developer commits this one.

thanks,

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


Re: [PATCH 1/2] omap2+: add drm device

2012-02-09 Thread Rob Clark
On Thu, Feb 9, 2012 at 11:28 AM, Greg KH  wrote:
> On Fri, Jan 13, 2012 at 02:41:59PM -0600, Rob Clark wrote:
>> From: Rob Clark 
>>
>> Register OMAP DRM/KMS platform device, and reserve a CMA region for
>> the device to use for buffer allocation.
>>
>> v1: initial patch
>> v2: move platform data structs into plat-omap to avoid having to
>>     #include headers from drivers/staging and cleanups
>>
>> Signed-off-by: Rob Clark 
>> ---
>> Note: after applying this patch there will be duplicate copies of the
>> platform data structs (until the 2nd patch is applied).  But I tested
>> to ensure this does not cause build breaks.  So the 2nd patch which
>> should go thru staging tree is safe to be held until this patch hits
>> Linus's master branch.
>>
>>  arch/arm/plat-omap/Makefile           |    2 +-
>>  arch/arm/plat-omap/common.c           |    3 +-
>>  arch/arm/plat-omap/drm.c              |   83 
>> +
>>  arch/arm/plat-omap/include/plat/drm.h |   70 +++
>>  4 files changed, 156 insertions(+), 2 deletions(-)
>>  create mode 100644 arch/arm/plat-omap/drm.c
>>  create mode 100644 arch/arm/plat-omap/include/plat/drm.h
>
> Did this ever get applied?

Not yet, there was requested some omap hwmod related changes for how
the driver gets SoC version specific information (irq, base addr), so
I'll resubmit again the device file registration (and the 2nd patch)
but that might have to be for 3.4

You can drop the existing 2/2 patch

BR,
-R


> As I can't apply 2/2 without it, please feel
> free to add:
>        Acked-by: Greg Kroah-Hartman 
>
> to 2/2 when some dri/omap developer commits this one.
>
> thanks,
>
> greg k-h
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH] drm/i915: Fix single msg gmbus_xfers writes

2012-02-09 Thread Benson Leung
gmbus_xfer with a single message (particularly a single message write) would
set Bus Cycle Select to 100b, the Gen Stop cycle, instead of 101b,
No Index, Stop cycle. This would not start single message i2c transactions.

Also, gmbus_xfer done: will disable the interface without checking if
it is idle. In the case of writes, there will be no wait on status or delay
to ensure the write starts and completes before the interface is turned off.

Fixed the former issue by using the same cycle selection as used in the
I2C_M_RD for the write case.
GMBUS_CYCLE_WAIT | (i + 1 == num ? GMBUS_CYCLE_STOP : 0)
Fixed the latter by waiting on GMBUS_ACTIVE to deassert before disable.

Signed-off-by: Benson Leung 
---
 drivers/gpu/drm/i915/intel_i2c.c |   13 +
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_i2c.c b/drivers/gpu/drm/i915/intel_i2c.c
index d30..64bb9cd 100644
--- a/drivers/gpu/drm/i915/intel_i2c.c
+++ b/drivers/gpu/drm/i915/intel_i2c.c
@@ -249,7 +249,8 @@ gmbus_xfer(struct i2c_adapter *adapter,
 
if (msgs[i].flags & I2C_M_RD) {
I915_WRITE(GMBUS1 + reg_offset,
-  GMBUS_CYCLE_WAIT | (i + 1 == num ? 
GMBUS_CYCLE_STOP : 0) |
+  GMBUS_CYCLE_WAIT |
+  (i + 1 == num ? GMBUS_CYCLE_STOP : 0) |
   (len << GMBUS_BYTE_COUNT_SHIFT) |
   (msgs[i].addr << GMBUS_SLAVE_ADDR_SHIFT) |
   GMBUS_SLAVE_READ | GMBUS_SW_RDY);
@@ -278,7 +279,8 @@ gmbus_xfer(struct i2c_adapter *adapter,
 
I915_WRITE(GMBUS3 + reg_offset, val);
I915_WRITE(GMBUS1 + reg_offset,
-  (i + 1 == num ? GMBUS_CYCLE_STOP : 
GMBUS_CYCLE_WAIT) |
+  GMBUS_CYCLE_WAIT |
+  (i + 1 == num ? GMBUS_CYCLE_STOP : 0) |
   (msgs[i].len << GMBUS_BYTE_COUNT_SHIFT) |
   (msgs[i].addr << GMBUS_SLAVE_ADDR_SHIFT) |
   GMBUS_SLAVE_WRITE | GMBUS_SW_RDY);
@@ -317,9 +319,12 @@ clear_err:
I915_WRITE(GMBUS1 + reg_offset, 0);
 
 done:
-   /* Mark the GMBUS interface as disabled. We will re-enable it at the
-* start of the next xfer, till then let it sleep.
+   /* Mark the GMBUS interface as disabled after waiting for idle.
+* We will re-enable it at the start of the next xfer,
+* till then let it sleep.
 */
+   if (wait_for((I915_READ(GMBUS2 + reg_offset) & GMBUS_ACTIVE) == 0, 10))
+   DRM_INFO("GMBUS timed out waiting for idle\n");
I915_WRITE(GMBUS0 + reg_offset, 0);
return i;
 
-- 
1.7.1

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


[PATCH] drm/i915: Fix race condition in accessing GMBUS

2012-02-09 Thread Yufeng Shen
GMBUS has several ports and each has it's own corresponding
I2C adpater. When multiple I2C adapters call gmbus_xfer() at
the same time there is a race condition in using the underlying
GMBUS controller. Fixing this by adding a mutex lock when calling
gmbus_xfer().

Signed-off-by: Yufeng Shen 
---
 drivers/gpu/drm/i915/i915_drv.h  |2 ++
 drivers/gpu/drm/i915/intel_i2c.c |   21 -
 2 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 9689ca3..d0f826e 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -733,6 +733,8 @@ typedef struct drm_i915_private {
u8 corr;
spinlock_t *mchdev_lock;
 
+   struct mutex gmbus_mutex;
+
enum no_fbc_reason no_fbc_reason;
 
struct drm_mm_node *compressed_fb;
diff --git a/drivers/gpu/drm/i915/intel_i2c.c b/drivers/gpu/drm/i915/intel_i2c.c
index d30..24fafdc 100644
--- a/drivers/gpu/drm/i915/intel_i2c.c
+++ b/drivers/gpu/drm/i915/intel_i2c.c
@@ -233,11 +233,16 @@ gmbus_xfer(struct i2c_adapter *adapter,
   struct intel_gmbus,
   adapter);
struct drm_i915_private *dev_priv = adapter->algo_data;
-   int i, reg_offset;
+   int i, reg_offset, ret;
 
-   if (bus->force_bit)
-   return intel_i2c_quirk_xfer(dev_priv,
+   mutex_lock(&dev_priv->gmbus_mutex);
+
+   if (bus->force_bit) {
+   ret = intel_i2c_quirk_xfer(dev_priv,
bus->force_bit, msgs, num);
+   mutex_unlock(&dev_priv->gmbus_mutex);
+   return ret;
+   }
 
reg_offset = HAS_PCH_SPLIT(dev_priv->dev) ? PCH_GMBUS0 - GMBUS0 : 0;
 
@@ -321,6 +326,7 @@ done:
 * start of the next xfer, till then let it sleep.
 */
I915_WRITE(GMBUS0 + reg_offset, 0);
+   mutex_unlock(&dev_priv->gmbus_mutex);
return i;
 
 timeout:
@@ -331,9 +337,12 @@ timeout:
/* Hardware may not support GMBUS over these pins? Try GPIO bitbanging 
instead. */
bus->force_bit = intel_gpio_create(dev_priv, bus->reg0 & 0xff);
if (!bus->force_bit)
-   return -ENOMEM;
+   ret = -ENOMEM;
+   else
+   ret = intel_i2c_quirk_xfer(dev_priv, bus->force_bit, msgs, num);
 
-   return intel_i2c_quirk_xfer(dev_priv, bus->force_bit, msgs, num);
+   mutex_unlock(&dev_priv->gmbus_mutex);
+   return ret;
 }
 
 static u32 gmbus_func(struct i2c_adapter *adapter)
@@ -380,6 +389,8 @@ int intel_setup_gmbus(struct drm_device *dev)
if (dev_priv->gmbus == NULL)
return -ENOMEM;
 
+   mutex_init(&dev_priv->gmbus_mutex);
+
for (i = 0; i < GMBUS_NUM_PORTS; i++) {
struct intel_gmbus *bus = &dev_priv->gmbus[i];
 
-- 
1.7.3.1

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


[Bug 43835] System crashes when radeon firmware blob (R520_cp.bin) is installed

2012-02-09 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=43835

--- Comment #53 from Jonathan Nieder  2012-02-09 17:55:11 
PST ---
(In reply to comment #51)
> Mainline kernel 3.3-rc2 contains the mentioned patches?

3.3-rc3 does.

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


[Bug 36602] Hierarchical Z support for R600

2012-02-09 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=36602

--- Comment #37 from Mathieu Belanger  2012-02-09 17:56:37 
PST ---
Created attachment 56845
  --> https://bugs.freedesktop.org/attachment.cgi?id=56845
EVE-Online screenshot

Work with EVE-Online.

I have a small problem (you can see on the screen shot).
It's some square of 'not rendered' stuff like if a miscalculation occur 
somewhere. They are of variable number (stay stable once the game is loaded) 
and are
placed in diagonal on the screen. On the screen shot I see only 7 but some time 
it's like 35, all in the same diagonal plane.

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


Re: [PATCH 14/60] drm: remove the second argument of k[un]map_atomic()

2012-02-09 Thread Thomas Hellstrom

Looks good to me.

Reviewed-by: Thomas Hellstrom 


On 02/10/2012 06:39 AM, Cong Wang wrote:

Signed-off-by: Cong Wang
---
  drivers/gpu/drm/drm_cache.c |8 
  drivers/gpu/drm/ttm/ttm_tt.c|   16 
  drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c |6 +++---
  3 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/drivers/gpu/drm/drm_cache.c b/drivers/gpu/drm/drm_cache.c
index 5928653..4b8653b 100644
--- a/drivers/gpu/drm/drm_cache.c
+++ b/drivers/gpu/drm/drm_cache.c
@@ -41,10 +41,10 @@ drm_clflush_page(struct page *page)
if (unlikely(page == NULL))
return;

-   page_virtual = kmap_atomic(page, KM_USER0);
+   page_virtual = kmap_atomic(page);
for (i = 0; i<  PAGE_SIZE; i += boot_cpu_data.x86_clflush_size)
clflush(page_virtual + i);
-   kunmap_atomic(page_virtual, KM_USER0);
+   kunmap_atomic(page_virtual);
  }

  static void drm_cache_flush_clflush(struct page *pages[],
@@ -87,10 +87,10 @@ drm_clflush_pages(struct page *pages[], unsigned long 
num_pages)
if (unlikely(page == NULL))
continue;

-   page_virtual = kmap_atomic(page, KM_USER0);
+   page_virtual = kmap_atomic(page);
flush_dcache_range((unsigned long)page_virtual,
   (unsigned long)page_virtual + PAGE_SIZE);
-   kunmap_atomic(page_virtual, KM_USER0);
+   kunmap_atomic(page_virtual);
}
  #else
printk(KERN_ERR "Architecture has no drm_cache.c support\n");
diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c
index 2f75d20..c10cf5e 100644
--- a/drivers/gpu/drm/ttm/ttm_tt.c
+++ b/drivers/gpu/drm/ttm/ttm_tt.c
@@ -309,11 +309,11 @@ int ttm_tt_swapin(struct ttm_tt *ttm)
goto out_err;

preempt_disable();
-   from_virtual = kmap_atomic(from_page, KM_USER0);
-   to_virtual = kmap_atomic(to_page, KM_USER1);
+   from_virtual = kmap_atomic(from_page);
+   to_virtual = kmap_atomic(to_page);
memcpy(to_virtual, from_virtual, PAGE_SIZE);
-   kunmap_atomic(to_virtual, KM_USER1);
-   kunmap_atomic(from_virtual, KM_USER0);
+   kunmap_atomic(to_virtual);
+   kunmap_atomic(from_virtual);
preempt_enable();
page_cache_release(from_page);
}
@@ -365,11 +365,11 @@ int ttm_tt_swapout(struct ttm_tt *ttm, struct file 
*persistent_swap_storage)
goto out_err;
}
preempt_disable();
-   from_virtual = kmap_atomic(from_page, KM_USER0);
-   to_virtual = kmap_atomic(to_page, KM_USER1);
+   from_virtual = kmap_atomic(from_page);
+   to_virtual = kmap_atomic(to_page);
memcpy(to_virtual, from_virtual, PAGE_SIZE);
-   kunmap_atomic(to_virtual, KM_USER1);
-   kunmap_atomic(from_virtual, KM_USER0);
+   kunmap_atomic(to_virtual);
+   kunmap_atomic(from_virtual);
preempt_enable();
set_page_dirty(to_page);
mark_page_accessed(to_page);
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c 
b/drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c
index f4e7763..51c9ba5 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c
@@ -136,10 +136,10 @@ static int vmw_gmr_build_descriptors(struct list_head 
*desc_pages,

if (likely(page_virtual != NULL)) {
desc_virtual->ppn = page_to_pfn(page);
-   kunmap_atomic(page_virtual, KM_USER0);
+   kunmap_atomic(page_virtual);
}

-   page_virtual = kmap_atomic(page, KM_USER0);
+   page_virtual = kmap_atomic(page);
desc_virtual = page_virtual - 1;
prev_pfn = ~(0UL);

@@ -169,7 +169,7 @@ static int vmw_gmr_build_descriptors(struct list_head 
*desc_pages,
}

if (likely(page_virtual != NULL))
-   kunmap_atomic(page_virtual, KM_USER0);
+   kunmap_atomic(page_virtual);

return 0;
  out_err:


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


[PATCH 1/5] drm/vgem: virtual GEM provider

2012-02-09 Thread Ben Widawsky
From: Adam Jackson 

This is about as minimal of a virtual GEM service as possible.  My plan
is to use this with non-native-3D hardware for buffer sharing between X
and DRI.

The current drisw winsys assumes an unmodified X server, which means
it's hopelessly inefficient for both the push direction of SwapBuffers/
DrawPixels and the pull direction of GLX_EXT_texture_from_pixmap.  I'm
still working through the details of what the xserver support will look
like, but in broad strokes it's "use vgem for CreatePixmap and
optionally the shadowfb".

Obviously alpha quality, mostly looking for feedback on the approach or
any glaring bugs.  Eventually I'd like to see solutions for sharing gem
objects between drm devices and/or the dma_buf API, but that's a ways
down the road.

Signed-off-by: Adam Jackson 
---
 drivers/gpu/drm/Kconfig |8 ++
 drivers/gpu/drm/Makefile|1 +
 drivers/gpu/drm/vgem/Makefile   |4 +
 drivers/gpu/drm/vgem/vgem_drv.c |  262 +++
 include/drm/vgem_drm.h  |   51 
 5 files changed, 326 insertions(+), 0 deletions(-)
 create mode 100644 drivers/gpu/drm/vgem/Makefile
 create mode 100644 drivers/gpu/drm/vgem/vgem_drv.c
 create mode 100644 include/drm/vgem_drm.h

diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index 2418429..566c468 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -159,6 +159,14 @@ config DRM_SAVAGE
  Choose this option if you have a Savage3D/4/SuperSavage/Pro/Twister
  chipset. If M is selected the module will be called savage.

+config DRM_VGEM
+   tristate "Virtual GEM provider"
+   depends on DRM
+   help
+ Choose this option to get a virtual graphics memory manager,
+ as used by Mesa's software renderer for enhanced performance.
+ If M is selected the module will be called vgem.
+
 source "drivers/gpu/drm/exynos/Kconfig"

 source "drivers/gpu/drm/vmwgfx/Kconfig"
diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
index 0cde1b8..021bf8a 100644
--- a/drivers/gpu/drm/Makefile
+++ b/drivers/gpu/drm/Makefile
@@ -34,6 +34,7 @@ obj-$(CONFIG_DRM_SIS)   += sis/
 obj-$(CONFIG_DRM_SAVAGE)+= savage/
 obj-$(CONFIG_DRM_VMWGFX)+= vmwgfx/
 obj-$(CONFIG_DRM_VIA)  +=via/
+obj-$(CONFIG_DRM_VGEM) += vgem/
 obj-$(CONFIG_DRM_NOUVEAU) +=nouveau/
 obj-$(CONFIG_DRM_EXYNOS) +=exynos/
 obj-$(CONFIG_DRM_GMA500) += gma500/
diff --git a/drivers/gpu/drm/vgem/Makefile b/drivers/gpu/drm/vgem/Makefile
new file mode 100644
index 000..3f4c7b8
--- /dev/null
+++ b/drivers/gpu/drm/vgem/Makefile
@@ -0,0 +1,4 @@
+ccflags-y := -Iinclude/drm
+vgem-y := vgem_drv.o
+
+obj-$(CONFIG_DRM_VGEM) += vgem.o
diff --git a/drivers/gpu/drm/vgem/vgem_drv.c b/drivers/gpu/drm/vgem/vgem_drv.c
new file mode 100644
index 000..82c6787
--- /dev/null
+++ b/drivers/gpu/drm/vgem/vgem_drv.c
@@ -0,0 +1,262 @@
+/*
+ * Copyright 2011 Red Hat, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software")
+ * to deal in the software without restriction, including without limitation
+ * on the rights to use, copy, modify, merge, publish, distribute, sub
+ * license, and/or sell copies of the Software, and to permit persons to whom
+ * them Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTIBILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Authors:
+ * Adam Jackson 
+ */
+
+/**
+ * This is vgem, a (non-hardware-backed) GEM service.  This is used by Mesa's
+ * software renderer and the X server for efficient buffer sharing.
+ */
+
+#include "drmP.h"
+#include "drm.h"
+#include "vgem_drm.h"
+#include 
+#include 
+
+#define DRIVER_NAME"vgem"
+#define DRIVER_DESC"Virtual GEM provider"
+#define DRIVER_DATE"20120112"
+#define DRIVER_MAJOR   1
+#define DRIVER_MINOR   0
+
+static int vgem_load(struct drm_device *dev, unsigned long flags)
+{
+   return 0;
+}
+
+static int vgem_unload(struct drm_device *dev)
+{
+   return 0;
+}
+
+static void vgem_preclose(struct drm_device *dev, struct drm_file *file)
+{
+}
+
+static void vgem_lastclose(struct drm_device *dev)
+{
+}
+
+static int vgem_gem_init_object(struct drm_gem_object *obj)
+{
+   return 0;
+}
+
+static void vgem_gem_free_object(struct drm_gem_object *obj)
+{
+   if (obj->map_list.ma

[RFCv2 PATCH 0/5] virtual GEM provider

2012-02-09 Thread Ben Widawsky
Incorporated some of the feedback given to Adam's original patch.  

My intention is to use this to do some dmabuf work/testing with i915
since it seemed too difficult to get some of Dave Airlie's stuff
working, and I really don't feel like learning anything about nouveau if
I can avoid it.  (though I plan to do that later as well).

I think what's missing is a shrinker, left in size for mmap (didn't see
anyone respond to Daniel Vetter's comment), munmap/remap probably won't
work, do quite a bit more testing; that's all I can think of at the
moment.

The most basic of tests for this are here:
git://people.freedesktop.org/~bwidawsk/vgem-gpu-tools master

I've also pushed this repo here:
git://people.freedesktop.org/~bwidawsk/drm-intel vgem

Adam Jackson (1):
  drm/vgem: virtual GEM provider

Ben Widawsky (4):
  drm/vgem: fops should be separate and constified
  drm/vgem: Add a drm_vgem_gem_object
  drm/vgem: getparam ioctl
  drm/vgem: properly implement mmap

 drivers/gpu/drm/Kconfig |8 +
 drivers/gpu/drm/Makefile|1 +
 drivers/gpu/drm/vgem/Makefile   |4 +
 drivers/gpu/drm/vgem/vgem_drv.c |  377 +++
 include/drm/vgem_drm.h  |   62 +++
 5 files changed, 452 insertions(+), 0 deletions(-)
 create mode 100644 drivers/gpu/drm/vgem/Makefile
 create mode 100644 drivers/gpu/drm/vgem/vgem_drv.c
 create mode 100644 include/drm/vgem_drm.h

-- 
1.7.9



[PATCH 2/5] drm/vgem: fops should be separate and constified

2012-02-09 Thread Ben Widawsky
...or else it just won't build.

Signed-off-by: Ben Widawsky 
---
 drivers/gpu/drm/vgem/vgem_drv.c |   20 +++-
 1 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/vgem/vgem_drv.c b/drivers/gpu/drm/vgem/vgem_drv.c
index 82c6787..3084389 100644
--- a/drivers/gpu/drm/vgem/vgem_drv.c
+++ b/drivers/gpu/drm/vgem/vgem_drv.c
@@ -173,6 +173,16 @@ static struct drm_ioctl_desc vgem_ioctls[] = {
  DRM_UNLOCKED | DRM_AUTH),
 };

+static const struct file_operations vgem_driver_fops = {
+   .owner  = THIS_MODULE,
+   .open   = drm_open,
+   .mmap   = drm_gem_mmap,
+   .poll   = drm_poll,
+   .read   = drm_read,
+   .unlocked_ioctl = drm_ioctl,
+   .release= drm_release,
+};
+
 static struct drm_driver vgem_driver = {
.driver_features= DRIVER_BUS_PLATFORM | DRIVER_GEM,
.load   = vgem_load,
@@ -183,15 +193,7 @@ static struct drm_driver vgem_driver = {
.gem_free_object= vgem_gem_free_object,
.gem_vm_ops = &vgem_gem_vm_ops,
.ioctls = vgem_ioctls,
-   .fops = {
-   .owner  = THIS_MODULE,
-   .open   = drm_open,
-   .mmap   = drm_gem_mmap,
-   .poll   = drm_poll,
-   .read   = drm_read,
-   .unlocked_ioctl = drm_ioctl,
-   .release= drm_release,
-   },
+   .fops   = &vgem_driver_fops,
.name   = DRIVER_NAME,
.desc   = DRIVER_DESC,
.date   = DRIVER_DATE,
-- 
1.7.9



[PATCH 3/5] drm/vgem: Add a drm_vgem_gem_object

2012-02-09 Thread Ben Widawsky
and use it

Signed-off-by: Ben Widawsky 
---
 drivers/gpu/drm/vgem/vgem_drv.c |   13 ++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/vgem/vgem_drv.c b/drivers/gpu/drm/vgem/vgem_drv.c
index 3084389..d47bd71 100644
--- a/drivers/gpu/drm/vgem/vgem_drv.c
+++ b/drivers/gpu/drm/vgem/vgem_drv.c
@@ -40,6 +40,10 @@
 #define DRIVER_MAJOR   1
 #define DRIVER_MINOR   0

+struct drm_vgem_gem_object {
+   struct drm_gem_object base;
+};
+
 static int vgem_load(struct drm_device *dev, unsigned long flags)
 {
return 0;
@@ -90,15 +94,18 @@ static struct drm_gem_object *vgem_gem_create(struct 
drm_device *dev,
  unsigned int *handle,
  unsigned long size)
 {
-   int err;
+   struct drm_vgem_gem_object *obj;
struct drm_gem_object *gem_object;
+   int err;

size = roundup(size, PAGE_SIZE);

-   gem_object = kzalloc(sizeof(*gem_object), GFP_KERNEL);
-   if (!gem_object)
+   obj = kzalloc(sizeof(*obj), GFP_KERNEL);
+   if (!obj)
return ERR_PTR(-ENOMEM);

+   gem_object = &obj->base;
+
if ((err = drm_gem_object_init(dev, gem_object, size)))
goto out;

-- 
1.7.9



[PATCH 4/5] drm/vgem: getparam ioctl

2012-02-09 Thread Ben Widawsky
Similar to i915, it's nice to be able to query this device uniquely and
get some info

Signed-off-by: Ben Widawsky 
---
 drivers/gpu/drm/vgem/vgem_drv.c |   29 +
 include/drm/vgem_drm.h  |   11 +++
 2 files changed, 32 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/vgem/vgem_drv.c b/drivers/gpu/drm/vgem/vgem_drv.c
index d47bd71..7a7a05f 100644
--- a/drivers/gpu/drm/vgem/vgem_drv.c
+++ b/drivers/gpu/drm/vgem/vgem_drv.c
@@ -158,26 +158,39 @@ static int vgem_gem_mmap_ioctl(struct drm_device *dev, 
void *data,

obj->filp->private_data = obj;

-   down_write(¤t->mm->mmap_sem);
-   addr = do_mmap(obj->filp, 0, args->size, PROT_READ | PROT_WRITE,
-  MAP_SHARED, 0);
-   up_write(¤t->mm->mmap_sem);
+   BUG_ON(!obj->map_list.map);

-   drm_gem_object_unreference_unlocked(obj);
+   args->mapped = obj->map_list.hash.key << PAGE_SHIFT;

-   if (IS_ERR((void *)addr))
-   return PTR_ERR((void *)addr);
+   return 0;
+}

-   args->mapped = addr;
+static int vgem_gem_getparam_ioctl(struct drm_device *dev, void *data,
+struct drm_file *file)
+{
+   struct vgem_gem_getparam *args = data;
+   int value=0, ret;
+
+   switch (args->param) {
+   case VGEM_PARAM_IS_VGEM:
+   value = 1;
+   }
+
+   ret = copy_to_user(args->value, &value, sizeof(int));
+   if (ret)
+   return ret;

return 0;
 }

+
 static struct drm_ioctl_desc vgem_ioctls[] = {
DRM_IOCTL_DEF_DRV(VGEM_GEM_CREATE, vgem_gem_create_ioctl,
  DRM_UNLOCKED | DRM_AUTH),
DRM_IOCTL_DEF_DRV(VGEM_GEM_MMAP, vgem_gem_mmap_ioctl,
  DRM_UNLOCKED | DRM_AUTH),
+   DRM_IOCTL_DEF_DRV(VGEM_GEM_GETPARAM, vgem_gem_getparam_ioctl,
+ DRM_UNLOCKED),
 };

 static const struct file_operations vgem_driver_fops = {
diff --git a/include/drm/vgem_drm.h b/include/drm/vgem_drm.h
index d73b537..df83503 100644
--- a/include/drm/vgem_drm.h
+++ b/include/drm/vgem_drm.h
@@ -37,8 +37,15 @@ struct vgem_gem_mmap {
uint64_t mapped;
 };

+struct vgem_gem_getparam {
+#define VGEM_PARAM_IS_VGEM 1
+   unsigned int param;
+   unsigned int *value;
+};
+
 #define DRM_VGEM_GEM_CREATE0x00
 #define DRM_VGEM_GEM_MMAP  0x01
+#define DRM_VGEM_GEM_GETPARAM  0x02

 #define DRM_IOCTL_VGEM_GEM_CREATE \
DRM_IOWR(DRM_COMMAND_BASE + DRM_VGEM_GEM_CREATE, \
@@ -48,4 +55,8 @@ struct vgem_gem_mmap {
DRM_IOWR(DRM_COMMAND_BASE + DRM_VGEM_GEM_MMAP, \
 struct vgem_gem_mmap)

+#define DRM_IOCTL_VGEM_GEM_GETPARAM \
+   DRM_IOWR(DRM_COMMAND_BASE + DRM_VGEM_GEM_GETPARAM, \
+struct vgem_gem_getparam)
+
 #endif
-- 
1.7.9



[PATCH 5/5] drm/vgem: properly implement mmap

2012-02-09 Thread Ben Widawsky
Mostly copied from i915 gtt mmaps, this will properly fault in pages as
the user tries to use them. The only thing of note are that no
prefaulting occurs, so perhaps some kind of madvise will happen later if
needed.

The only other thing missing right not is shrinker support, which will
come next after I figure out if locking is actually required right now.
Hmm, and now that I think about it, mremap, and munmap may not work
either.

Signed-off-by: Ben Widawsky 
---
 drivers/gpu/drm/vgem/vgem_drv.c |  105 --
 1 files changed, 99 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/vgem/vgem_drv.c b/drivers/gpu/drm/vgem/vgem_drv.c
index 7a7a05f..16f88ee 100644
--- a/drivers/gpu/drm/vgem/vgem_drv.c
+++ b/drivers/gpu/drm/vgem/vgem_drv.c
@@ -33,6 +33,7 @@
 #include "vgem_drm.h"
 #include 
 #include 
+#include 

 #define DRIVER_NAME"vgem"
 #define DRIVER_DESC"Virtual GEM provider"
@@ -40,8 +41,11 @@
 #define DRIVER_MAJOR   1
 #define DRIVER_MINOR   0

+#define to_vgem_bo(x) container_of(x, struct drm_vgem_gem_object, base)
+
 struct drm_vgem_gem_object {
struct drm_gem_object base;
+   struct page **pages;
 };

 static int vgem_load(struct drm_device *dev, unsigned long flags)
@@ -67,21 +71,109 @@ static int vgem_gem_init_object(struct drm_gem_object *obj)
return 0;
 }

+static void vgem_gem_put_pages(struct drm_vgem_gem_object *obj)
+{
+   int num_pages = obj->base.size / PAGE_SIZE;
+   int i;
+
+   for (i = 0; i < num_pages; i++) {
+   page_cache_release(obj->pages[i]);
+   }
+
+   drm_free_large(obj->pages);
+   obj->pages = NULL;
+}
+
 static void vgem_gem_free_object(struct drm_gem_object *obj)
 {
-   if (obj->map_list.map)
+   struct drm_vgem_gem_object *vgem_obj = to_vgem_bo(obj);
+
+   if (obj)
drm_gem_free_mmap_offset(obj);

drm_gem_object_release(obj);
+
+   if (vgem_obj->pages)
+   vgem_gem_put_pages(vgem_obj);
+
+   kfree(vgem_obj);
+}
+
+static int vgem_gem_get_pages(struct drm_vgem_gem_object *obj)
+{
+   struct address_space *mapping;
+   gfp_t gfpmask = __GFP_NORETRY | __GFP_NOWARN;
+   int num_pages, i, ret = 0;
+
+   num_pages = obj->base.size / PAGE_SIZE;
+
+   if (!obj->pages) {
+   obj->pages = drm_malloc_ab(num_pages, sizeof(struct page *));
+   if (obj->pages == NULL)
+   return -ENOMEM;
+   }
+
+   mapping = obj->base.filp->f_path.dentry->d_inode->i_mapping;
+   gfpmask |= mapping_gfp_mask(mapping);
+
+   if (WARN_ON(mapping == NULL))
+   return VM_FAULT_SIGBUS;
+
+   for (i = 0; i < num_pages; i++) {
+   struct page *page;
+   page = shmem_read_mapping_page_gfp(mapping, i, gfpmask);
+   if (IS_ERR(page)) {
+   ret = PTR_ERR(page);
+   goto err_out;
+   }
+   obj->pages[i] = page;
+   }
+
+   return ret;
+
+err_out:
+   while (i--)
+   page_cache_release(obj->pages[i]);
+   drm_free_large(obj->pages);
+   obj->pages = NULL;
+   return ret;
 }

-/* XXX I don't think this is ever hit */
 static int vgem_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
 {
-   BUG();
+   struct drm_vgem_gem_object *obj = to_vgem_bo(vma->vm_private_data);
+   loff_t num_pages;
+   pgoff_t page_offset;
+   int ret;
+
+   /* We don't use vmf->pgoff since that has the fake offset */
+   page_offset = ((unsigned long)vmf->virtual_address - vma->vm_start) >>
+   PAGE_SHIFT;
+
+   num_pages = obj->base.size / PAGE_SIZE;
+
+   if (WARN_ON(page_offset > num_pages))
+   return VM_FAULT_SIGBUS;
+
+   ret = vgem_gem_get_pages(obj);
+   if (ret)
+   return ret;
+
+   ret = vm_insert_page(vma, (unsigned long)vmf->virtual_address,
+obj->pages[page_offset]);
+
+   /* Pretty dumb handler for now */
+   switch (ret) {
+   case 0:
+   case -ERESTARTSYS:
+   case -EINTR:
+   return VM_FAULT_NOPAGE;
+   default:
+   return VM_FAULT_SIGBUS;
+   }
 }

-static struct vm_operations_struct vgem_gem_vm_ops = {
+static const struct vm_operations_struct vgem_gem_vm_ops = {
.fault = vgem_gem_fault,
.open = drm_gem_vm_open,
.close = drm_gem_vm_close,
@@ -150,7 +242,6 @@ static int vgem_gem_mmap_ioctl(struct drm_device *dev, void 
*data,
 {
struct vgem_gem_mmap *args = data;
struct drm_gem_object *obj;
-   uintptr_t addr;

obj = drm_gem_object_lookup(dev, file, args->handle);
if (!obj)
@@ -160,7 +251,9 @@ static int vgem_gem_mmap_ioctl(struct drm_device *dev, void 
*data,

BUG_ON(!obj->map_list.map);

-   args->mapped = obj->map_list.hash.key << PAGE_SHIFT;
+   args->mapped = (uint64_t)obj->map_list.hash.ke

[Bug 36602] Hierarchical Z support for R600

2012-02-09 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=36602

--- Comment #32 from Jerome Glisse  2012-02-08 
16:27:23 PST ---
Created attachment 56784
  --> https://bugs.freedesktop.org/attachment.cgi?id=56784
r600g patch

r600g patch on top of master

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


[Bug 36602] Hierarchical Z support for R600

2012-02-09 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=36602

--- Comment #33 from Jerome Glisse  2012-02-08 
16:29:04 PST ---
Created attachment 56785
  --> https://bugs.freedesktop.org/attachment.cgi?id=56785
Kernel patch top of lastest linux + tiling

Kernel patch on top of last linus + tiling. All seems to work ok but likely
stuff regressed.

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


[Bug 36602] Hierarchical Z support for R600

2012-02-09 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=36602

--- Comment #34 from darkbasic  2012-02-08 
16:46:33 PST ---
Thanks. Any chance hitting git master (masked behind a flag of course)?

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


[Bug 16140] [RADEON:KMS:RV250:RESUME] suspend to RAM resume broken

2012-02-09 Thread bugzilla-dae...@bugzilla.kernel.org
https://bugzilla.kernel.org/show_bug.cgi?id=16140


soren121  changed:

   What|Removed |Added

 CC||doodle62 at gmail.com




--- Comment #45 from soren121   2012-02-09 04:08:53 ---
No fix in sight, but there is a workaround: set a primary password in the BIOS.
The BIOS will initialize the video card on wake-up and allow Linux to resume
normally. Inconvenient? Yes, but it's better than bottlenecking your already
out-of-date graphics card. I posted this workaround on the Canonical Launchpad
bug report some time ago; I guess it hasn't been shared outside as of yet.

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


[Bug 45760] World of warcraft 4.3 slow down after a hour of game

2012-02-09 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=45760

--- Comment #2 from Andrew  2012-02-08 23:04:11 PST ---
Created attachment 56790
  --> https://bugs.freedesktop.org/attachment.cgi?id=56790
dmesg

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


[Bug 45760] World of warcraft 4.3 slow down after a hour of game

2012-02-09 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=45760

--- Comment #3 from Andrew  2012-02-08 23:04:39 PST ---
Created attachment 56791
  --> https://bugs.freedesktop.org/attachment.cgi?id=56791
glxinfo

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


[Bug 45760] World of warcraft 4.3 slow down after a hour of game

2012-02-09 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=45760

--- Comment #4 from Andrew  2012-02-08 23:05:01 PST ---
Created attachment 56792
  --> https://bugs.freedesktop.org/attachment.cgi?id=56792
xorg

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


[Bug 45760] World of warcraft 4.3 slow down after a hour of game

2012-02-09 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=45760

--- Comment #5 from Andrew  2012-02-08 23:09:21 PST ---
Yesterday I switched to xorg edgers, but the problem has remained.

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


[Bug 42727] radeon KMS with CRT TV

2012-02-09 Thread bugzilla-dae...@bugzilla.kernel.org
https://bugzilla.kernel.org/show_bug.cgi?id=42727





--- Comment #3 from Michel D?nzer   2012-02-09 09:13:35 
---
Looks like the radeon driver uses NTSC output by default, can the TV handle
that?

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


[PATCH 5/5] drm/vgem: properly implement mmap

2012-02-09 Thread Ben Widawsky
On 02/09/2012 12:36 AM, Chris Wilson wrote:
> On Thu,  9 Feb 2012 00:19:31 +0100, Ben Widawsky  wrote:
>> Mostly copied from i915 gtt mmaps, this will properly fault in pages as
>> the user tries to use them. The only thing of note are that no
>> prefaulting occurs, so perhaps some kind of madvise will happen later if
>> needed.
> 
> What's the goal here? Why not copy the simpler (from the driver
> perspective) CPU mmaps? I presume that this will be required for dmabuf
> in some form?
> -Chris
> 

That was what everyone seemed to want from the original RFC. I think
Eric said something about helping out valgrind. I don't recall the
other reasons.


[Bug 33038] [RADEON:KMS:R600C] celestia crashes radeon_cs_gem.c:181: cs_gem_write_reloc: Assertion `boi->space_accounted' failed

2012-02-09 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=33038

aceman  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WORKSFORME

--- Comment #10 from aceman  2012-02-09 01:21:46 PST ---
Let's close this, it does not currently happen. And also see bug 43893 comment
15.

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


[Bug 45760] World of warcraft 4.3 slow down after a hour of game

2012-02-09 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=45760

Michel D?nzer  changed:

   What|Removed |Added

  Attachment #56790|text/x-log  |text/plain
  mime type||

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


[Bug 45760] World of warcraft 4.3 slow down after a hour of game

2012-02-09 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=45760

Michel D?nzer  changed:

   What|Removed |Added

  Attachment #56791|text/x-log  |text/plain
  mime type||

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


[Bug 45760] World of warcraft 4.3 slow down after a hour of game

2012-02-09 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=45760

Michel D?nzer  changed:

   What|Removed |Added

  Attachment #56792|text/x-log  |text/plain
  mime type||

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


[Bug 45760] World of warcraft 4.3 slow down after a hour of game

2012-02-09 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=45760

--- Comment #6 from Michel D?nzer  2012-02-09 01:33:03 
PST ---
> With start of game the fps is above 30. After hour of game fps down to 10. 
> That
> may be cured by changing, for example, vertical sync in game settings, but
> after hour of game fps down to 10 again.

Hmm, sounds like maybe there's some kind of resource leak, and when you change
settings, things are reinitialized and it starts afresh...

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


[PATCH 5/5] drm/vgem: properly implement mmap

2012-02-09 Thread Daniel Vetter
On Wed, Feb 08, 2012 at 11:36:22PM +, Chris Wilson wrote:
> On Thu,  9 Feb 2012 00:19:31 +0100, Ben Widawsky  wrote:
> > Mostly copied from i915 gtt mmaps, this will properly fault in pages as
> > the user tries to use them. The only thing of note are that no
> > prefaulting occurs, so perhaps some kind of madvise will happen later if
> > needed.
> 
> What's the goal here? Why not copy the simpler (from the driver
> perspective) CPU mmaps? I presume that this will be required for dmabuf
> in some form?

Yeah, for proper instead of hacked-up dma_buf mmap support I expect that
the expoerter needs to provide some sort of vm_insert_pfn_from_dma_buf
function. We need this so that non-coherent dma_buf objects can fake
coherency and also to allow (eventually) eviction. For that the exporter
needs to be able to handle page-faults, so I've figured we might want to
hack something together.

I know it's not a beauty, because drm isn't a fs yet ;-)
-Daniel
-- 
Daniel Vetter
Mail: daniel at ffwll.ch
Mobile: +41 (0)79 365 57 48


[PATCH 1/2] intel: Mark up with valgrind intrinsics to reduce false positives

2012-02-09 Thread Chris Wilson
In particular, declare the hidden CPU mmaps to valgrind so that it knows
about those memory regions.

References: https://bugs.freedesktop.org/show_bug.cgi?id=35071
Signed-off-by: Chris Wilson 
---
 configure.ac |3 ++
 intel/Makefile.am|1 +
 intel/intel_bufmgr_gem.c |   52 +
 3 files changed, 42 insertions(+), 14 deletions(-)

diff --git a/configure.ac b/configure.ac
index 773167f..3ca7b79 100644
--- a/configure.ac
+++ b/configure.ac
@@ -258,6 +258,9 @@ if test "x$INTEL" != "xno" -o "x$RADEON" != "xno"; then
 fi
 fi

+PKG_CHECK_MODULES(VALGRIND, [valgrind],
+ AC_DEFINE([HAVE_VALGRIND], 1, [Use valgrind intrinsics to 
suppress false warings]),)
+
 AM_CONDITIONAL(HAVE_INTEL, [test "x$INTEL" != "xno"])
 AM_CONDITIONAL(HAVE_RADEON, [test "x$RADEON" != "xno"])
 if test "x$RADEON" = xyes; then
diff --git a/intel/Makefile.am b/intel/Makefile.am
index 581c8c0..e313614 100644
--- a/intel/Makefile.am
+++ b/intel/Makefile.am
@@ -28,6 +28,7 @@ AM_CFLAGS = \
-I$(top_srcdir)/intel \
$(PTHREADSTUBS_CFLAGS) \
$(PCIACCESS_CFLAGS) \
+   $(VALGRIND_CFLAGS) \
-I$(top_srcdir)/include/drm

 libdrm_intel_la_LTLIBRARIES = libdrm_intel.la
diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
index 2b4fab1..4d30e62 100644
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
@@ -62,6 +62,16 @@

 #include "i915_drm.h"

+#ifdef HAVE_VALGRIND
+#include 
+#include 
+#define VG(x) x
+#else
+#define VG(x)
+#endif
+
+#define VG_CLEAR(s) VG(memset(&s, 0, sizeof(s)))
+
 #define DBG(...) do {  \
if (bufmgr_gem->bufmgr.debug)   \
fprintf(stderr, __VA_ARGS__);   \
@@ -538,7 +548,7 @@ drm_intel_gem_bo_busy(drm_intel_bo *bo)
struct drm_i915_gem_busy busy;
int ret;

-   memset(&busy, 0, sizeof(busy));
+   VG_CLEAR(busy);
busy.handle = bo_gem->gem_handle;

ret = drmIoctl(bufmgr_gem->fd, DRM_IOCTL_I915_GEM_BUSY, &busy);
@@ -552,6 +562,7 @@ drm_intel_gem_bo_madvise_internal(drm_intel_bufmgr_gem 
*bufmgr_gem,
 {
struct drm_i915_gem_madvise madv;

+   VG_CLEAR(madv);
madv.handle = bo_gem->gem_handle;
madv.madv = state;
madv.retained = 1;
@@ -679,7 +690,8 @@ retry:
return NULL;

bo_gem->bo.size = bo_size;
-   memset(&create, 0, sizeof(create));
+
+   VG_CLEAR(create);
create.size = bo_size;

ret = drmIoctl(bufmgr_gem->fd,
@@ -835,7 +847,7 @@ drm_intel_bo_gem_create_from_name(drm_intel_bufmgr *bufmgr,
if (!bo_gem)
return NULL;

-   memset(&open_arg, 0, sizeof(open_arg));
+   VG_CLEAR(open_arg);
open_arg.name = handle;
ret = drmIoctl(bufmgr_gem->fd,
   DRM_IOCTL_GEM_OPEN,
@@ -858,7 +870,7 @@ drm_intel_bo_gem_create_from_name(drm_intel_bufmgr *bufmgr,
bo_gem->global_name = handle;
bo_gem->reusable = false;

-   memset(&get_tiling, 0, sizeof(get_tiling));
+   VG_CLEAR(get_tiling);
get_tiling.handle = bo_gem->gem_handle;
ret = drmIoctl(bufmgr_gem->fd,
   DRM_IOCTL_I915_GEM_GET_TILING,
@@ -889,6 +901,7 @@ drm_intel_gem_bo_free(drm_intel_bo *bo)

DRMLISTDEL(&bo_gem->vma_list);
if (bo_gem->mem_virtual) {
+   VG(VALGRIND_FREELIKE_BLOCK(bo_gem->mem_virtual, 0));
munmap(bo_gem->mem_virtual, bo_gem->bo.size);
bufmgr_gem->vma_count--;
}
@@ -898,7 +911,7 @@ drm_intel_gem_bo_free(drm_intel_bo *bo)
}

/* Close this object */
-   memset(&close, 0, sizeof(close));
+   VG_CLEAR(close);
close.handle = bo_gem->gem_handle;
ret = drmIoctl(bufmgr_gem->fd, DRM_IOCTL_GEM_CLOSE, &close);
if (ret != 0) {
@@ -1103,7 +1116,7 @@ static int drm_intel_gem_bo_map(drm_intel_bo *bo, int 
write_enable)
DBG("bo_map: %d (%s), map_count=%d\n",
bo_gem->gem_handle, bo_gem->name, bo_gem->map_count);

-   memset(&mmap_arg, 0, sizeof(mmap_arg));
+   VG_CLEAR(mmap_arg);
mmap_arg.handle = bo_gem->gem_handle;
mmap_arg.offset = 0;
mmap_arg.size = bo->size;
@@ -1120,12 +1133,14 @@ static int drm_intel_gem_bo_map(drm_intel_bo *bo, int 
write_enable)
pthread_mutex_unlock(&bufmgr_gem->lock);
return ret;
}
+   VG(VALGRIND_MALLOCLIKE_BLOCK(mmap_arg.addr_ptr, mmap_arg.size, 
0, 1));
bo_gem->mem_virtual = (void *)(uintptr_t) mmap_arg.addr_ptr;
}
DBG("bo_map: %d (%s) -> %p\n", bo_gem->gem_handle, bo_gem->name,
bo_gem->mem_virtual);
bo->virtual = bo_gem->mem_virtual;

+   VG_CLEAR(set_domain);
set_domain.handle = bo_gem->gem_handle;
   

[PATCH 2/2] intel: Detect cache domain inconsistency with valgrind

2012-02-09 Thread Chris Wilson
Every access to either the GTT or CPU pointer is supposed to be
proceeded by a set_domain ioctl so that GEM is able to manage the cache
domains correctly and for the following access to be coherent. Of
course, some people explicitly want incoherent, non-blocking access
which is going to trigger warnings by this patch but are probably better
served by explicit suppression.

Signed-off-by: Chris Wilson 
---
 intel/intel_bufmgr_gem.c |   22 ++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
index 4d30e62..d40f2cd 100644
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
@@ -1098,6 +1098,20 @@ static void drm_intel_gem_bo_unreference(drm_intel_bo 
*bo)
}
 }

+static void
+drm_intel_gem_bo_mark_mmaps_incoherent(drm_intel_bo *bo)
+{
+#if HAVE_VALGRIND
+   drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *) bo;
+
+   if (bo_gem->mem_virtual)
+   VALGRIND_MAKE_MEM_NOACCESS(bo_gem->mem_virtual, bo->size);
+
+   if (bo_gem->gtt_virtual)
+   VALGRIND_MAKE_MEM_NOACCESS(bo_gem->gtt_virtual, bo->size);
+#endif
+}
+
 static int drm_intel_gem_bo_map(drm_intel_bo *bo, int write_enable)
 {
drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bo->bufmgr;
@@ -1159,6 +1173,8 @@ static int drm_intel_gem_bo_map(drm_intel_bo *bo, int 
write_enable)
if (write_enable)
bo_gem->mapped_cpu_write = true;

+   drm_intel_gem_bo_mark_mmaps_incoherent(bo);
+   VALGRIND_MAKE_MEM_DEFINED(bo_gem->mem_virtual, bo->size);
pthread_mutex_unlock(&bufmgr_gem->lock);

return 0;
@@ -1239,6 +1255,8 @@ int drm_intel_gem_bo_map_gtt(drm_intel_bo *bo)
strerror(errno));
}

+   drm_intel_gem_bo_mark_mmaps_incoherent(bo);
+   VALGRIND_MAKE_MEM_DEFINED(bo_gem->gtt_virtual, bo->size);
pthread_mutex_unlock(&bufmgr_gem->lock);

return 0;
@@ -1614,6 +1632,8 @@ drm_intel_gem_bo_process_reloc(drm_intel_bo *bo)
if (target_bo == bo)
continue;

+   drm_intel_gem_bo_mark_mmaps_incoherent(bo);
+
/* Continue walking the tree depth-first. */
drm_intel_gem_bo_process_reloc(target_bo);

@@ -1638,6 +1658,8 @@ drm_intel_gem_bo_process_reloc2(drm_intel_bo *bo)
if (target_bo == bo)
continue;

+   drm_intel_gem_bo_mark_mmaps_incoherent(bo);
+
/* Continue walking the tree depth-first. */
drm_intel_gem_bo_process_reloc2(target_bo);

-- 
1.7.9



[Intel-gfx] [PATCH 2/2] intel: Detect cache domain inconsistency with valgrind

2012-02-09 Thread Daniel Vetter
On Thu, Feb 09, 2012 at 10:43:11AM +, Chris Wilson wrote:
> Every access to either the GTT or CPU pointer is supposed to be
> proceeded by a set_domain ioctl so that GEM is able to manage the cache
> domains correctly and for the following access to be coherent. Of
> course, some people explicitly want incoherent, non-blocking access
> which is going to trigger warnings by this patch but are probably better
> served by explicit suppression.
> 
> Signed-off-by: Chris Wilson 

I think we should also mark the mmaps incoherent when putting a bo into
the libdrm cache to catch use after free issues (and issues with
concurrent set_tiling).
-Daniel
-- 
Daniel Vetter
Mail: daniel at ffwll.ch
Mobile: +41 (0)79 365 57 48


[Bug 45825] Displayport output unusable on Llano

2012-02-09 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=45825

Alex Deucher  changed:

   What|Removed |Added

 AssignedTo|xorg-driver-ati at lists.x.org |dri-devel at 
lists.freedesktop
   ||.org
  QAContact|xorg-team at lists.x.org   |
Product|xorg|DRI
  Component|Driver/Radeon   |DRM/Radeon

--- Comment #3 from Alex Deucher  2012-02-09 05:19:55 PST 
---
Please attach your dmesg output.  What kernel are you using?

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


[Bug 16140] [RADEON:KMS:RV250:RESUME] suspend to RAM resume broken

2012-02-09 Thread bugzilla-dae...@bugzilla.kernel.org
https://bugzilla.kernel.org/show_bug.cgi?id=16140





--- Comment #46 from Paul Bolle   2012-02-09 13:54:32 ---
(In reply to comment #45)
> I posted this workaround on the Canonical Launchpad
> bug report some time ago; I guess it hasn't been shared outside as of yet.

Could you add a link to that bug report?

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


[Bug 34096] r300: Cannot get a relocation in radeon_drm_cs_write_reloc.

2012-02-09 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=34096

--- Comment #4 from 414N  2012-02-09 06:00:05 PST ---
Having this problem too with a mesa built from a 2 days old git snapshot.
The problem occurs when trying to launch a WebGL demo
(http://www.chromeexperiments.com/detail/glass-shader/) using Firefox 10.0
(x86_64).
On the shell the following message appears:

radeon: Cannot get a relocation in radeon_drm_cs_write_reloc.

and then Firefox crashes.
Reading the previous comments I looked at dmesg too and the following happens:
1) When using a 3.1.0 kernel, some lines similar to those already mentioned in
the above comments appear;
2) When using a 3.2.5 kernel, nothing appears in dmesg anymore after Firefox
crashing.
I tried using the 3.2.5 kernel because I thought that some changes undergone in
libdrm would only be available with a newer kernel.
My system specs follow:
CPU: AMD Athlon 64 FX-55
GPU: ATI Technologies Inc R420 JP [Radeon X800XT]
OS: Slackware64 13.37
Mesa git snapshot taken on February, the 7th
libdrm-2.4.31

If more information is needed, please tell me.

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


[Bug 34096] r300: Cannot get a relocation in radeon_drm_cs_write_reloc.

2012-02-09 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=34096

--- Comment #5 from Sven Arvidsson  2012-02-09 06:05:40 PST ---
414N : It's probably a better idea to open a new bug for this, it might not be
the same problem.

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


[PATCH] Ignore LVDS on hp t5745 and hp st5747 thin client

2012-02-09 Thread Marc Gariepy
Add a no_lvds quirk for the HP t5745 and HP st5747 thin clients

dmidecode for those thin clients are attached in thoses bugs:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/911916
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/911920


Signed-off-by: Marc Gariepy 
---
Hello,

this patch was previously posted on dri-devel and this is now
reformated.

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

diff --git a/drivers/gpu/drm/i915/intel_lvds.c 
b/drivers/gpu/drm/i915/intel_lvds.c
index 798f6e1..069f9ba 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -731,6 +731,22 @@ static const struct dmi_system_id intel_no_lvds[] = {
DMI_MATCH(DMI_BOARD_NAME, "AT5NM10T-I"),
},
},
+   {
+   .callback = intel_no_lvds_dmi_callback,
+   .ident = "Hewlett-Packard t5745",
+   .matches = {
+   DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
+   DMI_MATCH(DMI_BOARD_NAME, "hp t5745"),
+   },
+   },
+   {
+   .callback = intel_no_lvds_dmi_callback,
+   .ident = "Hewlett-Packard st5747",
+   .matches = {
+   DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
+   DMI_MATCH(DMI_BOARD_NAME, "hp st5747"),
+   },
+   },

{ } /* terminating entry */
 };
-- 
1.7.5.4



[PATCH 1/2] intel: Mark up with valgrind intrinsics to reduce false positives

2012-02-09 Thread Ben Widawsky
On 02/09/2012 11:43 AM, Chris Wilson wrote:
> In particular, declare the hidden CPU mmaps to valgrind so that it knows
> about those memory regions.
> 
> References: https://bugs.freedesktop.org/show_bug.cgi?id=35071
> Signed-off-by: Chris Wilson 
Acked-by: Ben Widawsky 

> ---
>  configure.ac |3 ++
>  intel/Makefile.am|1 +
>  intel/intel_bufmgr_gem.c |   52 +
>  3 files changed, 42 insertions(+), 14 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 773167f..3ca7b79 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -258,6 +258,9 @@ if test "x$INTEL" != "xno" -o "x$RADEON" != "xno"; then
>  fi
>  fi
>  
> +PKG_CHECK_MODULES(VALGRIND, [valgrind],
> +   AC_DEFINE([HAVE_VALGRIND], 1, [Use valgrind intrinsics to 
> suppress false warings]),)
> +
>  AM_CONDITIONAL(HAVE_INTEL, [test "x$INTEL" != "xno"])
>  AM_CONDITIONAL(HAVE_RADEON, [test "x$RADEON" != "xno"])
>  if test "x$RADEON" = xyes; then
> diff --git a/intel/Makefile.am b/intel/Makefile.am
> index 581c8c0..e313614 100644
> --- a/intel/Makefile.am
> +++ b/intel/Makefile.am
> @@ -28,6 +28,7 @@ AM_CFLAGS = \
>   -I$(top_srcdir)/intel \
>   $(PTHREADSTUBS_CFLAGS) \
>   $(PCIACCESS_CFLAGS) \
> + $(VALGRIND_CFLAGS) \
>   -I$(top_srcdir)/include/drm
>  
>  libdrm_intel_la_LTLIBRARIES = libdrm_intel.la
> diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
> index 2b4fab1..4d30e62 100644
> --- a/intel/intel_bufmgr_gem.c
> +++ b/intel/intel_bufmgr_gem.c
> @@ -62,6 +62,16 @@
>  
>  #include "i915_drm.h"
>  
> +#ifdef HAVE_VALGRIND
> +#include 
> +#include 
> +#define VG(x) x
> +#else
> +#define VG(x)
> +#endif
> +
> +#define VG_CLEAR(s) VG(memset(&s, 0, sizeof(s)))
> +
>  #define DBG(...) do {\
>   if (bufmgr_gem->bufmgr.debug)   \
>   fprintf(stderr, __VA_ARGS__);   \
> @@ -538,7 +548,7 @@ drm_intel_gem_bo_busy(drm_intel_bo *bo)
>   struct drm_i915_gem_busy busy;
>   int ret;
>  
> - memset(&busy, 0, sizeof(busy));
> + VG_CLEAR(busy);
>   busy.handle = bo_gem->gem_handle;
>  
>   ret = drmIoctl(bufmgr_gem->fd, DRM_IOCTL_I915_GEM_BUSY, &busy);
> @@ -552,6 +562,7 @@ drm_intel_gem_bo_madvise_internal(drm_intel_bufmgr_gem 
> *bufmgr_gem,
>  {
>   struct drm_i915_gem_madvise madv;
>  
> + VG_CLEAR(madv);
>   madv.handle = bo_gem->gem_handle;
>   madv.madv = state;
>   madv.retained = 1;
> @@ -679,7 +690,8 @@ retry:
>   return NULL;
>  
>   bo_gem->bo.size = bo_size;
> - memset(&create, 0, sizeof(create));
> +
> + VG_CLEAR(create);
>   create.size = bo_size;
>  
>   ret = drmIoctl(bufmgr_gem->fd,
> @@ -835,7 +847,7 @@ drm_intel_bo_gem_create_from_name(drm_intel_bufmgr 
> *bufmgr,
>   if (!bo_gem)
>   return NULL;
>  
> - memset(&open_arg, 0, sizeof(open_arg));
> + VG_CLEAR(open_arg);
>   open_arg.name = handle;
>   ret = drmIoctl(bufmgr_gem->fd,
>  DRM_IOCTL_GEM_OPEN,
> @@ -858,7 +870,7 @@ drm_intel_bo_gem_create_from_name(drm_intel_bufmgr 
> *bufmgr,
>   bo_gem->global_name = handle;
>   bo_gem->reusable = false;
>  
> - memset(&get_tiling, 0, sizeof(get_tiling));
> + VG_CLEAR(get_tiling);
>   get_tiling.handle = bo_gem->gem_handle;
>   ret = drmIoctl(bufmgr_gem->fd,
>  DRM_IOCTL_I915_GEM_GET_TILING,
> @@ -889,6 +901,7 @@ drm_intel_gem_bo_free(drm_intel_bo *bo)
>  
>   DRMLISTDEL(&bo_gem->vma_list);
>   if (bo_gem->mem_virtual) {
> + VG(VALGRIND_FREELIKE_BLOCK(bo_gem->mem_virtual, 0));
>   munmap(bo_gem->mem_virtual, bo_gem->bo.size);
>   bufmgr_gem->vma_count--;
>   }
> @@ -898,7 +911,7 @@ drm_intel_gem_bo_free(drm_intel_bo *bo)
>   }
>  
>   /* Close this object */
> - memset(&close, 0, sizeof(close));
> + VG_CLEAR(close);
>   close.handle = bo_gem->gem_handle;
>   ret = drmIoctl(bufmgr_gem->fd, DRM_IOCTL_GEM_CLOSE, &close);
>   if (ret != 0) {
> @@ -1103,7 +1116,7 @@ static int drm_intel_gem_bo_map(drm_intel_bo *bo, int 
> write_enable)
>   DBG("bo_map: %d (%s), map_count=%d\n",
>   bo_gem->gem_handle, bo_gem->name, bo_gem->map_count);
>  
> - memset(&mmap_arg, 0, sizeof(mmap_arg));
> + VG_CLEAR(mmap_arg);
>   mmap_arg.handle = bo_gem->gem_handle;
>   mmap_arg.offset = 0;
>   mmap_arg.size = bo->size;
> @@ -1120,12 +1133,14 @@ static int drm_intel_gem_bo_map(drm_intel_bo *bo, int 
> write_enable)
>   pthread_mutex_unlock(&bufmgr_gem->lock);
>   return ret;
>   }
> + VG(VALGRIND_MALLOCLIKE_BLOCK(mmap_arg.addr_ptr, mmap_arg.size, 
> 0, 1));
>   bo_gem->mem_virtual = (void *)(uintptr_t) mmap_arg.addr_

[Bug 45825] Displayport output unusable on Llano

2012-02-09 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=45825

--- Comment #4 from Tomi Pievil?inen  
2012-02-09 06:55:05 PST ---
Created attachment 56820
  --> https://bugs.freedesktop.org/attachment.cgi?id=56820
dmesg

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


[Bug 45825] Displayport output unusable on Llano

2012-02-09 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=45825

--- Comment #5 from Tomi Pievil?inen  
2012-02-09 06:56:30 PST ---
I have stock ubuntu oneiric kernel, linux-image-3.2.0-030200rc2-generic

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


[PATCH -next 0/0] vmwgfx updates

2012-02-09 Thread Thomas Hellstrom
A series of updates that brings in fake pageflipping support and
sets initial preferred mode in a way similar to how the legacy Xorg driver
does it. We bump minor to indicate availability of the pageflipping ioctl.



[PATCH 1/9] vmwgfx: Rework fence event action

2012-02-09 Thread Thomas Hellstrom
From: Jakob Bornecrantz 

Signed-off-by: Jakob Bornecrantz 
Reviewed-by: Thomas Hellstrom 
---
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.h   |   12 ++
 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c |  210 ++--
 2 files changed, 104 insertions(+), 118 deletions(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h 
b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
index dc27970..7f09db1 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
@@ -658,6 +658,18 @@ int vmw_overlay_num_overlays(struct vmw_private *dev_priv);
 int vmw_overlay_num_free_overlays(struct vmw_private *dev_priv);

 /**
+ * Fence function - vmwgfx_fence.c
+ */
+
+int vmw_event_fence_action_queue(struct drm_file *file_priv,
+struct vmw_fence_obj *fence,
+struct drm_pending_event *event,
+uint32_t *tv_sec,
+uint32_t *tv_usec,
+bool interruptible);
+
+
+/**
  * GMR Id manager
  */

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c 
b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
index 15fb260..ea9d045 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
@@ -69,12 +69,12 @@ struct vmw_user_fence {
  * be assigned the current time tv_usec val when the fence signals.
  */
 struct vmw_event_fence_action {
-   struct drm_pending_event e;
struct vmw_fence_action action;
+
+   struct drm_pending_event *event;
struct vmw_fence_obj *fence;
struct drm_device *dev;
-   struct kref kref;
-   uint32_t size;
+
uint32_t *tv_sec;
uint32_t *tv_usec;
 };
@@ -783,49 +783,6 @@ int vmw_fence_obj_unref_ioctl(struct drm_device *dev, void 
*data,
 TTM_REF_USAGE);
 }

-/**
- * vmw_event_fence_action_destroy
- *
- * @kref: The struct kref embedded in a struct vmw_event_fence_action.
- *
- * The vmw_event_fence_action destructor that may be called either after
- * the fence action cleanup, or when the event is delivered.
- * It frees both the vmw_event_fence_action struct and the actual
- * event structure copied to user-space.
- */
-static void vmw_event_fence_action_destroy(struct kref *kref)
-{
-   struct vmw_event_fence_action *eaction =
-   container_of(kref, struct vmw_event_fence_action, kref);
-   struct ttm_mem_global *mem_glob =
-   vmw_mem_glob(vmw_priv(eaction->dev));
-   uint32_t size = eaction->size;
-
-   kfree(eaction->e.event);
-   kfree(eaction);
-   ttm_mem_global_free(mem_glob, size);
-}
-
-
-/**
- * vmw_event_fence_action_delivered
- *
- * @e: The struct drm_pending_event embedded in a struct
- * vmw_event_fence_action.
- *
- * The struct drm_pending_event destructor that is called by drm
- * once the event is delivered. Since we don't know whether this function
- * will be called before or after the fence action destructor, we
- * free a refcount and destroy if it becomes zero.
- */
-static void vmw_event_fence_action_delivered(struct drm_pending_event *e)
-{
-   struct vmw_event_fence_action *eaction =
-   container_of(e, struct vmw_event_fence_action, e);
-
-   kref_put(&eaction->kref, vmw_event_fence_action_destroy);
-}
-

 /**
  * vmw_event_fence_action_seq_passed
@@ -836,18 +793,16 @@ static void vmw_event_fence_action_delivered(struct 
drm_pending_event *e)
  * This function is called when the seqno of the fence where @action is
  * attached has passed. It queues the event on the submitter's event list.
  * This function is always called from atomic context, and may be called
- * from irq context. It ups a refcount reflecting that we now have two
- * destructors.
+ * from irq context.
  */
 static void vmw_event_fence_action_seq_passed(struct vmw_fence_action *action)
 {
struct vmw_event_fence_action *eaction =
container_of(action, struct vmw_event_fence_action, action);
struct drm_device *dev = eaction->dev;
-   struct drm_file *file_priv = eaction->e.file_priv;
+   struct drm_file *file_priv = eaction->event->file_priv;
unsigned long irq_flags;

-   kref_get(&eaction->kref);
spin_lock_irqsave(&dev->event_lock, irq_flags);

if (likely(eaction->tv_sec != NULL)) {
@@ -858,7 +813,7 @@ static void vmw_event_fence_action_seq_passed(struct 
vmw_fence_action *action)
*eaction->tv_usec = tv.tv_usec;
}

-   list_add_tail(&eaction->e.link, &file_priv->event_list);
+   list_add_tail(&eaction->event->link, &file_priv->event_list);
wake_up_all(&file_priv->event_wait);
spin_unlock_irqrestore(&dev->event_lock, irq_flags);
 }
@@ -878,7 +833,7 @@ static void vmw_event_fence_action_cleanup(struct 
vmw_fence_action *action)
container_of(action, struct vmw_event_fence_action, action);

vmw_fence_obj_unreference(&eaction->fence);
-  

[PATCH 2/9] vmwgfx: Clean up pending event references to struct drm_file objects on close

2012-02-09 Thread Thomas Hellstrom
Pending events may have stale pointer references to struct drm_file objects
after a file has been closed, but before the event is supposed to be
attached to the drm file. Remove such events on file close.

Tested with "modetest".

Signed-off-by: Thomas Hellstrom 
Reviewed-by: Jakob Bornecrantz 
---
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c   |   11 ++
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.h   |1 +
 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c |   60 +++-
 drivers/gpu/drm/vmwgfx/vmwgfx_fence.h |3 ++
 4 files changed, 73 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c 
b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
index f390f5f..28f59a3c3 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
@@ -688,6 +688,15 @@ static int vmw_driver_unload(struct drm_device *dev)
return 0;
 }

+static void vmw_preclose(struct drm_device *dev,
+struct drm_file *file_priv)
+{
+   struct vmw_fpriv *vmw_fp = vmw_fpriv(file_priv);
+   struct vmw_private *dev_priv = vmw_priv(dev);
+
+   vmw_event_fence_fpriv_gone(dev_priv->fman, &vmw_fp->fence_events);
+}
+
 static void vmw_postclose(struct drm_device *dev,
 struct drm_file *file_priv)
 {
@@ -710,6 +719,7 @@ static int vmw_driver_open(struct drm_device *dev, struct 
drm_file *file_priv)
if (unlikely(vmw_fp == NULL))
return ret;

+   INIT_LIST_HEAD(&vmw_fp->fence_events);
vmw_fp->tfile = ttm_object_file_init(dev_priv->tdev, 10);
if (unlikely(vmw_fp->tfile == NULL))
goto out_no_tfile;
@@ -1102,6 +1112,7 @@ static struct drm_driver driver = {
.master_set = vmw_master_set,
.master_drop = vmw_master_drop,
.open = vmw_driver_open,
+   .preclose = vmw_preclose,
.postclose = vmw_postclose,
.fops = &vmwgfx_driver_fops,
.name = VMWGFX_DRIVER_NAME,
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h 
b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
index 7f09db1..93505ce 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
@@ -62,6 +62,7 @@
 struct vmw_fpriv {
struct drm_master *locked_master;
struct ttm_object_file *tfile;
+   struct list_head fence_events;
 };

 struct vmw_dma_buffer {
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c 
b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
index ea9d045..f2fb8f1 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
@@ -70,6 +70,7 @@ struct vmw_user_fence {
  */
 struct vmw_event_fence_action {
struct vmw_fence_action action;
+   struct list_head fpriv_head;

struct drm_pending_event *event;
struct vmw_fence_obj *fence;
@@ -783,6 +784,43 @@ int vmw_fence_obj_unref_ioctl(struct drm_device *dev, void 
*data,
 TTM_REF_USAGE);
 }

+/**
+ * vmw_event_fence_fpriv_gone - Remove references to struct drm_file objects
+ *
+ * @fman: Pointer to a struct vmw_fence_manager
+ * @event_list: Pointer to linked list of struct vmw_event_fence_action objects
+ * with pointers to a struct drm_file object about to be closed.
+ *
+ * This function removes all pending fence events with references to a
+ * specific struct drm_file object about to be closed. The caller is required
+ * to pass a list of all struct vmw_event_fence_action objects with such
+ * events attached. This function is typically called before the
+ * struct drm_file object's event management is taken down.
+ */
+void vmw_event_fence_fpriv_gone(struct vmw_fence_manager *fman,
+   struct list_head *event_list)
+{
+   struct vmw_event_fence_action *eaction;
+   struct drm_pending_event *event;
+   unsigned long irq_flags;
+
+   while (1) {
+   spin_lock_irqsave(&fman->lock, irq_flags);
+   if (list_empty(event_list))
+   goto out_unlock;
+   eaction = list_first_entry(event_list,
+  struct vmw_event_fence_action,
+  fpriv_head);
+   list_del_init(&eaction->fpriv_head);
+   event = eaction->event;
+   eaction->event = NULL;
+   spin_unlock_irqrestore(&fman->lock, irq_flags);
+   event->destroy(event);
+   }
+out_unlock:
+   spin_unlock_irqrestore(&fman->lock, irq_flags);
+}
+

 /**
  * vmw_event_fence_action_seq_passed
@@ -800,9 +838,14 @@ static void vmw_event_fence_action_seq_passed(struct 
vmw_fence_action *action)
struct vmw_event_fence_action *eaction =
container_of(action, struct vmw_event_fence_action, action);
struct drm_device *dev = eaction->dev;
-   struct drm_file *file_priv = eaction->event->file_priv;
+   struct drm_pending_event *event = eaction->event;
+   struct drm_file *file_priv;
unsig

[PATCH 3/9] vmwgfx: Make it possible to get fence from execbuf

2012-02-09 Thread Thomas Hellstrom
From: Jakob Bornecrantz 

Signed-off-by: Jakob Bornecrantz 
Reviewed-by: Thomas Hellstrom 
---
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.h |3 ++-
 drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c |   15 +++
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.c |   10 +-
 3 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h 
b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
index 93505ce..14c2f49 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
@@ -534,7 +534,8 @@ extern int vmw_execbuf_process(struct drm_file *file_priv,
   uint32_t command_size,
   uint64_t throttle_us,
   struct drm_vmw_fence_rep __user
-  *user_fence_rep);
+  *user_fence_rep,
+  struct vmw_fence_obj **out_fence);

 extern void
 vmw_execbuf_release_pinned_bo(struct vmw_private *dev_priv,
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c 
b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
index 40932fb..4acced4 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
@@ -1109,10 +1109,11 @@ int vmw_execbuf_process(struct drm_file *file_priv,
void *kernel_commands,
uint32_t command_size,
uint64_t throttle_us,
-   struct drm_vmw_fence_rep __user *user_fence_rep)
+   struct drm_vmw_fence_rep __user *user_fence_rep,
+   struct vmw_fence_obj **out_fence)
 {
struct vmw_sw_context *sw_context = &dev_priv->ctx;
-   struct vmw_fence_obj *fence;
+   struct vmw_fence_obj *fence = NULL;
uint32_t handle;
void *cmd;
int ret;
@@ -1208,8 +1209,13 @@ int vmw_execbuf_process(struct drm_file *file_priv,
vmw_execbuf_copy_fence_user(dev_priv, vmw_fpriv(file_priv), ret,
user_fence_rep, fence, handle);

-   if (likely(fence != NULL))
+   /* Don't unreference when handing fence out */
+   if (unlikely(out_fence != NULL)) {
+   *out_fence = fence;
+   fence = NULL;
+   } else if (likely(fence != NULL)) {
vmw_fence_obj_unreference(&fence);
+   }

mutex_unlock(&dev_priv->cmdbuf_mutex);
return 0;
@@ -1362,7 +1368,8 @@ int vmw_execbuf_ioctl(struct drm_device *dev, void *data,
ret = vmw_execbuf_process(file_priv, dev_priv,
  (void __user *)(unsigned long)arg->commands,
  NULL, arg->command_size, arg->throttle_us,
- (void __user *)(unsigned long)arg->fence_rep);
+ (void __user *)(unsigned long)arg->fence_rep,
+ NULL);

if (unlikely(ret != 0))
goto out_unlock;
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c 
b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
index b66ef0e..12619c3 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
@@ -547,7 +547,7 @@ static int do_surface_dirty_sou(struct vmw_private 
*dev_priv,
fifo_size = sizeof(*cmd) + sizeof(SVGASignedRect) * num;
cmd->header.size = cpu_to_le32(fifo_size - sizeof(cmd->header));
ret = vmw_execbuf_process(file_priv, dev_priv, NULL, cmd,
- fifo_size, 0, NULL);
+ fifo_size, 0, NULL, NULL);

if (unlikely(ret != 0))
break;
@@ -809,7 +809,7 @@ static int do_dmabuf_define_gmrfb(struct drm_file 
*file_priv,
cmd->body.ptr.offset = 0;

ret = vmw_execbuf_process(file_priv, dev_priv, NULL, cmd,
- fifo_size, 0, NULL);
+ fifo_size, 0, NULL, NULL);

kfree(cmd);

@@ -896,7 +896,7 @@ static int do_dmabuf_dirty_sou(struct drm_file *file_priv,

fifo_size = sizeof(*blits) * hit_num;
ret = vmw_execbuf_process(file_priv, dev_priv, NULL, blits,
- fifo_size, 0, NULL);
+ fifo_size, 0, NULL, NULL);

if (unlikely(ret != 0))
break;
@@ -1296,7 +1296,7 @@ int vmw_kms_present(struct vmw_private *dev_priv,
fifo_size = sizeof(*cmd) + sizeof(SVGASignedRect) * num;
cmd->header.size = cpu_to_le32(fifo_size - sizeof(cmd->header));
ret = vmw_execbuf_process(file_priv, dev_priv, NULL, cmd,
- fifo_size, 0, NULL);
+ fifo_size, 0, NULL, NULL);

if (unlikely(ret != 0))
break;
@@ -1409,7 +1409,7 @@ int vmw_kms_readbac

[PATCH 4/9] vmwgfx: Pipe fence out of screen object dirty functions

2012-02-09 Thread Thomas Hellstrom
From: Jakob Bornecrantz 

Signed-off-by: Jakob Bornecrantz 
Signed-off-by: Thomas Hellstrom 
---
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.c |   21 +++--
 1 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c 
b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
index 12619c3..24efcae 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
@@ -422,7 +422,8 @@ static int do_surface_dirty_sou(struct vmw_private 
*dev_priv,
struct vmw_framebuffer *framebuffer,
unsigned flags, unsigned color,
struct drm_clip_rect *clips,
-   unsigned num_clips, int inc)
+   unsigned num_clips, int inc,
+   struct vmw_fence_obj **out_fence)
 {
struct vmw_display_unit *units[VMWGFX_NUM_DISPLAY_UNITS];
struct drm_clip_rect *clips_ptr;
@@ -542,12 +543,15 @@ static int do_surface_dirty_sou(struct vmw_private 
*dev_priv,
if (num == 0)
continue;

+   /* only return the last fence */
+   if (out_fence && *out_fence)
+   vmw_fence_obj_unreference(out_fence);

/* recalculate package length */
fifo_size = sizeof(*cmd) + sizeof(SVGASignedRect) * num;
cmd->header.size = cpu_to_le32(fifo_size - sizeof(cmd->header));
ret = vmw_execbuf_process(file_priv, dev_priv, NULL, cmd,
- fifo_size, 0, NULL, NULL);
+ fifo_size, 0, NULL, out_fence);

if (unlikely(ret != 0))
break;
@@ -598,7 +602,7 @@ int vmw_framebuffer_surface_dirty(struct drm_framebuffer 
*framebuffer,

ret = do_surface_dirty_sou(dev_priv, file_priv, &vfbs->base,
   flags, color,
-  clips, num_clips, inc);
+  clips, num_clips, inc, NULL);

ttm_read_unlock(&vmaster->lock);
return 0;
@@ -821,7 +825,8 @@ static int do_dmabuf_dirty_sou(struct drm_file *file_priv,
   struct vmw_framebuffer *framebuffer,
   unsigned flags, unsigned color,
   struct drm_clip_rect *clips,
-  unsigned num_clips, int increment)
+  unsigned num_clips, int increment,
+  struct vmw_fence_obj **out_fence)
 {
struct vmw_display_unit *units[VMWGFX_NUM_DISPLAY_UNITS];
struct drm_clip_rect *clips_ptr;
@@ -894,9 +899,13 @@ static int do_dmabuf_dirty_sou(struct drm_file *file_priv,
if (hit_num == 0)
continue;

+   /* only return the last fence */
+   if (out_fence && *out_fence)
+   vmw_fence_obj_unreference(out_fence);
+
fifo_size = sizeof(*blits) * hit_num;
ret = vmw_execbuf_process(file_priv, dev_priv, NULL, blits,
- fifo_size, 0, NULL, NULL);
+ fifo_size, 0, NULL, out_fence);

if (unlikely(ret != 0))
break;
@@ -942,7 +951,7 @@ int vmw_framebuffer_dmabuf_dirty(struct drm_framebuffer 
*framebuffer,
} else {
ret = do_dmabuf_dirty_sou(file_priv, dev_priv, &vfbd->base,
  flags, color,
- clips, num_clips, increment);
+ clips, num_clips, increment, NULL);
}

ttm_read_unlock(&vmaster->lock);
-- 
1.7.4.4



[PATCH 5/9] vmwgfx: Add page flip support

2012-02-09 Thread Thomas Hellstrom
From: Jakob Bornecrantz 

Signed-off-by: Jakob Bornecrantz 
Reviewed-by: Thomas Hellstrom 
---
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.c  |   64 ++
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.h  |8 
 drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c |   34 ++
 3 files changed, 106 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c 
b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
index 24efcae..2286d47 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
@@ -1681,6 +1681,70 @@ int vmw_du_update_layout(struct vmw_private *dev_priv, 
unsigned num,
return 0;
 }

+int vmw_du_page_flip(struct drm_crtc *crtc,
+struct drm_framebuffer *fb,
+struct drm_pending_vblank_event *event)
+{
+   struct vmw_private *dev_priv = vmw_priv(crtc->dev);
+   struct drm_framebuffer *old_fb = crtc->fb;
+   struct vmw_framebuffer *vfb = vmw_framebuffer_to_vfb(fb);
+   struct drm_file *file_priv = event->base.file_priv;
+   struct vmw_fence_obj *fence = NULL;
+   struct drm_clip_rect clips;
+   int ret;
+
+   /* require ScreenObject support for page flipping */
+   if (!dev_priv->sou_priv)
+   return -ENOSYS;
+
+   if (!vmw_kms_screen_object_flippable(dev_priv, crtc))
+   return -EINVAL;
+
+   crtc->fb = fb;
+
+   /* do a full screen dirty update */
+   clips.x1 = clips.y1 = 0;
+   clips.x2 = fb->width;
+   clips.y2 = fb->height;
+
+   if (vfb->dmabuf)
+   ret = do_dmabuf_dirty_sou(file_priv, dev_priv, vfb,
+ 0, 0, &clips, 1, 1, &fence);
+   else
+   ret = do_surface_dirty_sou(dev_priv, file_priv, vfb,
+  0, 0, &clips, 1, 1, &fence);
+
+
+   if (ret != 0)
+   goto out_no_fence;
+   if (!fence) {
+   ret = -EINVAL;
+   goto out_no_fence;
+   }
+
+   ret = vmw_event_fence_action_queue(file_priv, fence,
+  &event->base,
+  &event->event.tv_sec,
+  &event->event.tv_usec,
+  true);
+
+   /*
+* No need to hold on to this now. The only cleanup
+* we need to do if we fail is unref the fence.
+*/
+   vmw_fence_obj_unreference(&fence);
+
+   if (vmw_crtc_to_du(crtc)->is_implicit)
+   vmw_kms_screen_object_update_implicit_fb(dev_priv, crtc);
+
+   return ret;
+
+out_no_fence:
+   crtc->fb = old_fb;
+   return ret;
+}
+
+
 void vmw_du_crtc_save(struct drm_crtc *crtc)
 {
 }
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h 
b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h
index a4f7f03..8184bc5 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h
@@ -121,6 +121,9 @@ struct vmw_display_unit {
  * Shared display unit functions - vmwgfx_kms.c
  */
 void vmw_display_unit_cleanup(struct vmw_display_unit *du);
+int vmw_du_page_flip(struct drm_crtc *crtc,
+struct drm_framebuffer *fb,
+struct drm_pending_vblank_event *event);
 void vmw_du_crtc_save(struct drm_crtc *crtc);
 void vmw_du_crtc_restore(struct drm_crtc *crtc);
 void vmw_du_crtc_gamma_set(struct drm_crtc *crtc,
@@ -154,5 +157,10 @@ int vmw_kms_init_screen_object_display(struct vmw_private 
*dev_priv);
 int vmw_kms_close_screen_object_display(struct vmw_private *dev_priv);
 int vmw_kms_sou_update_layout(struct vmw_private *dev_priv, unsigned num,
  struct drm_vmw_rect *rects);
+bool vmw_kms_screen_object_flippable(struct vmw_private *dev_priv,
+struct drm_crtc *crtc);
+void vmw_kms_screen_object_update_implicit_fb(struct vmw_private *dev_priv,
+ struct drm_crtc *crtc);
+

 #endif
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c 
b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
index 4defdcf..97aca0b 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
@@ -394,6 +394,7 @@ static struct drm_crtc_funcs vmw_screen_object_crtc_funcs = 
{
.gamma_set = vmw_du_crtc_gamma_set,
.destroy = vmw_sou_crtc_destroy,
.set_config = vmw_sou_crtc_set_config,
+   .page_flip = vmw_du_page_flip,
 };

 /*
@@ -535,3 +536,36 @@ int vmw_kms_close_screen_object_display(struct vmw_private 
*dev_priv)

return 0;
 }
+
+/**
+ * Returns if this unit can be page flipped.
+ * Must be called with the mode_config mutex held.
+ */
+bool vmw_kms_screen_object_flippable(struct vmw_private *dev_priv,
+struct drm_crtc *crtc)
+{
+   struct vmw_screen_object_unit *sou = vmw_crtc_to_sou(crtc);
+
+   if (!sou->base.is_implicit)
+   return true;
+
+   if (de

[PATCH 6/9] vmwgfx: Pick up the initial size from the width and height regs

2012-02-09 Thread Thomas Hellstrom
From: Jakob Bornecrantz 

Signed-off-by: Jakob Bornecrantz 
Signed-off-by: Thomas Hellstrom 
---
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c  |   32 
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.h  |2 ++
 drivers/gpu/drm/vmwgfx/vmwgfx_fb.c   |8 ++--
 drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c  |4 ++--
 drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c |4 ++--
 5 files changed, 40 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c 
b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
index 28f59a3c3..1227232 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
@@ -38,6 +38,10 @@
 #define VMWGFX_CHIP_SVGAII 0
 #define VMW_FB_RESERVATION 0

+#define VMW_MIN_INITIAL_WIDTH 800
+#define VMW_MIN_INITIAL_HEIGHT 600
+
+
 /**
  * Fully encoded drm commands. Might move to vmw_drm.h
  */
@@ -387,6 +391,31 @@ void vmw_3d_resource_dec(struct vmw_private *dev_priv,
BUG_ON(n3d < 0);
 }

+/**
+ * Sets the initial_[width|height] fields on the given vmw_private.
+ *
+ * It does so by reading SVGA_REG_[WIDTH|HEIGHT] regs and then
+ * capping the value to fb_max_[width|height] fields and the
+ * VMW_MIN_INITIAL_[WIDTH|HEIGHT].
+ */
+static void vmw_get_initial_size(struct vmw_private *dev_priv)
+{
+   uint32_t width;
+   uint32_t height;
+
+   width = vmw_read(dev_priv, SVGA_REG_WIDTH);
+   height = vmw_read(dev_priv, SVGA_REG_HEIGHT);
+
+   width = max_t(uint32_t, width, VMW_MIN_INITIAL_WIDTH);
+   width = min_t(uint32_t, width, dev_priv->fb_max_width);
+
+   height = max_t(uint32_t, height, VMW_MIN_INITIAL_HEIGHT);
+   height = min_t(uint32_t, height, dev_priv->fb_max_height);
+
+   dev_priv->initial_width = width;
+   dev_priv->initial_height = height;
+}
+
 static int vmw_driver_load(struct drm_device *dev, unsigned long chipset)
 {
struct vmw_private *dev_priv;
@@ -441,6 +470,9 @@ static int vmw_driver_load(struct drm_device *dev, unsigned 
long chipset)
dev_priv->mmio_size = vmw_read(dev_priv, SVGA_REG_MEM_SIZE);
dev_priv->fb_max_width = vmw_read(dev_priv, SVGA_REG_MAX_WIDTH);
dev_priv->fb_max_height = vmw_read(dev_priv, SVGA_REG_MAX_HEIGHT);
+
+   vmw_get_initial_size(dev_priv);
+
if (dev_priv->capabilities & SVGA_CAP_GMR) {
dev_priv->max_gmr_descriptors =
vmw_read(dev_priv,
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h 
b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
index 14c2f49..2866415 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
@@ -203,6 +203,8 @@ struct vmw_private {
uint32_t mmio_size;
uint32_t fb_max_width;
uint32_t fb_max_height;
+   uint32_t initial_width;
+   uint32_t initial_height;
__le32 __iomem *mmio_virt;
int mmio_mtrr;
uint32_t capabilities;
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c 
b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
index 34e51a1..39931c4 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
@@ -414,10 +414,6 @@ int vmw_fb_init(struct vmw_private *vmw_priv)
unsigned fb_bpp, fb_depth, fb_offset, fb_pitch, fb_size;
int ret;

-   /* XXX These shouldn't be hardcoded. */
-   initial_width = 800;
-   initial_height = 600;
-
fb_bpp = 32;
fb_depth = 24;

@@ -425,8 +421,8 @@ int vmw_fb_init(struct vmw_private *vmw_priv)
fb_width = min(vmw_priv->fb_max_width, (unsigned)2048);
fb_height = min(vmw_priv->fb_max_height, (unsigned)2048);

-   initial_width = min(fb_width, initial_width);
-   initial_height = min(fb_height, initial_height);
+   initial_width = min(vmw_priv->initial_width, fb_width);
+   initial_height = min(vmw_priv->initial_height, fb_height);

fb_pitch = fb_width * fb_bpp / 8;
fb_size = fb_pitch * fb_height;
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c 
b/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
index f77b184..070fb23 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
@@ -354,8 +354,8 @@ static int vmw_ldu_init(struct vmw_private *dev_priv, 
unsigned unit)
INIT_LIST_HEAD(&ldu->active);

ldu->base.pref_active = (unit == 0);
-   ldu->base.pref_width = 800;
-   ldu->base.pref_height = 600;
+   ldu->base.pref_width = dev_priv->initial_width;
+   ldu->base.pref_height = dev_priv->initial_height;
ldu->base.pref_mode = NULL;
ldu->base.is_implicit = true;

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c 
b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
index 97aca0b..6deaf2f 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
@@ -449,8 +449,8 @@ static int vmw_sou_init(struct vmw_private *dev_priv, 
unsigned unit)
sou->active_implicit = false;

sou->base.pref_active = (unit == 0);
-   sou->base.pref_width = 800;
-   sou->base.pref_height = 6

[PATCH 7/9] drm/vmwgfx: Treat out-of-range initial width and height as host errors

2012-02-09 Thread Thomas Hellstrom
And assign the initial width and height to the minimum in that case.
Strange values (-1) from these registers have been reported by users.

Signed-off-by: Thomas Hellstrom 
Reviewed-by: Jakob Bornecrantz 
---
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c |   18 ++
 1 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c 
b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
index 1227232..f076f66 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
@@ -395,7 +395,9 @@ void vmw_3d_resource_dec(struct vmw_private *dev_priv,
  * Sets the initial_[width|height] fields on the given vmw_private.
  *
  * It does so by reading SVGA_REG_[WIDTH|HEIGHT] regs and then
- * capping the value to fb_max_[width|height] fields and the
+ * clamping the value to fb_max_[width|height] fields and the
+ * VMW_MIN_INITIAL_[WIDTH|HEIGHT].
+ * If the values appear to be invalid, set them to
  * VMW_MIN_INITIAL_[WIDTH|HEIGHT].
  */
 static void vmw_get_initial_size(struct vmw_private *dev_priv)
@@ -407,10 +409,18 @@ static void vmw_get_initial_size(struct vmw_private 
*dev_priv)
height = vmw_read(dev_priv, SVGA_REG_HEIGHT);

width = max_t(uint32_t, width, VMW_MIN_INITIAL_WIDTH);
-   width = min_t(uint32_t, width, dev_priv->fb_max_width);
-
height = max_t(uint32_t, height, VMW_MIN_INITIAL_HEIGHT);
-   height = min_t(uint32_t, height, dev_priv->fb_max_height);
+
+   if (width > dev_priv->fb_max_width ||
+   height > dev_priv->fb_max_height) {
+
+   /*
+* This is a host error and shouldn't occur.
+*/
+
+   width = VMW_MIN_INITIAL_WIDTH;
+   height = VMW_MIN_INITIAL_HEIGHT;
+   }

dev_priv->initial_width = width;
dev_priv->initial_height = height;
-- 
1.7.4.4



[PATCH 8/9] vmwgfx: Move function declaration to correct header

2012-02-09 Thread Thomas Hellstrom
Signed-off-by: Thomas Hellstrom 
Reviewed-by: Jakob Bornecrantz 
---
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.h   |   12 
 drivers/gpu/drm/vmwgfx/vmwgfx_fence.h |8 ++--
 2 files changed, 6 insertions(+), 14 deletions(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h 
b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
index 2866415..a393bdc 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
@@ -662,18 +662,6 @@ int vmw_overlay_num_overlays(struct vmw_private *dev_priv);
 int vmw_overlay_num_free_overlays(struct vmw_private *dev_priv);

 /**
- * Fence function - vmwgfx_fence.c
- */
-
-int vmw_event_fence_action_queue(struct drm_file *file_priv,
-struct vmw_fence_obj *fence,
-struct drm_pending_event *event,
-uint32_t *tv_sec,
-uint32_t *tv_usec,
-bool interruptible);
-
-
-/**
  * GMR Id manager
  */

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.h 
b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.h
index 8767fc1..faf2e78 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.h
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.h
@@ -111,6 +111,10 @@ extern int vmw_fence_event_ioctl(struct drm_device *dev, 
void *data,
 struct drm_file *file_priv);
 extern void vmw_event_fence_fpriv_gone(struct vmw_fence_manager *fman,
   struct list_head *event_list);
-
-
+extern int vmw_event_fence_action_queue(struct drm_file *filee_priv,
+   struct vmw_fence_obj *fence,
+   struct drm_pending_event *event,
+   uint32_t *tv_sec,
+   uint32_t *tv_usec,
+   bool interruptible);
 #endif /* _VMWGFX_FENCE_H_ */
-- 
1.7.4.4



[PATCH 9/9] drm/vmwgfx: Bump driver minor

2012-02-09 Thread Thomas Hellstrom
Bump driver minor to signal availability of the page-flip ioctl.

Signed-off-by: Thomas Hellstrom 
---
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.h |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h 
b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
index a393bdc..d0f2c07 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
@@ -40,9 +40,9 @@
 #include "ttm/ttm_module.h"
 #include "vmwgfx_fence.h"

-#define VMWGFX_DRIVER_DATE "20111025"
+#define VMWGFX_DRIVER_DATE "20120209"
 #define VMWGFX_DRIVER_MAJOR 2
-#define VMWGFX_DRIVER_MINOR 3
+#define VMWGFX_DRIVER_MINOR 4
 #define VMWGFX_DRIVER_PATCHLEVEL 0
 #define VMWGFX_FILE_PAGE_OFFSET 0x0010
 #define VMWGFX_FIFO_STATIC_SIZE (1024*1024)
-- 
1.7.4.4



[PATCH -next 0/0] vmwgfx updates

2012-02-09 Thread Thomas Hellstrom
Should of course be 0/9

/Thomas


On 02/09/2012 04:56 PM, Thomas Hellstrom wrote:
> A series of updates that brings in fake pageflipping support and
> sets initial preferred mode in a way similar to how the legacy Xorg driver
> does it. We bump minor to indicate availability of the pageflipping ioctl.
>
> ___
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel



[Bug 16140] [RADEON:KMS:RV250:RESUME] suspend to RAM resume broken

2012-02-09 Thread bugzilla-dae...@bugzilla.kernel.org
https://bugzilla.kernel.org/show_bug.cgi?id=16140





--- Comment #47 from Paul Bolle   2012-02-09 16:12:36 ---
(In reply to comment #45)
> No fix in sight, but there is a workaround: set a primary password in the 
> BIOS.
> The BIOS will initialize the video card on wake-up and allow Linux to resume
> normally.

0) This wasn't on a ThinkPad, was it? Because on a ThinkPad T41 that triggers
issue there's no "primary" BIOS password. Fiddling with other BIOS passwords
doesn't seem to help: they're not even asked on resume.

1) Could you please provide some further details?

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


[Bug 16140] [RADEON:KMS:RV250:RESUME] suspend to RAM resume broken

2012-02-09 Thread bugzilla-dae...@bugzilla.kernel.org
https://bugzilla.kernel.org/show_bug.cgi?id=16140





--- Comment #48 from Wirawan Purwanto   2012-02-09 
16:41:59 ---
The trick mentioned in comment #45 applies to Dell Latitude D600 model. Here is
the link to Canonical's bug report:

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/559163

Paul Bolle said correctly that this trick depends on primary BIOS password
being asked upon resuming. It did not work for me on a Dell Inspiron 600m
(which is a "consumer" sister model of D600).

FWIW here are some related bug pages on Ubuntu/Launchpad:

  "resume broken on ATI radeon RV250"
  https://bugs.launchpad.net/ubuntu/+source/linux/+bug/557224
  (affecting Thinkpad T41)

  "[Dell Computer Corporation Inspiron 600m] suspend/resume failure"
  https://bugs.launchpad.net/linux/+bug/471872
  (affecting my Dell Inspiron 600m computer)

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


[Bug 36602] Hierarchical Z support for R600

2012-02-09 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=36602

--- Comment #35 from Sven Arvidsson  2012-02-09 08:50:05 UTC ---
(In reply to comment #33)
> Created attachment 56785 [details] [review]
> Kernel patch top of lastest linux + tiling
> 
> Kernel patch on top of last linus + tiling. All seems to work ok but likely
> stuff regressed.

Didn't work very well for me, glxgears output garbled and logs full of:

[   76.197338] [drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !
[   76.197524] radeon :01:00.0: evergreen_cs_track_validate_depth:664 htile
surface too small 8192 for 9216 (48 48)
[   76.197527] radeon :01:00.0: evergreen_packet3_check:1972 invalid cmd
stream 487


System environment:
-- system architecture: 32-bit
-- Linux distribution: Debian unstable
-- GPU: REDWOOD
-- Model: XFX Radeon HD 5670 1GB
-- Display connector: DVI
-- xf86-video-ati: e20284409937d784847339b5d466a95012d85940
-- xserver: 1.11.99.901
-- mesa: 26de5273acf1ebe6730b5e72b55b3bcceba167c6 + hiz patch
-- drm: 230ec7d7bbf1e8a7e263d471b21afb08c28eba0c
-- kernel: 3.3.0-rc2 + streamout, tiling and hiz patches

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


[Bug 36602] Hierarchical Z support for R600

2012-02-09 Thread bugzilla-dae...@freedesktop.org
https://bugs.freedesktop.org/show_bug.cgi?id=36602

--- Comment #36 from Sven Arvidsson  2012-02-09 08:57:17 PST ---
(In reply to comment #35)
> Didn't work very well for me, glxgears output garbled and logs full of:

Actually scratch that, glxgears in a window doesnt work, but running it
fullscreen and it has no problems.

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


[Bug 42727] radeon KMS with CRT TV

2012-02-09 Thread bugzilla-dae...@bugzilla.kernel.org
https://bugzilla.kernel.org/show_bug.cgi?id=42727





--- Comment #4 from Aur   2012-02-09 17:48:16 ---
I don't know if this TV supports NTSC but it supports PAL and SECAM.

Is it possible to force driver to use PAL by a kernel option or by a patch ?

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


  1   2   >