Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 219403 Details for
Bug 304811
Radeon KMS: Garbled kwin shadows and pixmaps
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Backfit of upstream patch
2.6.32-radeon-garbled.patch (text/plain), 7.05 KB, created by
Tanktalus
on 2010-02-13 05:59:19 UTC
(
hide
)
Description:
Backfit of upstream patch
Filename:
MIME Type:
Creator:
Tanktalus
Created:
2010-02-13 05:59:19 UTC
Size:
7.05 KB
patch
obsolete
>diff -u -pr linux-2.6.32-gentoo-r3/drivers/gpu/drm/radeon/r600.c linux-2.6.32-gentoo-r3-new/drivers/gpu/drm/radeon/r600.c >--- linux-2.6.32-gentoo-r3/drivers/gpu/drm/radeon/r600.c 2009-12-02 20:51:21.000000000 -0700 >+++ linux-2.6.32-gentoo-r3-new/drivers/gpu/drm/radeon/r600.c 2010-02-12 18:00:20.698670585 -0700 >@@ -1855,3 +1855,19 @@ int r600_debugfs_mc_info_init(struct rad > return 0; > #endif > } >+ >+/** >+ * r600_iotcl_wait_idle - flush host path cache on wait idle ioctl >+ * rdev: radeon device structure >+ * bo: buffer object struct which userspace is waiting for idle >+ * >+ * Some R6XX/R7XX doesn't seems to take into account HDP flush performed >+ * through ring buffer, this leads to corruption in rendering, see >+ * http://bugzilla.kernel.org/show_bug.cgi?id=15186 to avoid this we >+ * directly perform HDP flush by writing register through MMIO. >+ */ >+#define R_005480_HDP_MEM_COHERENCY_FLUSH_CNTL 0x5480 >+void r600_iotcl_wait_idle(struct radeon_device *rdev, struct radeon_object *robj) >+{ >+ WREG32(R_005480_HDP_MEM_COHERENCY_FLUSH_CNTL, 0x1); >+} >diff -u -pr linux-2.6.32-gentoo-r3/drivers/gpu/drm/radeon/radeon_asic.h linux-2.6.32-gentoo-r3-new/drivers/gpu/drm/radeon/radeon_asic.h >--- linux-2.6.32-gentoo-r3/drivers/gpu/drm/radeon/radeon_asic.h 2009-12-02 20:51:21.000000000 -0700 >+++ linux-2.6.32-gentoo-r3-new/drivers/gpu/drm/radeon/radeon_asic.h 2010-02-12 17:33:57.990668712 -0700 >@@ -162,6 +162,7 @@ static struct radeon_asic r300_asic = { > .set_surface_reg = r100_set_surface_reg, > .clear_surface_reg = r100_clear_surface_reg, > .bandwidth_update = &r100_bandwidth_update, >+ .ioctl_wait_idle = NULL, > }; > > /* >@@ -201,6 +202,7 @@ static struct radeon_asic r420_asic = { > .set_surface_reg = r100_set_surface_reg, > .clear_surface_reg = r100_clear_surface_reg, > .bandwidth_update = &r100_bandwidth_update, >+ .ioctl_wait_idle = NULL, > }; > > >@@ -245,6 +247,7 @@ static struct radeon_asic rs400_asic = { > .set_surface_reg = r100_set_surface_reg, > .clear_surface_reg = r100_clear_surface_reg, > .bandwidth_update = &r100_bandwidth_update, >+ .ioctl_wait_idle = NULL, > }; > > >@@ -291,6 +294,7 @@ static struct radeon_asic rs600_asic = { > .set_pcie_lanes = NULL, > .set_clock_gating = &radeon_atom_set_clock_gating, > .bandwidth_update = &rs600_bandwidth_update, >+ .ioctl_wait_idle = NULL, > }; > > >@@ -334,6 +338,7 @@ static struct radeon_asic rs690_asic = { > .set_surface_reg = r100_set_surface_reg, > .clear_surface_reg = r100_clear_surface_reg, > .bandwidth_update = &rs690_bandwidth_update, >+ .ioctl_wait_idle = NULL, > }; > > >@@ -381,6 +386,7 @@ static struct radeon_asic rv515_asic = { > .set_surface_reg = r100_set_surface_reg, > .clear_surface_reg = r100_clear_surface_reg, > .bandwidth_update = &rv515_bandwidth_update, >+ .ioctl_wait_idle = NULL, > }; > > >@@ -419,6 +425,7 @@ static struct radeon_asic r520_asic = { > .set_surface_reg = r100_set_surface_reg, > .clear_surface_reg = r100_clear_surface_reg, > .bandwidth_update = &rv515_bandwidth_update, >+ .ioctl_wait_idle = NULL, > }; > > /* >@@ -455,6 +462,7 @@ int r600_ring_test(struct radeon_device > int r600_copy_blit(struct radeon_device *rdev, > uint64_t src_offset, uint64_t dst_offset, > unsigned num_pages, struct radeon_fence *fence); >+extern void r600_iotcl_wait_idle(struct radeon_device *rdev, struct radeon_object *bo); > > static struct radeon_asic r600_asic = { > .init = &r600_init, >@@ -484,6 +492,7 @@ static struct radeon_asic r600_asic = { > .set_surface_reg = r600_set_surface_reg, > .clear_surface_reg = r600_clear_surface_reg, > .bandwidth_update = &rv515_bandwidth_update, >+ .ioctl_wait_idle = r600_iotcl_wait_idle, > }; > > /* >@@ -523,6 +532,7 @@ static struct radeon_asic rv770_asic = { > .set_surface_reg = r600_set_surface_reg, > .clear_surface_reg = r600_clear_surface_reg, > .bandwidth_update = &rv515_bandwidth_update, >+ .ioctl_wait_idle = r600_iotcl_wait_idle, > }; > > #endif >diff -u -pr linux-2.6.32-gentoo-r3/drivers/gpu/drm/radeon/radeon_gem.c linux-2.6.32-gentoo-r3-new/drivers/gpu/drm/radeon/radeon_gem.c >--- linux-2.6.32-gentoo-r3/drivers/gpu/drm/radeon/radeon_gem.c 2009-12-02 20:51:21.000000000 -0700 >+++ linux-2.6.32-gentoo-r3-new/drivers/gpu/drm/radeon/radeon_gem.c 2010-02-12 17:23:34.122659498 -0700 >@@ -306,6 +306,9 @@ int radeon_gem_wait_idle_ioctl(struct dr > } > robj = gobj->driver_private; > r = radeon_object_wait(robj); >+ /* callback hw specific functions if any */ >+ if (robj->rdev->asic->ioctl_wait_idle) >+ robj->rdev->asic->ioctl_wait_idle(robj->rdev, robj); > mutex_lock(&dev->struct_mutex); > drm_gem_object_unreference(gobj); > mutex_unlock(&dev->struct_mutex); >diff -u -pr linux-2.6.32-gentoo-r3/drivers/gpu/drm/radeon/radeon.h linux-2.6.32-gentoo-r3-new/drivers/gpu/drm/radeon/radeon.h >--- linux-2.6.32-gentoo-r3/drivers/gpu/drm/radeon/radeon.h 2009-12-02 20:51:21.000000000 -0700 >+++ linux-2.6.32-gentoo-r3-new/drivers/gpu/drm/radeon/radeon.h 2010-02-12 17:55:25.190668872 -0700 >@@ -639,6 +639,13 @@ struct radeon_asic { > uint32_t offset, uint32_t obj_size); > int (*clear_surface_reg)(struct radeon_device *rdev, int reg); > void (*bandwidth_update)(struct radeon_device *rdev); >+ /* ioctl hw specific callback. Some hw might want to perform special >+ * operation on specific ioctl. For instance on wait idle some hw >+ * might want to perform and HDP flush through MMIO as it seems that >+ * some R6XX/R7XX hw doesn't take HDP flush into account if programmed >+ * through ring. >+ */ >+ void (*ioctl_wait_idle)(struct radeon_device *rdev, struct radeon_object *robj); > }; > > /* >diff -u -pr linux-2.6.32-gentoo-r3/drivers/gpu/drm/radeon/radeon_object.c linux-2.6.32-gentoo-r3-new/drivers/gpu/drm/radeon/radeon_object.c >--- linux-2.6.32-gentoo-r3/drivers/gpu/drm/radeon/radeon_object.c 2009-12-02 20:51:21.000000000 -0700 >+++ linux-2.6.32-gentoo-r3-new/drivers/gpu/drm/radeon/radeon_object.c 2010-02-12 17:58:00.770664069 -0700 >@@ -34,20 +34,6 @@ > #include "radeon_drm.h" > #include "radeon.h" > >-struct radeon_object { >- struct ttm_buffer_object tobj; >- struct list_head list; >- struct radeon_device *rdev; >- struct drm_gem_object *gobj; >- struct ttm_bo_kmap_obj kmap; >- unsigned pin_count; >- uint64_t gpu_addr; >- void *kptr; >- bool is_iomem; >- uint32_t tiling_flags; >- uint32_t pitch; >- int surface_reg; >-}; > > int radeon_ttm_init(struct radeon_device *rdev); > void radeon_ttm_fini(struct radeon_device *rdev); >diff -u -pr linux-2.6.32-gentoo-r3/drivers/gpu/drm/radeon/radeon_object.h linux-2.6.32-gentoo-r3-new/drivers/gpu/drm/radeon/radeon_object.h >--- linux-2.6.32-gentoo-r3/drivers/gpu/drm/radeon/radeon_object.h 2009-12-02 20:51:21.000000000 -0700 >+++ linux-2.6.32-gentoo-r3-new/drivers/gpu/drm/radeon/radeon_object.h 2010-02-12 17:57:43.654662348 -0700 >@@ -43,4 +43,19 @@ struct radeon_mman { > struct ttm_bo_device bdev; > }; > >+struct radeon_object { >+ struct ttm_buffer_object tobj; >+ struct list_head list; >+ struct radeon_device *rdev; >+ struct drm_gem_object *gobj; >+ struct ttm_bo_kmap_obj kmap; >+ unsigned pin_count; >+ uint64_t gpu_addr; >+ void *kptr; >+ bool is_iomem; >+ uint32_t tiling_flags; >+ uint32_t pitch; >+ int surface_reg; >+}; >+ > #endif
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 304811
: 219403