[igt-dev] [PATCH i-g-t] tools/intel_dp_compliance: Use ARGB8888 format fbs for Gen 10

Imre Deak imre.deak at intel.com
Mon Jul 2 15:25:51 UTC 2018


On Fri, Jun 29, 2018 at 02:56:14PM -0700, Radhakrishna Sripada wrote:
> According to Display WA #1172, to truly bypass the color data on Gen 10
> use ARGB8888 instead of XRGB8888 to pass compliance.
> 
> Cc: Imre Deak <imre.deak at intel.com>
> Cc: Manasi Navare <manasi.d.navare at intel.com>
> Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada at intel.com>
> ---
>  tools/intel_dp_compliance.c | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/tools/intel_dp_compliance.c b/tools/intel_dp_compliance.c
> index c40548e79227..abfda1564559 100644
> --- a/tools/intel_dp_compliance.c
> +++ b/tools/intel_dp_compliance.c
> @@ -175,7 +175,7 @@ static int tio_fd;
>  struct termios saved_tio;
>  
>  drmModeRes *resources;
> -int drm_fd, modes;
> +int drm_fd, modes, gen;
>  uint64_t tiling = LOCAL_DRM_FORMAT_MOD_NONE;
>  uint32_t depth = 24, stride, bpp;
>  int specified_mode_num = -1, specified_disp_id = -1;
> @@ -445,7 +445,7 @@ static int setup_framebuffers(struct connector *dp_conn)
>  
>  	dp_conn->fb = igt_create_fb(drm_fd,
>  				    dp_conn->fb_width, dp_conn->fb_height,
> -				    DRM_FORMAT_XRGB8888,
> +				    gen == 10 ? DRM_FORMAT_ARGB8888 : DRM_FORMAT_XRGB8888,

I think this issue matters only in case of DP_TEST_LINK_VIDEO_PATTERN,
so we need to adjust the mode only in setup_video_pattern_framebuffer()
accordingly.

>  				    LOCAL_DRM_FORMAT_MOD_NONE,
>  				    &dp_conn->fb_video_pattern);
>  	igt_assert(dp_conn->fb);
> @@ -475,7 +475,7 @@ static int setup_failsafe_framebuffer(struct connector *dp_conn)
>  	dp_conn->failsafe_fb = igt_create_fb(drm_fd,
>  					     dp_conn->failsafe_width,
>  					     dp_conn->failsafe_height,
> -					     DRM_FORMAT_XRGB8888,
> +					     gen == 10 ? DRM_FORMAT_ARGB8888 : DRM_FORMAT_XRGB8888,
>  					     LOCAL_DRM_FORMAT_MOD_NONE,
>  					     &dp_conn->fb_failsafe_pattern);
>  	igt_assert(dp_conn->failsafe_fb);
> @@ -508,7 +508,7 @@ static int setup_video_pattern_framebuffer(struct connector *dp_conn)
>  	video_height = dp_conn->test_pattern.vdisplay;
>  	dp_conn->test_pattern.fb = igt_create_fb(drm_fd,
>  						 video_width, video_height,
> -						 DRM_FORMAT_XRGB8888,
> +						 gen == 10 ? DRM_FORMAT_ARGB8888 : DRM_FORMAT_XRGB8888,
>  						 LOCAL_DRM_FORMAT_MOD_NONE,
>  						 &dp_conn->test_pattern.fb_pattern);

We'd still have to set the per-pixel alpha value to 0xff in
fill_framebuffer(). Please also add here a code comment on why the
format adjustment is needed.

>  	igt_assert(dp_conn->test_pattern.fb);
> @@ -770,7 +770,7 @@ set_default_mode(struct connector *c, bool set_mode)
>  	height = c->mode.vdisplay;
>  
>  	fb_id = igt_create_pattern_fb(drm_fd, width, height,
> -				      DRM_FORMAT_XRGB8888,
> +				      gen == 10 ? DRM_FORMAT_ARGB8888 : DRM_FORMAT_XRGB8888,
>  				      tiling, &fb_info);
>  
>  	igt_info("CRTC(%u):[%d]", c->crtc, 0);
> @@ -1036,6 +1036,7 @@ int main(int argc, char **argv)
>  	set_termio_mode();
>  
>  	drm_fd = drm_open_driver(DRIVER_ANY);
> +	gen = intel_gen(intel_get_drm_devid(drm_fd));
>  
>  	kmstest_set_vt_graphics_mode();
>  	setup_debugfs_files();
> -- 
> 2.9.3
> 


More information about the igt-dev mailing list