[PATCH 15/15] drm/i915/intel_dp: Add support for forcing ultrajoiner
Ville Syrjälä
ville.syrjala at linux.intel.com
Thu Sep 19 18:45:31 UTC 2024
On Wed, Sep 18, 2024 at 08:13:43PM +0530, Ankit Nautiyal wrote:
> Allow forcing ultrajoiner through debugfs.
>
> Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal at intel.com>
> Reviewed-by: Suraj Kandpal <suraj.kandpal at intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_display_debugfs.c | 8 ++++++++
> drivers/gpu/drm/i915/display/intel_dp.c | 2 ++
> 2 files changed, 10 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> index 85742400348f..f5dcc1a4c45c 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> @@ -1520,6 +1520,7 @@ static ssize_t i915_joiner_write(struct file *file,
> struct seq_file *m = file->private_data;
> struct intel_connector *connector = m->private;
> struct intel_display *display = to_intel_display(connector);
> + struct drm_i915_private *i915 = to_i915(display->drm);
> int force_join_pipes = 0;
> int ret;
>
> @@ -1538,6 +1539,13 @@ static ssize_t i915_joiner_write(struct file *file,
> case 2:
> connector->force_joined_pipes = force_join_pipes;
> break;
> + case 4:
> + if (HAS_ULTRAJOINER(i915)) {
> + connector->force_joined_pipes = 4;
You assigned '... = force_join_pipes' in the other cases
so I'd do the same here instead of hardcoding the =4.
> + break;
> + }
> +
> + fallthrough;
> default:
> drm_dbg(display->drm, "Ignoring Invalid num of pipes %d for force joining\n",
> force_join_pipes);
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 4005700ab043..be82d4485fee 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -1317,6 +1317,8 @@ int intel_dp_compute_num_pipes(struct intel_dp *intel_dp,
> case 1:
> fallthrough;
> case 2:
> + fallthrough;
Unnecessary fallthrough.
> + case 4:
> return connector->force_joined_pipes;
> default:
> MISSING_CASE(connector->force_joined_pipes);
> --
> 2.45.2
--
Ville Syrjälä
Intel
More information about the Intel-gfx
mailing list