From: Jani Nikula <jani.nikula@linux.intel.com>
To: Andrzej Hajda <andrzej.hajda@intel.com>, intel-gfx@lists.freedesktop.org
Cc: Andrzej Hajda <andrzej.hajda@intel.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/display/vlv: use intel_de_rmw if possible
Date: Fri, 16 Dec 2022 13:15:08 +0200 [thread overview]
Message-ID: <878rj7vbur.fsf@intel.com> (raw)
In-Reply-To: <20221216092356.3336893-1-andrzej.hajda@intel.com>
On Fri, 16 Dec 2022, Andrzej Hajda <andrzej.hajda@intel.com> wrote:
> The helper makes the code more compact and readable.
>
> Signed-off-by: Andrzej Hajda <andrzej.hajda@intel.com>
[snip]
> @@ -649,23 +611,18 @@ static void intel_dsi_port_enable(struct intel_encoder *encoder,
> enum port port;
>
> if (intel_dsi->dual_link == DSI_DUAL_LINK_FRONT_BACK) {
> - u32 temp;
> + u32 temp = intel_dsi->pixel_overlap;
> if (IS_GEMINILAKE(dev_priv) || IS_BROXTON(dev_priv)) {
> - for_each_dsi_port(port, intel_dsi->ports) {
> - temp = intel_de_read(dev_priv,
> - MIPI_CTRL(port));
> - temp &= ~BXT_PIXEL_OVERLAP_CNT_MASK |
> - intel_dsi->pixel_overlap <<
> - BXT_PIXEL_OVERLAP_CNT_SHIFT;
This can't possibly be correct to begin with.
I think it's supposed to be the logical
temp &= ~BXT_PIXEL_OVERLAP_CNT_MASK;
temp |= intel_dsi->pixel_overlap << BXT_PIXEL_OVERLAP_CNT_SHIFT;
Nothing else makes sense, really.
I think I'd just fix that in a separate patch first, and then do the rmw
changes on top.
> - intel_de_write(dev_priv, MIPI_CTRL(port),
> - temp);
> - }
> + for_each_dsi_port(port, intel_dsi->ports)
> + intel_de_rmw(dev_priv, MIPI_CTRL(port),
> + BXT_PIXEL_OVERLAP_CNT_MASK &
> + ~(temp << BXT_PIXEL_OVERLAP_CNT_SHIFT),
> + 0);
> } else {
> - temp = intel_de_read(dev_priv, VLV_CHICKEN_3);
> - temp &= ~PIXEL_OVERLAP_CNT_MASK |
> - intel_dsi->pixel_overlap <<
> - PIXEL_OVERLAP_CNT_SHIFT;
> - intel_de_write(dev_priv, VLV_CHICKEN_3, temp);
Ditto here.
> + intel_de_rmw(dev_priv, VLV_CHICKEN_3,
> + PIXEL_OVERLAP_CNT_MASK &
> + ~(temp << PIXEL_OVERLAP_CNT_SHIFT),
> + 0);
> }
> }
>
Everything else in the patch checks out. With the above split out and
the rmw rebased,
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
--
Jani Nikula, Intel Open Source Graphics Center
next prev parent reply other threads:[~2022-12-16 11:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-16 9:23 [Intel-gfx] [PATCH] drm/i915/display/vlv: use intel_de_rmw if possible Andrzej Hajda
2022-12-16 9:42 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2022-12-16 10:11 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-12-16 11:15 ` Jani Nikula [this message]
2022-12-16 16:45 ` [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=878rj7vbur.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=andrzej.hajda@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--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