Skip to contentSkip to conversation

drm/radeon: don't check mipmap alignment if MIP_ADDRESS is FMASK

PATCH In review Marek Olšák 3 participants 4 messages Mar 1, 2013 – Mar 4, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/radeon: don't check mipmap alignment if MIP_ADDRESS is FMASK

---
 drivers/gpu/drm/radeon/evergreen_cs.c |    2 +-
 drivers/gpu/drm/radeon/radeon_drv.c   |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/radeon/evergreen_cs.c +1 -1
index d8f5d5f..a759a3d 100644
@@ -834,7 +834,7 @@ static int evergreen_cs_track_validate_texture(struct radeon_cs_parser *p,
 			 __func__, __LINE__, toffset, surf.base_align);
 		return -EINVAL;
 	}
-	if (moffset & (surf.base_align - 1)) {
+	if (surf.nsamples <= 1 && moffset & (surf.base_align - 1)) {
 		dev_warn(p->dev, "%s:%d mipmap bo base %ld not aligned with %ld\n",
 			 __func__, __LINE__, moffset, surf.base_align);
 		return -EINVAL;
drivers/gpu/drm/radeon/radeon_drv.c +2 -1
index 1677584..66a7f0f 100644
@@ -70,9 +70,10 @@
  *   2.27.0 - r600-SI: Add CS ioctl support for async DMA
  *   2.28.0 - r600-eg: Add MEM_WRITE packet support
  *   2.29.0 - R500 FP16 color clear registers
+ *   2.30.0 - fix for FMASK texturing
  */
 #define KMS_DRIVER_MAJOR	2
-#define KMS_DRIVER_MINOR	29
+#define KMS_DRIVER_MINOR	30
 #define KMS_DRIVER_PATCHLEVEL	0
 int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags);
 int radeon_driver_unload_kms(struct drm_device *dev);
Signature · 6 lines
1.7.10.4

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw
Quoted 1 line · Marek Olšák

Added to my -fixes queue.

Alex

Quoted 37 lines
---
 drivers/gpu/drm/radeon/evergreen_cs.c |    2 +-
 drivers/gpu/drm/radeon/radeon_drv.c   |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/radeon/evergreen_cs.c +1 -1
index d8f5d5f..a759a3d 100644
@@ -834,7 +834,7 @@ static int evergreen_cs_track_validate_texture(struct radeon_cs_parser *p,
                         __func__, __LINE__, toffset, surf.base_align);
                return -EINVAL;
        }
-       if (moffset & (surf.base_align - 1)) {
+       if (surf.nsamples <= 1 && moffset & (surf.base_align - 1)) {
                dev_warn(p->dev, "%s:%d mipmap bo base %ld not aligned with %ld\n",
                         __func__, __LINE__, moffset, surf.base_align);
                return -EINVAL;
drivers/gpu/drm/radeon/radeon_drv.c +2 -2
index 1677584..66a7f0f 100644
@@ -70,9 +70,10 @@
  *   2.27.0 - r600-SI: Add CS ioctl support for async DMA
  *   2.28.0 - r600-eg: Add MEM_WRITE packet support
  *   2.29.0 - R500 FP16 color clear registers
+ *   2.30.0 - fix for FMASK texturing
  */
 #define KMS_DRIVER_MAJOR       2
-#define KMS_DRIVER_MINOR       29
+#define KMS_DRIVER_MINOR       30
 #define KMS_DRIVER_PATCHLEVEL  0
 int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags);
 int radeon_driver_unload_kms(struct drm_device *dev);
--

1.7.10.4

Quoted 4 lines

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw

The MIP_ADDRESS state has 2 meanings. If the texture has one sample per pixel, it's a pointer to the mipmap chain. If the texture has multiple samples per pixel, it's a pointer to FMASK, a metadata buffer needed for reading compressed MSAA textures. AFAIK, the mipmap alignment rules do not apply to FMASK.

Marek

Quoted 6 lines · Paul Menzel

Am Montag, den 04.03.2013, 11:13 -0500 schrieb Alex Deucher:

Quoted 4 lines · Marek Olšák
Quoted 1 line

Added to my -fixes queue.

Quoted 7 lines

Too few information in my opinion as to why this change was made. Please be strict with that.

Thanks,

Paul

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel