From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 6/6] drm/i915: Simplify xelpdp_is_only_pipe_per_dbuf_bank()
Date: Thu, 31 Oct 2024 17:56:46 +0200 [thread overview]
Message-ID: <20241031155646.15165-7-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20241031155646.15165-1-ville.syrjala@linux.intel.com>
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Implement xelpdp_is_only_pipe_per_dbuf_bank() in a slightly
more straightforward way.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/display/skl_watermark.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/skl_watermark.c b/drivers/gpu/drm/i915/display/skl_watermark.c
index 98f9e01b2a1c..d3bbf335c749 100644
--- a/drivers/gpu/drm/i915/display/skl_watermark.c
+++ b/drivers/gpu/drm/i915/display/skl_watermark.c
@@ -3256,19 +3256,19 @@ static bool xelpdp_is_only_pipe_per_dbuf_bank(enum pipe pipe, u8 active_pipes)
{
switch (pipe) {
case PIPE_A:
- return !(active_pipes & BIT(PIPE_D));
case PIPE_D:
- return !(active_pipes & BIT(PIPE_A));
+ active_pipes &= BIT(PIPE_A) | BIT(PIPE_D);
+ break;
case PIPE_B:
- return !(active_pipes & BIT(PIPE_C));
case PIPE_C:
- return !(active_pipes & BIT(PIPE_B));
+ active_pipes &= BIT(PIPE_B) | BIT(PIPE_C);
+ break;
default: /* to suppress compiler warning */
MISSING_CASE(pipe);
- break;
+ return false;
}
- return false;
+ return is_power_of_2(active_pipes);
}
static u32 pipe_mbus_dbox_ctl(const struct intel_crtc *crtc,
--
2.45.2
next prev parent reply other threads:[~2024-10-31 15:57 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-31 15:56 [PATCH 0/6] drm/i915: Sanitize MBUS joining Ville Syrjala
2024-10-31 15:56 ` [PATCH 1/6] drm/i915: Relocate the SKL wm sanitation code Ville Syrjala
2024-11-01 10:26 ` Jani Nikula
2024-10-31 15:56 ` [PATCH 2/6] drm/i915: Extract pipe_mbus_dbox_ctl() Ville Syrjala
2024-11-01 10:27 ` Jani Nikula
2024-10-31 15:56 ` [PATCH 3/6] drm/i915: Extract pipe_mbus_dbox_ctl_update() Ville Syrjala
2024-11-01 10:29 ` Jani Nikula
2024-11-01 13:46 ` Ville Syrjälä
2024-10-31 15:56 ` [PATCH 4/6] drm/i915: Extract mbus_ctl_join_update() Ville Syrjala
2024-11-01 10:30 ` Jani Nikula
2024-10-31 15:56 ` [PATCH 5/6] drm/i915: Sanitize MBUS joining Ville Syrjala
2024-11-01 10:39 ` Jani Nikula
2024-10-31 15:56 ` Ville Syrjala [this message]
2024-11-01 10:32 ` [PATCH 6/6] drm/i915: Simplify xelpdp_is_only_pipe_per_dbuf_bank() Jani Nikula
2024-11-04 7:33 ` ✓ Fi.CI.BAT: success for drm/i915: Sanitize MBUS joining Patchwork
2024-11-04 8:54 ` ✓ Fi.CI.IGT: " 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=20241031155646.15165-7-ville.syrjala@linux.intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/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