Re: Removal of mach64

2010-02-10 Thread Catalin Patulea
On Tue, Feb 9, 2010 at 10:15 AM, Alex Deucher alexdeuc...@gmail.com wrote:
 You might check if your bios has an option to enable an irq for vga
 devices.  You'll need an irq for vblank support, but beyond that I
 don't recall what else the mach64 could use irqs for.
Unfortunately, no such option in the BIOS. I thought it could use an
IRQ for notification of completed DMA/CRTC operations. If it's only
used for vblank, it's not much of an issue for me.

 DRI has nothing to do with 2D stuff.  It only accelerates 3D (OpenGL).
  You might try switching to EXA:
 Option AccelMethod EXA
 Or lowering your resolution to free up more offscreen memory for 2D.
Using that AccelMethod results in SIGSEGV at X startup, after initialization:

(II) MACH64(0): [pci] Ring mapped at 0xb688a000
(II) MACH64(0): [drm] register handle = 0xfe121000
(II) MACH64(0): [dri] Visual configs initialized
(II) MACH64(0): [dri] Block 0 base at 0xfe121400
(II) MACH64(0): EXA memory management initialized
 base :  0xb68ff000
 offscreen: +18
 size : +7ffc00
 cursor   :  0xb70fec00
(II) MACH64(0): Will use 6655 kB of offscreen memory for EXA
 or  4.33 viewports (composite)
 or  9.86 dvdframes (xvideo)
(II) MACH64(0): Will use back  buffer at offset 0x18
(II) MACH64(0): Will use depth buffer at offset 0x30
(II) MACH64(0): Will use 1728 kB for local textures at offset 0x48
(II) MACH64(0): Render acceleration enabled
(II) EXA(0): Offscreen pixmap area of 6814720 bytes
(II) EXA(0): Driver registered support for the following operations:
(II) Solid
(II) Copy
(II) Composite (RENDER acceleration)
(II) UploadToScreen
(II) DownloadFromScreen
[...]
Backtrace:
0: /usr/bin/X11/X(xorg_backtrace+0x3b) [0x8133d6b]
1: /usr/bin/X11/X(xf86SigHandler+0x55) [0x80c7d35]
2: [0xb7704400]
3: /usr/lib/xorg/modules//libexa.so [0xb68d7f14]
4: /usr/lib/xorg/modules//libexa.so [0xb68d822b]
5: /usr/lib/xorg/modules//libexa.so(exaDoMigration+0x462) [0xb68d8ab2]
6: /usr/lib/xorg/modules//libexa.so(exaPrepareAccessReg+0x60) [0xb68d3530]
7: /usr/lib/xorg/modules//libexa.so(exaPrepareAccess+0x2c) [0xb68d357c]
8: /usr/lib/xorg/modules//libexa.so(ExaCheckComposite+0x105) [0xb68dc0b5]
9: /usr/lib/xorg/modules//libexa.so(exaComposite+0x1bd) [0xb68da65d]
10: /usr/bin/X11/X [0x817f51b]
11: /usr/bin/X11/X(CompositePicture+0x27c) [0x817177c]
12: /usr/bin/X11/X [0x817762b]
13: /usr/bin/X11/X [0x81742e5]
14: /usr/bin/X11/X(Dispatch+0x35f) [0x808d17f]
15: /usr/bin/X11/X(main+0x395) [0x8072515]
16: /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6) [0xb73f4b56]
17: /usr/bin/X11/X [0x80719c1]
Saw signal 11.  Server aborting.

The only changes I had to add on top of the Archlinux patches were
related to removed addr_mask argument in drm_pci_alloc. I can attach a
patch if you want, it's really just a few lines.

--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


2.6.33-rc7-git1: Radeon KMS and plymouthd hits kernel BUG

2010-02-10 Thread Thomas Backlund
(please cc me on replies)

Hi, Is this known ?

Kernel: 2.6.33-rc7-git1
Arch: x86_64
Distro: Mandriva Cooker

RADEON_KMS is enabled.

Plymouth is version 0.7.2

I hit the bug below:


  ... 

 [0.00] Command line: BOOT_IMAGE=Cooker-tmb root=/dev/sda2 
 resume=/dev/sda1 splash=silent vga=791

  ... 

 [   18.703916] [drm] Initialized drm 1.1.0 20060810
 [   18.968389] [drm] radeon defaulting to kernel modesetting.
 [   18.968392] [drm] radeon kernel modesetting enabled.
 [   18.968468] radeon :01:00.0: PCI INT A - GSI 16 (level, low) - IRQ 16
 [   18.968475] radeon :01:00.0: setting latency timer to 64
 [   18.970523] [drm] radeon: Initializing kernel modesetting.
 [   18.971122] [drm] register mmio base: 0xCFEF
 [   18.971124] [drm] register mmio size: 65536
 [   18.971208] ATOM BIOS: MXM
 [   18.971223] [drm] Clocks initialized !
 [   18.971245] mtrr: type mismatch for d000,1000 old: write-back new: 
 write-combining
 [   18.971248] [drm] Detected VRAM RAM=256M, BAR=256M
 [   18.971249] [drm] RAM width 128bits DDR
 [   18.971291] [TTM] Zone  kernel: Available graphics memory: 2028530 kiB.
 [   18.971306] [drm] radeon: 256M of VRAM memory ready
 [   18.971308] [drm] radeon: 512M of GTT memory ready.
 [   18.971365] radeon :01:00.0: irq 29 for MSI/MSI-X
 [   18.971372] [drm] radeon: using MSI.
 [   18.971407] [drm] radeon: irq initialized.
 [   18.971409] [drm] GART: num cpu pages 131072, num gpu pages 131072
 [   18.972290] [drm] Loading RV630 Microcode
 [   18.972295] platform radeon_cp.0: firmware: requesting radeon/RV630_pfp.bin
 [   18.973590] platform radeon_cp.0: firmware: requesting radeon/RV630_me.bin
 [   18.974702] platform radeon_cp.0: firmware: requesting radeon/R600_rlc.bin
 [   19.044477] [drm] ring test succeeded in 1 usecs
 [   19.044562] [drm] radeon: ib pool ready.
 [   19.044633] [drm] ib test succeeded in 0 usecs
 [   19.044635] [drm] Enabling audio support
 [   19.044709] [drm] Default TV standard: NTSC
 [   19.044786] [drm] Radeon Display Connectors
 [   19.044788] [drm] Connector 0:
 [   19.044789] [drm]   LVDS
 [   19.044791] [drm]   DDC: 0xac0 0xac0 0xac4 0xac4 0xac8 0xac8 0xacc 0xacc
 [   19.044792] [drm]   Encoders:
 [   19.044793] [drm] LCD1: INTERNAL_LVTM1
 [   19.044794] [drm] Connector 1:
 [   19.044795] [drm]   DIN
 [   19.044796] [drm]   Encoders:
 [   19.044797] [drm] TV1: INTERNAL_KLDSCP_DAC2
 [   19.044799] [drm] Connector 2:
 [   19.044799] [drm]   VGA
 [   19.044801] [drm]   DDC: 0x7e40 0x7e40 0x7e44 0x7e44 0x7e48 0x7e48 0x7e4c 
 0x7e4c
 [   19.044803] [drm]   Encoders:
 [   19.044804] [drm] CRT1: INTERNAL_KLDSCP_DAC1
 [   19.044805] [drm] Connector 3:
 [   19.044806] [drm]   DVI-I
 [   19.044807] [drm]   HPD1
 [   19.044808] [drm]   DDC: 0x7e50 0x7e50 0x7e54 0x7e54 0x7e58 0x7e58 0x7e5c 
 0x7e5c
 [   19.044810] [drm]   Encoders:
 [   19.044811] [drm] DFP1: INTERNAL_KLDSCP_TMDS1
 [   19.614327] [drm] fb mappable at 0xD0141000
 [   19.614329] [drm] vram apper at 0xD000
 [   19.614330] [drm] size 4096000
 [   19.614332] [drm] fb depth is 24
 [   19.614333] [drm]pitch is 5120
 [   19.614337] fb: conflicting fb hw usage radeondrmfb vs VESA VGA - removing 
 generic driver
 [   19.614353] Console: switching to colour dummy device 80x25
 [   19.614598] Console: switching to colour frame buffer device 160x50
 [   20.069974] fb0: radeondrmfb frame buffer device
 [   20.069976] registered panic notifier
 [   20.069984] [drm] Initialized radeon 2.0.0 20080528 for :01:00.0 on 
 minor 0

  ... 

 [   24.214473] kernel tried to execute NX-protected page - exploit attempt? 
 (uid: 0)
 [   24.215135] BUG: unable to handle kernel paging request at 88013f8bb3c0
 [   24.215137] IP: [88013f8bb3c0] 0x88013f8bb3c0
 [   24.215143] PGD 14a7063 PUD 19067 PMD 80013f8001e3
 [   24.215146] Oops: 0011 [#1] PREEMPT SMP
 [   24.215148] last sysfs file: 
 /sys/devices/pci:00/:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/size
 [   24.215150] CPU 1
 [   24.215153] Pid: 35, comm: plymouthd Not tainted 
 2.6.33-tmb-desktop-0.rc7.1.2mdv #1 Columbia   /TravelMate 
 5720
 [   24.215155] RIP: 0010:[88013f8bb3c0]  [88013f8bb3c0] 
 0x88013f8bb3c0
 [   24.215158] RSP: 0018:88013e7f9eb0  EFLAGS: 00010286
 [   24.215160] RAX: 88013f8bb3c0 RBX: 88013f8bb000 RCX: 
 0003
 [   24.215161] RDX: 88013f8bb3b0 RSI: 0001 RDI: 
 88013f8bb000
 [   24.215163] RBP: 88013e7f9ec8 R08:  R09: 
 
 [   24.215164] R10:  R11: 0246 R12: 
 88013f8bb008
 [   24.215166] R13: 88013f422b40 R14: 88013f8b2e38 R15: 
 88013e70a400
 [   24.215168] FS:  7f7575149700() GS:88002830() 
 knlGS:
 [   24.215170] CS:  0010 DS:  ES:  CR0: 80050033
 [   24.215171] CR2: 88013f8bb3c0 CR3: 00013e7bc000 CR4: 
 06e0
 [   24.215173] DR0:  

[Bug 26502] r600_texstate.c:1119: error: '__DRM_TEXTURE_FORMAT_RGBA' undeclared

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


Vinson Lee v...@vmware.com changed:

   What|Removed |Added

 CC||wol...@onsneteindhoven.nl




--- Comment #1 from Vinson Lee v...@vmware.com  2010-02-10 01:06:33 PST ---
*** Bug 26503 has been marked as a duplicate of this bug. ***


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

--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[PATCH] drm/radeon/kms: Test rdev-bios centrally in combios_get_table_offset().

2010-02-10 Thread Michel Dänzer
From: Michel Dänzer daen...@vmware.com

It's happened time and time again (most recently with the support for EDID
hardcoded in the BIOS ROM) that new code didn't check for rdev-bios being
non-NULL before triggering dereferences of it. This would result in an
oops/panic on setups with no BIOS ROM. Hopefully this central test will be
more robust.

Signed-off-by: Michel Dänzer daen...@vmware.com
---
 drivers/gpu/drm/radeon/radeon_combios.c |   40 +++---
 1 files changed, 4 insertions(+), 36 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_combios.c 
