From: Jani Nikula <jani.nikula@intel.com>
To: Bhanuprakash Modem <bhanuprakash.modem@intel.com>,
intel-gfx@lists.freedesktop.org
Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com>,
Ankit Nautiyal <ankit.k.nautiyal@intel.com>,
Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>
Subject: Re: [V2 1/2] drm/i915/drrs: Refactor CPU transcoder DRRS check
Date: Thu, 07 Mar 2024 16:08:48 +0200 [thread overview]
Message-ID: <87h6hiw2vj.fsf@intel.com> (raw)
In-Reply-To: <20240228055502.2857819-1-bhanuprakash.modem@intel.com>
On Wed, 28 Feb 2024, Bhanuprakash Modem <bhanuprakash.modem@intel.com> wrote:
> Rename cpu_transcoder_has_drrs() to intel_cpu_transcoder_has_drrs()
> and make it as non-static, therefore it can be re-used.
>
> V2:
> - Move helpers to intel_drrs.[ch] (Jani)
> - Fix commit message (Jani)
>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
> Cc: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Pushed to drm-intel-next with some checkpatch fixes.
BR,
Jani.
> ---
> drivers/gpu/drm/i915/display/intel_dp.c | 12 ++----------
> drivers/gpu/drm/i915/display/intel_drrs.c | 9 +++++++++
> drivers/gpu/drm/i915/display/intel_drrs.h | 3 +++
> 3 files changed, 14 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 6ece2c563c7a..0f3cd072a8fb 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -67,6 +67,7 @@
> #include "intel_dp_tunnel.h"
> #include "intel_dpio_phy.h"
> #include "intel_dpll.h"
> +#include "intel_drrs.h"
> #include "intel_fifo_underrun.h"
> #include "intel_hdcp.h"
> #include "intel_hdmi.h"
> @@ -2683,15 +2684,6 @@ intel_dp_compute_hdr_metadata_infoframe_sdp(struct intel_dp *intel_dp,
> intel_hdmi_infoframe_enable(HDMI_PACKET_TYPE_GAMUT_METADATA);
> }
>
> -static bool cpu_transcoder_has_drrs(struct drm_i915_private *i915,
> - enum transcoder cpu_transcoder)
> -{
> - if (HAS_DOUBLE_BUFFERED_M_N(i915))
> - return true;
> -
> - return intel_cpu_transcoder_has_m2_n2(i915, cpu_transcoder);
> -}
> -
> static bool can_enable_drrs(struct intel_connector *connector,
> const struct intel_crtc_state *pipe_config,
> const struct drm_display_mode *downclock_mode)
> @@ -2714,7 +2706,7 @@ static bool can_enable_drrs(struct intel_connector *connector,
> if (pipe_config->has_pch_encoder)
> return false;
>
> - if (!cpu_transcoder_has_drrs(i915, pipe_config->cpu_transcoder))
> + if (!intel_cpu_transcoder_has_drrs(i915, pipe_config->cpu_transcoder))
> return false;
>
> return downclock_mode &&
> diff --git a/drivers/gpu/drm/i915/display/intel_drrs.c b/drivers/gpu/drm/i915/display/intel_drrs.c
> index 169ef38ff188..4743495ad41f 100644
> --- a/drivers/gpu/drm/i915/display/intel_drrs.c
> +++ b/drivers/gpu/drm/i915/display/intel_drrs.c
> @@ -63,6 +63,15 @@ const char *intel_drrs_type_str(enum drrs_type drrs_type)
> return str[drrs_type];
> }
>
> +bool intel_cpu_transcoder_has_drrs(struct drm_i915_private *i915,
> + enum transcoder cpu_transcoder)
> +{
> + if (HAS_DOUBLE_BUFFERED_M_N(i915))
> + return true;
> +
> + return intel_cpu_transcoder_has_m2_n2(i915, cpu_transcoder);
> +}
> +
> static void
> intel_drrs_set_refresh_rate_pipeconf(struct intel_crtc *crtc,
> enum drrs_refresh_rate refresh_rate)
> diff --git a/drivers/gpu/drm/i915/display/intel_drrs.h b/drivers/gpu/drm/i915/display/intel_drrs.h
> index 8ef5f93a80ff..d0af091ed4c5 100644
> --- a/drivers/gpu/drm/i915/display/intel_drrs.h
> +++ b/drivers/gpu/drm/i915/display/intel_drrs.h
> @@ -9,12 +9,15 @@
> #include <linux/types.h>
>
> enum drrs_type;
> +enum transcoder;
> struct drm_i915_private;
> struct intel_atomic_state;
> struct intel_crtc;
> struct intel_crtc_state;
> struct intel_connector;
>
> +bool intel_cpu_transcoder_has_drrs(struct drm_i915_private *i915,
> + enum transcoder cpu_transcoder);
> const char *intel_drrs_type_str(enum drrs_type drrs_type);
> bool intel_drrs_is_active(struct intel_crtc *crtc);
> void intel_drrs_activate(const struct intel_crtc_state *crtc_state);
--
Jani Nikula, Intel
next prev parent reply other threads:[~2024-03-07 14:08 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-27 12:38 [PATCH 1/2] drm/i915/display/drrs: Refactor CPU transcoder DRRS check Bhanuprakash Modem
2024-02-27 12:38 ` [PATCH 2/2] drm/i915/display/debugfs: Fix duplicate checks in i915_drrs_status Bhanuprakash Modem
2024-02-27 14:12 ` [PATCH 1/2] drm/i915/display/drrs: Refactor CPU transcoder DRRS check Jani Nikula
2024-02-27 14:58 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] " Patchwork
2024-02-27 14:58 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-02-27 15:18 ` ✓ Fi.CI.BAT: success " Patchwork
2024-02-28 1:15 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-02-28 5:55 ` [V2 1/2] drm/i915/drrs: " Bhanuprakash Modem
2024-03-07 14:08 ` Jani Nikula [this message]
2024-02-28 8:10 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [V2,1/2] drm/i915/drrs: Refactor CPU transcoder DRRS check (rev2) Patchwork
2024-02-28 8:10 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-02-28 8:28 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-02-28 8:54 ` Modem, Bhanuprakash
2024-02-28 9:44 ` Illipilli, TejasreeX
2024-02-28 9:42 ` ✓ Fi.CI.BAT: success " Patchwork
2024-02-28 22:04 ` ✓ 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=87h6hiw2vj.fsf@intel.com \
--to=jani.nikula@intel.com \
--cc=ankit.k.nautiyal@intel.com \
--cc=bhanuprakash.modem@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=mitulkumar.ajitkumar.golani@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).