[PATCH v2 2/8] drm/i915/cdclk: Add and use mdclk_source_is_cdclk_pll()
Lucas De Marchi
lucas.demarchi at intel.com
Wed Mar 13 13:08:36 UTC 2024
On Tue, Mar 12, 2024 at 09:49:05AM -0700, Matt Roper wrote:
>On Tue, Mar 12, 2024 at 01:36:33PM -0300, Gustavo Sousa wrote:
>> Currently, only Xe2LPD uses CDCLK PLL as the source of MDCLK and
>> previous display IPs use the CD2XCLK. There will be changes in code
>> paths common to those platforms that will rely on which source is being
>> used. As such, let's make that information explicit with the addition of
>> the predicate function mdclk_source_is_cdclk_pll().
>>
>> Arguably, an enum could be created, but using a boolean should suffice
>> here, since we there are only two possible sources and the logic that
>> will rely on it will be very localized.
>>
>> In order to get the code into a more consistent state, let's also take
>> this opportunity to hook the selection of CDCLK_CTL's "MDCLK Source
>> Select" to that new function. Even though currently only
>> MDCLK_SOURCE_SEL_CDCLK_PLL will be returned, having this extra logic is
>> arguably better than keeping stuff untied and prone to bugs.
>>
>> v2:
>> - Extract mdclk_source_is_cdclk_pll() out of xe2lpd_mdclk_source_sel()
>> to make latter only about the register's field.
>>
>> Bspec: 69090
>
>You might also add 68861 here since that's where we find out that Xe2
I added this while applying.
thanks
Lucas De Marchi
More information about the Intel-gfx
mailing list