Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/libgfxinit/+/44786 )
Change subject: gma registers: Allow to specify an offset for display registers ......................................................................
Patch Set 4:
(1 comment)
https://review.coreboot.org/c/libgfxinit/+/44786/3/common/hw-gfx-gma-registe... File common/hw-gfx-gma-registers.adb:
https://review.coreboot.org/c/libgfxinit/+/44786/3/common/hw-gfx-gma-registe... PS3, Line 214: return Reg'Enum_Rep + Config.Display_Base_Offset / Register_Width;
I can't see any. I've added a comment, though.
Oh, looks like the EMGD people already wrote the function we would need:
static bool IS_DISPLAYREG(u32 reg) { /* * This should make it easier to transition modules over to the * new register block scheme, since we can do it incrementally. */ if (reg >= VLV_DISPLAY_BASE) return false; if (reg >= RENDER_RING_BASE && reg < RENDER_RING_BASE + 0xff) return false; if (reg >= GEN6_BSD_RING_BASE && reg < GEN6_BSD_RING_BASE + 0xff) return false; if (reg >= BLT_RING_BASE && reg < BLT_RING_BASE + 0xff) return false; if (reg >= IPEIR_I965 && reg < HWSTAM) return false; if (reg >= GTFIFODBG && reg <= GTFIFODBG+0xff) return false; if (reg >= GEN7_GT_GFX_RC6_LOCKED_TO_RPN && reg <= GEN7_GT_GFX_RC6PP) return false; if (reg == RENDER_RC0_COUNTER) return false; if (reg == MEDIA_RC0_COUNTER) return false; if (reg == MI_MODE) return false; if (reg == GEN7_CXT_SIZE) return false; if (reg == GFX_MODE_GEN7) return false; if (reg == PGTBL_ER) return false; if (reg >= FENCE_REG_SANDYBRIDGE_0 && reg <= GFX_FLSH_CNTL_GEN6) { return false; } if (reg == RENDER_HWS_PGA_GEN7 || reg == BSD_HWS_PGA_GEN7 || reg == BLT_HWS_PGA_GEN7) return false; if (reg == GEN6_BSD_SLEEP_PSMI_CONTROL || reg == GEN6_BSD_RNCID) return false; if (reg == GEN6_BLITTER_ECOSKPD) return false; if (reg >= GEN6_RPNSWREQ && reg < GEN6_PMINTRMSK + 4) return false; if (reg >= 0x4000c && reg <= 0x4002c) return false; if (reg >= 0x4f000 && reg <= 0x4f08f) return false; if (reg >= 0x4f100 && reg <= 0x4f11f) return false; if (reg >= VLV_MASTER_IER && reg <= GEN6_PMIER) return false; if (reg >= FENCE_REG_SANDYBRIDGE_0 && reg < (FENCE_REG_SANDYBRIDGE_0 + (16 * 8))) return false; if (reg == FORCEWAKE_VLV || reg == FORCEWAKE_ACK_VLV || reg == 0x130090) return false; if (reg == GEN6_GDRST) return false; if (reg > 0x9400 && reg <= 0x9418) return false; switch (reg) { case _3D_CHICKEN3: case IVB_CHICKEN3: case GEN7_HALF_SLICE_CHICKEN1: case GEN7_COMMON_SLICE_CHICKEN1: case GEN7_L3CNTLREG1: case GEN7_L3_CHICKEN_MODE_REGISTER: case GEN7_ROW_CHICKEN2: case GEN7_L3SQCREG4: case GEN7_SQ_CHICKEN_MBCUNIT_CONFIG: case GEN6_MBCTL: case GEN6_UCGCTL2: case GEN7_UCGCTL4: case FORCEWAKE_MEDIA_VLV: case FORCEWAKE_ACK_MEDIA_VLV: case VLV_GTLC_PW_STATUS: return false; default: break; } return true; }
Yeah, no. That thing is huge.