All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: jani.nikula@intel.com
Subject: [Intel-gfx] [PATCH v1 2/3] drm/i915/dsc: force full modeset whenever DSC is enabled at probe
Date: Thu, 13 Feb 2020 16:04:11 +0200	[thread overview]
Message-ID: <20200213140412.32697-3-stanislav.lisovskiy@intel.com> (raw)
In-Reply-To: <20200213140412.32697-1-stanislav.lisovskiy@intel.com>

From: Jani Nikula <jani.nikula@intel.com>

We lack full state readout of DSC config, which may lead to DSC enable
using a config that's all zeros, failing spectacularly. Force full
modeset and thus compute config at probe to get a sane state, until we
implement DSC state readout. Any fastset that did appear to work with
DSC at probe, worked by coincidence. [1] is an example of a change that
triggered the issue on TGL DSI DSC.

[1] http://patchwork.freedesktop.org/patch/msgid/20200212150102.7600-1-ville.syrjala@linux.intel.com

Cc: Manasi Navare <manasi.d.navare@intel.com>
Cc: Vandita Kulkarni <vandita.kulkarni@intel.com>
Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/display/intel_display.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 61ba1f2256a0..1e3f2cc27db8 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -17828,6 +17828,24 @@ static int intel_initial_commit(struct drm_device *dev)
 			 * have readout for pipe gamma enable.
 			 */
 			crtc_state->uapi.color_mgmt_changed = true;
+
+			/*
+			 * FIXME hack to force full modeset when DSC is being
+			 * used.
+			 *
+			 * As long as we do not have full state readout and
+			 * config comparison of crtc_state->dsc, we have no way
+			 * to ensure reliable fastset. Remove once we have
+			 * readout for DSC.
+			 */
+			if (crtc_state->dsc.compression_enable) {
+				ret = drm_atomic_add_affected_connectors(state,
+									 &crtc->base);
+				if (ret)
+					goto out;
+				crtc_state->uapi.mode_changed = true;
+				drm_dbg_kms(dev, "Force full modeset for DSC\n");
+			}
 		}
 	}
 
-- 
2.24.1.485.gad05a3d8e5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2020-02-13 14:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-13 14:04 [Intel-gfx] [PATCH v1 0/3] Fix modeset transitions related to DBuf Stanislav Lisovskiy
2020-02-13 14:04 ` [Intel-gfx] [PATCH v1 1/3] drm/i915: Ensure no conflicts with BIOS when updating Dbuf Stanislav Lisovskiy
2020-02-13 20:25   ` Matt Roper
2020-02-13 14:04 ` Stanislav Lisovskiy [this message]
2020-02-13 20:56   ` [Intel-gfx] [PATCH v1 2/3] drm/i915/dsc: force full modeset whenever DSC is enabled at probe Matt Roper
2020-02-13 21:03     ` Jani Nikula
2020-02-13 21:06       ` Matt Roper
2020-02-13 21:21         ` Jani Nikula
2020-02-13 14:04 ` [Intel-gfx] [PATCH v1 3/3] drm/i915: Force state->modeset=true when distrust_bios_wm==true Stanislav Lisovskiy
2020-02-13 21:08   ` Matt Roper
2020-02-13 16:39 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Fix modeset transitions related to DBuf Patchwork
2020-02-13 17:10 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-02-15 12:33 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2020-02-15 18:27 ` [Intel-gfx] [PATCH v1 0/3] " Jani Nikula

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=20200213140412.32697-3-stanislav.lisovskiy@intel.com \
    --to=stanislav.lisovskiy@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@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.