igt-dev.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Cc: igt-dev@lists.freedesktop.org, Manasi Navare <manasi.d.navare@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t v2] tools/intel_dp_compliance: Use ARGB8888 format fbs for Gen 10
Date: Wed, 11 Jul 2018 14:54:35 +0300	[thread overview]
Message-ID: <20180711115435.GA3170@ideak-desk.fi.intel.com> (raw)
In-Reply-To: <20180710204829.3036-1-radhakrishna.sripada@intel.com>

On Tue, Jul 10, 2018 at 01:48:29PM -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.
> 
> v2: Use ARGB8888 format only for video pattern fb, set per pixel alpha
>     value to 0xff in fill_framebuffer.(Imre)
> 
> Cc: Imre Deak <imre.deak@intel.com>
> Cc: Manasi Navare <manasi.d.navare@intel.com>
> Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
> ---
>  tools/intel_dp_compliance.c | 12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/tools/intel_dp_compliance.c b/tools/intel_dp_compliance.c
> index c40548e79227..468416293ef2 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;
> @@ -506,9 +506,13 @@ static int setup_video_pattern_framebuffer(struct connector *dp_conn)
>  
>  	video_width = dp_conn->test_pattern.hdisplay;
>  	video_height = dp_conn->test_pattern.vdisplay;
> +	/*
> +	 * Display WA1172: Gen10 To pass the color data unaffected set either
> +	 * per-pixel alpha or Plane alpha to 0xff. Use ARGB8888 and set alpha to 0xff.
> +	 */
>  	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);
>  	igt_assert(dp_conn->test_pattern.fb);
> @@ -557,7 +561,8 @@ static int fill_framebuffer(struct connector *dp_conn)
>  			red_ptr[x] = pixel_val << 16;
>  			green_ptr[x] = pixel_val << 8;
>  			blue_ptr[x] = pixel_val << 0;
> -			white_ptr[x] = red_ptr[x] | green_ptr[x] | blue_ptr[x];
> +			white_ptr[x] = gen == 10 ? 0xff : (red_ptr[x] |
> +				       green_ptr[x] | blue_ptr[x]);

Looks like each color needs its own alpha to be set, so something like:

alpha = gen == 10 ? 0xff : 0;
red_ptr[x] = (alpha << 24) | (pixel_val << 16);
green_ptr[x] = (alpha << 24) | (pixel_val << 8);
blue_ptr[x] = (alpha << 24) | (pixel_val << 0);

--Imre

>  			if (++x >= video_width)
>  				break;
>  		}
> @@ -1036,6 +1041,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
> 
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

      parent reply	other threads:[~2018-07-11 11:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-10 20:48 [igt-dev] [PATCH i-g-t v2] tools/intel_dp_compliance: Use ARGB8888 format fbs for Gen 10 Radhakrishna Sripada
2018-07-10 21:54 ` [igt-dev] ✓ Fi.CI.BAT: success for tools/intel_dp_compliance: Use ARGB8888 format fbs for Gen 10 (rev2) Patchwork
2018-07-11  1:39 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2018-07-11 11:54 ` Imre Deak [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180711115435.GA3170@ideak-desk.fi.intel.com \
    --to=imre.deak@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=manasi.d.navare@intel.com \
    --cc=radhakrishna.sripada@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).