From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4CDFC10E151 for ; Wed, 21 Jun 2023 10:43:49 +0000 (UTC) Message-ID: Date: Wed, 21 Jun 2023 12:43:45 +0200 MIME-Version: 1.0 Content-Language: en-US To: Swati Sharma , igt-dev@lists.freedesktop.org References: <20230621090032.611560-1-swati2.sharma@intel.com> <20230621090032.611560-4-swati2.sharma@intel.com> From: Andrzej Hajda In-Reply-To: <20230621090032.611560-4-swati2.sharma@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [igt-dev] [PATCH i-g-t v2 3/3] lib/igt_draw: Use intel_display_ver() for drawing with blits List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: On 21.06.2023 11:00, Swati Sharma wrote: > From: Matt Roper > > Display code should check the display version of the platform > rather than the graphics version; on some platforms these > versions won't be the same. > > v2: -fixed subject (Kamil) > > Signed-off-by: Matt Roper > Signed-off-by: Swati Sharma Reviewed-by: Andrzej Hajda Regards Andrzej > --- > lib/igt_draw.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/lib/igt_draw.c b/lib/igt_draw.c > index 6f362994..1f814bfc 100644 > --- a/lib/igt_draw.c > +++ b/lib/igt_draw.c > @@ -674,7 +674,7 @@ static void draw_rect_blt(int fd, struct cmd_data *cmd_data, > struct intel_buf *dst; > int blt_cmd_len, blt_cmd_tiling, blt_cmd_depth; > uint32_t devid = intel_get_drm_devid(fd); > - int gen = intel_gen(devid); > + int ver = intel_display_ver(devid); > int pitch; > > if (tiling) > @@ -751,9 +751,9 @@ static void draw_rect_blt(int fd, struct cmd_data *cmd_data, > igt_assert(false); > } > > - blt_cmd_len = (gen >= 8) ? 0x5 : 0x4; > + blt_cmd_len = (ver >= 8) ? 0x5 : 0x4; > blt_cmd_tiling = (tiling) ? XY_COLOR_BLT_TILED : 0; > - pitch = (gen >= 4 && tiling) ? buf->stride / 4 : buf->stride; > + pitch = (ver >= 4 && tiling) ? buf->stride / 4 : buf->stride; > > switch_blt_tiling(ibb, tiling, true); >