public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Imre Deak <imre.deak@intel.com>, intel-gfx@lists.freedesktop.org
Cc: "Juha-Pekka Heikkila" <juhapekka.heikkila@gmail.com>,
	"Ville Syrjälä" <ville.syrjala@linux.intel.com>
Subject: Re: [Intel-gfx] [PATCH v3 09/11] drm/i915: Add a platform independent way to check for CCS AUX planes
Date: Tue, 19 Oct 2021 11:02:45 +0300	[thread overview]
Message-ID: <87h7ddsaqi.fsf@intel.com> (raw)
In-Reply-To: <20211014220921.683870-10-imre.deak@intel.com>


From patch 1:

static bool check_modifier_display_ver(const struct intel_modifier_desc *md,
				       u8 display_ver)
{
	return display_ver >= md->display_ver.from &&
	       display_ver <= md->display_ver.until;
}

On Fri, 15 Oct 2021, Imre Deak <imre.deak@intel.com> wrote:
> +static bool check_modifier_display_ver_range(const struct intel_modifier_desc *md,
> +					     u8 display_ver_from, u8 display_ver_until)
> +{
> +	return check_modifier_display_ver(md, display_ver_from) &&
> +	       check_modifier_display_ver(md, display_ver_until);
> +}
> +

...

> +/**
> + * intel_fb_is_gen12_ccs_aux_plane: Check if a framebuffer color plane is a GEN12 CCS AUX plane
> + * @fb: Framebuffer
> + * @color_plane: color plane index to check
> + *
> + * Returns:
> + * Returns %true if @fb's color plane at index @color_plane is a GEN12 CCS AUX plane.
> + */
> +static bool intel_fb_is_gen12_ccs_aux_plane(const struct drm_framebuffer *fb, int color_plane)
>  {
> -	return is_gen12_ccs_modifier(fb->modifier) && is_ccs_plane(fb, plane);
> +	const struct intel_modifier_desc *md = lookup_modifier(fb->modifier);
> +
> +	return check_modifier_display_ver_range(md, 12, 13) &&
> +	       ccs_aux_plane_mask(md, fb->format) & BIT(color_plane);
>  }

check_modifier_display_ver_range(md, 12, 13)

==>

check_modifier_display_ver(md, 12) &&
check_modifier_display_ver(md, 13)

==>

12 >= md->display_ver.from &&
12 <= md->display_ver.until &&
13 >= md->display_ver.from &&
13 <= md->display_ver.until

==>

Always false.


BR,
Jani.


-- 
Jani Nikula, Intel Open Source Graphics Center

  reply	other threads:[~2021-10-19  8:02 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-14 22:09 [Intel-gfx] [PATCH v3 00/11] drm/i915: Simplify handling of modifiers Imre Deak
2021-10-14 22:09 ` [Intel-gfx] [PATCH v3 01/11] drm/i915: Add a table with a descriptor for all i915 modifiers Imre Deak
2021-10-15 18:04   ` Juha-Pekka Heikkila
2021-10-19  7:42     ` Jani Nikula
2021-10-19  7:46       ` Imre Deak
2021-10-20  9:40   ` Ville Syrjälä
2021-10-20 10:46     ` Imre Deak
2021-10-20 10:50       ` Ville Syrjälä
2021-10-14 22:09 ` [Intel-gfx] [PATCH v3 02/11] drm/i915: Move intel_get_format_info() to intel_fb.c Imre Deak
2021-10-14 22:09 ` [Intel-gfx] [PATCH v3 03/11] drm/i915: Add tiling attribute to the modifier descriptor Imre Deak
2021-10-14 22:09 ` [Intel-gfx] [PATCH v3 04/11] drm/i915: Simplify the modifier check for interlaced scanout support Imre Deak
2021-10-14 22:09 ` [Intel-gfx] [PATCH v3 05/11] drm/i915: Unexport is_semiplanar_uv_plane() Imre Deak
2021-10-14 22:09 ` [Intel-gfx] [PATCH v3 06/11] drm/i915: Move intel_format_info_is_yuv_semiplanar() to intel_fb.c Imre Deak
2021-10-14 22:09 ` [Intel-gfx] [PATCH v3 07/11] drm/i915: Add a platform independent way to get the RC CCS CC plane Imre Deak
2021-10-14 22:09 ` [Intel-gfx] [PATCH v3 08/11] drm/i915: Handle CCS CC planes separately from CCS AUX planes Imre Deak
2021-10-14 22:09 ` [Intel-gfx] [PATCH v3 09/11] drm/i915: Add a platform independent way to check for " Imre Deak
2021-10-19  8:02   ` Jani Nikula [this message]
2021-10-19  8:38     ` Imre Deak
2021-10-19  8:47       ` Imre Deak
2021-10-19 10:00         ` Imre Deak
2021-10-19  9:46   ` [Intel-gfx] [PATCH v4 " Imre Deak
2021-10-14 22:09 ` [Intel-gfx] [PATCH v3 10/11] drm/i915: Move is_ccs_modifier() to intel_fb.c Imre Deak
2021-10-14 22:09 ` [Intel-gfx] [PATCH v3 11/11] drm/i915: Add functions to check for RC CCS CC and MC CCS modifiers Imre Deak
2021-10-15  3:39 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Simplify handling of modifiers (rev10) Patchwork
2021-10-15  3:41 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2021-10-15  4:10 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-10-15 11:19 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-10-18 12:10   ` Imre Deak
2021-10-18 15:42     ` Petri Latvala
2021-10-18 16:10       ` Imre Deak
2021-10-19  7:41         ` Petri Latvala
2021-10-19 14:42 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Simplify handling of modifiers (rev11) Patchwork
2021-10-19 14:44 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2021-10-19 15:14 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-10-19 19:07 ` [Intel-gfx] ✓ Fi.CI.IGT: " 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=87h7ddsaqi.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=juhapekka.heikkila@gmail.com \
    --cc=ville.syrjala@linux.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