b/drivers/gpu/drm/radeon/radeon_combios.c
index 26fb424..9989d22 100644
--- a/drivers/gpu/drm/radeon/radeon_combios.c
+++ b/drivers/gpu/drm/radeon/radeon_combios.c
@@ -150,6 +150,9 @@ static uint16_t combios_get_table_offset(struct drm_device 
*dev,
int rev;
uint16_t offset = 0, check_offset;
 
+   if (!rdev-bios)
+   return 0;
+
switch (table) {
/* absolute offset tables */
case COMBIOS_ASIC_INIT_1_TABLE:
@@ -621,9 +624,6 @@ bool radeon_combios_get_clock_info(struct drm_device *dev)
int8_t rev;
uint16_t sclk, mclk;
 
-   if (rdev-bios == NULL)
-   return false;
-
pll_info = combios_get_table_offset(dev, COMBIOS_PLL_INFO_TABLE);
if (pll_info) {
rev = RBIOS8(pll_info);
@@ -748,9 +748,6 @@ struct radeon_encoder_primary_dac 
*radeon_combios_get_primary_dac_info(struct
if (!p_dac)
return NULL;
 
-   if (rdev-bios == NULL)
-   goto out;
-
/* check CRT table */
dac_info = combios_get_table_offset(dev, COMBIOS_CRT_INFO_TABLE);
if (dac_info) {
@@ -767,7 +764,6 @@ struct radeon_encoder_primary_dac 
*radeon_combios_get_primary_dac_info(struct
found = 1;
}
 
-out:
if (!found) /* fallback to defaults */
radeon_legacy_get_primary_dac_info_from_table(rdev, p_dac);
 
@@ -781,9 +777,6 @@ radeon_combios_get_tv_info(struct radeon_device *rdev)
uint16_t tv_info;
enum radeon_tv_std tv_std = TV_STD_NTSC;
 
-   if (rdev-bios == NULL)
-   return tv_std;
-
tv_info = combios_get_table_offset(dev, COMBIOS_TV_INFO_TABLE);
if (tv_info) {
if (RBIOS8(tv_info + 6) == 'T') {
@@ -887,9 +880,6 @@ struct radeon_encoder_tv_dac 
*radeon_combios_get_tv_dac_info(struct
if (!tv_dac)
return NULL;
 
-   if (rdev-bios == NULL)
-   goto out;
-
/* first check TV table */
dac_info = combios_get_table_offset(dev, COMBIOS_TV_INFO_TABLE);
if (dac_info) {
@@ -951,7 +941,6 @@ struct radeon_encoder_tv_dac 
*radeon_combios_get_tv_dac_info(struct
}
}
 
-out:
if (!found) /* fallback to defaults */
radeon_legacy_get_tv_dac_info_from_table(rdev, tv_dac);
 
@@ -1039,11 +1028,6 @@ struct radeon_encoder_lvds 
*radeon_combios_get_lvds_info(struct radeon_encoder
int tmp, i;
struct radeon_encoder_lvds *lvds = NULL;
 
-   if (rdev-bios == NULL) {
-   lvds = radeon_legacy_get_lvds_info_from_regs(rdev);
-   goto out;
-   }
-
lcd_info = combios_get_table_offset(dev, COMBIOS_LCD_INFO_TABLE);
 
if (lcd_info) {
@@ -1144,7 +1128,7 @@ struct radeon_encoder_lvds 
*radeon_combios_get_lvds_info(struct radeon_encoder
DRM_INFO(No panel info found in BIOS\n);
lvds = radeon_legacy_get_lvds_info_from_regs(rdev);
}
-out:
+
if (lvds)
encoder-native_mode = lvds-native_mode;
return lvds;
@@ -1196,9 +1180,6 @@ bool radeon_legacy_get_tmds_info_from_combios(struct 
radeon_encoder *encoder,
int i, n;
uint8_t ver;
 
-   if (rdev-bios == NULL)
-   return false;
-
tmds_info = combios_get_table_offset(dev, COMBIOS_DFP_INFO_TABLE);
 
if (tmds_info) {
@@ -1278,9 +1259,6 @@ bool radeon_legacy_get_ext_tmds_info_from_combios(struct 
radeon_encoder *encoder
enum radeon_combios_ddc gpio;
struct radeon_i2c_bus_rec i2c_bus;
 
-   if (rdev-bios == NULL)
-   return false;
-
tmds-i2c_bus = NULL;
if (rdev-flags  RADEON_IS_IGP) {
offset = combios_get_table_offset(dev, COMBIOS_I2C_INFO_TABLE);
@@ -2006,9 +1984,6 @@ bool radeon_get_legacy_connector_info_from_bios(struct 
drm_device *dev)
struct radeon_i2c_bus_rec ddc_i2c;
struct radeon_hpd hpd;
 
-   if (rdev-bios == NULL)
-   return false;
-
conn_info = combios_get_table_offset(dev, COMBIOS_CONNECTOR_INFO_TABLE);
if (conn_info) {
for (i = 0; i  4; i++) {
@@ -2385,10 +2360,6 @@ void radeon_combios_get_power_modes(struct radeon_device 
*rdev)
rdev-pm.default_power_state = NULL;
rdev-pm.current_power_state = NULL;
 
-   /* XXX mac/sparc cards */
-   

Re: vmwgfx + VMWare 7.0 - libdrm modetest.c

2010-02-10 Thread Peter Hanzel

Hello.

I don't have a patch, as I can't still make it run on VMWare.
But tests on other graphic card can be good.
I have attached the file.

There is no Cairo code, no page_flip and
I have also added drmModeDirtyFB, as Jakob from vmware suggested to make it 
work under vmwgfx.


Regards.

- Original Message - 
From: Kristian Høgsberg k...@bitplanet.net

To: Peter Hanzel hanzelpe...@gmail.com
Cc: dri-devel@lists.sourceforge.net
Sent: Tuesday, February 09, 2010 3:14 PM
Subject: Re: vmwgfx + VMWare 7.0 - libdrm modetest.c


On Tue, Feb 9, 2010 at 8:05 AM, Peter Hanzel hanzelpe...@gmail.com 
wrote:

Hello.

I have a question about libdrm/libkms and test/modetest/modetest.c.
I am now working with vmwgfx + VMWare 7.0, where vmwgfx had correctly
initialized framebuffer and also now using fbcon.
Now I want to test it woth modetest.c
This program is only for intel so i recoded it to use libkms functions.


Could you send the changes to make modetest.c use libkms as a patch?
It's a good idea.

cheers,
Kristian


/*
* DRM based mode setting test program
* Copyright 2008 Tungsten Graphics
*   Jakob Bornecrantz ja...@tungstengraphics.com
* Copyright 2008 Intel Corporation
*   Jesse Barnes jesse.bar...@intel.com
*
* 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
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice 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 MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS 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.
*/

/*
* This fairly simple test program dumps output in a similar format to the
* xrandr tool everyone knows  loves.  It's necessarily slightly different
* since the kernel separates outputs into encoder and connector structures,
* each with their own unique ID.  The program also allows test testing of the
* memory management and mode setting APIs by allowing the user to specify a
* connector and mode to use for mode setting.  If all works as expected, a
* blue background should be painted on the monitor attached to the specified
* connector after the selected mode is set.
*
* TODO: use cairo to write the mode info on the selected output once
*   the mode has been programmed, along with possible test patterns.
*/
#include config.h

#include assert.h
#include stdio.h
#include stdlib.h
#include stdint.h
#include unistd.h
#include string.h
#include errno.h
#include sys/poll.h

#include xf86drm.h
#include xf86drmMode.h
#include libkms/libkms.h

struct kms_bo
{
   struct kms_driver *kms;
   void *ptr;
   size_t size;
   size_t offset;
   size_t pitch;
   unsigned handle;
};


drmModeRes *resources;
int fd, modes;

#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))

struct type_name {
int type;
char *name;
};

#define type_name_fn(res) \
char * res##_str(int type) {\
int i;  \
for (i = 0; i  ARRAY_SIZE(res##_names); i++) { \
if (res##_names[i].type == type)\
return res##_names[i].name; \
}   \
return (invalid);   \
}

struct type_name encoder_type_names[] = {
{ DRM_MODE_ENCODER_NONE, none },
{ DRM_MODE_ENCODER_DAC, DAC },
{ DRM_MODE_ENCODER_TMDS, TMDS },
{ DRM_MODE_ENCODER_LVDS, LVDS },
{ DRM_MODE_ENCODER_TVDAC, TVDAC },
};

type_name_fn(encoder_type)

struct type_name connector_status_names[] = {
{ DRM_MODE_CONNECTED, connected },
{ DRM_MODE_DISCONNECTED, disconnected },
{ DRM_MODE_UNKNOWNCONNECTION, unknown },
};

type_name_fn(connector_status)

struct type_name connector_type_names[] = {
{ DRM_MODE_CONNECTOR_Unknown, unknown },
{ DRM_MODE_CONNECTOR_VGA, VGA },
{ DRM_MODE_CONNECTOR_DVII, DVI-I },
{ DRM_MODE_CONNECTOR_DVID, DVI-D },
{ DRM_MODE_CONNECTOR_DVIA, DVI-A },
{ DRM_MODE_CONNECTOR_Composite, composite },
{ DRM_MODE_CONNECTOR_SVIDEO, s-video },
{ DRM_MODE_CONNECTOR_LVDS, LVDS },
{ DRM_MODE_CONNECTOR_Component, component },
{ DRM_MODE_CONNECTOR_9PinDIN, 9-pin DIN },
   

[PATCH] drm/radeon/kms: point empty GPU GART entry to dummy page

2010-02-10 Thread Jerome Glisse
Rather than pointing to 0 address point empty entry to dummy
page. This might help to avoid hard lockup if for some wrong
reasons GPU try to access unmapped GART entry.

Signed-off-by: Jerome Glisse jgli...@redhat.com
---
 drivers/gpu/drm/radeon/evergreen.c |1 +
 drivers/gpu/drm/radeon/r100.c  |   11 +--
 drivers/gpu/drm/radeon/r300.c  |   15 +--
 drivers/gpu/drm/radeon/r600.c  |1 +
 drivers/gpu/drm/radeon/radeon.h|5 +
 drivers/gpu/drm/radeon/radeon_asic.h   |   15 ---
 drivers/gpu/drm/radeon/radeon_device.c |5 ++---
 drivers/gpu/drm/radeon/radeon_gart.c   |   32 ++--
 drivers/gpu/drm/radeon/rs400.c |   11 +--
 drivers/gpu/drm/radeon/rs600.c |   12 +---
 drivers/gpu/drm/radeon/rv770.c |1 +
 11 files changed, 40 insertions(+), 69 deletions(-)

diff --git a/drivers/gpu/drm/radeon/evergreen.c 
b/drivers/gpu/drm/radeon/evergreen.c
index c2f9752..3368920 100644
--- a/drivers/gpu/drm/radeon/evergreen.c
+++ b/drivers/gpu/drm/radeon/evergreen.c
@@ -93,6 +93,7 @@ int evergreen_pcie_gart_enable(struct radeon_device *rdev)
r = radeon_gart_table_vram_pin(rdev);
if (r)
return r;
+   radeon_gart_restore(rdev);
/* Setup L2 cache */
WREG32(VM_L2_CNTL, ENABLE_L2_CACHE | ENABLE_L2_FRAGMENT_PROCESSING |
ENABLE_L2_PTE_CACHE_LRU_UPDATE_BY_WRITE |
diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c
index ac17610..bc7d9e9 100644
--- a/drivers/gpu/drm/radeon/r100.c
+++ b/drivers/gpu/drm/radeon/r100.c
@@ -181,7 +181,6 @@ int r100_pci_gart_init(struct radeon_device *rdev)
rdev-gart.table_size = rdev-gart.num_gpu_pages * 4;
rdev-asic-gart_tlb_flush = r100_pci_gart_tlb_flush;
rdev-asic-gart_set_page = r100_pci_gart_set_page;
-   rdev-asic-gart_clear_page = r100_pci_gart_clear_page;
return radeon_gart_table_ram_alloc(rdev);
 }
 
@@ -198,6 +197,7 @@ int r100_pci_gart_enable(struct radeon_device *rdev)
 {
uint32_t tmp;
 
+   radeon_gart_restore(rdev);
/* discard memory request outside of configured range */
tmp = RREG32(RADEON_AIC_CNTL) | RADEON_DIS_OUT_OF_PCI_GART_ACCESS;
WREG32(RADEON_AIC_CNTL, tmp);
@@ -234,15 +234,6 @@ int r100_pci_gart_set_page(struct radeon_device *rdev, int 
i, uint64_t addr)
return 0;
 }
 
-int r100_pci_gart_clear_page(struct radeon_device *rdev, int i)
-{
-   if (i  0 || i  rdev-gart.num_gpu_pages) {
-   return -EINVAL;
-   }
-   rdev-gart.table.ram.ptr[i] = 0;
-   return 0;
-}
-
 void r100_pci_gart_fini(struct radeon_device *rdev)
 {
r100_pci_gart_disable(rdev);
diff --git a/drivers/gpu/drm/radeon/r300.c b/drivers/gpu/drm/radeon/r300.c
index 933f0f9..654aca1 100644
--- a/drivers/gpu/drm/radeon/r300.c
+++ b/drivers/gpu/drm/radeon/r300.c
@@ -83,19 +83,6 @@ int rv370_pcie_gart_set_page(struct radeon_device *rdev, int 
i, uint64_t addr)
return 0;
 }
 
-
-int rv370_pcie_gart_clear_page(struct radeon_device *rdev, int i)
-{
-   void __iomem *ptr = (void *)rdev-gart.table.vram.ptr;
-
-   if (i  0 || i  rdev-gart.num_gpu_pages) {
-   return -EINVAL;
-   }
-
-   writel(0, ((void __iomem *)ptr) + (i * 4));
-   return 0;
-}
-
 int rv370_pcie_gart_init(struct radeon_device *rdev)
 {
int r;
@@ -114,7 +101,6 @@ int rv370_pcie_gart_init(struct radeon_device *rdev)
rdev-gart.table_size = rdev-gart.num_gpu_pages * 4;
rdev-asic-gart_tlb_flush = rv370_pcie_gart_tlb_flush;
rdev-asic-gart_set_page = rv370_pcie_gart_set_page;
-   rdev-asic-gart_clear_page = rv370_pcie_gart_clear_page;
return radeon_gart_table_vram_alloc(rdev);
 }
 
@@ -131,6 +117,7 @@ int rv370_pcie_gart_enable(struct radeon_device *rdev)
r = radeon_gart_table_vram_pin(rdev);
if (r)
return r;
+   radeon_gart_restore(rdev);
/* discard memory request outside of configured range */
tmp = RADEON_PCIE_TX_GART_UNMAPPED_ACCESS_DISCARD;
WREG32_PCIE(RADEON_PCIE_TX_GART_CNTL, tmp);
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
index 05769fa..72c2648 100644
--- a/drivers/gpu/drm/radeon/r600.c
+++ b/drivers/gpu/drm/radeon/r600.c
@@ -416,6 +416,7 @@ int r600_pcie_gart_enable(struct radeon_device *rdev)
r = radeon_gart_table_vram_pin(rdev);
if (r)
return r;
+   radeon_gart_restore(rdev);
 
/* Setup L2 cache */
WREG32(VM_L2_CNTL, ENABLE_L2_CACHE | ENABLE_L2_FRAGMENT_PROCESSING |
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
index 9cb323a..d3040e2 100644
--- a/drivers/gpu/drm/radeon/radeon.h
+++ b/drivers/gpu/drm/radeon/radeon.h
@@ -726,7 +726,6 @@ struct radeon_asic {
int (*gpu_reset)(struct radeon_device *rdev);
void 

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

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





--- Comment #23 from Manuel Ullmann ullman.b...@gmx.de  2010-02-10 11:28:03 
---
Created an attachment (id=24987)
 -- (http://bugzilla.kernel.org/attachment.cgi?id=24987)
kernel 2.6.32.8 configuration file

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

--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


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

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


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

   What|Removed |Added

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




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

--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


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

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





--- Comment #14 from Andre Maasikas amaasi...@gmail.com  2010-02-10 03:25:32 
PST ---
Created an attachment (id=33209)
 -- (http://bugs.freedesktop.org/attachment.cgi?id=33209)
norm

patch to try


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

--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 26497] r600_texstate.c:1119: error: ‘__DRM_TEXTURE_FORMAT_RGBA’ undeclared

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


Rafał Miłecki zaj...@gmail.com changed:

   What|Removed |Added

 CC||david.ro...@mcgill.ca




--- Comment #1 from Rafał Miłecki zaj...@gmail.com  2010-02-10 04:03:03 PST 
---
*** Bug 26502 has been marked as a duplicate of this bug. ***


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 26502] r600_texstate.c:1119: error: '__DRM_TEXTURE_FORMAT_RGBA' undeclared

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


Rafał Miłecki zaj...@gmail.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE




--- Comment #2 from Rafał Miłecki zaj...@gmail.com  2010-02-10 04:03:03 PST 
---


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


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 26497] r600_texstate.c:1119: error: ‘__DRM_TEXTURE_FORMAT_RGBA’ undeclared

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


Rafał Miłecki zaj...@gmail.com changed:

   What|Removed |Added

 CC||wol...@onsneteindhoven.nl




--- Comment #2 from Rafał Miłecki zaj...@gmail.com  2010-02-10 04:03:16 PST 
---
*** Bug 26503 has been marked as a duplicate of this bug. ***


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


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

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





--- Comment #15 from Nils Kneuper crazy-ivano...@gmx.net  2010-02-10 04:56:56 
PST ---
(In reply to comment #14)
 Created an attachment (id=33209)
 -- (http://bugs.freedesktop.org/attachment.cgi?id=33209) [details]
 norm
 
 patch to try
 

Yes, this patch fixes the issues. Textures are not displayed correctly in
forgatto. Thanks!


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

--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 26497] r600_texstate.c:1119: error: ‘__DRM_TEXTURE_FORMAT_RGBA’ undeclared

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





--- Comment #4 from Rafał Miłecki zaj...@gmail.com  2010-02-10 05:14:56 PST 
---
commit: 3a0e4eb94cd88b130cdb4383c28be336f8d2379f

Thanks Kristian.


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


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

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





--- Comment #16 from Andrius Štikonas stiko...@gmail.com  2010-02-10 05:48:36 
PST ---
I can also confirm, that this patch fixes the textures.


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 26497] r600_texstate.c:1119: error: ‘__DRM_TEXTURE_FORMAT_RGBA’ undeclared

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


Kristian Høgsberg k...@bitplanet.net changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #3 from Kristian Høgsberg k...@bitplanet.net  2010-02-10 04:58:56 
PST ---
Argh.  Ok, fixed, thanks guys.


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: drm-radeon-testing commit 8131660130d3dc2629a150d47e6a04c8a1a6244b breaks LVDS on my PowerBook

2010-02-10 Thread Alex Deucher
2010/2/10 Michel Dänzer mic...@daenzer.net:
 On Wed, 2010-01-27 at 11:52 -0500, Alex Deucher wrote:
 2010/1/27 Michel Dänzer mic...@daenzer.net:
  On Wed, 2010-01-27 at 10:30 -0500, Alex Deucher wrote:
  2010/1/27 Michel Dänzer mic...@daenzer.net:
  
   your commit 8131660130d3dc2629a150d47e6a04c8a1a6244b ('drm/radeon/kms:
   add support for hw i2c on r1xx-r5xx') breaks LVDS on my PowerBook. It
   looks kinda like blooming, though I can actually make out a higly
   distorted part of what it's supposed to display, and there's a
   panel/backlight blinking around every second or so.
  
 
  Hmm, maybe the mac's edid is wired up such that hw i2c doesn't work or
  the prescale calculation for your system needs adjusting.  Switching
  back to sw i2c should fix it in the meantime.  Set the hw_capable bool
  in the radeon_i2c_bus_rec struct to false.
 
  Presumably that would work, as the previous commit ('drm/radeon/kms: add
  radeon i2c algo') works? [0]
 
  For the prescale:
  u32 prescale = (((rdev-clock.default_sclk * 10)/(4 * 128 * 100) + 1)
   8) + 128;
  does rdev-clock.default_sclk get initialized properly on the mac?  If
  not, you can use radeon_get_engine_clock to read back the value from
  the regs.
 
  Looks like it in /sys/kernel/debug/dri/0/radeon_pm_info:
 
  state: PM_STATE_DISABLED
  default engine clock: 445500 kHz
  current engine clock: 445500 kHz
  default memory clock: 240750 kHz
  current memory clock: 240750 kHz
 

 you could also try the prescale algo from r520:
 i2c_clock = 50;
 prescale = (127  8) + ((rdev-clock.default_sclk * 10) / (4 * 127 *
 i2c_clock));

 Sorry I didn't have time to try your suggestions. However, I'm happy to
 report that this problem is fixed in current drm-radeon-testing.

excellent.  I think it was the prescale calculation:
e6346ab00d9138f0303d79b3638bbc143266186e

Alex

--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 26515] New: Corrupt textures

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

   Summary: Corrupt textures
   Product: Mesa
   Version: 7.6
  Platform: x86-64 (AMD64)
OS/Version: Linux (All)
Status: NEW
  Severity: normal
  Priority: medium
 Component: Drivers/DRI/r300
AssignedTo: dri-devel@lists.sourceforge.net
ReportedBy: ma...@xivilization.net


Created an attachment (id=33216)
 -- (http://bugs.freedesktop.org/attachment.cgi?id=33216)
glibgl1-mesa-glx

When I start the Factor editor, I get broken textures. They seem to have some
kind of interlace effect with empty lines between them.

The program that I am running is Factor: http://factorcode.org and I am using
Debian squeeze amd64 with Mesa 7.6.1 and the Radeon driver 6.12.4 as well as
XServer-Xorg 1.7.4 (not using KMS). My video card is a Radeon Xpress 1250.

Initially, I though it is a problem with Factor itself, but after switching to
the software renderer, the textures look fine.

Attached are screenshots of both versions (broken and working).


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

--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 26515] Corrupt textures

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





--- Comment #1 from Marek Kubica ma...@xivilization.net  2010-02-10 07:19:33 
PST ---
Created an attachment (id=33217)
 -- (http://bugs.freedesktop.org/attachment.cgi?id=33217)
libgl1-mesa-swx11


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

--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: [PATCH] drm/radeon/kms: retry auxch on 0x20 timeout value.

2010-02-10 Thread Alex Deucher
On Wed, Feb 10, 2010 at 1:45 AM, Dave Airlie airl...@gmail.com wrote:
 From: Dave Airlie airl...@redhat.com

 ATOM appears to return 0x20 which seems to mean some sort of timeout.

 retry the transaction up to 10 times before failing, this
 makes DP-VGA convertor we bought work at least a bit more predictably.

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

 diff --git a/drivers/gpu/drm/radeon/atombios_dp.c 
 b/drivers/gpu/drm/radeon/atombios_dp.c
 index 0b6f2ce..a85069e 100644
 --- a/drivers/gpu/drm/radeon/atombios_dp.c
 +++ b/drivers/gpu/drm/radeon/atombios_dp.c
 @@ -336,11 +336,13 @@ bool radeon_process_aux_ch(struct radeon_i2c_chan 
 *chan, u8 *req_bytes,
        union aux_channel_transaction args;
        int index = GetIndexIntoMasterTable(COMMAND, 
 ProcessAuxChannelTransaction);
        unsigned char *base;
 +       int retry_count = 0;

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

        base = (unsigned char *)rdev-mode_info.atom_context-scratch;

 +retry:
        memcpy(base, req_bytes, num_bytes);

        args.v1.lpAuxRequest = 0;
 @@ -354,9 +356,11 @@ bool radeon_process_aux_ch(struct radeon_i2c_chan *chan, 
 u8 *req_bytes,
        atom_execute_table(rdev-mode_info.atom_context, index, (uint32_t 
 *)args);

        if (args.v1.ucReplyStatus) {
 -               DRM_DEBUG(failed to get auxch %02x%02x %02x %02x 0x%02x 
 %02x\n,
 +               if (args.v1.ucReplyStatus == 0x20  retry_count++  10)

If ucDataOutLen is 0, the ucReplyStatus codes are as follows:
0 - success
1 - timeout
2 - status flags not zero
3 - fail (no ack)

if ucDataOutLen is non-zero (reply byte count), ucReplyStatus is the
current value in the aux transaction buffer.

So, the retry logic should be something like:
if (ucDataOutLen || (ucReplyStatus != 3))
goto retry;

Alex


 +                       goto retry;
 +               DRM_DEBUG(failed to get auxch %02x%02x %02x %02x 0x%02x %02x 
 after %d\n,
                          req_bytes[1], req_bytes[0], req_bytes[2], 
 req_bytes[3],
 -                         chan-rec.i2c_id, args.v1.ucReplyStatus);
 +                         chan-rec.i2c_id, args.v1.ucReplyStatus, 
 retry_count);
                return false;
        }

 --
 1.6.5.2


 --
 SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
 Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
 http://p.sf.net/sfu/solaris-dev2dev
 --
 ___
 Dri-devel mailing list
 Dri-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/dri-devel


--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 26514] improper ENOMEM errors with Radeon 6.12.4

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


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

   What|Removed |Added

 AssignedTo|xorg-driver-...@lists.x.org |dri-
   ||de...@lists.sourceforge.net




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

--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 26514] improper ENOMEM errors with Radeon 6.12.4

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





--- Comment #2 from Alex Deucher ag...@yahoo.com  2010-02-10 08:02:15 PST ---
Does mesa 7.7 branch or git master work any better?


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

--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[PATCH] glean: Disable dithering for clipFlat.

2010-02-10 Thread Corbin Simpson
From fe9c18cb5f4417558d40be7372c8bb74b613d470 Mon Sep 17 00:00:00 2001
From: Corbin Simpson mostawesomed...@gmail.com
Date: Wed, 10 Feb 2010 10:56:56 -0800
Subject: [PATCH] glean: Disable dithering for clipFlat.

Allows r300g to handily pass.
---
 tests/glean/tclipflat.cpp |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/tests/glean/tclipflat.cpp b/tests/glean/tclipflat.cpp
index a2798c0..fe47825 100644
--- a/tests/glean/tclipflat.cpp
+++ b/tests/glean/tclipflat.cpp
@@ -188,6 +188,8 @@ ClipFlatResult::ClipFlatResult()
 void
 ClipFlatTest::setup(void)
 {
+   glDisable(GL_DITHER);
+
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(-1.25, 1.25, -1.25, 1.25, -1, 1);
-- 
1.6.6

--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[PATCH] mesa/st: Gallium quads, by spec, never change provoking vertex.

2010-02-10 Thread Corbin Simpson
From 215714d54a7f38b9add236bcc1c795e8b5d92867 Mon Sep 17 00:00:00 2001
From: Corbin Simpson mostawesomed...@gmail.com
Date: Wed, 10 Feb 2010 10:39:18 -0800
Subject: [PATCH] mesa/st: Gallium quads, by spec, never change provoking vertex.

Fixes glean/clipFlat. Softpipe might be broken; I haven't figured out
how to test it in this new API world. :T
---
 src/mesa/state_tracker/st_extensions.c |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/mesa/state_tracker/st_extensions.c
b/src/mesa/state_tracker/st_extensions.c
index d5f5854..e2d871b 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -137,6 +137,9 @@ void st_init_limits(struct st_context *st)
/* XXX separate query for early function return? */
st-ctx-Shader.EmitContReturn =
   screen-get_param(screen, PIPE_CAP_TGSI_CONT_SUPPORTED);
+
+   /* Quads always follow GL provoking rules. */
+   c-QuadsFollowProvokingVertexConvention = GL_FALSE;
 }


-- 
1.6.6

--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[PATCH] efifb: fix framebuffer handoff

2010-02-10 Thread Marcin Slusarz
Commit 4410f3910947dcea8672280b3adecd53cec4e85e
(fbdev: add support for handoff from firmware to hw framebuffers)
for unknown reason didn't add fb_destroy operation to efifb.
Fix it and change aperture_size to match size passed
to request_mem_region.

http://bugzilla.kernel.org/show_bug.cgi?id=15151

Reported-by: Alex Zhavnerchik alex.vi...@gmail.com
Tested-by: Alex Zhavnerchik alex.vi...@gmail.com
Signed-off-by: Marcin Slusarz marcin.slus...@gmail.com
---
 drivers/video/efifb.c |   11 ++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/drivers/video/efifb.c b/drivers/video/efifb.c
index eb12182..d25df51 100644
--- a/drivers/video/efifb.c
+++ b/drivers/video/efifb.c
@@ -161,8 +161,17 @@ static int efifb_setcolreg(unsigned regno, unsigned red, 
unsigned green,
return 0;
 }
 
+static void efifb_destroy(struct fb_info *info)
+{
+   if (info-screen_base)
+   iounmap(info-screen_base);
+   release_mem_region(info-aperture_base, info-aperture_size);
+   framebuffer_release(info);
+}
+
 static struct fb_ops efifb_ops = {
.owner  = THIS_MODULE,
+   .fb_destroy = efifb_destroy,
.fb_setcolreg   = efifb_setcolreg,
.fb_fillrect= cfb_fillrect,
.fb_copyarea= cfb_copyarea,
@@ -281,7 +290,7 @@ static int __init efifb_probe(struct platform_device *dev)
info-par = NULL;
 
info-aperture_base = efifb_fix.smem_start;
-   info-aperture_size = size_total;
+   info-aperture_size = size_remap;
 
info-screen_base = ioremap(efifb_fix.smem_start, efifb_fix.smem_len);
if (!info-screen_base) {
-- 
1.6.6


--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: Radeon hwmon driver

2010-02-10 Thread Domenico Andreoli
On Mon, Feb 08, 2010 at 01:32:33AM -0500, Alex Deucher wrote:
 On Sun, Feb 7, 2010 at 6:12 PM, Domenico Andreoli ca...@dandreoli.com wrote:
  Hi all,
 
   I'd like to write a hwmon driver for the Radeon GPUs. I made a quick
  search in the M56 and M76 register references on AMD's site but didn't
  find anything. I then wrote to gpudriverdevsupp...@amd.com and now I'm
  waiting for some response. In the meanwhile, has anybody of you seen
  anything related to this task while working at the graphic drivers?
 
  Supposing I will find the missing info, I see the first problem. I
  guess the hwmon registers are in the address space mapped by the DRM
  driver. Surely I could make a patch but then the radeon's hwmon support
  would depend on the DRM driver. And if one wants the hwmon support
  but doesn't want DRM? Would she need/use a different hwmon driver,
  maybe thank to some Kconfig trick? Any advice?
 
 The thermal and fan chips are generally 3rd party chips connected via
 i2c.  I think most of the chips used have hwmon drivers already.  You
 can look up the chip and i2c address in the power tables in the bios.
 See the PowerPlayInfo table definitions in atombios.h.  I've started
 work on cleaning up the radeon i2c buses for external use in the
 drm-radeon-testing branch of Dave's drm tree:
 http://git.kernel.org/?p=linux/kernel/git/airlied/drm-2.6.git;a=summary

I have a question: once the i2c cleaning is completed, every known
sensor hooked to it is available to the user-space. Would have any
sense that I worked on a hwmon wrapper in the kernel? Which duties
would still require the mighty kernel?

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

--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


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

2010-02-10 Thread Eric Anholt
On Tue,  9 Feb 2010 06:49:11 +0100, Luca Barbieri l...@luca-barbieri.com 
wrote:
 This patch introduces the drm_gem_object_unreference_unlocked
 and drm_gem_object_handle_unreference_unlocked functions that
 do not require holding struct_mutex.
 
 drm_gem_object_unreference_unlocked calls the new
 -gem_free_object_unlocked entry point if available, and
 otherwise just takes struct_mutex and just calls -gem_free_object

With the exception of adding a new unused API in the form of
gem_free_object_unlocked driver hook, I like this.


pgpWTX0zXEDW7.pgp
Description: PGP signature
--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: Radeon hwmon driver

2010-02-10 Thread Alex Deucher
On Wed, Feb 10, 2010 at 4:13 PM, Domenico Andreoli ca...@dandreoli.com wrote:
 On Mon, Feb 08, 2010 at 01:32:33AM -0500, Alex Deucher wrote:
 On Sun, Feb 7, 2010 at 6:12 PM, Domenico Andreoli ca...@dandreoli.com 
 wrote:
  Hi all,
 
   I'd like to write a hwmon driver for the Radeon GPUs. I made a quick
  search in the M56 and M76 register references on AMD's site but didn't
  find anything. I then wrote to gpudriverdevsupp...@amd.com and now I'm
  waiting for some response. In the meanwhile, has anybody of you seen
  anything related to this task while working at the graphic drivers?
 
  Supposing I will find the missing info, I see the first problem. I
  guess the hwmon registers are in the address space mapped by the DRM
  driver. Surely I could make a patch but then the radeon's hwmon support
  would depend on the DRM driver. And if one wants the hwmon support
  but doesn't want DRM? Would she need/use a different hwmon driver,
  maybe thank to some Kconfig trick? Any advice?

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

 I have a question: once the i2c cleaning is completed, every known
 sensor hooked to it is available to the user-space. Would have any
 sense that I worked on a hwmon wrapper in the kernel? Which duties
 would still require the mighty kernel?

You can just load the hwmon driver for the chip in question and
interface with it via the hwmon API.  It would just be hanging off an
i2c bus on the GPU rather than an i2c bus on the motherboard, etc.

Alex

--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[PATCH 1/2] drm/radeon: Skip dma copy test in benchmark if card doesn't have dma engine.

2010-02-10 Thread Pauli Nieminen
radeon_copy_dma is only available for r200 or newer cards.
Call to radeon_copy_dma would result to NULL pointer
dereference if benchmarking asic without dma engine.

Signed-off-by: Pauli Nieminen suok...@gmail.com
---
 drivers/gpu/drm/radeon/radeon_benchmark.c |   55 +---
 1 files changed, 33 insertions(+), 22 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_benchmark.c 
b/drivers/gpu/drm/radeon/radeon_benchmark.c
index 4ddfd4b..7932dc4 100644
--- a/drivers/gpu/drm/radeon/radeon_benchmark.c
+++ b/drivers/gpu/drm/radeon/radeon_benchmark.c
@@ -65,31 +65,42 @@ void radeon_benchmark_move(struct radeon_device *rdev, 
unsigned bsize,
if (r) {
goto out_cleanup;
}
-   start_jiffies = jiffies;
-   for (i = 0; i  n; i++) {
-   r = radeon_fence_create(rdev, fence);
-   if (r) {
-   goto out_cleanup;
+
+   /* r100 doesn't have dma engine so skip the test */
+   if (rdev-asic-copy_dma) {
+
+   start_jiffies = jiffies;
+   for (i = 0; i  n; i++) {
+   r = radeon_fence_create(rdev, fence);
+   if (r) {
+   goto out_cleanup;
+   }
+
+   r = radeon_copy_dma(rdev, saddr, daddr,
+   size / RADEON_GPU_PAGE_SIZE, fence);
+
+   if (r) {
+   goto out_cleanup;
+   }
+   r = radeon_fence_wait(fence, false);
+   if (r) {
+   goto out_cleanup;
+   }
+   radeon_fence_unref(fence);
}
-   r = radeon_copy_dma(rdev, saddr, daddr, size / 
RADEON_GPU_PAGE_SIZE, fence);
-   if (r) {
-   goto out_cleanup;
+   end_jiffies = jiffies;
+   time = end_jiffies - start_jiffies;
+   time = jiffies_to_msecs(time);
+   if (time  0) {
+   i = ((n * size)  10) / time;
+   printk(KERN_INFO radeon: dma %u bo moves of %ukb from
+%d to %d in %lums (%ukb/ms %ukb/s 
%uM/s)\n,
+   n, size  10,
+   sdomain, ddomain, time,
+   i, i * 1000, (i * 1000) / 1024);
}
-   r = radeon_fence_wait(fence, false);
-   if (r) {
-   goto out_cleanup;
-   }
-   radeon_fence_unref(fence);
-   }
-   end_jiffies = jiffies;
-   time = end_jiffies - start_jiffies;
-   time = jiffies_to_msecs(time);
-   if (time  0) {
-   i = ((n * size)  10) / time;
-   printk(KERN_INFO radeon: dma %u bo moves of %ukb from %d to %d
-   in %lums (%ukb/ms %ukb/s %uM/s)\n, n, size  10,
-  sdomain, ddomain, time, i, i * 1000, (i * 1000) / 1024);
}
+
start_jiffies = jiffies;
for (i = 0; i  n; i++) {
r = radeon_fence_create(rdev, fence);
-- 
1.6.3.3


--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[PATCH 2/2] drm/radeon: Add asic hook for dma copy to r200 cards.

2010-02-10 Thread Pauli Nieminen
r200 cards have dma engine which can be used to tranfer data
between vram and system memory.

r300 dma engine registers match r200 dma engine. Enabling
dma copy for r200 is simple as hooking r200 asic to already
existing function r300_copy_dma.

Rename r300_dma_copy to r200_dma_copyto reflect that supports
starts from r200 cards.

Signed-off-by: Pauli Nieminen suok...@gmail.com
---
 drivers/gpu/drm/radeon/r200.c  |   46 
 drivers/gpu/drm/radeon/r300.c  |   44 --
 drivers/gpu/drm/radeon/radeon_asic.h   |   18 ++--
 drivers/gpu/drm/radeon/radeon_device.c |3 ++
 4 files changed, 58 insertions(+), 53 deletions(-)

diff --git a/drivers/gpu/drm/radeon/r200.c b/drivers/gpu/drm/radeon/r200.c
index ff1e0cd..1146c99 100644
--- a/drivers/gpu/drm/radeon/r200.c
+++ b/drivers/gpu/drm/radeon/r200.c
@@ -31,6 +31,7 @@
 #include radeon_reg.h
 #include radeon.h
 
+#include r100d.h
 #include r200_reg_safe.h
 
 #include r100_track.h
@@ -79,6 +80,51 @@ static int r200_get_vtx_size_0(uint32_t vtx_fmt_0)
return vtx_size;
 }
 
+int r200_copy_dma(struct radeon_device *rdev,
+ uint64_t src_offset,
+ uint64_t dst_offset,
+ unsigned num_pages,
+ struct radeon_fence *fence)
+{
+   uint32_t size;
+   uint32_t cur_size;
+   int i, num_loops;
+   int r = 0;
+
+   /* radeon pitch is /64 */
+   size = num_pages  PAGE_SHIFT;
+   num_loops = DIV_ROUND_UP(size, 0x1F);
+   r = radeon_ring_lock(rdev, num_loops * 4 + 64);
+   if (r) {
+   DRM_ERROR(radeon: moving bo (%d).\n, r);
+   return r;
+   }
+   /* Must wait for 2D idle  clean before DMA or hangs might happen */
+   radeon_ring_write(rdev, PACKET0(RADEON_WAIT_UNTIL, 0));
+   radeon_ring_write(rdev, (1  16));
+   for (i = 0; i  num_loops; i++) {
+   cur_size = size;
+   if (cur_size  0x1F) {
+   cur_size = 0x1F;
+   }
+   size -= cur_size;
+   radeon_ring_write(rdev, PACKET0(0x720, 2));
+   radeon_ring_write(rdev, src_offset);
+   radeon_ring_write(rdev, dst_offset);
+   radeon_ring_write(rdev, cur_size | (1  31) | (1  30));
+   src_offset += cur_size;
+   dst_offset += cur_size;
+   }
+   radeon_ring_write(rdev, PACKET0(RADEON_WAIT_UNTIL, 0));
+   radeon_ring_write(rdev, RADEON_WAIT_DMA_GUI_IDLE);
+   if (fence) {
+   r = radeon_fence_emit(rdev, fence);
+   }
+   radeon_ring_unlock_commit(rdev);
+   return r;
+}
+
+
 static int r200_get_vtx_size_1(uint32_t vtx_fmt_1)
 {
int vtx_size, i, tex_size;
diff --git a/drivers/gpu/drm/radeon/r300.c b/drivers/gpu/drm/radeon/r300.c
index 43b55a0..6516cd6 100644
--- a/drivers/gpu/drm/radeon/r300.c
+++ b/drivers/gpu/drm/radeon/r300.c
@@ -198,50 +198,6 @@ void r300_fence_ring_emit(struct radeon_device *rdev,
radeon_ring_write(rdev, RADEON_SW_INT_FIRE);
 }
 
-int r300_copy_dma(struct radeon_device *rdev,
- uint64_t src_offset,
- uint64_t dst_offset,
- unsigned num_pages,
- struct radeon_fence *fence)
-{
-   uint32_t size;
-   uint32_t cur_size;
-   int i, num_loops;
-   int r = 0;
-
-   /* radeon pitch is /64 */
-   size = num_pages  PAGE_SHIFT;
-   num_loops = DIV_ROUND_UP(size, 0x1F);
-   r = radeon_ring_lock(rdev, num_loops * 4 + 64);
-   if (r) {
-   DRM_ERROR(radeon: moving bo (%d).\n, r);
-   return r;
-   }
-   /* Must wait for 2D idle  clean before DMA or hangs might happen */
-   radeon_ring_write(rdev, PACKET0(RADEON_WAIT_UNTIL, 0 ));
-   radeon_ring_write(rdev, (1  16));
-   for (i = 0; i  num_loops; i++) {
-   cur_size = size;
-   if (cur_size  0x1F) {
-   cur_size = 0x1F;
-   }
-   size -= cur_size;
-   radeon_ring_write(rdev, PACKET0(0x720, 2));
-   radeon_ring_write(rdev, src_offset);
-   radeon_ring_write(rdev, dst_offset);
-   radeon_ring_write(rdev, cur_size | (1  31) | (1  30));
-   src_offset += cur_size;
-   dst_offset += cur_size;
-   }
-   radeon_ring_write(rdev, PACKET0(RADEON_WAIT_UNTIL, 0));
-   radeon_ring_write(rdev, RADEON_WAIT_DMA_GUI_IDLE);
-   if (fence) {
-   r = radeon_fence_emit(rdev, fence);
-   }
-   radeon_ring_unlock_commit(rdev);
-   return r;
-}
-
 void r300_ring_start(struct radeon_device *rdev)
 {
unsigned gb_tile_config;
diff --git a/drivers/gpu/drm/radeon/radeon_asic.h 
b/drivers/gpu/drm/radeon/radeon_asic.h
index 05ee1ae..0489ef8 100644
--- a/drivers/gpu/drm/radeon/radeon_asic.h
+++ b/drivers/gpu/drm/radeon/radeon_asic.h
@@ -138,7 

Re: Radeon hwmon driver

2010-02-10 Thread Luca Tettamanti
On Mon, Feb 8, 2010 at 7:32 AM, Alex Deucher alexdeuc...@gmail.com wrote:
 On Sun, Feb 7, 2010 at 6:12 PM, Domenico Andreoli ca...@dandreoli.com wrote:
 Hi all,

  I'd like to write a hwmon driver for the Radeon GPUs. I made a quick
 search in the M56 and M76 register references on AMD's site but didn't
 find anything. I then wrote to gpudriverdevsupp...@amd.com and now I'm
 waiting for some response. In the meanwhile, has anybody of you seen
 anything related to this task while working at the graphic drivers?

 The thermal and fan chips are generally 3rd party chips connected via
 i2c.

Hi Alex,
AMD GPU clock tool also reports an Internal TSS, do you have clue on this one?

Luca

--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[PATCH] drm/radeon/kms: Fix for CS track check to allow at least one enabled component

2010-02-10 Thread Oldřich Jedlička
The current code causes failing of rendering (discovered on my KDE
4.4, mesa git master, xorg-video-ati git master) with message:

r600_cs_track_check:252 mask 0x000F | 0x no cb for 1

The problem is in the check of at least one component is enabled in
r600_cs_track_check() - it finds the first component and does not check
the rest. My patch fixes this by introducing is_valid local variable
and checking all enabled components. The check returns failure only
when there is really no component enabled.

Signed-off-by: Oldřich Jedlička oldium@seznam.cz
---
 drivers/gpu/drm/radeon/r600_cs.c |   20 
 1 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/radeon/r600_cs.c 
b/drivers/gpu/drm/radeon/r600_cs.c
index 7cabb62..f1dab96 100644
--- a/drivers/gpu/drm/radeon/r600_cs.c
+++ b/drivers/gpu/drm/radeon/r600_cs.c
@@ -233,6 +233,7 @@ static int r600_cs_track_check(struct radeon_cs_parser *p)
struct r600_cs_track *track = p-track;
u32 tmp;
int r, i;
+   bool is_valid = false;
 
/* on legacy kernel we don't perform advanced check */
if (p-rdev == NULL)
@@ -247,17 +248,20 @@ static int r600_cs_track_check(struct radeon_cs_parser 
*p)
for (i = 0; i  8; i++) {
if ((tmp  (i * 4))  0xF) {
/* at least one component is enabled */
-   if (track-cb_color_bo[i] == NULL) {
-   dev_warn(p-dev, %s:%d mask 0x%08X | 0x%08X no 
cb for %d\n,
-   __func__, __LINE__, 
track-cb_target_mask, track-
cb_shader_mask, i);
-   return -EINVAL;
+   if (track-cb_color_bo[i] != NULL) {
+   /* perform rewrite of CB_COLOR[0-7]_SIZE */
+   r = r600_cs_track_validate_cb(p, i);
+   if (r)
+   return r;
+   is_valid = true;
}
-   /* perform rewrite of CB_COLOR[0-7]_SIZE */
-   r = r600_cs_track_validate_cb(p, i);
-   if (r)
-   return r;
}
}
+   if (!is_valid) {
+   dev_warn(p-dev, %s:%d mask 0x%08X | 0x%08X no cb found\n,
+   __func__, __LINE__, track-cb_target_mask, 
track-cb_shader_mask);
+   return -EINVAL;
+   }
return 0;
 }
 
-- 
1.6.6.1


--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: Radeon hwmon driver

2010-02-10 Thread Alex Deucher
On Wed, Feb 10, 2010 at 5:34 PM, Luca Tettamanti kronos...@gmail.com wrote:
 On Mon, Feb 8, 2010 at 7:32 AM, Alex Deucher alexdeuc...@gmail.com wrote:
 On Sun, Feb 7, 2010 at 6:12 PM, Domenico Andreoli ca...@dandreoli.com 
 wrote:
 Hi all,

  I'd like to write a hwmon driver for the Radeon GPUs. I made a quick
 search in the M56 and M76 register references on AMD's site but didn't
 find anything. I then wrote to gpudriverdevsupp...@amd.com and now I'm
 waiting for some response. In the meanwhile, has anybody of you seen
 anything related to this task while working at the graphic drivers?

 The thermal and fan chips are generally 3rd party chips connected via
 i2c.

 Hi Alex,
 AMD GPU clock tool also reports an Internal TSS, do you have clue on this 
 one?

R6xx+ have an internal temperature sensor.  It's up to the oem as to
whether they use this or an external chip.  I haven't had time to dig
up the documentation on that yet.

Alex

--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: [PATCH] drm/radeon/kms: Fix for CS track check to allow at least one enabled component

2010-02-10 Thread Oldřich Jedlička
This patch (sent originally to xorg-driver-ati mailing list 4 days ago) fixes 
problem introduced by Jerome's patch for command stream checking for r600/r700 
(sent few minutes ago). My patch should be applied after his one.

Cheers,
Oldřich.

On Wednesday 10 of February 2010 at 23:36:12, Oldřich Jedlička wrote:
 The current code causes failing of rendering (discovered on my KDE
 4.4, mesa git master, xorg-video-ati git master) with message:
 
 r600_cs_track_check:252 mask 0x000F | 0x no cb for 1
 
 The problem is in the check of at least one component is enabled in
 r600_cs_track_check() - it finds the first component and does not check
 the rest. My patch fixes this by introducing is_valid local variable
 and checking all enabled components. The check returns failure only
 when there is really no component enabled.
 
 Signed-off-by: Oldřich Jedlička oldium@seznam.cz
 ---
  drivers/gpu/drm/radeon/r600_cs.c |   20 
  1 files changed, 12 insertions(+), 8 deletions(-)
 
 diff --git a/drivers/gpu/drm/radeon/r600_cs.c
 b/drivers/gpu/drm/radeon/r600_cs.c
 index 7cabb62..f1dab96 100644
 --- a/drivers/gpu/drm/radeon/r600_cs.c
 +++ b/drivers/gpu/drm/radeon/r600_cs.c
 @@ -233,6 +233,7 @@ static int r600_cs_track_check(struct radeon_cs_parser
 *p) struct r600_cs_track *track = p-track;
   u32 tmp;
   int r, i;
 + bool is_valid = false;
 
   /* on legacy kernel we don't perform advanced check */
   if (p-rdev == NULL)
 @@ -247,17 +248,20 @@ static int r600_cs_track_check(struct
 radeon_cs_parser *p)
   for (i = 0; i  8; i++) {
   if ((tmp  (i * 4))  0xF) {
   /* at least one component is enabled */
 - if (track-cb_color_bo[i] == NULL) {
 - dev_warn(p-dev, %s:%d mask 0x%08X | 0x%08X no 
 cb for %d\n,
 - __func__, __LINE__, 
 track-cb_target_mask, track-
 
 cb_shader_mask, i);
 
 - return -EINVAL;
 + if (track-cb_color_bo[i] != NULL) {
 + /* perform rewrite of CB_COLOR[0-7]_SIZE */
 + r = r600_cs_track_validate_cb(p, i);
 + if (r)
 + return r;
 + is_valid = true;
   }
 - /* perform rewrite of CB_COLOR[0-7]_SIZE */
 - r = r600_cs_track_validate_cb(p, i);
 - if (r)
 - return r;
   }
   }
 + if (!is_valid) {
 + dev_warn(p-dev, %s:%d mask 0x%08X | 0x%08X no cb found\n,
 + __func__, __LINE__, track-cb_target_mask, track-
cb_shader_mask);
 + return -EINVAL;
 + }
   return 0;
  }

--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[PATCH v2] drm/radeon/kms: Fix for CS track check to allow at least one enabled component

2010-02-10 Thread Oldřich Jedlička
The current code causes failing of rendering (discovered on my KDE
4.4) with message:

r600_cs_track_check:252 mask 0x000F | 0x no cb for 1

The problem is in the check of at least one component is enabled in
r600_cs_track_check() - it finds the first component and does not check
the rest. My patch fixes this by introducing is_valid local variable
and checking all enabled components. The check returns failure only
when there is really no component enabled.

Signed-off-by: Oldřich Jedlička oldium@seznam.cz
---
 drivers/gpu/drm/radeon/r600_cs.c |   20 
 1 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/radeon/r600_cs.c b/drivers/gpu/drm/radeon/r600_cs.c
index 7cabb62..f1dab96 100644
--- a/drivers/gpu/drm/radeon/r600_cs.c
+++ b/drivers/gpu/drm/radeon/r600_cs.c
@@ -233,6 +233,7 @@ static int r600_cs_track_check(struct radeon_cs_parser *p)
struct r600_cs_track *track = p-track;
u32 tmp;
int r, i;
+   bool is_valid = false;
 
/* on legacy kernel we don't perform advanced check */
if (p-rdev == NULL)
@@ -247,17 +248,20 @@ static int r600_cs_track_check(struct radeon_cs_parser *p)
for (i = 0; i  8; i++) {
if ((tmp  (i * 4))  0xF) {
/* at least one component is enabled */
-   if (track-cb_color_bo[i] == NULL) {
-   dev_warn(p-dev, %s:%d mask 0x%08X | 0x%08X no 
cb for %d\n,
-   __func__, __LINE__, 
track-cb_target_mask, track-cb_shader_mask, i);
-   return -EINVAL;
+   if (track-cb_color_bo[i] != NULL) {
+   /* perform rewrite of CB_COLOR[0-7]_SIZE */
+   r = r600_cs_track_validate_cb(p, i);
+   if (r)
+   return r;
+   is_valid = true;
}
-   /* perform rewrite of CB_COLOR[0-7]_SIZE */
-   r = r600_cs_track_validate_cb(p, i);
-   if (r)
-   return r;
}
}
+   if (!is_valid) {
+   dev_warn(p-dev, %s:%d mask 0x%08X | 0x%08X no cb found\n,
+   __func__, __LINE__, track-cb_target_mask, 
track-cb_shader_mask);
+   return -EINVAL;
+   }
return 0;
 }
 
-- 
1.6.6.1


--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: [PATCH] drm/radeon/kms: Fix for CS track check to allow at least one enabled component

2010-02-10 Thread Jerome Glisse
On Wed, Feb 10, 2010 at 11:36:12PM +0100, Oldřich Jedlička wrote:
 The current code causes failing of rendering (discovered on my KDE
 4.4, mesa git master, xorg-video-ati git master) with message:
 
 r600_cs_track_check:252 mask 0x000F | 0x no cb for 1
 
 The problem is in the check of at least one component is enabled in
 r600_cs_track_check() - it finds the first component and does not check
 the rest. My patch fixes this by introducing is_valid local variable
 and checking all enabled components. The check returns failure only
 when there is really no component enabled.
 
 Signed-off-by: Oldřich Jedlička oldium@seznam.cz

Already fixed in the newer version, also your patch defeated the
purpose of the checker. To work around this i only trust cb_target_mask.
Thanks for reporting this issue.

Cheers,
Jerome

--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: [PATCH] glean: Disable dithering for clipFlat.

2010-02-10 Thread Brian Paul
Corbin Simpson wrote:
From fe9c18cb5f4417558d40be7372c8bb74b613d470 Mon Sep 17 00:00:00 2001
 From: Corbin Simpson mostawesomed...@gmail.com
 Date: Wed, 10 Feb 2010 10:56:56 -0800
 Subject: [PATCH] glean: Disable dithering for clipFlat.
 
 Allows r300g to handily pass.

Applied upstream to Glean. Thanks.

-Brian


--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: [PATCH 2/2] drm/radeon: Add asic hook for dma copy to r200 cards.

2010-02-10 Thread Maarten Maathuis
What happens if you have two cards, one RS200 and one RV280 (just an
example). I think you shouldn't change values in a static struct.

On Wed, Feb 10, 2010 at 11:10 PM, Pauli Nieminen suok...@gmail.com wrote:
 r200 cards have dma engine which can be used to tranfer data
 between vram and system memory.

 r300 dma engine registers match r200 dma engine. Enabling
 dma copy for r200 is simple as hooking r200 asic to already
 existing function r300_copy_dma.

 Rename r300_dma_copy to r200_dma_copyto reflect that supports
 starts from r200 cards.

 Signed-off-by: Pauli Nieminen suok...@gmail.com
 ---
  drivers/gpu/drm/radeon/r200.c          |   46 
 
  drivers/gpu/drm/radeon/r300.c          |   44 --
  drivers/gpu/drm/radeon/radeon_asic.h   |   18 ++--
  drivers/gpu/drm/radeon/radeon_device.c |    3 ++
  4 files changed, 58 insertions(+), 53 deletions(-)

 diff --git a/drivers/gpu/drm/radeon/r200.c b/drivers/gpu/drm/radeon/r200.c
 index ff1e0cd..1146c99 100644
 --- a/drivers/gpu/drm/radeon/r200.c
 +++ b/drivers/gpu/drm/radeon/r200.c
 @@ -31,6 +31,7 @@
  #include radeon_reg.h
  #include radeon.h

 +#include r100d.h
  #include r200_reg_safe.h

  #include r100_track.h
 @@ -79,6 +80,51 @@ static int r200_get_vtx_size_0(uint32_t vtx_fmt_0)
        return vtx_size;
  }

 +int r200_copy_dma(struct radeon_device *rdev,
 +                 uint64_t src_offset,
 +                 uint64_t dst_offset,
 +                 unsigned num_pages,
 +                 struct radeon_fence *fence)
 +{
 +       uint32_t size;
 +       uint32_t cur_size;
 +       int i, num_loops;
 +       int r = 0;
 +
 +       /* radeon pitch is /64 */
 +       size = num_pages  PAGE_SHIFT;
 +       num_loops = DIV_ROUND_UP(size, 0x1F);
 +       r = radeon_ring_lock(rdev, num_loops * 4 + 64);
 +       if (r) {
 +               DRM_ERROR(radeon: moving bo (%d).\n, r);
 +               return r;
 +       }
 +       /* Must wait for 2D idle  clean before DMA or hangs might happen */
 +       radeon_ring_write(rdev, PACKET0(RADEON_WAIT_UNTIL, 0));
 +       radeon_ring_write(rdev, (1  16));
 +       for (i = 0; i  num_loops; i++) {
 +               cur_size = size;
 +               if (cur_size  0x1F) {
 +                       cur_size = 0x1F;
 +               }
 +               size -= cur_size;
 +               radeon_ring_write(rdev, PACKET0(0x720, 2));
 +               radeon_ring_write(rdev, src_offset);
 +               radeon_ring_write(rdev, dst_offset);
 +               radeon_ring_write(rdev, cur_size | (1  31) | (1  30));
 +               src_offset += cur_size;
 +               dst_offset += cur_size;
 +       }
 +       radeon_ring_write(rdev, PACKET0(RADEON_WAIT_UNTIL, 0));
 +       radeon_ring_write(rdev, RADEON_WAIT_DMA_GUI_IDLE);
 +       if (fence) {
 +               r = radeon_fence_emit(rdev, fence);
 +       }
 +       radeon_ring_unlock_commit(rdev);
 +       return r;
 +}
 +
 +
  static int r200_get_vtx_size_1(uint32_t vtx_fmt_1)
  {
        int vtx_size, i, tex_size;
 diff --git a/drivers/gpu/drm/radeon/r300.c b/drivers/gpu/drm/radeon/r300.c
 index 43b55a0..6516cd6 100644
 --- a/drivers/gpu/drm/radeon/r300.c
 +++ b/drivers/gpu/drm/radeon/r300.c
 @@ -198,50 +198,6 @@ void r300_fence_ring_emit(struct radeon_device *rdev,
        radeon_ring_write(rdev, RADEON_SW_INT_FIRE);
  }

 -int r300_copy_dma(struct radeon_device *rdev,
 -                 uint64_t src_offset,
 -                 uint64_t dst_offset,
 -                 unsigned num_pages,
 -                 struct radeon_fence *fence)
 -{
 -       uint32_t size;
 -       uint32_t cur_size;
 -       int i, num_loops;
 -       int r = 0;
 -
 -       /* radeon pitch is /64 */
 -       size = num_pages  PAGE_SHIFT;
 -       num_loops = DIV_ROUND_UP(size, 0x1F);
 -       r = radeon_ring_lock(rdev, num_loops * 4 + 64);
 -       if (r) {
 -               DRM_ERROR(radeon: moving bo (%d).\n, r);
 -               return r;
 -       }
 -       /* Must wait for 2D idle  clean before DMA or hangs might happen */
 -       radeon_ring_write(rdev, PACKET0(RADEON_WAIT_UNTIL, 0 ));
 -       radeon_ring_write(rdev, (1  16));
 -       for (i = 0; i  num_loops; i++) {
 -               cur_size = size;
 -               if (cur_size  0x1F) {
 -                       cur_size = 0x1F;
 -               }
 -               size -= cur_size;
 -               radeon_ring_write(rdev, PACKET0(0x720, 2));
 -               radeon_ring_write(rdev, src_offset);
 -               radeon_ring_write(rdev, dst_offset);
 -               radeon_ring_write(rdev, cur_size | (1  31) | (1  30));
 -               src_offset += cur_size;
 -               dst_offset += cur_size;
 -       }
 -       radeon_ring_write(rdev, PACKET0(RADEON_WAIT_UNTIL, 0));
 -       radeon_ring_write(rdev, RADEON_WAIT_DMA_GUI_IDLE);
 -       if (fence) {
 -               r = radeon_fence_emit(rdev, fence);
 -       }
 -       

[PATCH] drm/radeon/kms: remove HDP flushes from fence emit

2010-02-10 Thread Alex Deucher
From 760d0f9ad3cf010ccb628e7107d52ce391d15644 Mon Sep 17 00:00:00 2001
From: Alex Deucher alexdeuc...@gmail.com
Date: Wed, 10 Feb 2010 18:21:49 -0500
Subject: [PATCH] drm/radeon/kms: remove HDP flushes from fence emit

r600_ioctl_wait_idle() now handles this.

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

diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
index 05769fa..1ecca29 100644
--- a/drivers/gpu/drm/radeon/r600.c
+++ b/drivers/gpu/drm/radeon/r600.c
@@ -1794,8 +1794,6 @@ void r600_fence_ring_emit(struct radeon_device *rdev,
radeon_ring_write(rdev, PACKET3(PACKET3_SET_CONFIG_REG, 1));
radeon_ring_write(rdev, ((rdev-fence_drv.scratch_reg -
PACKET3_SET_CONFIG_REG_OFFSET)  2));
radeon_ring_write(rdev, fence-seq);
-   radeon_ring_write(rdev, PACKET0(R_005480_HDP_MEM_COHERENCY_FLUSH_CNTL, 
0));
-   radeon_ring_write(rdev, 1);
/* CP_INTERRUPT packet 3 no longer exists, use packet 0 */
radeon_ring_write(rdev, PACKET0(CP_INT_STATUS, 0));
radeon_ring_write(rdev, RB_INT_STAT);
-- 
1.5.6.3


0001-drm-radeon-kms-remove-HDP-flushes-from-fence-emit.patch
Description: application/mbox
--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[PATCH] drm/radeon/kms: fix gart set/clear page on r6xx/r7xx

2010-02-10 Thread Alex Deucher
From 18b56fe95eda19b7e68a6c656570a7db3e34bb2f Mon Sep 17 00:00:00 2001
From: Alex Deucher alexdeuc...@gmail.com
Date: Wed, 10 Feb 2010 18:42:03 -0500
Subject: [PATCH] drm/radeon/kms: fix gart set/clear page on r6xx/r7xx

While working on evergreen gart support, I noticed
that tcore flushes the VM TLBs and the HDP cache
when it updates page table entries.  This makes
sense and should be done to make sure the updated
entries hit memory.  Add r600 set/clear page hooks
for r6xx/r7xx and use them instead of the rs600
version.

Signed-off-by: Alex Deucher alexdeuc...@gmail.com
---
 drivers/gpu/drm/radeon/r600.c|   35 ++
 drivers/gpu/drm/radeon/radeon.h  |1 -
 drivers/gpu/drm/radeon/radeon_asic.h |   10 +---
 3 files changed, 41 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
index 1ecca29..213780b 100644
--- a/drivers/gpu/drm/radeon/r600.c
+++ b/drivers/gpu/drm/radeon/r600.c
@@ -353,6 +353,33 @@ void r600_hpd_fini(struct radeon_device *rdev)
 /*
  * R600 PCIE GART
  */
+#define R600_PTE_VALID (1  0)
+#define R600_PTE_SYSTEM(1  1)
+#define R600_PTE_SNOOPED   (1  2)
+#define R600_PTE_READABLE  (1  5)
+#define R600_PTE_WRITEABLE (1  6)
+
+int r600_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr)
+{
+   void __iomem *ptr = (void *)rdev-gart.table.vram.ptr;
+
+   if (i  0 || i  rdev-gart.num_gpu_pages)
+   return -EINVAL;
+
+   /* Flush VM TLBs, L2 */
+   WREG32(VM_L2_CNTL2, INVALIDATE_ALL_L1_TLBS | INVALIDATE_L2_CACHE);
+
+   addr = addr  0xF000ULL;
+   addr |= R600_PTE_VALID | R600_PTE_SYSTEM | R600_PTE_SNOOPED;
+   addr |= R600_PTE_READABLE | R600_PTE_WRITEABLE;
+   writeq(addr, ((void __iomem *)ptr) + (i * 8));
+
+   /* flush hdp cache so updates hit vram */
+   WREG32(R_005480_HDP_MEM_COHERENCY_FLUSH_CNTL, 0x1);
+
+   return 0;
+}
+
 int r600_gart_clear_page(struct radeon_device *rdev, int i)
 {
void __iomem *ptr = (void *)rdev-gart.table.vram.ptr;
@@ -360,8 +387,16 @@ int r600_gart_clear_page(struct radeon_device *rdev, int i)

if (i  0 || i  rdev-gart.num_gpu_pages)
return -EINVAL;
+
+   /* Flush VM TLBs, L2 */
+   WREG32(VM_L2_CNTL2, INVALIDATE_ALL_L1_TLBS | INVALIDATE_L2_CACHE);
+
pte = 0;
writeq(pte, ((void __iomem *)ptr) + (i * 8));
+
+   /* flush hdp cache so updates hit vram */
+   WREG32(R_005480_HDP_MEM_COHERENCY_FLUSH_CNTL, 0x1);
+
return 0;
 }

diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
index 9cb323a..30903f3 100644
--- a/drivers/gpu/drm/radeon/radeon.h
+++ b/drivers/gpu/drm/radeon/radeon.h
@@ -1266,7 +1266,6 @@ extern void r600_ring_init(struct radeon_device
*rdev, unsigned ring_size);
 extern int r600_cp_resume(struct radeon_device *rdev);
 extern void r600_cp_fini(struct radeon_device *rdev);
 extern int r600_count_pipe_bits(uint32_t val);
-extern int r600_gart_clear_page(struct radeon_device *rdev, int i);
 extern int r600_mc_wait_for_idle(struct radeon_device *rdev);
 extern int r600_pcie_gart_init(struct radeon_device *rdev);
 extern void r600_pcie_gart_tlb_flush(struct radeon_device *rdev);
diff --git a/drivers/gpu/drm/radeon/radeon_asic.h
b/drivers/gpu/drm/radeon/radeon_asic.h
index 6367946..8e1938a 100644
--- a/drivers/gpu/drm/radeon/radeon_asic.h
+++ b/drivers/gpu/drm/radeon/radeon_asic.h
@@ -506,6 +506,8 @@ int r600_wb_init(struct radeon_device *rdev);
 void r600_wb_fini(struct radeon_device *rdev);
 void r600_cp_commit(struct radeon_device *rdev);
 void r600_pcie_gart_tlb_flush(struct radeon_device *rdev);
+int r600_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr);
+int r600_gart_clear_page(struct radeon_device *rdev, int i);
 uint32_t r600_pciep_rreg(struct radeon_device *rdev, uint32_t reg);
 void r600_pciep_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v);
 int r600_cs_parse(struct radeon_cs_parser *p);
@@ -544,8 +546,8 @@ static struct radeon_asic r600_asic = {
.vga_set_state = r600_vga_set_state,
.gpu_reset = r600_gpu_reset,
.gart_tlb_flush = r600_pcie_gart_tlb_flush,
-   .gart_set_page = rs600_gart_set_page,
-   .gart_clear_page = rs600_gart_clear_page,
+   .gart_set_page = r600_gart_set_page,
+   .gart_clear_page = r600_gart_clear_page,
.ring_test = r600_ring_test,
.ring_ib_execute = r600_ring_ib_execute,
.irq_set = r600_irq_set,
@@ -591,8 +593,8 @@ static struct radeon_asic rv770_asic = {
.gpu_reset = rv770_gpu_reset,
.vga_set_state = r600_vga_set_state,
.gart_tlb_flush = r600_pcie_gart_tlb_flush,
-   .gart_set_page = rs600_gart_set_page,
-   .gart_clear_page = rs600_gart_clear_page,
+   .gart_set_page = r600_gart_set_page,
+   .gart_clear_page = r600_gart_clear_page,
.ring_test = r600_ring_test,
.ring_ib_execute = 

[Bug 26496] OpenGL does not work on Radeon 9600 (r300)

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


Benjamin Berg benja...@sipsolutions.net changed:

   What|Removed |Added

Version|unspecified |7.6




--- Comment #3 from Benjamin Berg benja...@sipsolutions.net  2010-02-10 
16:55:33 PST ---
Mesa is at version 7.6.1 it seems. (I did not explicitly mention it, but it
works fine without DRI.)

libgl1-mesa-dri  7.6.1-1


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

--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


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

2010-02-10 Thread Eric Anholt
On Sun, 7 Feb 2010 21:48:24 +0100, Rafael J. Wysocki r...@sisk.pl wrote:
 On Thursday 04 February 2010, Zhenyu Wang wrote:
  On 2010.02.03 23:44:41 +0100, Rafael J. Wysocki wrote:
   On Wednesday 03 February 2010, Alan Jenkins wrote:
Hi

I found this regression on my EeePC 701 with modesetting enabled.  When 
I hibernate using s2disk, I can abort the hibernation by pressing the 
backspace key.  Doing so breaks X on 2.6.32-rc6 (but not 2.6.32).
   
   Yeah.
   
   To be honest, I knew that's going to happen, but didn't have the time to 
   take
   care of it.
   
   The problem is that i915 does literally _nothing_ in its .thaw() callback,
   although it should at least reverse whatever .freeze() did to the hardware
   (and memory allocations and so on), so that the adapter is functional
   after creating the image.
   
   Fixing this requires some thought, though, because at the moment .freeze()
   thinks it's .suspend(), which is not the case as this report clearly 
   shows.
   So, in fact i915_pci_suspend() has to be split into the .freeze() part and
   the poweroff part cleanly and that's not  so simple (at least to me).
   
  
  Right, I think that'll be more clean, stuff in i915_save/restore_state() 
  need
  to be splited too, especially isolate stuff for mode setting and other 
  device
  state, as what my original purpose for this is to remove extra mode setting 
  cycle in old behavior so not waste time for hibernate.
 
 We can't really do that, because we'll need to restore the saved state at the
 resume-from-hibernation stage.
 
 The appended patch fixes the issue for me, although it's been only tested
 a little.  It sort of defeats the purpose of commit
 cbda12d77ea590082edb6d30bd342a67ebc459e0, but I don't see any less invasive
 way to fix this except maybe for reverting that commit entirely.
 
 Note that the drm_irq_[un]install() thing may be unnecessary, but I wasn't 
 sure
 about that and surely wouldn't suggest doing that for 2.6.33.  Also it looks 
 like
 some things from the freeze and thaw parts may be moved to the low-level
 suspend and resume parts, respectively, but that would require some
 i915_gem_* surgery I was too scared to do.
 
 Alan, please test, i915 guys, please review.
 
 Rafael

Applied to for-linus.  Thanks!


pgpya6h1omM6W.pgp
Description: PGP signature
--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


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

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





--- Comment #17 from Ignacio R. Morelle shad...@wesnoth.org  2010-02-10 
18:17:27 PST ---
(In reply to comment #14)
 Created an attachment (id=33209)
 -- (http://bugs.freedesktop.org/attachment.cgi?id=33209) [details]
 norm
 
 patch to try
 

The patch solves the problem here with a Radeon HD 3200 (RS780M/RS780MN)
controller on Debian Squeeze (amd64, custom Linux 2.6.32.5 build, no KMS,
latest radeon ddx and libdrm from the git repos). All textures were previously
missing with the same latest build of the application, using both Mesa 7.7 and
later HEAD from the git master (before applying the patch, that is).


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

--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[PATCH] drm/radeon/kms/atom: use get_unaligned() for ctx-ps

2010-02-10 Thread Matt Turner
Noticed on a DEC Alpha.

Start up into console mode caused 15 unaligned accesses, and starting X
caused another 48.

Signed-off-by: Matt Turner matts...@gmail.com
CC: Jerome Glisse jgli...@redhat.com
CC: Alex Deucher alexdeuc...@gmail.com
CC: Dave Airlie airl...@redhat.com
---
 drivers/gpu/drm/radeon/atom.c |5 -
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/radeon/atom.c b/drivers/gpu/drm/radeon/atom.c
index bd0c843..c1d3c24 100644
--- a/drivers/gpu/drm/radeon/atom.c
+++ b/drivers/gpu/drm/radeon/atom.c
@@ -24,6 +24,7 @@
 
 #include linux/module.h
 #include linux/sched.h
+#include asm/unaligned.h
 
 #define ATOM_DEBUG
 
@@ -212,7 +213,9 @@ static uint32_t atom_get_src_int(atom_exec_context *ctx, 
uint8_t attr,
case ATOM_ARG_PS:
idx = U8(*ptr);
(*ptr)++;
-   val = le32_to_cpu(ctx-ps[idx]);
+   /* get_unaligned avoids unaligned accesses from atombios tables
+* 21, 24, 42. */
+   val = le32_to_cpu(get_unaligned((u32 *)ctx-ps[idx]));
if (print)
DEBUG(PS[0x%02X,0x%04X], idx, val);
break;
-- 
1.6.5.3


--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: [PATCH] drm/radeon/kms/atom: use get_unaligned() for ctx-ps

2010-02-10 Thread Matt Turner
Updated patch to use get_unaligned_le32, as suggested by Dave.

On Wed, Feb 10, 2010 at 10:56 PM, Matt Turner matts...@gmail.com wrote:
 Noticed on a DEC Alpha.

 Start up into console mode caused 15 unaligned accesses, and starting X
 caused another 48.

 Signed-off-by: Matt Turner matts...@gmail.com
 CC: Jerome Glisse jgli...@redhat.com
 CC: Alex Deucher alexdeuc...@gmail.com
 CC: Dave Airlie airl...@redhat.com
 ---
  drivers/gpu/drm/radeon/atom.c |    5 -
  1 files changed, 4 insertions(+), 1 deletions(-)

 diff --git a/drivers/gpu/drm/radeon/atom.c b/drivers/gpu/drm/radeon/atom.c
 index bd0c843..c1d3c24 100644
 --- a/drivers/gpu/drm/radeon/atom.c
 +++ b/drivers/gpu/drm/radeon/atom.c
 @@ -24,6 +24,7 @@

  #include linux/module.h
  #include linux/sched.h
 +#include asm/unaligned.h

  #define ATOM_DEBUG

 @@ -212,7 +213,9 @@ static uint32_t atom_get_src_int(atom_exec_context *ctx, 
 uint8_t attr,
        case ATOM_ARG_PS:
                idx = U8(*ptr);
                (*ptr)++;
 -               val = le32_to_cpu(ctx-ps[idx]);
 +               /* get_unaligned avoids unaligned accesses from atombios 
 tables
 +                * 21, 24, 42. */
 +               val = le32_to_cpu(get_unaligned((u32 *)ctx-ps[idx]));
                if (print)
                        DEBUG(PS[0x%02X,0x%04X], idx, val);
                break;
 --
 1.6.5.3




0001-drm-radeon-kms-atom-use-get_unaligned_le32-for-ctx-p.patch
Description: Binary data
--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[git pull] drm

2010-02-10 Thread Dave Airlie

Hi Linus,

vmware + nouveau staging fixes are the bulk of this.

one vgaarb patch that I found in mmtom but can't find in my inbox for some 
reason ah well better late than never.

radeon: fix the Kconfig msg to be more explicit, and some oops crashers
in the presence of bad bioses, along with a get rid of stupid white 
borders on fbcon patch.

The following changes since commit e28cab42f384745c8a947a9ccd51e4aae52f5d51:
  Linus Torvalds (1):
Merge branch 'i2c-for-linus' of 
git://git.kernel.org/.../jdelvare/staging

are available in the git repository at:

  ssh://master.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6.git drm-linus

Andy Getzendanner (1):
  vgaarb: fix incorrect dereference of userspace pointer.

Ben Skeggs (5):
  drm/nouveau: fix non-vram notifier blocks
  drm/nv40: make INIT_COMPUTE_MEM a NOP, just like nv50
  drm/nouveau: make dp auxch xfer len check for reads only
  drm/nv50: prevent multiple init tables being parsed at the same time
  drm/nv50: disregard dac outputs in nv50_sor_dpms()

Dave Airlie (7):
  drm/radeon/kms: change Kconfig text to reflect the new option.
  drm/radeon/kms: don't crash if no DDC bus on VGA/DVI connector.
  drm/radeon/kms: add quirk for VGA without DDC on rv730 XFX card.
  drm/radeon/kms: fix screen clearing before fbcon.
  Merge remote branch 'nouveau/for-airlied' of nouveau-2.6
  drm/radeon/kms: retry auxch on 0x20 timeout value.
  Merge branch 'drm-radeon-linus' of ../drm-next

Francisco Jerez (1):
  drm/nouveau: Fixup semaphores on pre-nv50 cards.

Jakob Bornecrantz (2):
  drm/vmwgfx: Report propper framebuffer_{max|min}_{width|height}
  drm/vmwgfx: Drop scanout flag compat and add execbuf ioctl parameter 
members. Bumps major.

Julia Lawall (1):
  drivers/gpu/drm/nouveau/nouveau_grctx.c: correct NULL test

Luca Barbieri (1):
  drm/nouveau: call ttm_bo_wait with the bo lock held to prevent hang

Maarten Maathuis (4):
  drm/nv50: align size of buffer object to the right boundaries.
  drm/nv50: avoid unloading pgraph context when ctxprog is running
  drm/nv50: delete ramfc object after disabling fifo, not before
  drm/nv50: make the pgraph irq handler loop like the pre-nv50 version

Marcin Kościelnicki (4):
  drm/nouveau: Add module options to disable acceleration.
  drm/nouveau: Add getparam to get available PGRAPH units.
  drm/nouveau: Fix fbcon on mixed pre-NV50 + NV50 multicard.
  drm/nouveau: Add proper vgaarb support.

Marcin Slusarz (1):
  drm/nouveau: move dereferences after null checks

Matthew Garrett (1):
  nouveau: fix state detection with switchable graphics

Pauli Nieminen (1):
  drm/radeon: Skip dma copy test in benchmark if card doesn't have dma 
engine.

Rafał Miłecki (1):
  drm/radeon/kms: suspend and resume audio stuff

Thomas Hellstrom (2):
  drm/vmwgfx: Update the user-space interface.
  drm/vmwgfx: Fix a circular locking dependency bug.

 drivers/gpu/drm/nouveau/nouveau_acpi.c  |   12 +-
 drivers/gpu/drm/nouveau/nouveau_bios.c  |   19 ++--
 drivers/gpu/drm/nouveau/nouveau_bios.h  |2 +
 drivers/gpu/drm/nouveau/nouveau_bo.c|   10 +-
 drivers/gpu/drm/nouveau/nouveau_channel.c   |7 +-
 drivers/gpu/drm/nouveau/nouveau_connector.c |7 +-
 drivers/gpu/drm/nouveau/nouveau_dp.c|   10 +-
 drivers/gpu/drm/nouveau/nouveau_drv.c   |   10 ++-
 drivers/gpu/drm/nouveau/nouveau_drv.h   |2 +
 drivers/gpu/drm/nouveau/nouveau_fbcon.c |   40 +++-
 drivers/gpu/drm/nouveau/nouveau_fbcon.h |6 +
 drivers/gpu/drm/nouveau/nouveau_gem.c   |2 +
 drivers/gpu/drm/nouveau/nouveau_grctx.c |4 +-
 drivers/gpu/drm/nouveau/nouveau_irq.c   |  155 ---
 drivers/gpu/drm/nouveau/nouveau_notifier.c  |   13 ++-
 drivers/gpu/drm/nouveau/nouveau_object.c|3 +-
 drivers/gpu/drm/nouveau/nouveau_reg.h   |1 +
 drivers/gpu/drm/nouveau/nouveau_sgdma.c |7 +-
 drivers/gpu/drm/nouveau/nouveau_state.c |   49 +++--
 drivers/gpu/drm/nouveau/nv04_fbcon.c|9 +-
 drivers/gpu/drm/nouveau/nv50_crtc.c |   11 ++-
 drivers/gpu/drm/nouveau/nv50_fbcon.c|9 +-
 drivers/gpu/drm/nouveau/nv50_fifo.c |9 +-
 drivers/gpu/drm/nouveau/nv50_graph.c|   10 ++-
 drivers/gpu/drm/nouveau/nv50_sor.c  |1 +
 drivers/gpu/drm/radeon/Kconfig  |   12 ++-
 drivers/gpu/drm/radeon/atombios_dp.c|   10 ++-
 drivers/gpu/drm/radeon/r600.c   |8 ++
 drivers/gpu/drm/radeon/r600_audio.c |3 +-
 drivers/gpu/drm/radeon/radeon_atombios.c|9 ++
 drivers/gpu/drm/radeon/radeon_benchmark.c   |   55 ++
 drivers/gpu/drm/radeon/radeon_connectors.c  |   20 ++--
 drivers/gpu/drm/radeon/radeon_display.c |   11 ++-
 drivers/gpu/drm/radeon/radeon_fb.c  |2 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.h |   11 +-
 

[Bug 26525] New: Rendering bug due to ARB_texture_non_power_of_two

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

   Summary: Rendering bug due to ARB_texture_non_power_of_two
   Product: Mesa
   Version: git
  Platform: Other
OS/Version: All
Status: NEW
  Severity: normal
  Priority: medium
 Component: Drivers/DRI/R600
AssignedTo: dri-devel@lists.sourceforge.net
ReportedBy: ppa...@shaw.ca


While trying to address a D3D rendering bug report in Wine, I've been working
on trying to add card recognition support into Wine for the Mesa ATI
(R300/R600) drivers. This was in order to resolve a rendering issue when using
the Mesa ATI driver. What we've found is that a code workaround to avoid using
ARB_texture_non_power_of_two APIs on R300-R500 cards also seems to fix this
rendering issue on Mesa DRI R600 (in particular with an HD4800 series card).
This would seem to indicate a bug in the ARP texture_non_power_of_two
implementation on R600. The Wine bug report is at 
http://bugs.winehq.org/show_bug.cgi?id=21515

Comments #45-47 indicate that the rendering problem is fixed by activating a
quirk/workaround that avoids ARB_texture_non_power_of_two. Stefan Dosinger's
comment #48 indicates what the quirk workaround does, how it should not be
required on an R600/R700 series card, and how that indicates a probable driver
bug.


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

--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: [PATCH] drm/radeon/kms/atom: use get_unaligned() for ctx-ps

2010-02-10 Thread Alex Deucher
On Wed, Feb 10, 2010 at 11:19 PM, Matt Turner matts...@gmail.com wrote:
 Updated patch to use get_unaligned_le32, as suggested by Dave.

 On Wed, Feb 10, 2010 at 10:56 PM, Matt Turner matts...@gmail.com wrote:
 Noticed on a DEC Alpha.

 Start up into console mode caused 15 unaligned accesses, and starting X
 caused another 48.

 Signed-off-by: Matt Turner matts...@gmail.com
 CC: Jerome Glisse jgli...@redhat.com
 CC: Alex Deucher alexdeuc...@gmail.com
 CC: Dave Airlie airl...@redhat.com
 ---
  drivers/gpu/drm/radeon/atom.c |    5 -
  1 files changed, 4 insertions(+), 1 deletions(-)

 diff --git a/drivers/gpu/drm/radeon/atom.c b/drivers/gpu/drm/radeon/atom.c
 index bd0c843..c1d3c24 100644
 --- a/drivers/gpu/drm/radeon/atom.c
 +++ b/drivers/gpu/drm/radeon/atom.c
 @@ -24,6 +24,7 @@

  #include linux/module.h
  #include linux/sched.h
 +#include asm/unaligned.h

  #define ATOM_DEBUG

 @@ -212,7 +213,9 @@ static uint32_t atom_get_src_int(atom_exec_context *ctx, 
 uint8_t attr,
        case ATOM_ARG_PS:
                idx = U8(*ptr);
                (*ptr)++;
 -               val = le32_to_cpu(ctx-ps[idx]);
 +               /* get_unaligned avoids unaligned accesses from atombios 
 tables
 +                * 21, 24, 42. */

Not a big deal, but you might want to mention that this is needed for
alpha in the comment.  Also, the tables with unaligned accesses will
probably vary with the card, so there's not really any need to mention
them here.

Alex

 +               val = le32_to_cpu(get_unaligned((u32 *)ctx-ps[idx]));
                if (print)
                        DEBUG(PS[0x%02X,0x%04X], idx, val);
                break;
 --
 1.6.5.3




--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


[Bug 26525] Rendering bug due to ARB_texture_non_power_of_two

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





--- Comment #1 from Alex Deucher ag...@yahoo.com  2010-02-10 22:04:31 PST ---
Can you explain the broken behavior or do you have a screen shot?  Or even
better, do you have a simple test case that shows the broken behavior?  The
basic npot demos work fine.  I suspect the actual bug may lie elsewhere; i.e.,
there are bugs with certain types of vertex fetches. 


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

--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


direct I/O instruction access to graphics register is sync with CPU?

2010-02-10 Thread Westermann Fu
Hi, friends:

Sorry for my stupid question but I think right here can help me.

As I know, DMA/CommandParser or no matter what you call can provide
asynchronous execuation of graphics commands with CPU execution, and the
direct I/O of course is synchronous with instructions executed on CPU, but
what is here 'synchronous' means? I take an example of direct I/O triangle
setting for 3D engine to render triangle as the below piece of code:

/*
 ** set graphics contexts
 */

/*
** using direct I/O to write 3 vertex data to 3D engine ** register
for rendering a triangle
 */
movl vertex_data1,  VP_register
movl vertex_data2,  VP_register
movl vertex_data3,  VP_register

does 'synchronous' mean CPU won't finish the last one mov instruction until
the 3D engine finish rendering this triangle? Or whatever other meaning?
Thanks very much.

Regards
--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


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

2010-02-10 Thread Luca Barbieri
 With the exception of adding a new unused API in the form of
 gem_free_object_unlocked driver hook, I like this.

Nouveau and Radeon should be able to use it (by setting it to the same
function used for gem_free_object) with little or no modification
(they rely on TTM locking).

I didn't do it for Radeon since I'm not familiar with the code.
I'll hopefully send a Nouveau patch as part of a patchset removing all
non-init/KMS BKL/struct_mutex usage in it once it is done.

--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel