public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Petri Latvala <petri.latvala@intel.com>
To: Mika Kahola <mika.kahola@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t v2 1/1] tests/kms_plane_lowres: Fix CRC mismatch
Date: Fri, 31 Jan 2020 12:55:20 +0200	[thread overview]
Message-ID: <20200131105520.GY25209@platvala-desk.ger.corp.intel.com> (raw)
In-Reply-To: <20200131092603.24223-2-mika.kahola@intel.com>

On Fri, Jan 31, 2020 at 11:26:03AM +0200, Mika Kahola wrote:
> Mixing SDR and HDR planes yields to CRC mismatch. The patch computes the
> reference image and CRC with the main plane matching the SDR/HDR plane type.
> 
> v2: HDR planes are not defined for gen9 and older (CI)
> 
> References: https://gitlab.freedesktop.org/drm/intel/issues/899
> Signed-off-by: Mika Kahola <mika.kahola@intel.com>
> ---
>  tests/kms_plane_lowres.c | 142 +++++++++++++++++++++++++--------------
>  1 file changed, 90 insertions(+), 52 deletions(-)
> 
> diff --git a/tests/kms_plane_lowres.c b/tests/kms_plane_lowres.c
> index 4c3f5636..012b25e3 100644
> --- a/tests/kms_plane_lowres.c
> +++ b/tests/kms_plane_lowres.c
> @@ -32,11 +32,15 @@
>  
>  IGT_TEST_DESCRIPTION("Test atomic mode setting with a plane by switching between high and low resolutions");
>  
> +#define SDR_PLANE_BASE 3
>  #define SIZE 64
>  
>  typedef struct {
>  	int drm_fd;
>  	igt_display_t display;
> +	uint32_t devid;
> +	igt_output_t *output;
> +	enum pipe pipe;
>  	struct igt_fb fb_primary;
>  	struct igt_fb fb_plane[2];
>  	struct {
> @@ -77,11 +81,44 @@ get_lowres_mode(int drmfd, igt_output_t *output,
>  	return *mode;
>  }
>  
> +static igt_plane_t *first_sdr_plane(igt_output_t *output, uint32_t devid)
> +{
> +        int index;
> +
> +        index = intel_gen(devid) <= 9 ? 0 : SDR_PLANE_BASE;
> +
> +        return igt_output_get_plane(output, index);
> +}
> +
> +static bool is_sdr_plane(const igt_plane_t *plane, uint32_t devid)
> +{
> +        if (intel_gen(devid) <= 9)
> +                return true;
> +
> +        return plane->index >= SDR_PLANE_BASE;
> +}

kms_plane.c has similar HDR plane finder code by Ville. For some
values of similar. At least it had comments explaining why the SDR plane base is 3. :P

Any takers for refactoring to shared code?


-- 
Petri Latvala
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2020-01-31 10:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-31  9:26 [igt-dev] [PATCH i-g-t v2 0/1] Fix CRC mismatch Mika Kahola
2020-01-31  9:26 ` [igt-dev] [PATCH i-g-t v2 1/1] tests/kms_plane_lowres: " Mika Kahola
2020-01-31 10:55   ` Petri Latvala [this message]
2020-01-31 12:11     ` Kahola, Mika
2020-02-03 15:06   ` Juha-Pekka Heikkila
2020-02-04  7:31     ` Kahola, Mika
2020-01-31 10:29 ` [igt-dev] ✗ Fi.CI.BAT: failure for Fix CRC mismatch (rev3) Patchwork
2020-01-31 11:55 ` [igt-dev] ✗ Fi.CI.BAT: failure for Fix CRC mismatch (rev4) Patchwork
2020-01-31 15:11 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2020-02-03  9:35 ` [igt-dev] ✓ Fi.CI.BAT: success for Fix CRC mismatch (rev5) Patchwork
2020-02-03 11:57 ` [igt-dev] ✓ Fi.CI.IGT: success for Fix CRC mismatch (rev4) Patchwork

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=20200131105520.GY25209@platvala-desk.ger.corp.intel.com \
    --to=petri.latvala@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=mika.kahola@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