summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/i915')
-rw-r--r--drivers/gpu/drm/i915/display/intel_cdclk.c13
-rw-r--r--drivers/gpu/drm/i915/display/intel_dsb.c16
2 files changed, 11 insertions, 18 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_cdclk.c b/drivers/gpu/drm/i915/display/intel_cdclk.c
index 92e6fca861f6..0f2f693c78d4 100644
--- a/drivers/gpu/drm/i915/display/intel_cdclk.c
+++ b/drivers/gpu/drm/i915/display/intel_cdclk.c
@@ -1269,18 +1269,7 @@ static void skl_set_cdclk(struct intel_display *display,
static void skl_sanitize_cdclk(struct intel_display *display)
{
- u32 cdctl, expected, swf18;
-
- /*
- * check if the pre-os initialized the display
- * There is SWF18 scratchpad register defined which is set by the
- * pre-os which can be used by the OS drivers to check the status
- */
- swf18 = intel_de_read(display, SWF_ILK(0x18));
- if ((swf18 & 0x00FFFFFF) == 0) {
- drm_dbg_kms(display->drm, "Sanitizing CDCLK due to SWF18 0x%x\n", swf18);
- goto sanitize;
- }
+ u32 cdctl, expected;
intel_update_cdclk(display);
intel_cdclk_dump_config(display, &display->cdclk.hw, "Current CDCLK");
diff --git a/drivers/gpu/drm/i915/display/intel_dsb.c b/drivers/gpu/drm/i915/display/intel_dsb.c
index d9a270362a82..07d864039e82 100644
--- a/drivers/gpu/drm/i915/display/intel_dsb.c
+++ b/drivers/gpu/drm/i915/display/intel_dsb.c
@@ -589,10 +589,10 @@ static void intel_dsb_align_tail(struct intel_dsb *dsb)
tail = dsb->free_pos * 4;
aligned_tail = ALIGN(tail, CACHELINE_BYTES);
- if (aligned_tail > tail)
+ if (aligned_tail > tail) {
dsb_buffer_fill(dsb, dsb->free_pos, 0, aligned_tail - tail);
-
- dsb->free_pos = aligned_tail / 4;
+ dsb->free_pos = aligned_tail / 4;
+ }
}
static void intel_dsb_gosub_align(struct intel_dsb *dsb)
@@ -607,11 +607,15 @@ static void intel_dsb_gosub_align(struct intel_dsb *dsb)
/*
* Wa_16024917128
* "Ensure GOSUB is not placed in cacheline QW slot 6 or 7 (numbered 0-7)"
+ *
+ * Move to the next cacheline only for those two slots. The skipped
+ * bytes stay in the programmed range, so fill them with NOPs. Any
+ * other slot can take the GOSUB directly.
*/
- if (aligned_tail - tail <= 2 * 8)
+ if (aligned_tail - tail <= 2 * 8) {
dsb_buffer_fill(dsb, dsb->free_pos, 0, aligned_tail - tail);
-
- dsb->free_pos = aligned_tail / 4;
+ dsb->free_pos = aligned_tail / 4;
+ }
}
void intel_dsb_gosub(struct intel_dsb *dsb,