From: Jani Nikula <jani.nikula@intel.com>
To: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: intel-gfx@lists.freedesktop.org,
Manasi Navare <manasi.d.navare@intel.com>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/mst: use intel_de_rmw() to simplify VC payload alloc set/clear
Date: Fri, 13 Aug 2021 22:30:08 +0300 [thread overview]
Message-ID: <87fsvdkurj.fsf@intel.com> (raw)
In-Reply-To: <87o8a1l6uz.fsf@intel.com>
On Fri, 13 Aug 2021, Jani Nikula <jani.nikula@intel.com> wrote:
> On Fri, 13 Aug 2021, Rodrigo Vivi <rodrigo.vivi@intel.com> wrote:
>> On Fri, Aug 13, 2021 at 02:56:10PM +0300, Jani Nikula wrote:
>>> Less is more, fewer lines to wonder about.
>>>
>>> Cc: Manasi Navare <manasi.d.navare@intel.com>
>>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>>
>> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
>
> Thanks!
And pushed.
BR,
Jani.
>
>> although sometimes I get myself wondering we might get in some
>> case where our check inside the rmw function, to avoid writing the
>> same value, could cause some situation where we should perform
>> the write operation regardless.
>
> Me too. I could be persuaded to change the rmw function to not optimize
> the write away.
>
> BR,
> Jani.
>
>>
>>> ---
>>> drivers/gpu/drm/i915/display/intel_dp_mst.c | 9 ++-------
>>> 1 file changed, 2 insertions(+), 7 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
>>> index 8d13d7b26a25..9859c0334ebc 100644
>>> --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
>>> +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
>>> @@ -396,7 +396,6 @@ static void intel_mst_post_disable_dp(struct intel_atomic_state *state,
>>> to_intel_connector(old_conn_state->connector);
>>> struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
>>> bool last_mst_stream;
>>> - u32 val;
>>>
>>> intel_dp->active_mst_links--;
>>> last_mst_stream = intel_dp->active_mst_links == 0;
>>> @@ -412,12 +411,8 @@ static void intel_mst_post_disable_dp(struct intel_atomic_state *state,
>>>
>>> clear_act_sent(encoder, old_crtc_state);
>>>
>>> - val = intel_de_read(dev_priv,
>>> - TRANS_DDI_FUNC_CTL(old_crtc_state->cpu_transcoder));
>>> - val &= ~TRANS_DDI_DP_VC_PAYLOAD_ALLOC;
>>> - intel_de_write(dev_priv,
>>> - TRANS_DDI_FUNC_CTL(old_crtc_state->cpu_transcoder),
>>> - val);
>>> + intel_de_rmw(dev_priv, TRANS_DDI_FUNC_CTL(old_crtc_state->cpu_transcoder),
>>> + TRANS_DDI_DP_VC_PAYLOAD_ALLOC, 0);
>>>
>>> wait_for_act_sent(encoder, old_crtc_state);
>>>
>>> --
>>> 2.20.1
>>>
--
Jani Nikula, Intel Open Source Graphics Center
next prev parent reply other threads:[~2021-08-13 19:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-13 11:56 [Intel-gfx] [PATCH] drm/i915/mst: use intel_de_rmw() to simplify VC payload alloc set/clear Jani Nikula
2021-08-13 14:07 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2021-08-13 14:21 ` [Intel-gfx] [PATCH] " Rodrigo Vivi
2021-08-13 15:08 ` Jani Nikula
2021-08-13 19:30 ` Jani Nikula [this message]
2021-08-13 17:28 ` [Intel-gfx] ✗ Fi.CI.IGT: failure for " 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=87fsvdkurj.fsf@intel.com \
--to=jani.nikula@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=manasi.d.navare@intel.com \
--cc=rodrigo.vivi@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