diff mbox series

[v2,2/3] INTEL_DII: drm/i915/pvc: Add PVC logical mapping for VDBOXs

Message ID 20220316233148.434177-3-lucas.demarchi@intel.com (mailing list archive)
State New, archived
Headers show
Series [v2,1/3] drm/i915: Fix renamed struct field | expand

Commit Message

Lucas De Marchi March 16, 2022, 11:31 p.m. UTC
From: Matthew Brost <matthew.brost@intel.com>

PVC has non-standard logical mapping for the VDBOXs, add support for the
correct mapping.

Signed-off-by: Matthew Brost <matthew.brost@intel.com>
---
 drivers/gpu/drm/i915/gt/intel_engine_cs.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/gt/intel_engine_cs.c b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
index 7a12192ff1d51..7f9cff011561c 100644
--- a/drivers/gpu/drm/i915/gt/intel_engine_cs.c
+++ b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
@@ -925,7 +925,13 @@  static void setup_logical_ids(struct intel_gt *gt, u8 *logical_ids, u8 class)
 	 * Logical to physical mapping is needed for proper support
 	 * to split-frame feature.
 	 */
-	if (MEDIA_VER_FULL(gt->i915) >= IP_VER(12, 50) &&
+	if (IS_PONTEVECCHIO(gt->i915) && class == VIDEO_DECODE_CLASS) {
+		static const u8 map[] = { 0, 2, 1 };
+
+		populate_logical_ids(gt, logical_ids, class,
+				     map, ARRAY_SIZE(map));
+
+	} else if (MEDIA_VER_FULL(gt->i915) >= IP_VER(12, 50) &&
 	    class == VIDEO_DECODE_CLASS) {
 		static const u8 map[] = { 0, 2, 4, 6, 1, 3, 5, 7 };