From: Jani Nikula <jani.nikula@linux.intel.com>
To: Suraj Kandpal <suraj.kandpal@intel.com>,
intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Cc: ankit.k.nautiyal@intel.com, chaitanya.kumar.borah@intel.com,
dnyaneshwar.bhadane@intel.com,
Suraj Kandpal <suraj.kandpal@intel.com>
Subject: Re: [PATCH 2/2] drm/i915/ddi: Optimize mtl_port_buf_ctl_program
Date: Fri, 03 Jan 2025 12:08:40 +0200 [thread overview]
Message-ID: <87msg8mcpj.fsf@intel.com> (raw)
In-Reply-To: <20250103051705.145161-3-suraj.kandpal@intel.com>
On Fri, 03 Jan 2025, Suraj Kandpal <suraj.kandpal@intel.com> wrote:
> A small optimization and cleanup for mtl_port_buf_ctl_program function
> which lets use intel_de_rmw instead of a intel_de_read and
> intel_de_write.
>
> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_ddi.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
> index 5e944cae116a..c3c8a1d255a1 100644
> --- a/drivers/gpu/drm/i915/display/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/display/intel_ddi.c
> @@ -2537,13 +2537,10 @@ static void mtl_port_buf_ctl_program(struct intel_encoder *encoder,
> struct intel_display *display = to_intel_display(encoder);
> struct intel_digital_port *dig_port = enc_to_dig_port(encoder);
> enum port port = encoder->port;
> - u32 val;
> + u32 val = 0;
>
> - val = intel_de_read(display, XELPDP_PORT_BUF_CTL1(i915, port));
> - val &= ~XELPDP_PORT_WIDTH_MASK;
> val |= XELPDP_PORT_WIDTH(mtl_get_port_width(crtc_state->lane_count));
>
> - val &= ~XELPDP_PORT_BUF_PORT_DATA_WIDTH_MASK;
> if (intel_dp_is_uhbr(crtc_state))
> val |= XELPDP_PORT_BUF_PORT_DATA_40BIT;
> else
> @@ -2552,7 +2549,9 @@ static void mtl_port_buf_ctl_program(struct intel_encoder *encoder,
> if (dig_port->lane_reversal)
> val |= XELPDP_PORT_REVERSAL;
>
> - intel_de_write(display, XELPDP_PORT_BUF_CTL1(display, port), val);
> + intel_de_rmw(display, XELPDP_PORT_BUF_CTL1(display, port),
> + XELPDP_PORT_WIDTH_MASK | XELPDP_PORT_BUF_PORT_DATA_WIDTH_MASK,
> + val);
> }
>
> static void mtl_port_buf_ctl_io_selection(struct intel_encoder *encoder)
--
Jani Nikula, Intel
next prev parent reply other threads:[~2025-01-03 10:08 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-03 5:17 [PATCH 0/2] Clean and Optimise mtl_ddi_prepare_link_retrain Suraj Kandpal
2025-01-03 5:17 ` [PATCH 1/2] drm/i915/dp: Use intel_display instead of drm_i915_private Suraj Kandpal
2025-01-03 10:08 ` Jani Nikula
2025-01-03 5:17 ` [PATCH 2/2] drm/i915/ddi: Optimize mtl_port_buf_ctl_program Suraj Kandpal
2025-01-03 10:08 ` Jani Nikula [this message]
2025-01-03 6:21 ` ✓ CI.Patch_applied: success for Clean and Optimise mtl_ddi_prepare_link_retrain Patchwork
2025-01-03 6:21 ` ✓ CI.checkpatch: " Patchwork
2025-01-03 6:23 ` ✓ CI.KUnit: " Patchwork
2025-01-03 6:41 ` ✓ CI.Build: " Patchwork
2025-01-03 6:43 ` ✓ CI.Hooks: " Patchwork
2025-01-03 6:45 ` ✓ CI.checksparse: " Patchwork
2025-01-03 7:01 ` ✗ i915.CI.BAT: failure " Patchwork
2025-01-03 7:17 ` ✗ Xe.CI.BAT: " Patchwork
2025-01-03 8:50 ` ✗ Xe.CI.Full: " Patchwork
2025-01-06 10:38 ` ✓ i915.CI.BAT: success " Patchwork
2025-01-06 14:59 ` ✗ i915.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=87msg8mcpj.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=ankit.k.nautiyal@intel.com \
--cc=chaitanya.kumar.borah@intel.com \
--cc=dnyaneshwar.bhadane@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@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.