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 1/2] drm/i915/hdcp: add intel_atomic_state argument to hdcp_enable function
Date: Thu, 11 May 2023 10:57:25 +0300 [thread overview]
Message-ID: <87cz37mhay.fsf@intel.com> (raw)
In-Reply-To: <20230511055705.611809-2-suraj.kandpal@intel.com>
On Thu, 11 May 2023, Suraj Kandpal <suraj.kandpal@intel.com> wrote:
> Pass all the parameter in intel_encoder->enable()
> to intel_hdcp_enable as we need intel_atomic_state
> later down to get acquire_ctx.
You're passing connector, not encoder, though.
BR,
Jani.
>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_ddi.c | 5 +++--
> drivers/gpu/drm/i915/display/intel_dp_mst.c | 4 ++--
> drivers/gpu/drm/i915/display/intel_hdcp.c | 12 +++++++-----
> drivers/gpu/drm/i915/display/intel_hdcp.h | 6 ++++--
> 4 files changed, 16 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
> index 29e4bfab4635..e838d56415cd 100644
> --- a/drivers/gpu/drm/i915/display/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/display/intel_ddi.c
> @@ -3264,9 +3264,10 @@ static void intel_enable_ddi(struct intel_atomic_state *state,
> /* Enable hdcp if it's desired */
> if (conn_state->content_protection ==
> DRM_MODE_CONTENT_PROTECTION_DESIRED)
> - intel_hdcp_enable(to_intel_connector(conn_state->connector),
> + intel_hdcp_enable(state, to_intel_connector(conn_state->connector),
> crtc_state,
> - (u8)conn_state->hdcp_content_type);
> + conn_state);
> +
> }
>
> static void intel_disable_ddi_dp(struct intel_atomic_state *state,
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> index 2c49d9ab86a2..e1e040434a97 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> @@ -800,9 +800,9 @@ static void intel_mst_enable_dp(struct intel_atomic_state *state,
> /* Enable hdcp if it's desired */
> if (conn_state->content_protection ==
> DRM_MODE_CONTENT_PROTECTION_DESIRED)
> - intel_hdcp_enable(to_intel_connector(conn_state->connector),
> + intel_hdcp_enable(state, to_intel_connector(conn_state->connector),
> pipe_config,
> - (u8)conn_state->hdcp_content_type);
> + conn_state);
> }
>
> static bool intel_dp_mst_enc_get_hw_state(struct intel_encoder *encoder,
> diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c b/drivers/gpu/drm/i915/display/intel_hdcp.c
> index 650232c4892b..1928c80cb6a2 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdcp.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdcp.c
> @@ -2330,8 +2330,10 @@ int intel_hdcp_init(struct intel_connector *connector,
> return 0;
> }
>
> -int intel_hdcp_enable(struct intel_connector *connector,
> - const struct intel_crtc_state *pipe_config, u8 content_type)
> +int intel_hdcp_enable(struct intel_atomic_state *state,
> + struct intel_connector *connector,
> + const struct intel_crtc_state *pipe_config,
> + const struct drm_connector_state *conn_state)
> {
> struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
> struct intel_digital_port *dig_port = intel_attached_dig_port(connector);
> @@ -2352,7 +2354,7 @@ int intel_hdcp_enable(struct intel_connector *connector,
> mutex_lock(&dig_port->hdcp_mutex);
> drm_WARN_ON(&dev_priv->drm,
> hdcp->value == DRM_MODE_CONTENT_PROTECTION_ENABLED);
> - hdcp->content_type = content_type;
> + hdcp->content_type = (u8)conn_state->content_type;
>
> if (intel_crtc_has_type(pipe_config, INTEL_OUTPUT_DP_MST)) {
> hdcp->cpu_transcoder = pipe_config->mst_master_transcoder;
> @@ -2483,9 +2485,9 @@ void intel_hdcp_update_pipe(struct intel_atomic_state *state,
> }
>
> if (desired_and_not_enabled || content_protection_type_changed)
> - intel_hdcp_enable(connector,
> + intel_hdcp_enable(state, connector,
> crtc_state,
> - (u8)conn_state->hdcp_content_type);
> + conn_state);
> }
>
> void intel_hdcp_component_fini(struct drm_i915_private *dev_priv)
> diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.h b/drivers/gpu/drm/i915/display/intel_hdcp.h
> index 8f53b0c7fe5c..6aaec4df6f6c 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdcp.h
> +++ b/drivers/gpu/drm/i915/display/intel_hdcp.h
> @@ -28,8 +28,10 @@ void intel_hdcp_atomic_check(struct drm_connector *connector,
> int intel_hdcp_init(struct intel_connector *connector,
> struct intel_digital_port *dig_port,
> const struct intel_hdcp_shim *hdcp_shim);
> -int intel_hdcp_enable(struct intel_connector *connector,
> - const struct intel_crtc_state *pipe_config, u8 content_type);
> +int intel_hdcp_enable(struct intel_atomic_state *state,
> + struct intel_connector *connector,
> + const struct intel_crtc_state *pipe_config,
> + const struct drm_connector_state *conn_state);
> int intel_hdcp_disable(struct intel_connector *connector);
> void intel_hdcp_update_pipe(struct intel_atomic_state *state,
> struct intel_encoder *encoder,
--
Jani Nikula, Intel Open Source Graphics Center
next prev parent reply other threads:[~2023-05-11 7:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-11 5:57 [Intel-gfx] [PATCH 0/2] Fix modeset locking issue in HDCP MST Suraj Kandpal
2023-05-11 5:57 ` [Intel-gfx] [PATCH 1/2] drm/i915/hdcp: add intel_atomic_state argument to hdcp_enable function Suraj Kandpal
2023-05-11 7:57 ` Jani Nikula [this message]
2023-05-11 9:14 ` Kandpal, Suraj
2023-05-11 5:57 ` [Intel-gfx] [PATCH 2/2] drm/i915/hdcp: Fix modeset locking issue in hdcp mst Suraj Kandpal
2023-05-11 9:21 ` Nautiyal, Ankit K
2023-05-11 6:39 ` [Intel-gfx] ✓ Fi.CI.BAT: success for Fix modeset locking issue in HDCP MST Patchwork
2023-05-11 8:13 ` [Intel-gfx] ✗ Fi.CI.IGT: 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=87cz37mhay.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.