First 3 commits are more or less independent from this RFC and pretty harmless "drive-by changes". For the others: my intention is to get rid of the never ending checks for platform to decide what to depending on the port and phy, conversions from port to phy, port to tc_port, etc. For that I decided to create a table-based initialization approach in which I keep the useful indexes for each platform: these indexes work similarly to what we have on the pll part. "enum port" is mostly a "driver thing" and when all the conversions take place, it would allow us to stop using the port as indexes to register or register bits. "enum tc_port", "enum phy", etc are not meaningful numbers from the spec POV and change with every other platform. I'm doing the conversion to use the new indexes, but the effort is paramount as the port <-> tc_port <-> phy, paired with the checks intel_phy_is_combo(), are everywhere, hence this RFC on the idea before I continue the conversions. Right now I'm keeping a intel_ddi_port_info inside intel_digital_port (see last commit). I first imagined I could ignore the dsi part and let it leave on its own world, but upon converting icl_dpclka_cfgcr0_clk_off() and icl_sanitize_encoder_pll_mapping() I noticed this is probably not true, since it re-uses the phy mapping. So, I would probably have to move the port_info to intel_encoder and make let the dsi init also fill it up or let the dsi init() call be part of the ddi init. IMO the latter is better, but pulls another great amount of work to complete. RFC: do you see other shortcomings? I think this provides a nice cleanup but others may disagree. Lucas De Marchi (9): drm/i915/display: nuke skl workaround for pre-production hw drm/i915/display: remove alias to dig_port drm/i915/display: prefer the more common dig_port name drm/i915/display: start description-based ddi initialization drm/i915/display: move icl to description-based ddi init drm/i915/display: description-based initialization for remaining ddi platforms drm/i915/display: add phy, vbt and ddi indexes drm/i915/display: refer to vbt info as vbt_port_info drm/i915/display: use port_info on intel_ddi_init drivers/gpu/drm/i915/display/intel_ddi.c | 93 +++---- drivers/gpu/drm/i915/display/intel_ddi.h | 8 +- drivers/gpu/drm/i915/display/intel_display.c | 232 ++++++++++++------ drivers/gpu/drm/i915/display/intel_display.h | 9 +- .../drm/i915/display/intel_display_power.c | 4 +- .../drm/i915/display/intel_display_types.h | 20 +- drivers/gpu/drm/i915/display/intel_dpio_phy.c | 38 +-- drivers/gpu/drm/i915/display/intel_hdmi.c | 20 +- 8 files changed, 269 insertions(+), 155 deletions(-) -- 2.24.0 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx