Re: [Intel-gfx] [PATCH 3/6] drm/i915/dg1: map/unmap pll clocks

2020-10-22 Thread Lucas De Marchi
On Thu, Oct 22, 2020 at 04:22:01PM -0700, Matt Roper wrote: On Wed, Oct 21, 2020 at 01:20:31AM -0700, Lucas De Marchi wrote: +#define DG1_DPCLKA_CFGCR0_DDI_CLK_SEL_VAL_TO_ID(val, phy) \ + val) & DG1_DPCLKA_CFGCR0_DDI_CLK_SEL_MASK(phy)) >> ((phy % 2) * 2)) + (2 * (phy / 2))) This

Re: [Intel-gfx] [PATCH 3/6] drm/i915/dg1: map/unmap pll clocks

2020-10-22 Thread Matt Roper
On Wed, Oct 21, 2020 at 01:20:31AM -0700, Lucas De Marchi wrote: > DG1 uses 2 registers for the ddi clock mapping, with PHY A and B using > DPCLKA_CFGCR0 and PHY C and D using DPCLKA1_CFGCR0. Hide this behind a > single macro that chooses the correct register according to the phy > being accessed,

[Intel-gfx] [PATCH 3/6] drm/i915/dg1: map/unmap pll clocks

2020-10-21 Thread Lucas De Marchi
DG1 uses 2 registers for the ddi clock mapping, with PHY A and B using DPCLKA_CFGCR0 and PHY C and D using DPCLKA1_CFGCR0. Hide this behind a single macro that chooses the correct register according to the phy being accessed, use the correct bitfields for each pll/phy and implement separate functio