From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6F7636EB25 for ; Thu, 13 Feb 2020 04:22:12 +0000 (UTC) Date: Wed, 12 Feb 2020 20:22:11 -0800 Message-ID: <87h7zvunf0.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" In-Reply-To: <20200212215036.27407-3-imre.deak@intel.com> References: <20200211023108.25369-7-imre.deak@intel.com> <20200212215036.27407-3-imre.deak@intel.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Subject: Re: [igt-dev] [PATCH v3 7/8] lib/igt_draw: Fix igt_draw_fill_fb() on platforms w/o aperture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" To: Imre Deak Cc: igt-dev@lists.freedesktop.org List-ID: On Wed, 12 Feb 2020 13:50:36 -0800, Imre Deak wrote: > > Draw through a WC mapping on platforms w/o a GTT aperture. > > v2: > - Use WC instead of CPU mapping. (Ashutosh) > > Cc: Matt Roper > Cc: Ashutosh Dixit > Signed-off-by: Imre Deak > Reviewed-by: Matt Roper (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); Not sure if the conditional switch between GTT and WC is really needed. For example, __gem_mmap__device_coherent() unconditionally prefers WC over GTT. In any case: Reviewed-by: Ashutosh Dixit _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev