Skip to content

Commit bc2fdea

Browse files
committed
Merge tag 'drm-intel-fixes-2023-12-28' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
drm/i915 fixes for v6.7-rc8: - Fix bogus DPCD rev usage for DP phy test pattern setup - Fix handling of MMIO triggered reports in the OA buffer Signed-off-by: Dave Airlie <airlied@redhat.com> From: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/87cyuqk26k.fsf@intel.com
2 parents 610a9b8 + ee11d2d commit bc2fdea

File tree

2 files changed

+35
-6
lines changed

2 files changed

+35
-6
lines changed

drivers/gpu/drm/i915/display/intel_dp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4496,7 +4496,7 @@ static void intel_dp_process_phy_request(struct intel_dp *intel_dp,
44964496
intel_dp->train_set, crtc_state->lane_count);
44974497

44984498
drm_dp_set_phy_test_pattern(&intel_dp->aux, data,
4499-
link_status[DP_DPCD_REV]);
4499+
intel_dp->dpcd[DP_DPCD_REV]);
45004500
}
45014501

45024502
static u8 intel_dp_autotest_phy_pattern(struct intel_dp *intel_dp)

drivers/gpu/drm/i915/i915_perf.c

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -772,10 +772,6 @@ static int gen8_append_oa_reports(struct i915_perf_stream *stream,
772772
* The reason field includes flags identifying what
773773
* triggered this specific report (mostly timer
774774
* triggered or e.g. due to a context switch).
775-
*
776-
* In MMIO triggered reports, some platforms do not set the
777-
* reason bit in this field and it is valid to have a reason
778-
* field of zero.
779775
*/
780776
reason = oa_report_reason(stream, report);
781777
ctx_id = oa_context_id(stream, report32);
@@ -787,8 +783,41 @@ static int gen8_append_oa_reports(struct i915_perf_stream *stream,
787783
*
788784
* Note: that we don't clear the valid_ctx_bit so userspace can
789785
* understand that the ID has been squashed by the kernel.
786+
*
787+
* Update:
788+
*
789+
* On XEHP platforms the behavior of context id valid bit has
790+
* changed compared to prior platforms. To describe this, we
791+
* define a few terms:
792+
*
793+
* context-switch-report: This is a report with the reason type
794+
* being context-switch. It is generated when a context switches
795+
* out.
796+
*
797+
* context-valid-bit: A bit that is set in the report ID field
798+
* to indicate that a valid context has been loaded.
799+
*
800+
* gpu-idle: A condition characterized by a
801+
* context-switch-report with context-valid-bit set to 0.
802+
*
803+
* On prior platforms, context-id-valid bit is set to 0 only
804+
* when GPU goes idle. In all other reports, it is set to 1.
805+
*
806+
* On XEHP platforms, context-valid-bit is set to 1 in a context
807+
* switch report if a new context switched in. For all other
808+
* reports it is set to 0.
809+
*
810+
* This change in behavior causes an issue with MMIO triggered
811+
* reports. MMIO triggered reports have the markers in the
812+
* context ID field and the context-valid-bit is 0. The logic
813+
* below to squash the context ID would render the report
814+
* useless since the user will not be able to find it in the OA
815+
* buffer. Since MMIO triggered reports exist only on XEHP,
816+
* we should avoid squashing these for XEHP platforms.
790817
*/
791-
if (oa_report_ctx_invalid(stream, report)) {
818+
819+
if (oa_report_ctx_invalid(stream, report) &&
820+
GRAPHICS_VER_FULL(stream->engine->i915) < IP_VER(12, 50)) {
792821
ctx_id = INVALID_CTX_ID;
793822
oa_context_id_squash(stream, report32);
794823
}

0 commit comments

Comments
 (0)