[igt-dev] [PATCH i-g-t 4/4] lib/i915: Add intel_display_ver() and use it in display tests/libs
Kamil Konieczny
kamil.konieczny at linux.intel.com
Wed Jun 14 18:01:41 UTC 2023
Hi Swati,
On 2023-06-09 at 18:50:19 +0530, Swati Sharma wrote:
> From: Matt Roper <matthew.d.roper at intel.com>
>
Please change commit message, patch no longer adds function
intel_display_ver(), so instead of:
lib/i915: Add intel_display_ver() and use it in display tests/libs
better:
lib/igt_draw: Use intel_display_ver() for drawing with blits
Regards,
Kamil
> 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.
>
> Signed-off-by: Matt Roper <matthew.d.roper at intel.com>
> Signed-off-by: Swati Sharma <swati2.sharma at intel.com>
> ---
> 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 a5c0cbbf..011d5cad 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);
>
> --
> 2.25.1
>
More information about the igt-dev
mailing list