Skip to content

Commit 9276bcc

Browse files
rtauro1895rodrigovivi
authored andcommitted
drm/xe: Standardize power gate registers
Standardize power gate registers No functional changes v2: change commit message (Rodrigo) Signed-off-by: Riana Tauro <riana.tauro@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240524070916.143022-2-riana.tauro@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
1 parent 5c9464e commit 9276bcc

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

drivers/gpu/drm/xe/regs/xe_gt_regs.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -316,11 +316,9 @@
316316

317317
#define FORCEWAKE_GT XE_REG(0xa188)
318318

319-
#define PG_ENABLE XE_REG(0xa210)
320-
#define VD2_MFXVDENC_POWERGATE_ENABLE REG_BIT(8)
321-
#define VD2_HCP_POWERGATE_ENABLE REG_BIT(7)
322-
#define VD0_MFXVDENC_POWERGATE_ENABLE REG_BIT(4)
323-
#define VD0_HCP_POWERGATE_ENABLE REG_BIT(3)
319+
#define POWERGATE_ENABLE XE_REG(0xa210)
320+
#define VDN_HCP_POWERGATE_ENABLE(n) REG_BIT(3 + 2 * (n))
321+
#define VDN_MFXVDENC_POWERGATE_ENABLE(n) REG_BIT(4 + 2 * (n))
324322

325323
#define CTC_MODE XE_REG(0xa26c)
326324
#define CTC_SHIFT_PARAMETER_MASK REG_GENMASK(2, 1)

drivers/gpu/drm/xe/xe_gt_idle.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ void xe_gt_idle_disable_c6(struct xe_gt *gt)
202202
xe_device_assert_mem_access(gt_to_xe(gt));
203203
xe_force_wake_assert_held(gt_to_fw(gt), XE_FORCEWAKE_ALL);
204204

205-
xe_mmio_write32(gt, PG_ENABLE, 0);
205+
xe_mmio_write32(gt, POWERGATE_ENABLE, 0);
206206
xe_mmio_write32(gt, RC_CONTROL, 0);
207207
xe_mmio_write32(gt, RC_STATE, 0);
208208
}

drivers/gpu/drm/xe/xe_wa.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -238,11 +238,11 @@ static const struct xe_rtp_entry_sr gt_was[] = {
238238
},
239239
{ XE_RTP_NAME("14020316580"),
240240
XE_RTP_RULES(MEDIA_VERSION(1301)),
241-
XE_RTP_ACTIONS(CLR(PG_ENABLE,
242-
VD0_HCP_POWERGATE_ENABLE |
243-
VD0_MFXVDENC_POWERGATE_ENABLE |
244-
VD2_HCP_POWERGATE_ENABLE |
245-
VD2_MFXVDENC_POWERGATE_ENABLE)),
241+
XE_RTP_ACTIONS(CLR(POWERGATE_ENABLE,
242+
VDN_HCP_POWERGATE_ENABLE(0) |
243+
VDN_MFXVDENC_POWERGATE_ENABLE(0) |
244+
VDN_HCP_POWERGATE_ENABLE(2) |
245+
VDN_MFXVDENC_POWERGATE_ENABLE(2))),
246246
},
247247
{ XE_RTP_NAME("14019449301"),
248248
XE_RTP_RULES(MEDIA_VERSION(1301), ENGINE_CLASS(VIDEO_DECODE)),

0 commit comments

Comments
 (0)