From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH 2/4] drm/i915: Remove some local 'mode_changed' bools
Date: Thu, 20 Oct 2022 15:04:55 +0300 [thread overview]
Message-ID: <20221020120457.19528-3-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20221020120457.19528-1-ville.syrjala@linux.intel.com>
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
These 'mode_changed' booleans aren't very helpful. Just
replace them with direct intel_crtc_needs_modeset() calls
which is more descriptive.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/display/intel_display.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 0929fb8a4302..b6004b3e6684 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -4833,14 +4833,14 @@ static int intel_crtc_atomic_check(struct intel_atomic_state *state,
struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
struct intel_crtc_state *crtc_state =
intel_atomic_get_new_crtc_state(state, crtc);
- bool mode_changed = intel_crtc_needs_modeset(crtc_state);
int ret;
if (DISPLAY_VER(dev_priv) < 5 && !IS_G4X(dev_priv) &&
- mode_changed && !crtc_state->hw.active)
+ intel_crtc_needs_modeset(crtc_state) &&
+ !crtc_state->hw.active)
crtc_state->update_wm_post = true;
- if (mode_changed) {
+ if (intel_crtc_needs_modeset(crtc_state)) {
ret = intel_dpll_crtc_get_shared_dpll(state, crtc);
if (ret)
return ret;
@@ -4853,7 +4853,7 @@ static int intel_crtc_atomic_check(struct intel_atomic_state *state,
if (c8_planes_changed(crtc_state))
crtc_state->uapi.color_mgmt_changed = true;
- if (mode_changed ||
+ if (intel_crtc_needs_modeset(crtc_state) ||
intel_crtc_needs_fastset(crtc_state) ||
crtc_state->uapi.color_mgmt_changed) {
ret = intel_color_check(crtc_state);
@@ -4881,7 +4881,7 @@ static int intel_crtc_atomic_check(struct intel_atomic_state *state,
}
if (DISPLAY_VER(dev_priv) >= 9) {
- if (mode_changed ||
+ if (intel_crtc_needs_modeset(crtc_state) ||
intel_crtc_needs_fastset(crtc_state)) {
ret = skl_update_scaler_crtc(crtc_state);
if (ret)
@@ -6962,9 +6962,7 @@ static int intel_atomic_prepare_commit(struct intel_atomic_state *state)
return ret;
for_each_new_intel_crtc_in_state(state, crtc, crtc_state, i) {
- bool mode_changed = intel_crtc_needs_modeset(crtc_state);
-
- if (mode_changed ||
+ if (intel_crtc_needs_modeset(crtc_state) ||
intel_crtc_needs_fastset(crtc_state) ||
crtc_state->uapi.color_mgmt_changed) {
intel_dsb_prepare(crtc_state);
--
2.35.1
next prev parent reply other threads:[~2022-10-20 12:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-20 12:04 [Intel-gfx] [PATCH 0/4] drm/i915: Clean up crtc state flag checks Ville Syrjala
2022-10-20 12:04 ` [Intel-gfx] [PATCH 1/4] drm/i915: Introduce intel_crtc_needs_fastset() Ville Syrjala
2022-10-20 12:04 ` Ville Syrjala [this message]
2022-10-20 12:04 ` [Intel-gfx] [PATCH 3/4] drm/i915: Don't flag both full modeset and fastset at the same time Ville Syrjala
2022-10-20 12:04 ` [Intel-gfx] [PATCH 4/4] drm/i915: Introduce intel_crtc_needs_color_update() Ville Syrjala
2022-10-20 13:45 ` [Intel-gfx] [PATCH 0/4] drm/i915: Clean up crtc state flag checks Jani Nikula
2022-10-20 14:17 ` Ville Syrjälä
2022-10-20 15:02 ` Jani Nikula
2022-10-20 15:40 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for " Patchwork
2022-10-21 15:00 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Clean up crtc state flag checks (rev2) 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=20221020120457.19528-3-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