[Bug 19170] compiz w/ 3D effects causes Intel GM45 hang in drm module

2009-01-05 Thread bugzilla-daemon
http://bugs.freedesktop.org/show_bug.cgi?id=19170





--- Comment #3 from M. Edwin Zakaria medw...@gmail.com  2009-01-05 00:20:07 
PST ---
Thanks for replying me. I will take a look at there, and fill the comment if
necessary.


-- 
Configure bugmail: http://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.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 19400] New: glxgears appears blank!

2009-01-05 Thread bugzilla-daemon
http://bugs.freedesktop.org/show_bug.cgi?id=19400

   Summary: glxgears appears blank!
   Product: Mesa
   Version: 7.2
  Platform: Other
OS/Version: All
Status: NEW
  Severity: normal
  Priority: medium
 Component: Drivers/DRI/r300
AssignedTo: dri-devel@lists.sourceforge.net
ReportedBy: sbmekatho...@gmail.com


Details of the X-stack:
--
Build Date: 5-Jan-2008

mesa/drm:   master (git)
mesa/mesa :7.2 
xorg/xserver:1.5.2   
xorg/xf86-video-ati: master(git)  
xorg/driver/xf86-input-keyboard - 1.3.0  
xorg/driver/xf86-input-mouse-1.3.0 


 Problem:
-

After installing the driver , check 'glxinfo' and make sure the driver is
installed properly and DRI is enabled. 
And then run 'glxgears'

   *** It results in blank window! (attached screen shot)


-- 
Configure bugmail: http://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.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 12359] WARNING and other intel modesetting problems

2009-01-05 Thread bugme-daemon
http://bugzilla.kernel.org/show_bug.cgi?id=12359





--- Comment #8 from dennis.jan...@web.de  2009-01-05 01:28 ---
I tried 2.5.1 with --enable-kms and it was worse than 2.5.99 without. My Ubuntu
doesn't have that package version available(only 7.0.12). The compile error of
intel 2.5.99 --enable-kms is:
drmmode_display.c:149: error: 'struct _xf86Crtc' has no member named
'transformPresent'
drmmode_display.c:170: error: too few arguments to function 'xf86CrtcRotate'
I'll try again sometime in a week.
Thanks!


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

--
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 19400] glxgears and opengl related applications appear blank!

2009-01-05 Thread bugzilla-daemon
http://bugs.freedesktop.org/show_bug.cgi?id=19400





--- Comment #8 from Sunil Mekathotti sbmekatho...@gmail.com  2009-01-05 
04:27:29 PST ---
Created an attachment (id=21677)
 -- (http://bugs.freedesktop.org/attachment.cgi?id=21677)
Mplayer Run logs

This log contains , 
 - mplayer run with  -vo xv option which works fine
 - mplayer run with -vo gl and -vo gl2 options which FAIL


-- 
Configure bugmail: http://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.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 12345] X on Intel 965GM hangs on console switch if compositing is enabled

2009-01-05 Thread bugme-daemon
http://bugzilla.kernel.org/show_bug.cgi?id=12345


jbar...@virtuousgeek.org changed:

   What|Removed |Added

 AssignedTo|drivers_video-...@kernel-   |jbar...@virtuousgeek.org
   |bugs.osdl.org   |
 Status|NEW |ASSIGNED




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

--
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 12345] X on Intel 965GM hangs on console switch if compositing is enabled

2009-01-05 Thread bugme-daemon
http://bugzilla.kernel.org/show_bug.cgi?id=12345





--- Comment #4 from jbar...@virtuousgeek.org  2009-01-05 10:16 ---
Thanks Gordon, I was just going to point that out too.  Peter, can you try the
patch in the referenced bug
(http://bugs.freedesktop.org/show_bug.cgi?id=18879)?


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

--
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 19400] glxgears appears blank!

2009-01-05 Thread bugzilla-daemon
http://bugs.freedesktop.org/show_bug.cgi?id=19400





--- Comment #4 from Sunil Mekathotti sbmekatho...@gmail.com  2009-01-05 
03:50:18 PST ---
Created an attachment (id=21675)
 -- (http://bugs.freedesktop.org/attachment.cgi?id=21675)
Xorg.0.log


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

--
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 19400] glxgears and opengl related applications appear blank!

2009-01-05 Thread bugzilla-daemon
http://bugs.freedesktop.org/show_bug.cgi?id=19400





--- Comment #9 from Michel Dänzer mic...@daenzer.net  2009-01-05 04:49:00 PST 
---
(In reply to comment #7)
 All the above mentioned problems are not appearing with 29-DEC-2008 build

So, please try and isolate which change in which component caused it. I think
xf86-video-ati is the most likely candidate.


-- 
Configure bugmail: http://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.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 19400] glxgears appears blank!

2009-01-05 Thread bugzilla-daemon
http://bugs.freedesktop.org/show_bug.cgi?id=19400





--- Comment #1 from Sunil Mekathotti sbmekatho...@gmail.com  2009-01-05 
03:44:27 PST ---
Created an attachment (id=21672)
 -- (http://bugs.freedesktop.org/attachment.cgi?id=21672)
glxinfo


-- 
Configure bugmail: http://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.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 12359] WARNING and other intel modesetting problems

2009-01-05 Thread bugme-daemon
http://bugzilla.kernel.org/show_bug.cgi?id=12359





--- Comment #9 from e...@anholt.net  2009-01-05 11:04 ---
 And I can't start X with it activated. I use intel xorg module v. 2.5.0. 

Choose this option if you want kernel modesetting enabled by default,
and you have a new enough userspace to support this. Running old
userspaces with this enabled will cause pain.

You can't run non-kms aware X with kms enabled.  This should be marked invalid.


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

--
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 12356] [i915 drm] irq 16: nobody cared with 2.6.28 kernel

2009-01-05 Thread bugme-daemon
http://bugzilla.kernel.org/show_bug.cgi?id=12356





--- Comment #1 from p...@gentoo.org  2009-01-05 02:55 ---
Answering question Niku asked me:

 Could you try booting with pci=noacpi ?

I'm unable to boot this notebook PC with pci=noacpi as I get kernel panic:
VFS: Cannot open root device sda2 or unknown-block(0,0)

During boot process I see the following:

===
ahci :00:1f.2 AHCI 0001.0100 32 slots 3 ports 1.5 Gbps 0x1 impl SATA mode
ahci :00:1f.2 flags: 64bit ncq sntf pm led clo pio slum part
scsi0: ahci
scsi1: ahci
scsi2: ahci
ata1: SATA max UDMA/133 abar m2...@0xfe226000 port 0xfe226100 irq10
ata2: DUMMY
ata3: DUMMY
ata1: SATA link up 1.5Gbps (SStatus 113 SControl 300)
ata1.00: qc timeout (cmd 0xec)
ata1.00: failed to IDENTIFY (I/O ERROR, err_mask=0x4)
ata1: SATA link up 1.5Gbps (SStatus 113 SControl 300)
ata1.00: qc timeout (cmd 0xec)
ata1.00: failed to IDENTIFY (I/O ERROR, err_mask=0x4)
===

Well, I thought this could be bios related so I've updated bios from 1.11 to
1.21 but I'm still unable to boot it with noacpi. But since this latest BIOS
update (1.21) fixes something Video related I'll try to reproduce initial
problem another time... I'll be back ASAP

BIOS ChangeLog from Lenovo site:

Version 7SET35WW (1.21)
* (New) Intel Video BIOS update.
Version 7SET34WW (1.20)
* (Fix) Buzzing sound around the fan with battery.
  o Note: To use this feature, you need to install following drivers.
+ Power Manager for Windows 2000, XP (1.40 or later)
+ Power Manager for Windows Vista (2.30 or later)
+ Power Management driver(1.44 or later)* (Fix) The
computer may hang if Rescue and Recovery is installed on Windows Vista 64-bit
SP1.
Version 7SET33WW (1.19)
* (New) Support for Intel ICH-8 step B2.
Version 7SET31WW (1.17)
* (New) Security function was enhanced.
* (New) Firmware update of Intel AMT ME.
* (Fix) Data transmission speed of 1394 device gets slow.
Version 7SET30WW (1.16)
* (Fix) System hangs while formatting CardBus ATA HDD drive under Windows
Vista 64-bit SP1.
Version 7SET28WW (1.14)
* (Fix) WOL (Wake on LAN) may fail. (BIOS)
* (Fix) Boot error occurs at Intel ICH8M SATA initialization. (BIOS)
Version 7SET25WW (1.11)


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

--
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 19400] glxgears appears blank!

