[igt-dev] [PATCH v3 7/8] lib/igt_draw: Fix igt_draw_fill_fb() on platforms w/o aperture
Imre Deak
imre.deak at intel.com
Wed Feb 12 21:50:36 UTC 2020
Draw through a WC mapping on platforms w/o a GTT aperture.
v2:
- Use WC instead of CPU mapping. (Ashutosh)
Cc: Matt Roper <matthew.d.roper at intel.com>
Cc: Ashutosh Dixit <ashutosh.dixit at intel.com>
Signed-off-by: Imre Deak <imre.deak at intel.com>
Reviewed-by: Matt Roper <matthew.d.roper at intel.com> (v1)
---
lib/igt_draw.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/igt_draw.c b/lib/igt_draw.c
index fa8ab5620..f2340127f 100644
--- a/lib/igt_draw.c
+++ b/lib/igt_draw.c
@@ -728,6 +728,8 @@ void igt_draw_rect_fb(int fd, drm_intel_bufmgr *bufmgr,
*/
void igt_draw_fill_fb(int fd, struct igt_fb *fb, uint32_t color)
{
- igt_draw_rect_fb(fd, NULL, NULL, fb, IGT_DRAW_MMAP_GTT,
+ igt_draw_rect_fb(fd, NULL, NULL, fb,
+ gem_has_mappable_ggtt(fd) ? IGT_DRAW_MMAP_GTT :
+ IGT_DRAW_MMAP_WC,
0, 0, fb->width, fb->height, color);
}
--
2.23.1
More information about the igt-dev
mailing list