From: Imre Deak <imre.deak@intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH 1/6] drm/i915/dp: constify struct link_config_limits pointers
Date: Thu, 30 Jan 2025 15:47:31 +0200 [thread overview]
Message-ID: <Z5uC83oEarvvX7Y3@ideak-desk.fi.intel.com> (raw)
In-Reply-To: <6ab2f68eef7849aca18e82ad788e44e9f82b576e.1738161945.git.jani.nikula@intel.com>
On Wed, Jan 29, 2025 at 04:46:33PM +0200, Jani Nikula wrote:
> The limits get passed around, but are only modified in a few
> places. Constify the pointers elsewhere so it's easier to follow where
> they can be modified.
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_dp.c | 18 +++++++++---------
> drivers/gpu/drm/i915/display/intel_dp.h | 2 +-
> drivers/gpu/drm/i915/display/intel_dp_mst.c | 6 +++---
> 3 files changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index a286e5e31c4d..d367f9c2fa23 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -1941,7 +1941,7 @@ static bool is_bw_sufficient_for_dsc_config(u16 compressed_bppx16, u32 link_cloc
>
> static int dsc_compute_link_config(struct intel_dp *intel_dp,
> struct intel_crtc_state *pipe_config,
> - struct link_config_limits *limits,
> + const struct link_config_limits *limits,
> u16 compressed_bppx16,
> int timeslots)
> {
> @@ -2061,7 +2061,7 @@ static int dsc_src_max_compressed_bpp(struct intel_dp *intel_dp)
> static int
> icl_dsc_compute_link_config(struct intel_dp *intel_dp,
> struct intel_crtc_state *pipe_config,
> - struct link_config_limits *limits,
> + const struct link_config_limits *limits,
> int dsc_max_bpp,
> int dsc_min_bpp,
> int pipe_bpp,
> @@ -2104,7 +2104,7 @@ static int
> xelpd_dsc_compute_link_config(struct intel_dp *intel_dp,
> const struct intel_connector *connector,
> struct intel_crtc_state *pipe_config,
> - struct link_config_limits *limits,
> + const struct link_config_limits *limits,
> int dsc_max_bpp,
> int dsc_min_bpp,
> int pipe_bpp,
> @@ -2153,7 +2153,7 @@ xelpd_dsc_compute_link_config(struct intel_dp *intel_dp,
> static int dsc_compute_compressed_bpp(struct intel_dp *intel_dp,
> const struct intel_connector *connector,
> struct intel_crtc_state *pipe_config,
> - struct link_config_limits *limits,
> + const struct link_config_limits *limits,
> int pipe_bpp,
> int timeslots)
> {
> @@ -2185,7 +2185,7 @@ int intel_dp_dsc_min_src_input_bpc(void)
> }
>
> static
> -bool is_dsc_pipe_bpp_sufficient(struct link_config_limits *limits,
> +bool is_dsc_pipe_bpp_sufficient(const struct link_config_limits *limits,
> int pipe_bpp)
> {
> return pipe_bpp >= limits->pipe.min_bpp &&
> @@ -2194,7 +2194,7 @@ bool is_dsc_pipe_bpp_sufficient(struct link_config_limits *limits,
>
> static
> int intel_dp_force_dsc_pipe_bpp(struct intel_dp *intel_dp,
> - struct link_config_limits *limits)
> + const struct link_config_limits *limits)
> {
> struct intel_display *display = to_intel_display(intel_dp);
> int forced_bpp;
> @@ -2220,7 +2220,7 @@ int intel_dp_force_dsc_pipe_bpp(struct intel_dp *intel_dp,
> static int intel_dp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp,
> struct intel_crtc_state *pipe_config,
> struct drm_connector_state *conn_state,
> - struct link_config_limits *limits,
> + const struct link_config_limits *limits,
> int timeslots)
> {
> const struct intel_connector *connector =
> @@ -2270,7 +2270,7 @@ static int intel_dp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp,
> static int intel_edp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp,
> struct intel_crtc_state *pipe_config,
> struct drm_connector_state *conn_state,
> - struct link_config_limits *limits)
> + const struct link_config_limits *limits)
> {
> struct intel_display *display = to_intel_display(intel_dp);
> struct intel_connector *connector =
> @@ -2335,7 +2335,7 @@ static void intel_dp_fec_compute_config(struct intel_dp *intel_dp,
> int intel_dp_dsc_compute_config(struct intel_dp *intel_dp,
> struct intel_crtc_state *pipe_config,
> struct drm_connector_state *conn_state,
> - struct link_config_limits *limits,
> + const struct link_config_limits *limits,
> int timeslots,
> bool compute_pipe_bpp)
> {
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.h b/drivers/gpu/drm/i915/display/intel_dp.h
> index ca49f0a05da5..ffc27f8ad226 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.h
> +++ b/drivers/gpu/drm/i915/display/intel_dp.h
> @@ -75,7 +75,7 @@ int intel_dp_compute_config(struct intel_encoder *encoder,
> int intel_dp_dsc_compute_config(struct intel_dp *intel_dp,
> struct intel_crtc_state *pipe_config,
> struct drm_connector_state *conn_state,
> - struct link_config_limits *limits,
> + const struct link_config_limits *limits,
> int timeslots,
> bool recompute_pipe_bpp);
> void intel_dp_audio_compute_config(struct intel_encoder *encoder,
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> index d58facf78aa9..2acc26aad6a0 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> @@ -363,7 +363,7 @@ int intel_dp_mtp_tu_compute_config(struct intel_dp *intel_dp,
> static int mst_stream_find_vcpi_slots_for_bpp(struct intel_dp *intel_dp,
> struct intel_crtc_state *crtc_state,
> int max_bpp, int min_bpp,
> - struct link_config_limits *limits,
> + const struct link_config_limits *limits,
> struct drm_connector_state *conn_state,
> int step, bool dsc)
> {
> @@ -388,7 +388,7 @@ static int mst_stream_find_vcpi_slots_for_bpp(struct intel_dp *intel_dp,
> static int mst_stream_compute_link_config(struct intel_dp *intel_dp,
> struct intel_crtc_state *crtc_state,
> struct drm_connector_state *conn_state,
> - struct link_config_limits *limits)
> + const struct link_config_limits *limits)
> {
> /*
> * FIXME: allocate the BW according to link_bpp, which in the case of
> @@ -404,7 +404,7 @@ static int mst_stream_compute_link_config(struct intel_dp *intel_dp,
> static int mst_stream_dsc_compute_link_config(struct intel_dp *intel_dp,
> struct intel_crtc_state *crtc_state,
> struct drm_connector_state *conn_state,
> - struct link_config_limits *limits)
> + const struct link_config_limits *limits)
> {
> struct intel_display *display = to_intel_display(intel_dp);
> struct intel_connector *connector = to_intel_connector(conn_state->connector);
> --
> 2.39.5
>
next prev parent reply other threads:[~2025-01-30 13:46 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-29 14:46 [PATCH 0/6] drm/i915: DP and DP MST cleanups Jani Nikula
2025-01-29 14:46 ` [PATCH 1/6] drm/i915/dp: constify struct link_config_limits pointers Jani Nikula
2025-01-30 13:47 ` Imre Deak [this message]
2025-01-29 14:46 ` [PATCH 2/6] drm/i915/dp: change the order of intel_dp_mtp_tu_compute_config() params Jani Nikula
2025-01-30 14:03 ` Imre Deak
2025-01-29 14:46 ` [PATCH 3/6] drm/i915/mst: change where lane_count and port_clock are set Jani Nikula
2025-01-30 14:16 ` Imre Deak
2025-01-29 14:46 ` [PATCH 4/6] drm/i915/mst: handle mst pbn_div in intel_dp_mtp_tu_compute_config() Jani Nikula
2025-01-30 14:23 ` Imre Deak
2025-01-30 21:14 ` Jani Nikula
2025-01-30 21:34 ` Imre Deak
2025-01-29 14:46 ` [PATCH 5/6] drm/i915/mst: remove unnecessary mst_stream_find_vcpi_slots_for_bpp() Jani Nikula
2025-01-30 14:25 ` Imre Deak
2025-01-29 14:46 ` [PATCH 6/6] drm/i915/mst: use min_array() and max_array() instead of hand-rolling Jani Nikula
2025-01-30 14:35 ` Imre Deak
2025-01-30 14:39 ` Imre Deak
2025-01-31 9:20 ` Jani Nikula
2025-01-31 9:38 ` Raag Jadav
2025-01-29 16:31 ` ✓ CI.Patch_applied: success for series starting with [1/6] drm/i915/dp: constify struct link_config_limits pointers Patchwork
2025-01-29 16:32 ` ✓ CI.checkpatch: " Patchwork
2025-01-29 16:33 ` ✓ CI.KUnit: " Patchwork
2025-01-29 16:49 ` ✓ CI.Build: success for drm/i915: DP and DP MST cleanups Patchwork
2025-01-29 16:51 ` ✗ CI.Hooks: failure " Patchwork
2025-01-29 16:53 ` ✗ CI.checksparse: warning " Patchwork
2025-01-29 17:13 ` ✓ Xe.CI.BAT: success " Patchwork
2025-01-30 0:24 ` ✗ Xe.CI.Full: failure " 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=Z5uC83oEarvvX7Y3@ideak-desk.fi.intel.com \
--to=imre.deak@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@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