2009-01-05 Thread bugzilla-daemon
http://bugs.freedesktop.org/show_bug.cgi?id=19400





--- Comment #7 from Sunil Mekathotti sbmekatho...@gmail.com  2009-01-05 
04:05:21 PST ---
All the above mentioned problems are not appearing with 29-DEC-2008 build


-- 
Configure bugmail: http://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.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 19400] glxgears appears blank!

2009-01-05 Thread bugzilla-daemon
http://bugs.freedesktop.org/show_bug.cgi?id=19400





--- Comment #3 from Sunil Mekathotti sbmekatho...@gmail.com  2009-01-05 
03:49:46 PST ---
Created an attachment (id=21674)
 -- (http://bugs.freedesktop.org/attachment.cgi?id=21674)
xorg.conf


-- 
Configure bugmail: http://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.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 19400] glxgears appears blank!

2009-01-05 Thread bugzilla-daemon
http://bugs.freedesktop.org/show_bug.cgi?id=19400


Sunil Mekathotti sbmekatho...@gmail.com changed:

   What|Removed |Added

   Severity|normal  |critical
   Priority|medium  |high




--- Comment #6 from Sunil Mekathotti sbmekatho...@gmail.com  2009-01-05 
03:58:59 PST ---
couldn't attach screen shot due to large size. But anyway it is just a blank
window.


Other observations are:

  - I can't play a video with 'mplayer -vo gl' or 'mplayer -vo gl2' options
where as I can play with 'mplayer -vo xv' option

 - I also can't play games like urban terror, as I just see a blank window!

Increasing the priority and severity


-- 
Configure bugmail: http://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.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 19400] glxgears appears blank!

2009-01-05 Thread bugzilla-daemon
http://bugs.freedesktop.org/show_bug.cgi?id=19400





--- Comment #2 from Sunil Mekathotti sbmekatho...@gmail.com  2009-01-05 
03:49:22 PST ---
Created an attachment (id=21673)
 -- (http://bugs.freedesktop.org/attachment.cgi?id=21673)
lspci


-- 
Configure bugmail: http://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.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 12356] [i915 drm] irq 16: nobody cared with 2.6.28 kernel

2009-01-05 Thread bugme-daemon
http://bugzilla.kernel.org/show_bug.cgi?id=12356





--- Comment #2 from p...@gentoo.org  2009-01-05 13:06 ---
Looks like bios update did not fixed this problem. Again I've got irq16 diabled
error, but this time error message is different:

[drm:i915_gem_idle] *ERROR* hardware wedged
irq 16: nobody cared (try booting with the irqpoll option)
Pid: 0, comm: swapper Not tainted 2.6.28-gentoo-noswap #1
Call Trace:
 IRQ  [802559b8] __report_bad_irq+0x30/0x7d
 [80255b0a] note_interrupt+0x105/0x16b
 [8025618e] handle_fasteoi_irq+0xa6/0xcf
 [8020dcb0] do_IRQ+0x75/0xe5
 [8020b866] ret_from_intr+0x0/0xa
 EOI  [8048064c] menu_select+0x3f/0x8a
 [803c9175] acpi_idle_enter_simple+0x1c7/0x237
 [803c916b] acpi_idle_enter_simple+0x1bd/0x237
 [8048064c] menu_select+0x3f/0x8a
 [8047fa97] cpuidle_idle_call+0x8b/0xc8
 [8020a5cc] cpu_idle+0x4a/0xac
handlers:
[80440d68] (ahci_interrupt+0x0/0x45c)
[a003969d] (yenta_interrupt+0x0/0xc1 [yenta_socket])
Disabling IRQ #16


This happened after X got locked with lot's of
[mi] mieqEnequeue: out-of-order valuator event; dropping.
[mi] EQ overflowing. The server is probably stuck in an infinite loop
messages in Xorg.0.log and I had to kill X server with `kill -9`. After that on
start I've got this disabling irq 16 error in kernel log.

  (heh, don't know why bug gdb failed to attach to X server with the linux-
  nat.c:988: internal-error: linux_nat_attach: Assertion `pid == GET_PID 
  (inferior_ptid)  WIFSTOPPED (status)  WSTOPSIG (status) == SIGSTOP' 
  failed error but this is different problem...)

That's said I'll downgrade to 2.6.27 and will try to check if problem is
reproducible there. Other posters never had problem there, so probably I'll
workaround my problem this way.


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

--
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[PATCH 4/4] xf86-video-intel: save drm FD to be used by dri cursor (the shortcut scheme).

2009-01-05 Thread Tiago Vignatti

Signed-off-by: Tiago Vignatti vigna...@c3sl.ufpr.br
---
 src/i830_dri.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/i830_dri.c b/src/i830_dri.c
index 07ae646..e9484bd 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -108,6 +108,8 @@ typedef struct drm_i915_flip {
 
 #include dristruct.h
 
+#include dricursor.h
+
 static Bool I830InitVisualConfigs(ScreenPtr pScreen);
 static Bool I830CreateContext(ScreenPtr pScreen, VisualPtr visual,
  drm_context_t hwContext, void *pVisualConfigPriv,
@@ -674,6 +676,8 @@ I830DRIScreenInit(ScreenPtr pScreen)
   return FALSE;
}
 
+   DRICursorSaveFD(pI830-drmSubFD);
+
/* Now, nuke dri.c's dummy frontbuffer map setup if we did that. */
if (pDRIInfo-frameBufferSize != 0) {
int tmp;
-- 
1.5.6.3


-- 
Tiago Vignatti
C3SL - Centro de Computação Científica e Software Livre
www.c3sl.ufpr.br

--
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[PATCH 2/4] X server: dricursor implementation using the X server as application.

2009-01-05 Thread Tiago Vignatti
This implementation gives two ioctls APIs (DRICursorSetDev, DRICursorHotspot)
to interface with the DRM modesetting cursors. For now this patch disables
the pointer acceleration scheme.

Signed-off-by: Tiago Vignatti vigna...@c3sl.ufpr.br
---
 Makefile.am|1 +
 configure.ac   |4 ++-
 dix/getevents.c|2 +
 dricursor/Makefile.am  |9 +++
 dricursor/dricursor.c  |   51 
 hw/xfree86/common/xf86Xinput.c |8 ++
 hw/xfree86/ramdac/xf86Cursor.c |3 ++
 include/Makefile.am|1 +
 include/dricursor.h|3 ++
 9 files changed, 81 insertions(+), 1 deletions(-)
 create mode 100644 dricursor/Makefile.am
 create mode 100644 dricursor/dricursor.c
 create mode 100644 include/dricursor.h

diff --git a/Makefile.am b/Makefile.am
index aa9c8b6..c641710 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -19,6 +19,7 @@ endif
 
 SUBDIRS = \
doc \
+   dricursor \
include \
dix  \
fb \
diff --git a/configure.ac b/configure.ac
index 93e3a60..a83da6c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -842,6 +842,7 @@ AC_SUBST([GLX_DEFINES])
 
 AM_CONDITIONAL(DRI, test x$DRI = xyes)
 if test x$DRI = xyes; then
+DRICURSOR_LIB='$(top_builddir)/dricursor/libdricursor.la'
AC_DEFINE(XF86DRI, 1, [Build DRI extension])
PKG_CHECK_MODULES([DRIPROTO], [xf86driproto])
PKG_CHECK_MODULES([LIBDRM], [libdrm = 2.3.0])
@@ -1228,7 +1229,7 @@ if test x$XORG = xyes; then
XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support 
-I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os'
XORG_INCS=$XORG_DDXINCS $XORG_OSINCS
XORG_CFLAGS=$XORGSERVER_CFLAGS -DHAVE_XORG_CONFIG_H
-   XORG_LIBS=$COMPOSITE_LIB $FIXES_LIB $XEXTXORG_LIB $GLX_LIBS 
$RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB 
$XKB_LIB $SELINUX_LIB
+   XORG_LIBS=$COMPOSITE_LIB $FIXES_LIB $XEXTXORG_LIB $GLX_LIBS 
$RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB 
$XKB_LIB $SELINUX_LIB $DRICURSOR_LIB
 
PKG_CHECK_MODULES([PCIACCESS], [pciaccess = 0.8.0])
SAVE_LIBS=$LIBS
@@ -1803,6 +1804,7 @@ damageext/Makefile
 dbe/Makefile
 dix/Makefile
 doc/Makefile
+dricursor/Makefile
 fb/Makefile
 record/Makefile
 config/Makefile
diff --git a/dix/getevents.c b/dix/getevents.c
index 4770a69..8d24075 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -880,12 +880,14 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, 
int type, int buttons,
 }
 }
 else {
+#if 0
 if (flags  POINTER_ACCELERATE 
 pDev-valuator-accelScheme.AccelSchemeProc){
 pDev-valuator-accelScheme.AccelSchemeProc(
   pDev, first_valuator, num_valuators, valuators, ms);
 }
 
+#endif
 if(v0) x += *v0;
 if(v1) y += *v1;
 
diff --git a/dricursor/Makefile.am b/dricursor/Makefile.am
new file mode 100644
index 000..017a861
--- /dev/null
+++ b/dricursor/Makefile.am
@@ -0,0 +1,9 @@
+noinst_LTLIBRARIES = libdricursor.la
+
+AM_CFLAGS = @DIX_CFLAGS@ @LIBDRM_CFLAGS@
+
+INCLUDES = $(XORG_INCS) \
+  -I$(top_srcdir)/include 
+
+libdricursor_la_SOURCES = dricursor.c
+libdricursor_la_LIBADD = @LIBDRM_LIBS@
diff --git a/dricursor/dricursor.c b/dricursor/dricursor.c
new file mode 100644
index 000..933baac
--- /dev/null
+++ b/dricursor/dricursor.c
@@ -0,0 +1,51 @@
+#ifdef HAVE_DIX_CONFIG_H
+#include dix-config.h
+#endif
+
+#include stdio.h
+#include xf86drm.h
+#include dricursor.h
+
+
+int drmFD = -1;
+
+/**
+ * Save the DRM fd. Called by the DRM user, i.e. the video driver.
+ *
+ * @param The drm file-descriptor
+ */
+void
+DRICursorSaveFD(int fd) {
+fprintf(stderr, %s: %d\n, __FUNCTION__, fd);
+drmFD = fd;
+}
+
+/**
+ * drmCursorSetDev ioctl interface.
+ *
+ * Notify DRM about which devices are responsible for cursor updates.
+ *
+ * @param The device path (e.g. /dev/input/event0)
+ * @return On success zero is returned.
+ */
+int
+DRICursorSetDev(char *path)
+{
+fprintf(stderr, %s: %d: %s\n, __FUNCTION__, drmFD, path);
+return drmCursorSetDev(drmFD, path);
+}
+
+/**
+ * drmCursorHotspot ioctl interface.
+ *
+ * When the application updates the sprite, DRM must be notified by the
+ * changes.
+ *
+ * @param The hotspot of the cursor.
+ * @return On success zero is returned.
+ */
+int
+DRICursorHotspot(int hotx, int hoty)
+{
+return drmCursorHotspot(drmFD, hotx, hoty);
+}
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index 8eaa118..c4f3f30 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -89,6 +89,7 @@
 #endif
 
 #include os.h
+#include dricursor.h
 
 EventListPtr xf86Events = NULL;
 
@@ -471,6 +472,7 @@ NewInputDeviceRequest (InputOption *options, DeviceIntPtr 
*pdev)
 DeviceIntPtr dev = NULL;
 int rval = Success;
 int is_auto = 0;
+  

[PATCH 3/4] evdev: short-circuit evdev with drm to update cursors in-kernel.

2009-01-05 Thread Tiago Vignatti

Signed-off-by: Tiago Vignatti vigna...@c3sl.ufpr.br
---
 drivers/input/evdev.c  |   11 +++
 include/linux/drm_cursor.h |3 +++
 2 files changed, 14 insertions(+), 0 deletions(-)
 create mode 100644 include/linux/drm_cursor.h

diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
index 3524bef..2b7742e 100644
--- a/drivers/input/evdev.c
+++ b/drivers/input/evdev.c
@@ -21,6 +21,11 @@
 #include linux/device.h
 #include linux/compat.h
 
+#define DRM_CURSOR
+#ifdef DRM_CURSOR
+#include linux/drm_cursor.h
+#endif
+
 struct evdev {
int exist;
int open;
@@ -77,6 +82,12 @@ static void evdev_event(struct input_handle *handle,
event.code = code;
event.value = value;
 
+#ifdef DRM_CURSOR
+/* TODO: we can do this shortcut better using a callback scheme thus
+ * drm won't be a dependency for the evdev module */
+drm_collect_input_event(evdev-name, event);
+#endif
+
rcu_read_lock();
 
client = rcu_dereference(evdev-grab);
diff --git a/include/linux/drm_cursor.h b/include/linux/drm_cursor.h
new file mode 100644
index 000..aa983d9
--- /dev/null
+++ b/include/linux/drm_cursor.h
@@ -0,0 +1,3 @@
+#include linux/input.h
+
+void drm_collect_input_event(const char *name, struct input_event *ev);
-- 
1.5.6.3


-- 
Tiago Vignatti
C3SL - Centro de Computação Científica e Software Livre
www.c3sl.ufpr.br

--
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[PATCH 1/4] DRM: in-kernel cursor update on the top of mode setting.

2009-01-05 Thread Tiago Vignatti
This commit adds support for the DRM in-kernel cursor mode setting APIs.
When drm_mode_setcrtc is called we also initialize the cursor routines.
Through drmCursorSetDev, the userspace app (e.g. Xorg, wayland) tells which
devices are responsible for cursors' updates and the kernel input layer
will spit the events to DRM (drm_collect_input_event). DRM will take
care about the event informations and also screen limits, and then will
draw the cursor on screen.

Signed-off-by: Tiago Vignatti vigna...@c3sl.ufpr.br
---
 libdrm/xf86drm.c   |   20 
 libdrm/xf86drm.h   |4 +
 libdrm/xf86drmMode.c   |4 +-
 linux-core/Makefile.kernel |4 +-
 linux-core/drm_crtc.c  |3 +
 linux-core/drm_crtc.h  |4 +
 linux-core/drm_cursor.c|  214 
 linux-core/drm_cursorP.h   |1 +
 linux-core/drm_drv.c   |2 +
 shared-core/drm.h  |   11 +++
 10 files changed, 264 insertions(+), 3 deletions(-)
 create mode 100644 linux-core/drm_cursor.c
 create mode 100644 linux-core/drm_cursorP.h

diff --git a/libdrm/xf86drm.c b/libdrm/xf86drm.c
index 7b67813..b8f12b6 100644
--- a/libdrm/xf86drm.c
+++ b/libdrm/xf86drm.c
@@ -2994,3 +2994,23 @@ int drmDropMaster(int fd)
ret = ioctl(fd, DRM_IOCTL_DROP_MASTER, 0);
return ret;
 }
+
+int drmCursorSetDev(int fd, char *name)
+{
+struct drm_mode_cursor_setdev arg;
+
+strncpy(arg.name, name, strlen(name));
+arg.name[strlen(name)] = '\0';
+
+return ioctl(fd, DRM_IOCTL_MODE_CURSORSETDEV, arg);
+}
+
+int drmCursorHotspot(int fd, int hotx, int hoty)
+{
+struct drm_mode_cursor_hotspot arg;
+
+arg.hotx = hotx;
+arg.hoty = hoty;
+
+return ioctl(fd, DRM_IOCTL_MODE_CURSORHOTSPOT, arg);
+}
diff --git a/libdrm/xf86drm.h b/libdrm/xf86drm.h
index 35780ac..04b7faa 100644
--- a/libdrm/xf86drm.h
+++ b/libdrm/xf86drm.h
@@ -663,6 +663,10 @@ extern void drmCloseOnce(int fd);
 extern int drmSetMaster(int fd);
 extern int drmDropMaster(int fd);
 
+/* In-kernel cursor update routines */
+extern int drmCursorSetDev(int fd, char *name);
+extern int drmCursorHotspot(int fd, int hotx, int hoty);
+
 #include xf86mm.h
 
 #endif
diff --git a/libdrm/xf86drmMode.c b/libdrm/xf86drmMode.c
index c3921ee..e3a1c76 100644
--- a/libdrm/xf86drmMode.c
+++ b/libdrm/xf86drmMode.c
@@ -325,7 +325,9 @@ int drmModeMoveCursor(int fd, uint32_t crtcId, int x, int y)
arg.x = x;
arg.y = y;
 
-   return ioctl(fd, DRM_IOCTL_MODE_CURSOR, arg);
+/* Just to see that we're doing the things correctly :)
+ * return ioctl(fd, DRM_IOCTL_MODE_CURSOR, arg); */
+return 1;
 }
 
 /*
diff --git a/linux-core/Makefile.kernel b/linux-core/Makefile.kernel
index 246c0b3..53f5795 100644
--- a/linux-core/Makefile.kernel
+++ b/linux-core/Makefile.kernel
@@ -7,8 +7,8 @@
 # $XFree86: 
xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Makefile.kernel,v 
1.18 2003/08/16 17:59:17 dawes Exp $
 #
 
-drm-objs:= drm_auth.o drm_bufs.o drm_context.o drm_dma.o drm_drawable.o \
-   drm_drv.o drm_fops.o drm_ioctl.o drm_irq.o \
+drm-objs:= drm_auth.o drm_bufs.o drm_context.o drm_cursor.o drm_dma.o \
+   drm_drawable.o drm_drv.o drm_fops.o drm_ioctl.o drm_irq.o \
drm_lock.o drm_memory.o drm_proc.o drm_stub.o drm_vm.o \
drm_sysfs.o drm_pci.o drm_agpsupport.o drm_scatter.o \
drm_memory_debug.o ati_pcigart.o drm_sman.o \
diff --git a/linux-core/drm_crtc.c b/linux-core/drm_crtc.c
index 7ee3321..e015342 100644
--- a/linux-core/drm_crtc.c
+++ b/linux-core/drm_crtc.c
@@ -33,6 +33,7 @@
 #include drm.h
 #include drmP.h
 #include drm_crtc.h
+#include drm_cursorP.h
 
 struct drm_prop_enum_list {
int type;
@@ -1412,6 +1413,8 @@ int drm_mode_setcrtc(struct drm_device *dev,
set.fb =fb;
ret = crtc-funcs-set_config(set);
 
+drm_cursor_init(crtc);
+
 out:
kfree(connector_set);
mutex_unlock(dev-mode_config.mutex);
diff --git a/linux-core/drm_crtc.h b/linux-core/drm_crtc.h
index bfccdeb..15e9aca 100644
--- a/linux-core/drm_crtc.h
+++ b/linux-core/drm_crtc.h
@@ -676,6 +676,10 @@ extern int drm_mode_setcrtc(struct drm_device *dev,
void *data, struct drm_file *file_priv);
 extern int drm_mode_cursor_ioctl(struct drm_device *dev,
void *data, struct drm_file *file_priv);
+extern int drm_mode_cursor_setdev_ioctl(struct drm_device *dev,
+void *data, struct drm_file *file_priv);
+extern int drm_mode_cursor_hotspot_ioctl(struct drm_device *dev,
+void *data, struct drm_file *file_priv);
 extern int drm_mode_addfb(struct drm_device *dev,
  void *data, struct drm_file *file_priv);
 extern int drm_mode_rmfb(struct drm_device *dev,
diff --git a/linux-core/drm_cursor.c b/linux-core/drm_cursor.c
new file mode 100644
index 000..832e3b1
--- /dev/null
+++ b/linux-core/drm_cursor.c
@@ -0,0 +1,214 @@

[PATCH 0/4] Cursor's update inside kernel only

2009-01-05 Thread Tiago Vignatti
Hi guys,

Under KMS, we can build a feature to update the cursor directly to screen
without the continuous intervention of the userspace application (X server,
wayland, etc). It's a fastpath for DRM based cursors obtained by short-circuit
the kernel input layer and DRM module. This would solve all cursor's latency
issues that we have in our current model [0].

This series of patches implement such feature using Xorg as the application.
Through an ioctl, Xorg tells which devices are responsible for cursors'
updates and the kernel evdev driver will spit the events to DRM. DRM will take
care about the event informations and also screen limits, and then will draw
the cursor on screen. Very intuitive.

Right now a thing that is annoying me is how others cursors, sw rendered,
could be implemented. I want to avoid two differents sets of the same code in
different contexts. IMHO conceptually all these cursor update things must be
in-kernel. Painting a cursor image seems to be quite hard as we have to
save/restore areas under the cursor. I remember that anholt had an idea
concerning this, but I do not remember details.

Well, the patches are far from ready to go upstream, but it deploys a system
working on this way. So, for now, this mail has two goals:
- to people comment on and see in what kind of world we can move.
- get a feedback how we can proceed in the case of sw cursors.


Please, comment on. Thank you,

[0] http://vignatti.wordpress.com/2008/07/29/improving-input-latency/

-- 
Tiago Vignatti
C3SL - Centro de Computação Científica e Software Livre
www.c3sl.ufpr.br

--
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 12356] [i915 drm] irq 16: nobody cared with 2.6.28 kernel

2009-01-05 Thread bugme-daemon
http://bugzilla.kernel.org/show_bug.cgi?id=12356





--- Comment #3 from e...@anholt.net  2009-01-05 13:45 ---
Something is broken in your configuration that is preventing MSI.  You need MSI
for stable graphics on this chipset.


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

--
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[PATCH] drm: Drop unused and broken dri_library_name sysfs attribute.

2009-01-05 Thread Kristian Høgsberg
The kernel shouldn't be in the business of telling user space which
driver to load.  The kernel defers mapping PCI IDs to module names
to user space and we should do the same for DRI drivers.

And in fact, that's how it does work today.  Nothing uses the
dri_library_name attribute, and the attribute is in fact broken.
For intel devices, it falls back to the default behaviour of returning
the kernel module name as the DRI driver name, which doesn't work for
i965 devices.  Nobody has ever hit this problem or filed a bug about this.

Signed-off-by: Kristian Høgsberg k...@redhat.com
---
 drivers/gpu/drm/drm_sysfs.c |   29 -
 drivers/gpu/drm/radeon/radeon_drv.c |   12 
 drivers/gpu/drm/via/via_drv.c   |6 --
 include/drm/drmP.h  |1 -
 4 files changed, 0 insertions(+), 48 deletions(-)

diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c
index 65d72d0..f922c0b 100644
--- a/drivers/gpu/drm/drm_sysfs.c
+++ b/drivers/gpu/drm/drm_sysfs.c
@@ -118,20 +118,6 @@ void drm_sysfs_destroy(void)
class_destroy(drm_class);
 }
 
-static ssize_t show_dri(struct device *device, struct device_attribute *attr,
-   char *buf)
-{
-   struct drm_minor *drm_minor = to_drm_minor(device);
-   struct drm_device *drm_dev = drm_minor-dev;
-   if (drm_dev-driver-dri_library_name)
-   return drm_dev-driver-dri_library_name(drm_dev, buf);
-   return snprintf(buf, PAGE_SIZE, %s\n, 
drm_dev-driver-pci_driver.name);
-}
-
-static struct device_attribute device_attrs[] = {
-   __ATTR(dri_library_name, S_IRUGO, show_dri, NULL),
-};
-
 /**
  * drm_sysfs_device_release - do nothing
  * @dev: Linux device
@@ -474,7 +460,6 @@ void drm_sysfs_hotplug_event(struct drm_device *dev)
 int drm_sysfs_device_add(struct drm_minor *minor)
 {
int err;
-   int i, j;
char *minor_str;
 
minor-kdev.parent = minor-dev-pdev-dev;
@@ -496,18 +481,8 @@ int drm_sysfs_device_add(struct drm_minor *minor)
goto err_out;
}
 
-   for (i = 0; i  ARRAY_SIZE(device_attrs); i++) {
-   err = device_create_file(minor-kdev, device_attrs[i]);
-   if (err)
-   goto err_out_files;
-   }
-
return 0;
 
-err_out_files:
-   if (i  0)
-   for (j = 0; j  i; j++)
-   device_remove_file(minor-kdev, device_attrs[j]);
device_unregister(minor-kdev);
 err_out:
 
@@ -523,9 +498,5 @@ err_out:
  */
 void drm_sysfs_device_remove(struct drm_minor *minor)
 {
-   int i;
-
-   for (i = 0; i  ARRAY_SIZE(device_attrs); i++)
-   device_remove_file(minor-kdev, device_attrs[i]);
device_unregister(minor-kdev);
 }
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c 
b/drivers/gpu/drm/radeon/radeon_drv.c
index 71af746..971f380 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.c
+++ b/drivers/gpu/drm/radeon/radeon_drv.c
@@ -41,17 +41,6 @@ int radeon_no_wb;
 MODULE_PARM_DESC(no_wb, Disable AGP writeback for scratch registers);
 module_param_named(no_wb, radeon_no_wb, int, 0444);
 
-static int dri_library_name(struct drm_device *dev, char *buf)
-{
-   drm_radeon_private_t *dev_priv = dev-dev_private;
-   int family = dev_priv-flags  RADEON_FAMILY_MASK;
-
-   return snprintf(buf, PAGE_SIZE, %s\n,
-   (family  CHIP_R200) ? radeon :
-   ((family  CHIP_R300) ? r200 :
-   r300));
-}
-
 static int radeon_suspend(struct drm_device *dev, pm_message_t state)
 {
drm_radeon_private_t *dev_priv = dev-dev_private;
@@ -95,7 +84,6 @@ static struct drm_driver driver = {
.get_vblank_counter = radeon_get_vblank_counter,
.enable_vblank = radeon_enable_vblank,
.disable_vblank = radeon_disable_vblank,
-   .dri_library_name = dri_library_name,
.irq_preinstall = radeon_driver_irq_preinstall,
.irq_postinstall = radeon_driver_irq_postinstall,
.irq_uninstall = radeon_driver_irq_uninstall,
diff --git a/drivers/gpu/drm/via/via_drv.c b/drivers/gpu/drm/via/via_drv.c
index 0993b44..bc2f518 100644
--- a/drivers/gpu/drm/via/via_drv.c
+++ b/drivers/gpu/drm/via/via_drv.c
@@ -28,11 +28,6 @@
 
 #include drm_pciids.h
 
-static int dri_library_name(struct drm_device *dev, char *buf)
-{
-   return snprintf(buf, PAGE_SIZE, unichrome);
-}
-
 static struct pci_device_id pciidlist[] = {
viadrv_PCI_IDS
 };
@@ -52,7 +47,6 @@ static struct drm_driver driver = {
.irq_uninstall = via_driver_irq_uninstall,
.irq_handler = via_driver_irq_handler,
.dma_quiescent = via_driver_dma_quiescent,
-   .dri_library_name = dri_library_name,
.reclaim_buffers = drm_core_reclaim_buffers,
.reclaim_buffers_locked = NULL,
.reclaim_buffers_idlelocked = via_reclaim_buffers_locked,
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 7802c80..63a1bb3 100644
--- 

[Bug 12359] WARNING and other intel modesetting problems

2009-01-05 Thread bugme-daemon
http://bugzilla.kernel.org/show_bug.cgi?id=12359


dennis.jan...@web.de changed:

   What|Removed |Added

 Status|NEW |NEEDINFO




--- Comment #10 from dennis.jan...@web.de  2009-01-05 14:27 ---
Well at least the kernel warning on loading the i915 module is valid, right?
And the other part is yet to be confirmed.


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

--
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 12359] WARNING and other intel modesetting problems

2009-01-05 Thread bugme-daemon
http://bugzilla.kernel.org/show_bug.cgi?id=12359





--- Comment #11 from dennis.jan...@web.de  2009-01-05 14:30 ---
btw. intel v. 2.5.1 was compiled with --enable-kms and still didn't work.(see
#8)


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

--
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 12359] WARNING and other intel modesetting problems

2009-01-05 Thread bugme-daemon
http://bugzilla.kernel.org/show_bug.cgi?id=12359





--- Comment #12 from cor...@debian.org  2009-01-05 14:41 ---
I'm not really sure 2.5.1 even supports KMS?


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

--
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 12342] drm_pci_alloc needs to error when alignment constraints not met

2009-01-05 Thread bugme-daemon
http://bugzilla.kernel.org/show_bug.cgi?id=12342





--- Comment #2 from a...@osdl.org  2009-01-05 15:00 ---
Please send patches by email?

Suitable recipients for this one are:

dri-devel@lists.sourceforge.net
airl...@linux.ie
linux-ker...@vger.kernel.org
a...@linux-foundation.org

Thanks.


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

--
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 12359] WARNING and other intel modesetting problems

2009-01-05 Thread bugme-daemon
http://bugzilla.kernel.org/show_bug.cgi?id=12359





--- Comment #14 from e...@anholt.net  2009-01-05 15:18 ---
If it doesn't build by default, it's probably not meant for real use.

(No, don't use old kms code, please)


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

--
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[PATCH] drm/i915: Don't allow objects to get bound while VT switched.

2009-01-05 Thread Eric Anholt
This avoids a BUG_ON in the enter_vt path due to objects being in the GTT
when we shouldn't have ever let them be (as we're not supposed to touch the
device during that time).

This was triggered by a change in the 2D driver to use the GTT mapping of
objects after pinning them to improve software fallback performance.

Signed-off-by: Eric Anholt e...@anholt.net
---
 drivers/gpu/drm/i915/i915_gem.c |   15 +--
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index cc2ca55..14afc23 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1623,6 +1623,8 @@ i915_gem_object_bind_to_gtt(struct drm_gem_object *obj, 
unsigned alignment)
struct drm_mm_node *free_space;
int page_count, ret;
 
+   if (dev_priv-mm.suspended)
+   return -EBUSY;
if (alignment == 0)
alignment = PAGE_SIZE;
if (alignment  (PAGE_SIZE - 1)) {
@@ -2641,7 +2643,7 @@ i915_gem_object_pin(struct drm_gem_object *obj, uint32_t 
alignment)
if (obj_priv-gtt_space == NULL) {
ret = i915_gem_object_bind_to_gtt(obj, alignment);
if (ret != 0) {
-   if (ret != -ERESTARTSYS)
+   if (ret != -EBUSY  ret != -ERESTARTSYS)
DRM_ERROR(Failure to bind: %d, ret);
return ret;
}
@@ -3219,20 +3221,21 @@ i915_gem_entervt_ioctl(struct drm_device *dev, void 
*data,
dev_priv-mm.wedged = 0;
}
 
-   ret = i915_gem_init_ringbuffer(dev);
-   if (ret != 0)
-   return ret;
-
dev_priv-mm.gtt_mapping = io_mapping_create_wc(dev-agp-base,

dev-agp-agp_info.aper_size
* 1024 * 1024);
 
mutex_lock(dev-struct_mutex);
+   dev_priv-mm.suspended = 0;
+
+   ret = i915_gem_init_ringbuffer(dev);
+   if (ret != 0)
+   return ret;
+
BUG_ON(!list_empty(dev_priv-mm.active_list));
BUG_ON(!list_empty(dev_priv-mm.flushing_list));
BUG_ON(!list_empty(dev_priv-mm.inactive_list));
BUG_ON(!list_empty(dev_priv-mm.request_list));
-   dev_priv-mm.suspended = 0;
mutex_unlock(dev-struct_mutex);
 
drm_irq_install(dev);
-- 
1.5.6.5


--
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[PATCH] drm/i915: Respect the other stolen memory sizes we know of.

2009-01-05 Thread Eric Anholt
fd.o bug #19336.

Signed-off-by: Eric Anholt e...@anholt.net
---
 drivers/gpu/drm/i915/i915_dma.c |   46 ---
 drivers/gpu/drm/i915/i915_reg.h |8 ++-
 2 files changed, 40 insertions(+), 14 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 3d7082a..62a4bf7 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -827,6 +827,7 @@ static int i915_probe_agp(struct drm_device *dev, unsigned 
long *aperture_size,
struct pci_dev *bridge_dev;
u16 tmp = 0;
unsigned long overhead;
+   unsigned long stolen;
 
bridge_dev = pci_get_bus_and_slot(0, PCI_DEVFN(0,0));
if (!bridge_dev) {
@@ -866,36 +867,55 @@ static int i915_probe_agp(struct drm_device *dev, 
unsigned long *aperture_size,
else
overhead = (*aperture_size / 1024) + 4096;
 
-   switch (tmp  INTEL_855_GMCH_GMS_MASK) {
+   switch (tmp  INTEL_GMCH_GMS_MASK) {
+   case INTEL_855_GMCH_GMS_DISABLED:
+   DRM_ERROR(video memory is disabled\n);
+   return -1;
case INTEL_855_GMCH_GMS_STOLEN_1M:
-   break; /* 1M already */
+   stolen = 1 * 1024 * 1024;
+   break;
case INTEL_855_GMCH_GMS_STOLEN_4M:
-   *preallocated_size *= 4;
+   stolen = 4 * 1024 * 1024;
break;
case INTEL_855_GMCH_GMS_STOLEN_8M:
-   *preallocated_size *= 8;
+   stolen = 8 * 1024 * 1024;
break;
case INTEL_855_GMCH_GMS_STOLEN_16M:
-   *preallocated_size *= 16;
+   stolen = 16 * 1024 * 1024;
break;
case INTEL_855_GMCH_GMS_STOLEN_32M:
-   *preallocated_size *= 32;
+   stolen = 32 * 1024 * 1024;
break;
case INTEL_915G_GMCH_GMS_STOLEN_48M:
-   *preallocated_size *= 48;
+   stolen = 48 * 1024 * 1024;
break;
case INTEL_915G_GMCH_GMS_STOLEN_64M:
-   *preallocated_size *= 64;
+   stolen = 64 * 1024 * 1024;
+   break;
+   case INTEL_GMCH_GMS_STOLEN_128M:
+   stolen = 128 * 1024 * 1024;
+   break;
+   case INTEL_GMCH_GMS_STOLEN_256M:
+   stolen = 256 * 1024 * 1024;
+   break;
+   case INTEL_GMCH_GMS_STOLEN_96M:
+   stolen = 96 * 1024 * 1024;
+   break;
+   case INTEL_GMCH_GMS_STOLEN_160M:
+   stolen = 160 * 1024 * 1024;
+   break;
+   case INTEL_GMCH_GMS_STOLEN_224M:
+   stolen = 224 * 1024 * 1024;
+   break;
+   case INTEL_GMCH_GMS_STOLEN_352M:
+   stolen = 352 * 1024 * 1024;
break;
-   case INTEL_855_GMCH_GMS_DISABLED:
-   DRM_ERROR(video memory is disabled\n);
-   return -1;
default:
DRM_ERROR(unexpected GMCH_GMS value: 0x%02x\n,
-   tmp  INTEL_855_GMCH_GMS_MASK);
+   tmp  INTEL_GMCH_GMS_MASK);
return -1;
}
-   *preallocated_size -= overhead;
+   *preallocated_size = stolen - overhead;
 
return 0;
 }
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 1024315..2731625 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -35,7 +35,7 @@
 #define INTEL_GMCH_MEM_64M 0x1
 #define INTEL_GMCH_MEM_128M0
 
-#define INTEL_855_GMCH_GMS_MASK(0x7  4)
+#define INTEL_GMCH_GMS_MASK(0xf  4)
 #define INTEL_855_GMCH_GMS_DISABLED(0x0  4)
 #define INTEL_855_GMCH_GMS_STOLEN_1M   (0x1  4)
 #define INTEL_855_GMCH_GMS_STOLEN_4M   (0x2  4)
@@ -45,6 +45,12 @@
 
 #define INTEL_915G_GMCH_GMS_STOLEN_48M (0x6  4)
 #define INTEL_915G_GMCH_GMS_STOLEN_64M (0x7  4)
+#define INTEL_GMCH_GMS_STOLEN_128M (0x8  4)
+#define INTEL_GMCH_GMS_STOLEN_256M (0x9  4)
+#define INTEL_GMCH_GMS_STOLEN_96M  (0xa  4)
+#define INTEL_GMCH_GMS_STOLEN_160M (0xb  4)
+#define INTEL_GMCH_GMS_STOLEN_224M (0xc  4)
+#define INTEL_GMCH_GMS_STOLEN_352M (0xd  4)
 
 /* PCI config space */
 
-- 
1.5.6.5


--
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[PATCH] drm/i915: Pin cursor bo and unpin old bo when setting cursor.

2009-01-05 Thread Eric Anholt
From: Kristian Høgsberg k...@redhat.com

We also didn't track the cursor bo before and would leak a reference
when the cursor image was change.

Signed-off-by: Kristian Høgsberg k...@redhat.com
Signed-off-by: Eric Anholt e...@anholt.net
---
 drivers/gpu/drm/i915/intel_display.c |   29 +
 drivers/gpu/drm/i915/intel_drv.h |1 +
 2 files changed, 22 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c 
b/drivers/gpu/drm/i915/intel_display.c
index e5c1c80..1204d26 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -986,19 +986,17 @@ static int intel_crtc_cursor_set(struct drm_crtc *crtc,
uint32_t base = (pipe == 0) ? CURABASE : CURBBASE;
uint32_t temp;
size_t addr;
+   int ret;
 
DRM_DEBUG(\n);
 
/* if we want to turn off the cursor ignore width and height */
if (!handle) {
DRM_DEBUG(cursor off\n);
-   /* turn of the cursor */
-   temp = 0;
-   temp |= CURSOR_MODE_DISABLE;
-
-   I915_WRITE(control, temp);
-   I915_WRITE(base, 0);
-   return 0;
+   temp = CURSOR_MODE_DISABLE;
+   addr = 0;
+   bo = NULL;
+   goto finish;
}
 
/* Currently we only support 64x64 cursors */
@@ -1025,15 +1023,30 @@ static int intel_crtc_cursor_set(struct drm_crtc *crtc,
addr = obj_priv-gtt_offset;
}
 
-   intel_crtc-cursor_addr = addr;
+   ret = i915_gem_object_pin(bo, PAGE_SIZE);
+   if (ret) {
+   DRM_ERROR(failed to pin cursor bo\n);
+   drm_gem_object_unreference(bo);
+   return ret;
+   }
+
temp = 0;
/* set the pipe for the cursor */
temp |= (pipe  28);
temp |= CURSOR_MODE_64_ARGB_AX | MCURSOR_GAMMA_ENABLE;
 
+ finish:
I915_WRITE(control, temp);
I915_WRITE(base, addr);
 
+   if (intel_crtc-cursor_bo) {
+   i915_gem_object_unpin(intel_crtc-cursor_bo);
+   drm_gem_object_unreference(intel_crtc-cursor_bo);
+   }
+
+   intel_crtc-cursor_addr = addr;
+   intel_crtc-cursor_bo = bo;
+
return 0;
 }
 
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 407edd5..94981ee 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -88,6 +88,7 @@ struct intel_crtc {
struct drm_crtc base;
int pipe;
int plane;
+   struct drm_gem_object *cursor_bo;
uint32_t cursor_addr;
u8 lut_r[256], lut_g[256], lut_b[256];
int dpms_mode;
-- 
1.5.6.5


--
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[PATCH] drm/i915: Don't oops when root asks to unpin an already unpinned buffer.

2009-01-05 Thread Eric Anholt
Signed-off-by: Eric Anholt e...@anholt.net
---
 drivers/gpu/drm/i915/i915_gem.c |7 +++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 14afc23..e87db6f 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2761,6 +2761,13 @@ i915_gem_unpin_ioctl(struct drm_device *dev, void *data,
mutex_unlock(dev-struct_mutex);
return -EBADF;
}
+   obj_priv = obj-driver_private;
+
+   if (obj_priv-pin_count == 0) {
+   drm_gem_object_unreference(obj);
+   mutex_unlock(dev-struct_mutex);
+   return -EINVAL;
+   }
 
obj_priv = obj-driver_private;
if (obj_priv-pin_filp != file_priv) {
-- 
1.5.6.5


--
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


intel KMS and stability series

2009-01-05 Thread Eric Anholt
Here comes a series of patches I've been cleaning up over the last few days.
The first couple are bugfixes that we've tripped over with 2.6.28 that I'll
want to get merged to stable.  The rest are getting KMS ready to go.  Dropped
from the series is airlied's vma patch, which caused lock ordering complaints.


--
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[PATCH] drm/i915: Fix failure to take the mode_config lock in driver setup.

2009-01-05 Thread Eric Anholt
We're not really concerned with races during setup, but we do want to keep
the warning around given how easy it is to misplace that lock.

Signed-off-by: Eric Anholt e...@anholt.net
---
 drivers/gpu/drm/drm_crtc_helper.c |3 +++
 drivers/gpu/drm/i915/intel_tv.c   |2 ++
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/drm_crtc_helper.c 
b/drivers/gpu/drm/drm_crtc_helper.c
index d8a982b..f4e6d1d 100644
--- a/drivers/gpu/drm/drm_crtc_helper.c
+++ b/drivers/gpu/drm/drm_crtc_helper.c
@@ -766,7 +766,10 @@ bool drm_helper_initial_config(struct drm_device *dev, 
bool can_grow)
 {
int ret = false;
 
+   mutex_lock(dev-mode_config.mutex);
drm_helper_plugged_event(dev);
+   mutex_unlock(dev-mode_config.mutex);
+
return ret;
 }
 EXPORT_SYMBOL(drm_helper_initial_config);
diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c
index fbb35dc..aa36f92 100644
--- a/drivers/gpu/drm/i915/intel_tv.c
+++ b/drivers/gpu/drm/i915/intel_tv.c
@@ -1704,6 +1704,7 @@ intel_tv_init(struct drm_device *dev)
goto out;
for (i = 0; i  NUM_TV_MODES; i++)
tv_format_names[i] = tv_modes[i].name;
+   mutex_lock(dev-mode_config.mutex);
drm_mode_create_tv_properties(dev, NUM_TV_MODES, tv_format_names);
 
drm_connector_attach_property(connector, 
dev-mode_config.tv_mode_property,
@@ -1720,6 +1721,7 @@ intel_tv_init(struct drm_device *dev)
drm_connector_attach_property(connector,
   dev-mode_config.tv_bottom_margin_property,
   tv_priv-margin[TV_MARGIN_BOTTOM]);
+   mutex_unlock(dev-mode_config.mutex);
 out:
drm_sysfs_connector_add(connector);
 }
-- 
1.5.6.5


--
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[PATCH] drm/i915: Non-mobile parts don't have integrated TV-out.

2009-01-05 Thread Eric Anholt
Signed-off-by: Eric Anholt e...@anholt.net
---
 drivers/gpu/drm/i915/intel_display.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c 
b/drivers/gpu/drm/i915/intel_display.c
index 14d82de..5824462 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -1455,7 +1455,7 @@ static void intel_setup_outputs(struct drm_device *dev)
} else
intel_dvo_init(dev);
 
-   if (IS_I9XX(dev)  !IS_I915G(dev))
+   if (IS_I9XX(dev)  IS_MOBILE(dev))
intel_tv_init(dev);
 
list_for_each_entry(connector, dev-mode_config.connector_list, head) {
-- 
1.5.6.5


--
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[PATCH] drm/i915: Add support for integrated HDMI on G4X hardware.

2009-01-05 Thread Eric Anholt
This is ported directly from the userland 2D driver code.  The HDMI audio bits
aren't hooked up yet.

Signed-off-by: Eric Anholt e...@anholt.net
---
 drivers/gpu/drm/i915/Makefile|1 +
 drivers/gpu/drm/i915/i915_drv.h  |2 +
 drivers/gpu/drm/i915/i915_reg.h  |   17 ++
 drivers/gpu/drm/i915/intel_display.c |   11 +-
 drivers/gpu/drm/i915/intel_drv.h |4 +-
 drivers/gpu/drm/i915/intel_hdmi.c|  281 ++
 drivers/gpu/drm/i915/intel_sdvo.c|8 +-
 7 files changed, 317 insertions(+), 7 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/intel_hdmi.c

diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
index dd57a5b..793cba3 100644
--- a/drivers/gpu/drm/i915/Makefile
+++ b/drivers/gpu/drm/i915/Makefile
@@ -13,6 +13,7 @@ i915-y := i915_drv.o i915_dma.o i915_irq.o i915_mem.o \
  intel_crt.o \
  intel_lvds.o \
  intel_bios.o \
+ intel_hdmi.o \
  intel_sdvo.o \
  intel_modes.o \
  intel_i2c.o \
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 4756e5c..563de18 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -664,6 +664,7 @@ extern void intel_modeset_cleanup(struct drm_device *dev);
 writel(upper_32_bits(val), dev_priv-regs + \
(reg) + 4))
 #endif
+#define POSTING_READ(reg)  (void)I915_READ(reg)
 
 #define I915_VERBOSE 0
 
@@ -760,6 +761,7 @@ extern int i915_wait_ring(struct drm_device * dev, int n, 
const char *caller);
IS_I945GM(dev) || IS_I965GM(dev) || IS_GM45(dev))
 
 #define I915_NEED_GFX_HWS(dev) (IS_G33(dev) || IS_GM45(dev) || IS_G4X(dev))
+#define SUPPORTS_INTEGRATED_HDMI(dev)  (IS_G4X(dev))
 
 #define PRIMARY_RINGBUFFER_SIZE (128*1024)
 
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 47e6baf..1024315 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -549,6 +549,8 @@
 /** GM965 GM45 render standby register */
 #define MCHBAR_RENDER_STANDBY  0x111B8
 
+#define PEG_BAND_GAP_DATA  0x14d68
+
 /*
  * Overlay regs
  */
@@ -612,6 +614,9 @@
 
 /* Hotplug control (945+ only) */
 #define PORT_HOTPLUG_EN0x61110
+#define   HDMIB_HOTPLUG_INT_EN (1  29)
+#define   HDMIC_HOTPLUG_INT_EN (1  28)
+#define   HDMID_HOTPLUG_INT_EN (1  27)
 #define   SDVOB_HOTPLUG_INT_EN (1  26)
 #define   SDVOC_HOTPLUG_INT_EN (1  25)
 #define   TV_HOTPLUG_INT_EN(1  18)
@@ -619,6 +624,9 @@
 #define   CRT_HOTPLUG_FORCE_DETECT (1  3)
 
 #define PORT_HOTPLUG_STAT  0x61114
+#define   HDMIB_HOTPLUG_INT_STATUS (1  29)
+#define   HDMIC_HOTPLUG_INT_STATUS (1  28)
+#define   HDMID_HOTPLUG_INT_STATUS (1  27)
 #define   CRT_HOTPLUG_INT_STATUS   (1  11)
 #define   TV_HOTPLUG_INT_STATUS(1  10)
 #define   CRT_HOTPLUG_MONITOR_MASK (3  8)
@@ -648,7 +656,16 @@
 #define   SDVO_PHASE_SELECT_DEFAULT(6  19)
 #define   SDVO_CLOCK_OUTPUT_INVERT (1  18)
 #define   SDVOC_GANG_MODE  (1  16)
+#define   SDVO_ENCODING_SDVO   (0x0  10)
+#define   SDVO_ENCODING_HDMI   (0x2  10)
+/** Requird for HDMI operation */
+#define   SDVO_NULL_PACKETS_DURING_VSYNC (1  9)
 #define   SDVO_BORDER_ENABLE   (1  7)
+#define   SDVO_AUDIO_ENABLE(1  6)
+/** New with 965, default is to be set */
+#define   SDVO_VSYNC_ACTIVE_HIGH   (1  4)
+/** New with 965, default is to be set */
+#define   SDVO_HSYNC_ACTIVE_HIGH   (1  3)
 #define   SDVOB_PCIE_CONCURRENCY   (1  3)
 #define   SDVO_DETECTED(1  2)
 /* Bits to be preserved when writing */
diff --git a/drivers/gpu/drm/i915/intel_display.c 
b/drivers/gpu/drm/i915/intel_display.c
index 1204d26..14d82de 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -1443,8 +1443,15 @@ static void intel_setup_outputs(struct drm_device *dev)
intel_lvds_init(dev);
 
if (IS_I9XX(dev)) {
-   intel_sdvo_init(dev, SDVOB);
-   intel_sdvo_init(dev, SDVOC);
+   int found;
+
+   found = intel_sdvo_init(dev, SDVOB);
+   if (!found  SUPPORTS_INTEGRATED_HDMI(dev))
+   intel_hdmi_init(dev, SDVOB);
+
+   found = intel_sdvo_init(dev, SDVOC);
+   if (!found  SUPPORTS_INTEGRATED_HDMI(dev))
+   intel_hdmi_init(dev, SDVOC);
} else
intel_dvo_init(dev);
 
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 94981ee..8a4cc50 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -53,6 +53,7 @@
 #define 

[Bug 19396] incorrect font rendering when run googleearth 4.3

2009-01-05 Thread bugzilla-daemon
http://bugs.freedesktop.org/show_bug.cgi?id=19396





--- Comment #6 from liuhaien haien@intel.com  2009-01-05 18:03:57 PST ---
(In reply to comment #5)
 maybe bug#19233. So can you verify with server-1.5 branch?
 

yes, it works against server-1.5 branch.


-- 
Configure bugmail: http://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.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 19396] incorrect font rendering when run googleearth 4.3

2009-01-05 Thread bugzilla-daemon
http://bugs.freedesktop.org/show_bug.cgi?id=19396


Gordon Jin gordon@intel.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE




--- Comment #7 from Gordon Jin gordon@intel.com  2009-01-05 19:30:14 PST 
---
marking dup with bug#19233.

*** This bug has been marked as a duplicate of bug 19233 ***


-- 
Configure bugmail: http://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.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 19415] [945GM] X fail to start on kernel 2.6.28

2009-01-05 Thread bugzilla-daemon
http://bugs.freedesktop.org/show_bug.cgi?id=19415





--- Comment #1 from Li Peng peng...@intel.com  2009-01-05 23:12:27 PST ---
After bisect, below commit cause the problem, revert it could fix the issue. It
is strange that my kernel config has CONFIG_HIGHMEM64G=y, and GEM works with
this option.

commit ac5c4e76180a74c7f922f6fa71ace0cef45fa433
Author: Dave Airlie airl...@redhat.com
Date:   Fri Dec 19 15:38:34 2008 +1000

drm/i915: GEM on PAE has problems - disable it for now.

On PAE systems, GEM allocates pages using shmem, and passes these
pages to be bound into AGP, however the AGP interfaces + the x86
set_memory interfaces all take unsigned long not dma_addr_t.

The initial fix for this was a mess, so we need to do this correctly
for 2.6.29.


-- 
Configure bugmail: http://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.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel