diff options
author | Matt Roper <matthew.d.roper@intel.com> | 2023-06-21 14:30:32 +0530 |
---|---|---|
committer | Swati Sharma <swati2.sharma@intel.com> | 2023-06-23 12:30:01 +0530 |
commit | 621c2d3115d40a1ba0b53668413ea21edf03a5ff (patch) | |
tree | f6a2a6a7dfa1594480846fb12a5ae7e24a1997a5 /lib/igt_draw.c | |
parent | e1259b581ef5d7bb5ac9154121913499c0c1b5bc (diff) |
lib/igt_draw: Use intel_display_ver() for drawing with blits
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 <matthew.d.roper@intel.com>
Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>
Diffstat (limited to 'lib/igt_draw.c')
-rw-r--r-- | lib/igt_draw.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/igt_draw.c b/lib/igt_draw.c index 6f3629949..1f814bfc8 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); |