From: Jani Nikula <jani.nikula@linux.intel.com>
To: Suraj Kandpal <suraj.kandpal@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 5/5] drm/i915/display: Compare the readout dsc pps params
Date: Mon, 10 Jul 2023 14:15:17 +0300 [thread overview]
Message-ID: <87ttuchvay.fsf@intel.com> (raw)
In-Reply-To: <20230710100911.2736389-6-suraj.kandpal@intel.com>
On Mon, 10 Jul 2023, Suraj Kandpal <suraj.kandpal@intel.com> wrote:
> With the dsc config being readout and filled in crtc_state add
> macros and use them to compare current and previous PPS param in
> DSC.
>
> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_display.c | 55 ++++++++++++++++++++
> 1 file changed, 55 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index eed01957bdb9..5c1596d7cd92 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -5007,6 +5007,8 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
> {
> struct drm_i915_private *dev_priv = to_i915(current_config->uapi.crtc->dev);
> struct intel_crtc *crtc = to_intel_crtc(pipe_config->uapi.crtc);
> + const struct drm_dsc_config *dsc_current_config = ¤t_config->dsc.config;
> + const struct drm_dsc_config *dsc_pipe_config = &pipe_config->dsc.config;
> bool ret = true;
> bool fixup_inherited = fastset &&
> current_config->inherited && !pipe_config->inherited;
> @@ -5202,6 +5204,26 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
> #define PIPE_CONF_QUIRK(quirk) \
> ((current_config->quirks | pipe_config->quirks) & (quirk))
>
> +#define PIPE_DSC_CONF_CHECK_I(name) do { \
> + if (dsc_current_config->name != dsc_pipe_config->name) { \
> + pipe_config_mismatch(fastset, crtc, __stringify(name), \
> + "(expected %i, found %i)", \
> + dsc_current_config->name, \
> + dsc_pipe_config->name); \
> + ret = false; \
> + } \
> +} while (0)
> +
> +#define PIPE_DSC_CONF_CHECK_BOOL(name) do { \
> + if (dsc_current_config->name != dsc_pipe_config->name) { \
> + pipe_config_mismatch(fastset, crtc, __stringify(name), \
> + "(expected %s, found %s)", \
> + str_yes_no(dsc_current_config->name), \
> + str_yes_no(dsc_pipe_config->name)); \
> + ret = false; \
> + } \
> +} while (0)
> +
> PIPE_CONF_CHECK_I(hw.enable);
> PIPE_CONF_CHECK_I(hw.active);
>
> @@ -5378,6 +5400,39 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
> PIPE_CONF_CHECK_I(master_transcoder);
> PIPE_CONF_CHECK_X(bigjoiner_pipes);
>
> + PIPE_DSC_CONF_CHECK_BOOL(block_pred_enable);
You should be able to pass the dsc substruct as name, no need to define
dupe macros for DSC. See e.g. PIPE_CONF_CHECK_I(hw.enable); above in the
patch context above.
> + PIPE_DSC_CONF_CHECK_BOOL(convert_rgb);
> + PIPE_DSC_CONF_CHECK_BOOL(simple_422);
> + PIPE_DSC_CONF_CHECK_BOOL(native_422);
> + PIPE_DSC_CONF_CHECK_BOOL(native_420);
> + PIPE_DSC_CONF_CHECK_BOOL(vbr_enable);
> + PIPE_DSC_CONF_CHECK_I(line_buf_depth);
> + PIPE_DSC_CONF_CHECK_I(bits_per_component);
> + PIPE_DSC_CONF_CHECK_I(pic_width);
> + PIPE_DSC_CONF_CHECK_I(pic_height);
> + PIPE_DSC_CONF_CHECK_I(slice_width);
> + PIPE_DSC_CONF_CHECK_I(slice_height);
> + PIPE_DSC_CONF_CHECK_I(initial_dec_delay);
> + PIPE_DSC_CONF_CHECK_I(initial_xmit_delay);
> + PIPE_DSC_CONF_CHECK_I(scale_decrement_interval);
> + PIPE_DSC_CONF_CHECK_I(scale_increment_interval);
> + PIPE_DSC_CONF_CHECK_I(initial_scale_value);
> + PIPE_DSC_CONF_CHECK_I(first_line_bpg_offset);
> + PIPE_DSC_CONF_CHECK_I(flatness_min_qp);
> + PIPE_DSC_CONF_CHECK_I(flatness_max_qp);
> + PIPE_DSC_CONF_CHECK_I(slice_bpg_offset);
> + PIPE_DSC_CONF_CHECK_I(nfl_bpg_offset);
> + PIPE_DSC_CONF_CHECK_I(initial_offset);
> + PIPE_DSC_CONF_CHECK_I(final_offset);
> + PIPE_DSC_CONF_CHECK_I(rc_model_size);
> + PIPE_DSC_CONF_CHECK_I(rc_quant_incr_limit0);
> + PIPE_DSC_CONF_CHECK_I(rc_quant_incr_limit1);
> + PIPE_DSC_CONF_CHECK_I(slice_chunk_size);
> + if (DISPLAY_VER(dev_priv) >= 14) {
> + PIPE_DSC_CONF_CHECK_I(second_line_bpg_offset);
> + PIPE_DSC_CONF_CHECK_I(nsl_bpg_offset);
> + }
I'd prefer it if we didn't have version checks here. Just check the
values anyway, it should be zeros in both hw and sw states for display <
14, and if it's not, the state checker caught a bug.
> +
> PIPE_CONF_CHECK_I(dsc.compression_enable);
> PIPE_CONF_CHECK_I(dsc.dsc_split);
> PIPE_CONF_CHECK_I(dsc.compressed_bpp);
--
Jani Nikula, Intel Open Source Graphics Center
next prev parent reply other threads:[~2023-07-10 11:15 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-10 10:09 [Intel-gfx] [PATCH 0/5] Add DSC PPS readout Suraj Kandpal
2023-07-10 10:09 ` [Intel-gfx] [PATCH 1/5] drm/i915/dsc: Add PPS enum Suraj Kandpal
2023-07-10 10:45 ` Jani Nikula
2023-07-10 10:45 ` Jani Nikula
2023-07-11 6:12 ` Kandpal, Suraj
2023-07-10 10:09 ` [Intel-gfx] [PATCH 2/5] drm/i915/vdsc: Add function to read any PPS register Suraj Kandpal
2023-07-10 10:52 ` Jani Nikula
2023-07-10 10:56 ` Jani Nikula
2023-07-10 10:09 ` [Intel-gfx] [PATCH 3/5] drm/i915/vdsc: Add function to write in PPS registers Suraj Kandpal
2023-07-10 10:57 ` Jani Nikula
2023-07-10 10:09 ` [Intel-gfx] [PATCH 4/5] drm/i915/vdsc: Fill the intel_dsc_get_pps_config function Suraj Kandpal
2023-07-10 11:11 ` Jani Nikula
2023-07-11 9:42 ` Kandpal, Suraj
2023-07-10 10:09 ` [Intel-gfx] [PATCH 5/5] drm/i915/display: Compare the readout dsc pps params Suraj Kandpal
2023-07-10 11:15 ` Jani Nikula [this message]
2023-07-11 5:15 ` Kandpal, Suraj
2023-07-10 13:45 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for Add DSC PPS readout 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=87ttuchvay.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=suraj.kandpal@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.